A method and device for processing an intelligent short message generation task
By constructing a keyword feature set and training a feedback prediction model, and combining it with a large language model for targeted fine-tuning of the SMS generation task, the problem of rigid SMS content was solved and the SMS feedback effect was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XINGYUN ZHIYU TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-19
AI Technical Summary
In existing SMS push services, content generation relies on manual writing or fixed templates, lacking systematic utilization of historical feedback data, resulting in rigid SMS content and failing to effectively improve feedback results.
Construct a set of keyword feature types and train a feedback prediction model. Combine this with a large language model to fine-tune the SMS generation task and optimize the keyword feature combination to generate natural and fluent SMS text.
It improves the problem of rigid SMS content and enhances SMS feedback. By optimizing keyword feature combinations, it increases the diversity and feedback effectiveness of SMS messages.
Smart Images

Figure CN122242472A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for processing intelligent SMS generation tasks. Background Technology
[0002] In the current SMS push service field, content generation mainly relies on manual writing or variable substitution based on fixed templates. Operations personnel combine various keywords (such as region, discounts, and time) based on experience to create SMS messages. This conventional model heavily depends on manual experience or fixed templates, lacks systematic utilization of historical feedback data, and easily leads to rigid SMS content and difficulty in discovering optimal feature combinations, thus failing to effectively improve SMS feedback.
[0003] To address the aforementioned issues, we propose an improved solution: 1) Construct a keyword feature type set (i.e., feature set X) to structure the SMS content, and design and train a feedback prediction model that can predict SMS feedback scores based on keyword feature vectors. Based on this prediction model, the optimal combination of keyword features can be selected from multiple combinations, using feedback as the selection criterion. 2) Select a Large Language Model (LLM) as the SMS generation model, and fine-tune its SMS generation task to enable it to generate natural and fluent SMS text based on the keyword text set corresponding to the optimized feature combination. The Natural Language Processing (NLP) capabilities of the SMS generation model can effectively improve the content diversity of SMS text. This improved solution not only addresses the problem of rigid SMS content but also enhances SMS feedback through optimized keyword feature combinations. How to specifically implement this improved solution is the technical problem this invention aims to solve. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a method, apparatus, electronic device, and computer-readable storage medium for intelligent SMS generation tasks. This invention configures a set of keyword feature types (i.e., feature set X) for an SMS push platform. It constructs a feedback prediction model to predict SMS feedback scores based on SMS keyword features; and builds a first dataset based on feature set X and historical SMS messages from the SMS push platform and their corresponding feedback scores; and trains the feedback prediction model based on the first dataset. It selects a general-purpose LLM model that has completed pre-training for large language models and general NLP tasks as the SMS generation model; configures a corresponding SMS generation instruction template for the SMS generation model; and constructs a second dataset based on feature set X and the first dataset; and fine-tunes the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset. After both the prediction and generation models have been trained, the system receives multiple candidate keyword text sets input by the SMS generator user. It then uses a feedback prediction model to predict the feedback score for each candidate keyword text set, selecting the set with the highest score as the preferred keyword text set. Based on the SMS generation instruction template and the preferred keyword text set, it generates an SMS generation instruction, inputs this instruction into the SMS generation model for processing, and finally outputs the SMS text to the current user. This invention can improve the problem of rigid SMS content and enhance SMS feedback effectiveness.
[0005] To achieve the above objectives, a first aspect of the present invention provides a method for processing intelligent SMS generation tasks, the method comprising: A keyword feature type set is configured for the SMS push platform to obtain a corresponding feature set X; the feature set X is the keyword feature type set used by the SMS push platform to generate SMS content; the feature set X includes multiple feature types x. i 1 ≤ index i ≤ N, where N is the total number of preset feature types; A feedback prediction model is constructed to predict SMS feedback scores based on SMS keyword features; a first dataset is constructed based on the feature set X and the historical SMS messages and their corresponding feedback scores of the SMS push platform; and the feedback prediction model is trained based on the first dataset; the feedback prediction model is used to predict SMS feedback scores based on the keyword feature vector Y input to the model and output the corresponding predicted score Z; the keyword feature vector Y is a multi-hot encoded vector and consists of N feature codes y i Composition; each of the said feature codes y i The encoding value is 0 or 1; the predicted score Z is a normalized score between 0 and 1; Select a general-purpose LLM model that has completed pre-training for large language models and general NLP tasks as the SMS generation model; configure a corresponding SMS generation instruction template for the SMS generation model; construct a second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset; the general-purpose NLP tasks include at least text generation, translation, and question answering tasks; the general-purpose LLM model includes at least the Wenxin sequence model, Qwen series models, GPT series models, and DeepSeek series models; After both the prediction model and the generation model have been trained, the SMS push platform receives multiple candidate keyword text sets input by the SMS generator user; each candidate keyword text set includes N keyword texts d. i The keyword text d i With the feature type x i One-to-one correspondence; The keyword feature vector Y corresponding to each candidate keyword text set is identified; and each identified keyword feature vector Y is input into the feedback prediction model to predict the corresponding prediction score Z; and the candidate keyword text set corresponding to the highest prediction score Z is taken as the corresponding preferred keyword text set. Based on the SMS generation instruction template and the preferred keyword text set, the model instruction is configured to obtain the corresponding SMS generation instruction; the SMS generation instruction is then input into the SMS generation model to process the SMS generation task; and the SMS text output by the model in this processing is fed back to the current user.
[0006] Preferably, the SMS push platform is an Internet and / or mobile Internet service platform used to provide targeted SMS text pushes to the corresponding SMS content subscribers; The first dataset includes multiple first data records; the first data record includes the original SMS text S, the keyword feature vector Y, and the tag score Z. tag The tag score Z tag It is a normalized score between 0 and 1; The SMS generation instruction template consists of an instruction requirement section, a keyword section, and a formatting requirement section; The instruction requires the text segment to be a fixed natural language text; the instruction requires the text segment to prompt the model to generate a natural and fluent SMS text containing all keyword content based on the keyword text information given in the keyword segment, and requires that the length of the generated SMS text does not exceed the preset maximum SMS length L. SMS The maximum SMS length L SMSIt is a preset positive integer; The keyword segment consists of a configurable segment title and a set of keyword entries; the text format of the segment title is fixed as "total number of keyword entries is U, where:", and the configurable parameter U is the total number of entries in the keyword entry set, 2≤U≤N; the keyword entry set consists of U configured keyword entries; each keyword entry corresponds to one of the feature types x. i Each keyword entry consists of a corresponding entry title and entry text; the text format of the entry title is fixed as "V:", and the configurable parameter V is the feature type x corresponding to the current keyword entry. i The type name; the entry text is a configured text message; The formatting requirement text is a fixed natural language text; the formatting requirement text is used to prompt the model to encapsulate and output the generated SMS text according to a preset SMS output format; the SMS output format is formed by sequentially connecting a preset start marker text, the SMS text generated by the model, and a preset end marker text. The second dataset includes multiple second data records; the second data records include a keyword text set C and a tag SMS text set S. tag The keyword text set C includes N keyword texts c. i The keyword text c i With the feature type x i One-to-one correspondence.
[0007] Preferably, the model input of the feedback prediction model is used to receive the keyword feature vector Y, and the model output is used to output the prediction score Z; The feedback prediction model includes an MLP model, a linear layer, and a Sigmoid function layer; The input of the MLP model is connected to the model input, and the output is connected to the input of the linear layer; the output of the linear layer is connected to the input of the Sigmoid function layer; the output of the Sigmoid function layer is connected to the model output. The MLP model is used to encode the keyword feature vector Y to obtain the corresponding feature vector H1, which is then sent to the linear layer. The feature vector H1 is calculated as follows: ; W1 and W2 are the first and second weight matrices of the model, b1 and b2 are the first and second bias vectors of the model; ReLU() is the ReLU activation function; The linear layer is used to perform feature scalar prediction based on the feature vector H1 to obtain the corresponding feature scalar H2 and send it to the Sigmoid function layer; The characteristic scalar H2 is calculated as follows: ; W3 and b3 are the third weight matrix and the third bias vector of the model; The Sigmoid function layer is used to substitute the feature scalar H2 into the Sigmoid function to calculate the normalized score and output the calculation result as the corresponding prediction score Z. The prediction score Z is calculated as follows: .
[0008] Preferably, the step of constructing the first dataset based on the feature set X and the historical SMS messages and their corresponding feedback scores of the SMS push platform specifically includes: Step 41: Collect big data from the historical SMS messages and their corresponding feedback scores of the SMS push platform to obtain the corresponding raw information set; The original information set includes multiple original information records; the original information records include the original SMS text S and the SMS feedback score; the SMS feedback score is a normalized score between 0 and 1. Step 42: The SMS feedback score of each of the original information records is used as a corresponding tag score Z. tag ; Step 43: Take the original SMS text S of each of the original information records as the corresponding current SMS text; and for all the feature types x of the feature set X. i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i The current feature type is used as the current feature type; and the current SMS text is used to identify whether it contains keywords that match the current feature type; if so, the corresponding feature code y is set. i Set the value to 1; otherwise, set the corresponding feature code y. i The value is 0; and at the end of this round of traversal, the value is encoded by all the obtained features y. i The corresponding keyword feature vector Y is formed; Step 44: The original SMS text S, the keyword feature vector Y, and the tag score Z corresponding to each of the original information records are used. tag A corresponding first data record is formed; and all the obtained first data records form the corresponding first dataset.
[0009] Preferably, training the feedback prediction model based on the first dataset specifically includes: Step 51: Based on a preset first segmentation ratio, the first dataset is randomly divided into two subsets, denoted as the first training set and the first evaluation set. Both the first training set and the first evaluation set consist of multiple first data records; The total number of records in the first training set is denoted as N. tr The total number of records in the first evaluation set is denoted as N. av ; The ratio N of the total number of records in the first training set to the total number of records in the first evaluation set tr :N av The first segmentation ratio is satisfied; The label scores Z of the first training set tag Record as the corresponding 1 ≤ index r ≤ N tr ; The label scores Z of the first evaluation set tag Record as the corresponding 1 ≤ index q ≤ N av ; Step 52: Input the keyword feature vector Y of each of the first data records in the first training set into the feedback prediction model for processing, and record the prediction score Z output by the model in this processing as the corresponding... ; and by each of the predicted scores and their corresponding tag ratings Form a corresponding first prediction-label pair; Step 53, obtain N tr Substituting the first prediction-label pair into the preset first model loss function L M1 The corresponding first loss value is obtained through calculation; Wherein, the first model loss function L M1 for: ; Step 54: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 55; if not, based on the preset first model optimizer, move towards making the first model loss function L... M1 The direction that reaches the minimum value modulates the model parameters of the feedback prediction model in one round, and returns to step 52 when the modulation ends; The first model optimizer includes the Adam optimizer and the SGD optimizer. Step 55: Input the keyword feature vector Y of each of the first data records in the first evaluation set into the feedback prediction model for processing, and record the predicted score Z output by the model in this processing as the corresponding... ; and by each of the predicted scores and their corresponding tag ratings Form a corresponding second prediction-label pair; and obtain N av The second prediction-label pair is substituted into the preset first model evaluation function F. M1 The corresponding first evaluation value is obtained through calculation; Wherein, the first model evaluation function F M1 for: ; Step 56: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 51; if it does, stop training and confirm that the training of the feedback prediction model is complete.
[0010] Preferably, constructing the second dataset based on the feature set X and the first dataset specifically includes: Step 61: Take each of the original SMS texts S in the first dataset as a corresponding tagged SMS text S. tag ; Step 62, transfer each of the tagged SMS text messages S ta As the corresponding current SMS text; and for all the feature types x of the feature set X. i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i The current feature type is used as the basis for identification; and the current SMS text is used to identify whether it contains keywords that match the current feature type. If so, the keyword text that matches the current feature type is extracted as the corresponding keyword text c. i If not, then set the corresponding keyword text c. i It is empty; and at the end of this round of traversal, it is determined by all the obtained keyword text c. i This constitutes the corresponding keyword text set C; Step 63, the text messages S containing the tags are generated by each tag. ta The keyword text set C and its corresponding text set form a corresponding second data record; and all the obtained second data records form the corresponding second dataset.
[0011] Preferably, the step of fine-tuning the SMS generation model based on the SMS generation instruction template and the second dataset specifically includes: Step 71: Divide the second dataset into multiple first data batches based on a preset batch size B; and take the first first data batch as the current data batch; Each of the first data batches includes B second data records; the tag SMS text S of each of the second data records in each of the first data batches ta Record as the corresponding 1 ≤ index g ≤ B; SMS text for each tag The total number of word segments is denoted as n. g Each of the aforementioned tag SMS texts Each word segment is recorded as its corresponding tag segmentation. 1 ≤ index o ≤ n g ; Step 72: Take each of the second data records in the current data batch as the current record; and take the non-empty keyword text c in the keyword text set C of the current record. i The extracted text segments form the corresponding current text set; the total number of keyword texts in the current text set is counted to obtain the corresponding current text total; and the keyword segments of the SMS generation instruction template are configured based on the current text set and the current text total, and the configured template text is used as the corresponding SMS generation instruction CMD. g ; and the SMS generation command CMD g The SMS generation model is input for processing, and the autoregressive text generation process of the SMS generation model during this processing is recorded; after the Bth model processing corresponding to the current data batch is completed, the preset second model loss function L is applied. M2 Calculate the corresponding second loss value; Wherein, the second model loss function L M2 for: ; For the tagged SMS text The word segmentation sequence preceding the o-th word; For the model in its autoregressive generation process, the SMS generation instruction CMD is used. g and word segmentation sequence The o-th segment generated for the context is the tag segment. The probability of; Step 73: Identify whether the second loss value meets the preset second loss value range; if not, then based on the preset second model optimizer, move towards making the second model loss function L... M2The direction that reaches the minimum value is used to modulate the model parameters of the SMS generation model in one round, and the process returns to step 72 after the modulation is completed. If the condition is met, it is identified whether the current data batch is the last first data batch. If not, the next first data batch is taken as the new current data batch and the process returns to step 72. If the condition is met, training is stopped and the training of the SMS generation model is confirmed to be complete. The second model optimizer includes at least the Adam optimizer, the SGD optimizer, and the AdamW optimizer.
[0012] Preferably, the step of identifying the keyword feature vector Y corresponding to each candidate keyword text set specifically includes: Each of the candidate keyword text sets is taken as the current text set; and for all feature types x of the feature set X... i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i As the current feature type; and for the keyword text d in the current text set that corresponds to the current feature type; i The system identifies whether the value is empty; if so, it sets the corresponding feature code y. i If the value is 0, then the corresponding feature code y is set to 0. i The value is 1; and at the end of this round of traversal, the feature code y is obtained from all the features. i The corresponding keyword feature vector Y is formed.
[0013] Preferably, the step of configuring the model instruction based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instruction specifically includes: The keyword text d that is not empty in the preferred keyword text set i Extract the relevant texts to form the current text set; count the total number of keyword texts in the current text set to obtain the total number of current texts; configure the keyword segments of the SMS generation instruction template based on the current text set and the total number of current texts, and use the configured template text as the corresponding SMS generation instruction.
[0014] A second aspect of the present invention provides an apparatus for implementing the intelligent SMS generation task processing method described in the first aspect above. The apparatus includes: a feature set configuration module, a prediction model construction and training module, a generation model selection and fine-tuning module, a data receiving module, a prediction optimization module, and an SMS generation module. The feature set configuration module is used to configure a set of keyword feature types for the SMS push platform to obtain a corresponding feature set X; the feature set X is a set of keyword feature types used by the SMS push platform to generate SMS content; the feature set X includes multiple feature types x. i 1 ≤ index i ≤ N, where N is the total number of preset feature types; The prediction model construction and training module is used to construct a feedback prediction model for predicting SMS feedback scores based on SMS keyword features; and to construct a first dataset based on the feature set X and the historical SMS messages and their corresponding feedback scores of the SMS push platform; and to train the feedback prediction model based on the first dataset; the feedback prediction model is used to predict SMS feedback scores based on the keyword feature vector Y input to the model and output the corresponding predicted score Z; the keyword feature vector Y is a multi-hot encoded vector and consists of N feature codes y i Composition; each of the said feature codes y i The encoding value is 0 or 1; the predicted score Z is a normalized score between 0 and 1; The generative model selection and fine-tuning module is used to select a general-purpose LLM that has completed pre-training of a large language model and a general NLP task as the SMS generation model; configure a corresponding SMS generation instruction template for the SMS generation model; construct a second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset; the general-purpose NLP task includes at least text generation, translation, and question answering tasks; the general-purpose LLM includes at least the Wenxin sequence model, Qwen series models, GPT series models, and DeepSeek series models; The data receiving module is used to receive multiple candidate keyword text sets input by the SMS generator user of the SMS push platform after both the prediction model and the generation model have been trained; each candidate keyword text set includes N keyword texts d i The keyword text d i With the feature type x i One-to-one correspondence; The prediction and optimization module is used to identify the keyword feature vector Y corresponding to each candidate keyword text set; and input each identified keyword feature vector Y into the feedback prediction model to predict and obtain the corresponding prediction score Z; and take the candidate keyword text set corresponding to the highest prediction score Z as the corresponding optimized keyword text set; The SMS generation module configures the model instructions based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instructions; it then inputs the SMS generation instructions into the SMS generation model to process the SMS generation task; and finally, it sends the SMS text output by the model to the current user.
[0015] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver; The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.
[0017] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing intelligent SMS generation tasks. As described above, this invention configures a keyword feature type set (i.e., feature set X) for an SMS push platform. A feedback prediction model is constructed to predict SMS feedback scores based on SMS keyword features. A first dataset is built based on feature set X and historical SMS messages from the SMS push platform and their corresponding feedback scores. The feedback prediction model is trained based on the first dataset. A general-purpose LLM model that has completed pre-training for large language models and general NLP tasks is selected as the SMS generation model. A corresponding SMS generation instruction template is configured for the SMS generation model. A second dataset is constructed based on feature set X and the first dataset. The SMS generation model is fine-tuned for SMS generation tasks based on the SMS generation instruction template and the second dataset. After both the prediction and generation models have been trained, the system receives multiple candidate keyword text sets input by the SMS generator user. It then uses a feedback prediction model to predict the feedback score for each candidate keyword text set, selecting the set with the highest score as the preferred keyword text set. Based on the SMS generation instruction template and the preferred keyword text set, it generates an SMS generation instruction, inputs this instruction into the SMS generation model for processing, and finally outputs the SMS text to the current user. This embodiment of the invention improves upon the problem of rigid SMS content and enhances the SMS feedback effect. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of a method for processing intelligent SMS generation tasks provided in Embodiment 1 of the present invention; Figure 2 This is a block diagram of the feedback prediction model provided in Embodiment 1 of the present invention; Figure 3 This is a module structure diagram of a processing device for intelligent SMS generation tasks provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0020] Embodiment 1 of the present invention provides a method for processing intelligent SMS generation tasks, such as... Figure 1 The diagram illustrates a method for processing intelligent SMS generation tasks according to Embodiment 1 of the present invention. This method mainly includes the following steps: Step 1: Configure the keyword feature type set for the SMS push platform to obtain the corresponding feature set X.
[0021] Here, the SMS push platform in this embodiment of the invention is an Internet and / or mobile Internet service platform used to provide targeted SMS text push to the corresponding SMS content subscribers.
[0022] In this embodiment of the invention, the feature set X is a set of keyword feature types used by the SMS push platform to generate SMS content; the feature set X includes multiple feature types x i 1 ≤ index i ≤ N, where N is the preset total number of feature types, and N ≥ 2. It should be noted that the specific type space of the feature set X in this embodiment of the invention should be specifically customized based on constraints such as the service objects and service scenarios of the SMS push platform. The specific value of the corresponding total number of feature types N is also determined by the specific customization, but it can be determined that N is a positive integer greater than or equal to 2; for example, if the service object is a telecommunications operator and the service scenario is a monthly bill push scenario, then the feature type x of feature set X... i It should include at least the user's number, billing date, billing amount, and detailed billing query URL.
[0023] Step 2: Construct a feedback prediction model for predicting SMS feedback scores based on SMS keyword features; and construct a first dataset based on feature set X and historical SMS messages and their corresponding feedback scores from the SMS push platform; and train the feedback prediction model based on the first dataset.
[0024] Specifically, this includes: Step 21, constructing a feedback prediction model for predicting SMS feedback scores based on SMS keyword features.
[0025] Here, the feedback prediction model in this embodiment of the invention is used to predict SMS feedback scores based on the keyword feature vector Y input to the model and output the corresponding predicted score Z. The keyword feature vector Y is a multi-hot encoded vector, consisting of N feature codes y. i Composition; each feature encodes y i The encoding value is either 0 or 1. The predicted score Z is a normalized score between 0 and 1.
[0026] like Figure 2 As shown in the module structure diagram of the feedback prediction model provided in Embodiment 1 of the present invention, the model input end of the feedback prediction model is used to receive the keyword feature vector Y, and the model output end is used to output the prediction score Z.
[0027] like Figure 2 As shown, the model components of the feedback prediction model include: an MLP model, a linear layer, and a Sigmoid function layer.
[0028] like Figure 2 As shown, the connection relationships of the model components in the feedback prediction model are as follows: the input end of the MLP model is connected to the model input end, and the output end is connected to the input end of the linear layer; the output end of the linear layer is connected to the input end of the Sigmoid function layer; and the output end of the Sigmoid function layer is connected to the model output end.
[0029] The functionality of the model components in the feedback prediction model is shown below.
[0030] 1) MLP model: The MLP model in this embodiment of the invention is used to encode the keyword feature vector Y to obtain the corresponding feature vector H1, which is then sent to the linear layer.
[0031] Here, the feature vector H1 in this embodiment of the invention is calculated as follows: ; Where W1 and W2 are the first and second weight matrices of the model, b1 and b2 are the first and second bias vectors of the model, and ReLU() is the ReLU activation function.
[0032] 2) Linear layer: In this embodiment of the invention, the linear layer is used to perform feature scalar prediction based on feature vector H1 to obtain the corresponding feature scalar H2, which is then sent to the Sigmoid function layer.
[0033] Here, the characteristic scalar H2 in this embodiment of the invention is calculated as follows: ; Where W3 and b3 are the third weight matrix and the third bias vector of the model.
[0034] 3) Sigmoid function layer: In this embodiment of the invention, the Sigmoid function layer is used to substitute the feature scalar H2 into the Sigmoid function to calculate the normalized score and output the calculation result as the corresponding prediction score Z.
[0035] Here, the calculation method for the prediction score Z in this embodiment of the invention is as follows: .
[0036] Step 22: Construct the first dataset based on feature set X and historical SMS messages from the SMS push platform and their corresponding feedback scores.
[0037] Here, the first dataset in this embodiment of the invention includes multiple first data records. Each first data record includes the original SMS text S, keyword feature vector Y, and tag score Z. tag Tag rating Z tag It is a normalized score between 0 and 1.
[0038] The current step 22 specifically includes: Step 221: Collect big data from historical SMS messages and their corresponding feedback scores on the SMS push platform to obtain the corresponding raw information set.
[0039] Here, the original information set in this embodiment of the invention includes multiple original information records; the original information records include the original SMS text S and the SMS feedback score; the SMS feedback score is a normalized score between 0 and 1.
[0040] It's important to note that most SMS push platforms have SMS feedback statistics mechanisms. The statistical objects of feedback are customized based on the SMS scenario. To facilitate qualitative analysis of feedback effectiveness, the feedback statistics are generally normalized and scored. For example, if an SMS push platform serves a manufacturer of a certain brand's products, and the service scenario is to promote a new product to the brand's users, and the new product promotion SMS includes a website for querying product information, then one feedback statistics mechanism for this new product promotion SMS would be: to count the total number of times the new product promotion SMS was sent, to count the total number of times the website for querying product information corresponding to the new product promotion SMS was accessed, and then to calculate the feedback score, i.e., the SMS feedback rating, based on the ratio of the total number of accesses to the total number of messages sent.
[0041] Step 222: Use the SMS feedback score of each original information record as a corresponding tag score Z. tag .
[0042] Step 223: Take the original SMS text S of each original information record as the corresponding current SMS text; and for all feature types x of feature set X... i Perform one round of traversal; and during this round of traversal, change the feature type x of the current traversal. i The current feature type is used as the basis for identification; the current SMS text is then checked for keywords that match the current feature type; if so, the corresponding feature code y is set. i Set the value to 1; otherwise, set the corresponding feature code y. i The value is 0; and at the end of this round of traversal, the value is encoded by all the features obtained. i This forms the corresponding keyword feature vector Y.
[0043] Step 224 involves analyzing the original SMS text S, keyword feature vector Y, and tag score Z corresponding to each original information record. tag A corresponding first data record is formed; and all the obtained first data records form the corresponding first dataset.
[0044] Step 23: Train the feedback prediction model based on the first dataset.
[0045] Specifically, it includes: Step 231: Based on the preset first segmentation ratio, the first dataset is randomly divided into two subsets, denoted as the first training set and the first evaluation set.
[0046] Here, the first segmentation ratio in this embodiment of the invention is a pre-set ratio parameter, such as 8:2. Both the first training set and the first evaluation set in this embodiment of the invention consist of multiple first data records. The total number of records in the first training set is denoted as N. tr The total number of records in the first evaluation set is denoted as N. av The ratio N of the total number of records in the first training set to the total number of records in the first evaluation set. tr :N av The first segmentation ratio is satisfied.
[0047] It should be noted that the Z-scores for each label in the first training set... tag Record as the corresponding 1 ≤ index r ≤ N tr The ratings Z for each label in the first evaluation set. tag Record as the corresponding 1 ≤ index q ≤ N av .
[0048] Step 232: Input the keyword feature vector Y of each first data record in the first training set into the feedback prediction model for processing, and record the prediction score Z output by the model in this processing as the corresponding... ; and by each prediction score and their corresponding tag ratings Form a corresponding first prediction-label pair.
[0049] Step 233, obtain N tr Each first prediction-label pair is substituted into the preset first model loss function L. M1 The corresponding first loss value is obtained through calculation.
[0050] Here, the first model loss function L in this embodiment of the invention M1 for: .
[0051] Step 234: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 235; if not, based on the preset first model optimizer, move towards making the first model loss function L... M1 The direction that reaches the minimum value modulates the model parameters of the feedback prediction model in one round, and returns to step 232 when the modulation ends.
[0052] Here, the first loss value range in this embodiment of the invention is a pre-set numerical range. The first model optimizer includes the Adam optimizer and the SGD optimizer.
[0053] Step 235: Input the keyword feature vector Y of each first data record in the first evaluation set into the feedback prediction model for processing, and record the prediction score Z output by the model in this processing as the corresponding... ; and by each prediction score and their corresponding tag ratings Form a corresponding second prediction-label pair; and obtain N av Each second prediction-label pair is substituted into the preset first model evaluation function F. M1 The corresponding first evaluation value is obtained through calculation.
[0054] Here, the first model evaluation function F in this embodiment of the invention M1 for: .
[0055] Step 236: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 231; if it does, stop training and confirm that the training of the prediction model of the feedback prediction model is complete.
[0056] Here, the first evaluation value range of this embodiment of the invention is a pre-set numerical range.
[0057] Step 3: Select a general LLM model that has completed pre-training of a large language model and a general NLP task as the SMS generation model; configure the corresponding SMS generation instruction template for the SMS generation model; construct the second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for the SMS generation task based on the SMS generation instruction template and the second dataset.
[0058] Specifically, it includes: Step 31: Select a general LLM model that has completed pre-training for both large language models and general NLP tasks as the SMS generation model.
[0059] Here, the general NLP tasks in this embodiment of the invention include at least text generation, translation, and question answering tasks. The general LLM in this embodiment of the invention includes at least text-centric sequence models, Qwen series models, GPT series models, and DeepSeek series models.
[0060] Step 32: Configure the corresponding SMS generation instruction template for the SMS generation model.
[0061] Here, the SMS generation instruction template of this embodiment of the invention consists of an instruction requirement section, a keyword section, and a formatting requirement section. Wherein: The instruction requires the text segment to be a fixed piece of natural language text. The instruction requires the text segment to prompt the model to generate a natural and fluent SMS text containing all the keywords, based on the given keyword text information. The generated SMS text must not exceed the preset maximum SMS length L. SMS Here, the maximum SMS length L in this embodiment of the invention is... SMS It is a preset positive integer, for example, L in Chinese text messages. SMS It was set to 70.
[0062] It should be noted that the specific text content of the instruction required in the embodiments of the present invention can be customized based on application requirements or the developer's language habits. For example, "Please generate a text message based on the following keyword information, which should be natural and fluent, contain all keyword content, and the text message length should not exceed 70 characters."
[0063] A keyword segment consists of a configurable segment title and a set of keyword entries. The segment title has a fixed text format: "Total number of keyword entries is U, where:", where the configurable parameter U is the total number of entries in the keyword entry set, 2 ≤ U ≤ N. The keyword entry set consists of U configured keyword entries. Each keyword entry corresponds to a feature type x. i Each keyword entry consists of a corresponding entry title and entry text. The text format of the entry title is fixed as "V:", and the configurable parameter V is the feature type x corresponding to the current keyword entry.i The type name; the entry text is a configuration text message.
[0064] For example, set the keyword segment as: The total number of keyword entries is 4, of which: Region: City A Product: xx mobile phone Price: 300 off for purchases over 3000 Promotion: Limited-time flash sale The formatting requirement is a fixed natural language text segment; the formatting requirement is used to prompt the model to encapsulate and output the generated SMS text according to the preset SMS output format; the SMS output format is composed of the preset start marker text, the SMS text generated by the model, and the preset end marker text connected in sequence.
[0065] It should be noted that the specific text content of the formatting requirement segment in this embodiment of the invention can be customized based on application requirements or the developer's language habits. For example, the starting marker text is set to " <sms> The end marker text is set to "".< / sms> The formatting requirement is that the text should be set to "Please place the generated SMS text in..." <sms> and< / sms> Output only within the specified space, without including any other content.
[0066] Step 33: Construct the second dataset based on the feature set X and the first dataset.
[0067] Here, the second dataset in this embodiment of the invention includes multiple second data records; the second data records include a keyword text set C and a tag SMS text S. tag The keyword text set C includes N keyword texts. i Keyword text c i With feature type x i One-to-one correspondence.
[0068] The current step 33 specifically includes: Step 331: Take each original SMS text S in the first dataset as a corresponding tagged SMS text S tag .
[0069] Step 332, transfer the text messages S of each tag to the appropriate text message. ta As the corresponding current SMS text; and for all feature types x of feature set X. i Perform one round of traversal; and during this round of traversal, change the feature type x of the current traversal. i The current feature type is used as the basis for identification; the current SMS text is then checked for keywords that match the current feature type; if so, the keyword text matching the current feature type is extracted and used as the corresponding keyword text c. iIf not, set the corresponding keyword text c. i It is empty; and at the end of this round of traversal, it is determined by all the keyword texts c obtained. i This forms the corresponding keyword text set C.
[0070] Step 333, from each tag SMS text S ta The corresponding second data record is formed by the text set C containing the keywords; and the second dataset is formed by all the obtained second data records.
[0071] Step 34: Fine-tune the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset.
[0072] Specifically, it includes: Step 341: Divide the second dataset into multiple first data batches based on the preset batch size B; and take the first first data batch as the current data batch.
[0073] Here, the batch size B in this embodiment of the invention is a pre-set positive integer.
[0074] Each first data batch in this embodiment of the invention includes B second data records. The tag SMS text S of each second data record in each first data batch... ta Record as the corresponding 1 ≤ index g ≤ B. It should be noted that the text messages for each tag... The total number of word segments is denoted as n. g Text messages with various tags Each word segment is recorded as its corresponding tag segmentation. 1 ≤ index o ≤ n g .
[0075] Step 342: Take each second data record of the current data batch as the current record; and take the non-empty keyword text c from the keyword text set C of the current record. i Extract the relevant text to form the current text set; count the total number of keyword texts in the current text set to obtain the total number of current texts; configure the keyword segments of the SMS generation command template based on the current text set and the total number of current texts, and use the configured template text as the corresponding SMS generation command CMD. g ; and generate SMS command CMD g The input SMS generation model is processed, and the autoregressive text generation process of the SMS generation model is recorded during this processing. After the Bth model processing corresponding to the current data batch is completed, the preset second model loss function L is applied. M2 Calculate the corresponding second loss value.
[0076] Here, the second model loss function L in this embodiment of the invention M2 for: .
[0077] in, Tag SMS text The word segmentation sequence preceding the o-th word; The model uses SMS generation instructions (CMD) during its autoregressive generation process. g and word segmentation sequence The o-th segment generated for the context is the tag segment. The probability of.
[0078] Step 343: Identify whether the second loss value meets the preset range of the second loss value; if not, then based on the preset second model optimizer, move towards making the second model loss function L... M2 The direction that reaches the minimum value modulates the model parameters of the SMS generation model in one round, and returns to step 342 after the end of this round of modulation; if satisfied, it is identified whether the current data batch is the last first data batch; otherwise, the next first data batch is taken as the new current data batch and the process returns to step 342; if yes, training is stopped and the training of the SMS generation model is confirmed to be complete.
[0079] Here, the second loss value range in this embodiment of the invention is a pre-set numerical range. The second model optimizer includes at least the Adam optimizer, the SGD optimizer, and the AdamW optimizer.
[0080] Step 4: After both the prediction model and the generation model have been trained, receive a set of multiple candidate keyword texts input by the SMS generator user from the SMS push platform.
[0081] Here, each candidate keyword text set in this embodiment of the invention includes N keyword texts d. i Keyword text d i With feature type x i One-to-one correspondence.
[0082] It should be noted that the multiple candidate keyword text sets here are keyword text sets with various combinations of features targeting the same promotional goal. Each candidate keyword text set corresponds to a different promotional strategy.
[0083] For example, given a feature set X containing 6 types of features: region, product, price, promotional method, time, and brand. The current promotional activity is: on [Date] at [Location], a promotion will be launched for brand Q's new product Q. newA limited-time price reduction promotion will be implemented, with a promotional price of J. Based on different promotional focuses, multiple candidate keyword text sets will be generated, such as: Candidate keyword text set 1 focusing on regional and price characteristics: Region (P), Product (Q) new Price (J), Promotion (empty), Time (empty), Brand (Q).
[0084] The second set of candidate keyword texts, focusing on regional, promotional methods and time characteristics, is: Region (P), Product (), Price (), Promotion (limited-time price reduction), Time (YYYY year MM month DD), Brand (Q).
[0085] Step 5: Identify the keyword feature vector Y corresponding to each candidate keyword text set; input each identified keyword feature vector Y into the feedback prediction model to predict the corresponding prediction score Z; and take the candidate keyword text set corresponding to the highest prediction score Z as the corresponding preferred keyword text set.
[0086] Specifically, it includes: Step 51: Identify the keyword feature vector Y corresponding to each candidate keyword text set.
[0087] Specifically, this includes: using each candidate keyword text set as the current text set; and processing all feature types x of feature set X. i Perform one round of traversal; and during this round of traversal, change the feature type x of the current traversal. i As the current feature type; and for the keyword text d in the current text set that corresponds to the current feature type. i The system identifies whether an element is empty; if so, it sets the corresponding feature code y. i Set the value to 0; otherwise, set the corresponding feature code y. i The value is 1; and at the end of this round of traversal, the y encoding is determined by all the obtained features. i This forms the corresponding keyword feature vector Y.
[0088] Step 52: Input the identified keyword feature vectors Y into the feedback prediction model to obtain the corresponding prediction score Z.
[0089] Step 53, and take the candidate keyword text set corresponding to the highest predicted score Z as the corresponding preferred keyword text set.
[0090] Step 6: Configure the model instructions based on the SMS generation instruction template and the selected keyword text set to obtain the corresponding SMS generation instructions; input the SMS generation instructions into the SMS generation model to process the SMS generation task; and send the SMS text output by the model in this processing to the current user.
[0091] Specifically, it includes: Step 61: Configure the model instructions based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instructions.
[0092] Specifically, this includes: selecting non-empty keyword texts d from the preferred keyword text set. i Extract the relevant texts to form the current text set; count the total number of keyword texts in the current text set to obtain the total number of current texts; configure the keyword segments of the SMS generation instruction template based on the current text set and the total number of current texts, and use the configured template text as the corresponding SMS generation instruction.
[0093] Step 62: Input the SMS generation instruction into the SMS generation model to process the SMS generation task; and send the SMS text output by the model in this processing back to the current user.
[0094] Figure 3 This is a module structure diagram of a processing device for intelligent SMS generation tasks provided in Embodiment 2 of the present invention. This device can be a terminal device or server implementing the aforementioned method embodiments, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiments. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 3 As shown, the device includes: a feature set configuration module 201, a prediction model construction and training module 202, a generation model selection and fine-tuning module 203, a data receiving module 204, a prediction optimization module 205, and an SMS generation module 206.
[0095] Feature set configuration module 201 is used to configure the keyword feature type set for the SMS push platform to obtain the corresponding feature set X; feature set X is the keyword feature type set used by the SMS push platform to generate SMS content; feature set X includes multiple feature types x i 1 ≤ index i ≤ N, where N is the total number of preset feature types.
[0096] The prediction model construction and training module 202 is used to construct a feedback prediction model for predicting SMS feedback scores based on SMS keyword features; and to construct a first dataset based on feature set X and historical SMS messages and their corresponding feedback scores from the SMS push platform; and to train the feedback prediction model based on the first dataset; the feedback prediction model is used to predict SMS feedback scores based on the keyword feature vector Y input to the model and output the corresponding predicted score Z; the keyword feature vector Y is a multi-hot encoded vector and consists of N feature codes y i Composition; each feature encodes y i The encoding value is 0 or 1; the predicted score Z is a normalized score between 0 and 1.
[0097] The generative model selection and fine-tuning module 203 is used to select a general-purpose LLM that has completed pre-training of a large language model and a general NLP task as the SMS generation model; configure the corresponding SMS generation instruction template for the SMS generation model; construct a second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for the SMS generation task based on the SMS generation instruction template and the second dataset; the general-purpose NLP task includes at least text generation task, translation task, and question answering task; the general-purpose LLM includes at least the Wenxin sequence model, Qwen series model, GPT series model, and DeepSeek series model.
[0098] The data receiving module 204 is used to receive multiple candidate keyword text sets input by the SMS generator user from the SMS push platform after both the prediction model and the generative model have been trained; each candidate keyword text set includes N keyword texts d i Keyword text d i With feature type x i One-to-one correspondence.
[0099] The prediction and optimization module 205 is used to identify the keyword feature vector Y corresponding to each candidate keyword text set; and input each identified keyword feature vector Y into the feedback prediction model to predict the corresponding prediction score Z; and take the candidate keyword text set corresponding to the highest prediction score Z as the corresponding optimized keyword text set.
[0100] The SMS generation module 206 configures the model instructions based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instructions; inputs the SMS generation instructions into the SMS generation model to process the SMS generation task; and feeds back the SMS text output by the model in this processing to the current user.
[0101] The intelligent SMS generation task processing device provided in this embodiment of the invention can execute the method steps in the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.
[0102] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the feature set configuration module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0103] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-on-a-Chip (SOC).
[0104] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).
[0105] Figure 4 This is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. Figure 4 As shown, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for performing various processing functions and implementing the processing steps described in the foregoing embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.
[0106] exist Figure 4The system bus 305 mentioned can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include Non-Volatile Memory, such as at least one disk storage device.
[0107] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0108] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.
[0109] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing intelligent SMS generation tasks. As described above, this invention configures a keyword feature type set (i.e., feature set X) for an SMS push platform. A feedback prediction model is constructed to predict SMS feedback scores based on SMS keyword features. A first dataset is built based on feature set X and historical SMS messages from the SMS push platform and their corresponding feedback scores. The feedback prediction model is trained based on the first dataset. A general-purpose LLM model that has completed pre-training for large language models and general NLP tasks is selected as the SMS generation model. A corresponding SMS generation instruction template is configured for the SMS generation model. A second dataset is constructed based on feature set X and the first dataset. The SMS generation model is fine-tuned for SMS generation tasks based on the SMS generation instruction template and the second dataset. After both the prediction and generation models have been trained, the system receives multiple candidate keyword text sets input by the SMS generator user. It then uses a feedback prediction model to predict the feedback score for each candidate keyword text set, selecting the set with the highest score as the preferred keyword text set. Based on the SMS generation instruction template and the preferred keyword text set, it generates an SMS generation instruction, inputs this instruction into the SMS generation model for processing, and finally outputs the SMS text to the current user. This embodiment of the invention improves upon the problem of rigid SMS content and enhances the SMS feedback effect.
[0110] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0111] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for processing intelligent SMS generation tasks, characterized in that, The method includes: A keyword feature type set is configured for the short message push platform to obtain a corresponding feature set X; the feature set X is a keyword feature type set used by the short message push platform to generate short message content; the feature set X includes a plurality of feature types x i , 1≤index i≤N, N is a total number of preset feature types; A feedback prediction model is constructed for predicting the feedback score of a short message according to the keyword features of the short message; a first data set is constructed based on the feature set X and the historical short messages and their corresponding feedback scores of the short message pushing platform; the feedback prediction model is trained based on the first data set; the feedback prediction model is used for predicting the feedback score of a short message according to the keyword feature vector Y input by the model and outputting the corresponding predicted score Z; the keyword feature vector Y is a multi-hot encoding vector and is composed of N feature encodings y i Each feature encoding y i has a coding value of 0 or 1; the predicted score Z is a normalized score between 0 and 1. Select a general-purpose LLM model that has completed pre-training for large language models and general NLP tasks as the SMS generation model; configure a corresponding SMS generation instruction template for the SMS generation model; construct a second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset; the general-purpose NLP tasks include at least text generation, translation, and question answering tasks; the general-purpose LLM model includes at least the Wenxin sequence model, Qwen series models, GPT series models, and DeepSeek series models; After both the prediction model and the generation model have been trained, the SMS push platform receives multiple candidate keyword text sets input by the SMS generator user; each candidate keyword text set includes N keyword texts d. i The keyword text d i With the feature type x i One-to-one correspondence; The keyword feature vector Y corresponding to each candidate keyword text set is identified; and each identified keyword feature vector Y is input into the feedback prediction model to predict the corresponding prediction score Z; and the candidate keyword text set corresponding to the highest prediction score Z is taken as the corresponding preferred keyword text set. Based on the SMS generation instruction template and the preferred keyword text set, the model instruction is configured to obtain the corresponding SMS generation instruction; the SMS generation instruction is then input into the SMS generation model to process the SMS generation task; and the SMS text output by the model in this processing is fed back to the current user.
2. The method for processing intelligent SMS generation tasks according to claim 1, characterized in that, The SMS push platform is a type of internet and / or mobile internet service platform used to provide targeted SMS text messages to the corresponding SMS content subscribers. The first dataset includes multiple first data records; the first data record includes the original SMS text S, the keyword feature vector Y, and the tag score Z. tag The tag score Z tag It is a normalized score between 0 and 1; The SMS generation instruction template consists of an instruction requirement section, a keyword section, and a formatting requirement section; The instruction requires the text segment to be a fixed natural language text; the instruction requires the text segment to prompt the model to generate a natural and fluent SMS text containing all keyword content based on the keyword text information given in the keyword segment, and requires that the length of the generated SMS text does not exceed the preset maximum SMS length L. SMS The maximum SMS length L SMS It is a preset positive integer; The keyword segment consists of a configurable segment title and a set of keyword entries; the text format of the segment title is fixed as "Total number of keyword entries is U, where:", where the configurable parameter U is the total number of entries in the keyword entry set, 2≤U≤N; the keyword entry set consists of U configured keyword entries; each keyword entry corresponds to one of the feature types x. i Each keyword entry consists of a set of corresponding entry titles and entry text; the text format of the entry title is fixed as "V:", and the configurable parameter V is the feature type x corresponding to the current keyword entry. i The type name; the entry text is a configured text message; The formatting requirement text is a fixed natural language text; the formatting requirement text is used to prompt the model to encapsulate and output the generated SMS text according to a preset SMS output format; the SMS output format is formed by sequentially connecting a preset start marker text, the SMS text generated by the model, and a preset end marker text. The second dataset includes multiple second data records; the second data records include a keyword text set C and a tag SMS text set S. tag The keyword text set C includes N keyword texts c. i The keyword text c i With the feature type x i One-to-one correspondence.
3. The method for processing intelligent SMS generation tasks according to claim 1, characterized in that, The model input of the feedback prediction model is used to receive the keyword feature vector Y, and the model output is used to output the prediction score Z. The feedback prediction model includes an MLP model, a linear layer, and a Sigmoid function layer; The input of the MLP model is connected to the model input, and the output is connected to the input of the linear layer; the output of the linear layer is connected to the input of the Sigmoid function layer; the output of the Sigmoid function layer is connected to the model output. The MLP model is used to encode the keyword feature vector Y to obtain the corresponding feature vector H1, which is then sent to the linear layer. The feature vector H1 is calculated as follows: ; W1 and W2 are the first and second weight matrices of the model, b1 and b2 are the first and second bias vectors of the model; ReLU() is the ReLU activation function; The linear layer is used to perform feature scalar prediction based on the feature vector H1 to obtain the corresponding feature scalar H2 and send it to the Sigmoid function layer; The characteristic scalar H2 is calculated as follows: ; W3 and b3 are the third weight matrix and the third bias vector of the model; The Sigmoid function layer is used to substitute the feature scalar H2 into the Sigmoid function to calculate the normalized score and output the calculation result as the corresponding prediction score Z. The prediction score Z is calculated as follows: 。 4. The method for processing intelligent SMS generation tasks according to claim 2, characterized in that, The construction of the first dataset based on the feature set X and the historical SMS messages and their corresponding feedback scores of the SMS push platform specifically includes: Step 41: Collect big data from the historical SMS messages and their corresponding feedback scores of the SMS push platform to obtain the corresponding raw information set; The original information set includes multiple original information records; the original information records include the original SMS text S and the SMS feedback score; the SMS feedback score is a normalized score between 0 and 1. Step 42: The SMS feedback score of each of the original information records is used as a corresponding tag score Z. tag ; Step 43: Take the original SMS text S of each of the original information records as the corresponding current SMS text; and for all the feature types x of the feature set X. i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i The current feature type is used as the current feature type; and the current SMS text is used to identify whether it contains keywords that match the current feature type; if so, the corresponding feature code y is set. i Set the value to 1; otherwise, set the corresponding feature code y. i The value is 0; and at the end of this round of traversal, the value is encoded by all the obtained features y. i The corresponding keyword feature vector Y is formed; Step 44: The original SMS text S, the keyword feature vector Y, and the tag score Z corresponding to each of the original information records are used. tag A corresponding first data record is formed; and all the obtained first data records form the corresponding first dataset.
5. The method for processing intelligent SMS generation tasks according to claim 2, characterized in that, The step of training the feedback prediction model based on the first dataset specifically includes: Step 51: Based on a preset first segmentation ratio, the first dataset is randomly divided into two subsets, denoted as the first training set and the first evaluation set. Both the first training set and the first evaluation set consist of multiple first data records; The total number of records in the first training set is denoted as N. tr The total number of records in the first evaluation set is denoted as N. av ; The ratio N of the total number of records in the first training set to the total number of records in the first evaluation set tr :N av The first segmentation ratio is satisfied; The label scores Z of the first training set tag Record as the corresponding 1 ≤ index r ≤ N tr ; The label scores Z of the first evaluation set tag Record as the corresponding 1 ≤ index q ≤ N av ; Step 52: Input the keyword feature vector Y of each of the first data records in the first training set into the feedback prediction model for processing, and record the prediction score Z output by the model in this processing as the corresponding... ; and by each of the predicted scores and their corresponding tag ratings Form a corresponding first prediction-label pair; Step 53, obtain N tr Substituting the first prediction-label pair into the preset first model loss function L M1 The corresponding first loss value is obtained through calculation; Wherein, the first model loss function L M1 for: ; Step 54: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 55; if not, based on the preset first model optimizer, move towards making the first model loss function L... M1 The direction that reaches the minimum value modulates the model parameters of the feedback prediction model in one round, and returns to step 52 when the modulation ends; The first model optimizer includes the Adam optimizer and the SGD optimizer. Step 55: Input the keyword feature vector Y of each of the first data records in the first evaluation set into the feedback prediction model for processing, and record the predicted score Z output by the model in this processing as the corresponding... ; and by each of the predicted scores and their corresponding tag ratings Form a corresponding second prediction-label pair; and obtain N av The second prediction-label pair is substituted into the preset first model evaluation function F. M1 The corresponding first evaluation value is obtained through calculation; Wherein, the first model evaluation function F M1 for: ; Step 56: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 51; if it does, stop training and confirm that the training of the feedback prediction model is complete.
6. The method for processing intelligent SMS generation tasks according to claim 2, characterized in that, The construction of the second dataset based on the feature set X and the first dataset specifically includes: Step 61: Take each of the original SMS texts S in the first dataset as a corresponding tagged SMS text S. tag ; Step 62, transfer each of the tagged SMS text messages S ta As the corresponding current SMS text; and for all the feature types x of the feature set X. i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i The current feature type is used as the basis for identification; and the current SMS text is used to identify whether it contains keywords that match the current feature type. If so, the keyword text that matches the current feature type is extracted as the corresponding keyword text c. i If not, then set the corresponding keyword text c. i It is empty; and at the end of this round of traversal, it is determined by all the obtained keyword text c. i This constitutes the corresponding keyword text set C; Step 63, the text messages S containing the tags are generated by each tag. ta The keyword text set C and its corresponding text set form a corresponding second data record; and all the obtained second data records form the corresponding second dataset.
7. The method for processing intelligent SMS generation tasks according to claim 2, characterized in that, The fine-tuning of the SMS generation model based on the SMS generation instruction template and the second dataset specifically includes: Step 71: Divide the second dataset into multiple first data batches based on a preset batch size B; and take the first first data batch as the current data batch; Each of the first data batches includes B second data records; the tag SMS text S of each of the second data records in each of the first data batches ta Record as the corresponding 1 ≤ index g ≤ B; SMS text for each tag The total number of word segments is denoted as n. g Each of the aforementioned tag SMS texts Each word segment is recorded as its corresponding tag segmentation. 1 ≤ index o ≤ n g ; Step 72: Take each of the second data records in the current data batch as the current record; and take the non-empty keyword text c in the keyword text set C of the current record. i The extracted text segments form the corresponding current text set; the total number of keyword texts in the current text set is counted to obtain the corresponding current text total; and the keyword segments of the SMS generation instruction template are configured based on the current text set and the current text total, and the configured template text is used as the corresponding SMS generation instruction CMD. g ; and the SMS generation command CMD g The SMS generation model is input for processing, and the autoregressive text generation process of the SMS generation model during this processing is recorded; after the Bth model processing corresponding to the current data batch is completed, the preset second model loss function L is applied. M2 Calculate the corresponding second loss value; Wherein, the second model loss function L M2 for: ; For the tagged SMS text The word segmentation sequence preceding the o-th word; For the model in its autoregressive generation process, the SMS generation instruction CMD is used. g and word segmentation sequence The o-th segment generated for the context is the tag segment. The probability of; Step 73: Identify whether the second loss value meets the preset second loss value range; if not, then based on the preset second model optimizer, move towards making the second model loss function L... M2 The direction that reaches the minimum value is used to modulate the model parameters of the SMS generation model in one round, and the process returns to step 72 after the modulation is completed. If the condition is met, it is identified whether the current data batch is the last first data batch. If not, the next first data batch is taken as the new current data batch and the process returns to step 72. If the condition is met, training is stopped and the training of the SMS generation model is confirmed to be complete. The second model optimizer includes at least the Adam optimizer, the SGD optimizer, and the AdamW optimizer.
8. The method for processing intelligent SMS generation tasks according to claim 1, characterized in that, The step of identifying the keyword feature vector Y corresponding to each candidate keyword text set specifically includes: Each of the candidate keyword text sets is taken as the current text set; and for all feature types x of the feature set X... i Perform one round of traversal; and during this round of traversal, change the currently traversed feature type x. i As the current feature type; and for the keyword text d in the current text set that corresponds to the current feature type; i The system identifies whether the value is empty; if so, it sets the corresponding feature code y. i If the value is 0, then the corresponding feature code y is set to 0. i The value is 1; and at the end of this round of traversal, the feature code y is obtained from all the features. i The corresponding keyword feature vector Y is formed.
9. The method for processing intelligent SMS generation tasks according to claim 1, characterized in that, The step of configuring the model instruction based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instruction specifically includes: The keyword text d that is not empty in the preferred keyword text set i Extract the relevant texts to form the current text set; count the total number of keyword texts in the current text set to obtain the total number of current texts; configure the keyword segments of the SMS generation instruction template based on the current text set and the total number of current texts, and use the configured template text as the corresponding SMS generation instruction.
10. An apparatus for performing the processing method for generating intelligent text messages according to any one of claims 1-9, characterized in that, The device includes: a feature set configuration module, a prediction model construction and training module, a generation model selection and fine-tuning module, a data receiving module, a prediction optimization module, and an SMS generation module; The feature set configuration module is used to configure a set of keyword feature types for the SMS push platform to obtain a corresponding feature set X; the feature set X is a set of keyword feature types used by the SMS push platform to generate SMS content; the feature set X includes multiple feature types x. i 1 ≤ index i ≤ N, where N is the total number of preset feature types; The prediction model construction and training module is used to construct a feedback prediction model for predicting SMS feedback scores based on SMS keyword features; and to construct a first dataset based on the feature set X and the historical SMS messages and their corresponding feedback scores of the SMS push platform; and to train the feedback prediction model based on the first dataset; the feedback prediction model is used to predict SMS feedback scores based on the keyword feature vector Y input to the model and output the corresponding predicted score Z; the keyword feature vector Y is a multi-hot encoded vector and consists of N feature codes y i Composition; each of the said feature codes y i The encoding value is 0 or 1; the predicted score Z is a normalized score between 0 and 1; The generative model selection and fine-tuning module is used to select a general-purpose LLM that has completed pre-training of a large language model and a general NLP task as the SMS generation model; configure a corresponding SMS generation instruction template for the SMS generation model; construct a second dataset based on the feature set X and the first dataset; and fine-tune the SMS generation model for SMS generation tasks based on the SMS generation instruction template and the second dataset; the general-purpose NLP task includes at least text generation, translation, and question answering tasks; the general-purpose LLM includes at least the Wenxin sequence model, Qwen series models, GPT series models, and DeepSeek series models; The data receiving module is used to receive multiple candidate keyword text sets input by the SMS generator user of the SMS push platform after both the prediction model and the generation model have been trained; each candidate keyword text set includes N keyword texts d i The keyword text d i With the feature type x i One-to-one correspondence; The prediction and optimization module is used to identify the keyword feature vector Y corresponding to each candidate keyword text set; and input each identified keyword feature vector Y into the feedback prediction model to predict and obtain the corresponding prediction score Z; and take the candidate keyword text set corresponding to the highest prediction score Z as the corresponding optimized keyword text set; The SMS generation module configures the model instructions based on the SMS generation instruction template and the preferred keyword text set to obtain the corresponding SMS generation instructions; it then inputs the SMS generation instructions into the SMS generation model to process the SMS generation task; and finally, it sends the SMS text output by the model to the current user.
11. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-9; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-9.