Power retail package generation method and system based on prompt-driven Transform model

Through the prompt-driven Transformer model, combined with historical data and user feedback, optimized the generation of power packages, the problem of low user satisfaction in the existing technology is solved, and more accurate user demand capture and package optimization is achieved.

CN119515425APending Publication Date: 2025-02-25GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411614475.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing power package generation methods are difficult to accurately capture subtle changes in user needs, and cannot deeply explore the potential needs and behavior patterns of users, resulting in low user satisfaction.

Method used

Using the prompt-driven Transformer model, by obtaining and preprocessing historical power packages, user purchase records, user feedback information and related policy information, the Transformer model is trained to generate candidate power packages, and optimize the packages through power sales company profits and user satisfaction.

Benefits of technology

It realizes intelligent power package generation, reduces manual decision-making pressure, optimizes package design and pricing strategies, and improves user satisfaction and profits of power sales companies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515425A_ABST
    Figure CN119515425A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of power retail package generation, and provides a power retail package generation method and system based on a prompt-driven Transform model, and the method comprises the steps: obtaining all historical power retail packages, package demand information, user purchase records, user feedback information and related policy information, the obtained data is preprocessed; calculating the profit of the electricity selling company and analyzing the user satisfaction; inputting historical power retail packages, package demand information, user purchase records, related policy information, profit of a power selling company and user satisfaction as data set samples into the constructed model for training to obtain a trained model; inputting target package demand information obtained in real time into the trained model to obtain candidate power retail packages, profits of power selling companies and user satisfaction; the candidate power retail package is optimized, the target power retail package is determined, and the pricing strategy of the power package is effectively optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power retail package generation, and in particular to a method and system for generating a power retail package based on a prompt-driven Transformer model. Background Art

[0002] With the development of technology and the market-oriented reform of the power industry, the traditional offline electricity purchase process is shifting to the online platform, and power retail has entered the information age. Reasonable power package settings are crucial to the competitiveness of enterprises and user satisfaction. In addition to ensuring the maximization of profits of power sales companies, reasonable power packages must also take policy guidance into consideration.

[0003] At present, traditional electricity package generation methods mainly rely on static pricing strategies and limited user data. These methods often fail to accurately capture subtle changes in user demand and are not adapted to the dynamics of the market. Some electricity retail package generation technologies use simple data analysis to optimize packages, but these analyses cannot deeply explore users' potential needs and behavior patterns, resulting in inaccurate analysis results, which leads to low user satisfaction with the generated electricity packages.

[0004] In view of this, a method and system for generating electricity retail packages based on a prompt-driven Transformer model is needed. Summary of the invention

[0005] The embodiments of the present application provide a method and system for generating a power retail package based on a prompt-driven Transformer model, which is used to solve the problem of low user satisfaction.

[0006] A first aspect of an embodiment of the present application provides a method for generating a power retail package based on a prompt-driven Transformer model, comprising:

[0007] Obtain all historical electricity retail packages, package demand information, user purchase records, user feedback information and relevant policy information, and perform data preprocessing on the acquired data information;

[0008] Calculate the profit of the power sales company based on the pre-processed historical electricity retail packages and user purchase records, and analyze user satisfaction based on the pre-processed user feedback information;

[0009] The preprocessed historical electricity retail packages, package demand information, user purchase records, relevant policy information, power sales company profits and user satisfaction are input as data set samples into the constructed Transformer model for training to obtain a trained Transformer model;

[0010] Input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction;

[0011] The candidate electricity retail packages are optimized based on the profit and user satisfaction of the electricity sales company, and a target electricity retail package is determined.

[0012] Furthermore, the calculation of the profit of the power sales company based on the pre-processed historical power retail packages and user purchase records, and the analysis of user satisfaction based on the pre-processed user feedback information, include:

[0013] Determine the user's electricity usage based on the pre-processed historical electricity retail packages and user purchase records, and use the package rules to calculate the profit of the electricity sales company;

[0014] The preprocessed user feedback information is input into the trained recurrent neural network model to predict the user satisfaction score.

[0015] Furthermore, the pre-processed user feedback information is input into the trained recurrent neural network model to predict the user satisfaction score, including:

[0016] Collect all historical feedback information of users who purchase retail packages, and determine the corresponding word vector based on the feedback information;

[0017] The word vector is input into the constructed recurrent neural network model for training, and a trained recurrent neural network model is obtained by adjusting and optimizing the model loss;

[0018] The preprocessed user feedback information is input into the trained recurrent neural network, and a satisfaction score between 0 and 1 is output.

[0019] Furthermore, the word vector is input into the constructed recurrent neural network model for training, and the trained recurrent neural network model is obtained by adjusting and optimizing the model loss, including:

[0020] Loss function:

[0021]

[0022] Where: y i represents the actual satisfaction label, p i is the satisfaction probability predicted by the model, and N is the number of samples.

[0023] Furthermore, the pre-processed electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction are input as data set samples into the constructed Transformer model for training, and a trained Transformer model is obtained, including:

[0024] Using the word vector corresponding to the package demand information as a query vector, and filtering a prompt vector from a constructed prompt pool based on the query vector, wherein the prompt pool includes all electricity retail packages, package demand information, and related policy information;

[0025] The query vector and the prompt vector are combined and input into the encoder of the Transformer model, and the feature vectors corresponding to the historical electricity retail packages and user purchase records are input into the decoder of the Transformer model to obtain a trained Transformer model.

[0026] Furthermore, the word vector corresponding to the package demand information is used as a query vector, and a prompt vector is screened from a constructed prompt pool based on the query vector, wherein the prompt pool includes all electricity retail packages, package demand information, and related policy information, including:

[0027] The prompt vector is selected by calculating the similarity between the word vector corresponding to the user demand information and the vector in the constructed prompt pool. The expression is as follows:

[0028]

[0029] Where: w i Represents the i-th word vector of demand N, k j represents the jth prompt vector in the prompt pool, ‖w i ‖ and ‖k j ‖ are the corresponding vector absolute values.

[0030] Furthermore, the optimizing the candidate electricity retail packages and determining the target electricity retail package by the profit and user satisfaction of the electricity sales company includes:

[0031] The six-year maximization of the electricity sales company and the maximization of user satisfaction are taken as the two optimization objectives as the Pareto optimal solution;

[0032] The profit and user satisfaction of the power sales company are compared with the Pareto optimal solution in the Pareto frontier, and the target power retail package is determined by updating the Pareto optimal solution.

[0033] A second aspect of an embodiment of the present application provides a system for generating a power retail package based on a prompt-driven Transformer model, including:

[0034] A data acquisition and preprocessing unit is used to acquire all historical electricity retail packages, package demand information, user purchase records, user feedback information, and relevant policy information, and to perform data preprocessing on the acquired data information;

[0035] A profit and user satisfaction determination unit of a power sales company, used to calculate the profit of the power sales company based on pre-processed historical power retail packages and user purchase records, and to analyze user satisfaction based on pre-processed user feedback information;

[0036] The Transformer model training unit is used to input the pre-processed historical electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction as data set samples into the constructed Transformer model for training to obtain a trained Transformer model;

[0037] A candidate electricity retail package determination unit is used to input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction;

[0038] The target electricity retail package determining unit is used to optimize the candidate electricity retail packages according to the profit and user satisfaction of the electricity sales company and determine the target electricity retail package.

[0039] A third aspect of the embodiments of the present application provides a computer device, including:

[0040] memories, transceivers, processors, and bus systems;

[0041] Wherein, the memory is used to store programs;

[0042] The processor is used to execute the program in the memory, including executing the above-mentioned method for generating a power retail package based on a prompt-driven Transformer model;

[0043] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0044] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute the above-mentioned method for generating a power retail package based on a prompt-driven Transformer model.

[0045] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0046] 1. Through the prompt-driven Transformer model, the intelligent generation of electricity packages is realized, which reduces the pressure of manual mathematical modeling, parameter debugging and decision-making. AI quickly generates package settings that meet the needs, effectively optimizes the design and pricing strategy of electricity packages, and provides enterprises with more competitive marketing strategies and product portfolios.

[0047] 2. The present invention takes the maximization of the profit of the power sales company and the maximization of user satisfaction as the optimization goals, and intelligently generates packages to meet a dynamic balance between the power sales party and the consumer. While increasing the company's profits, it also improves user loyalty and enhances user stickiness, fully considering the long-term development goals of the power sales company.

[0048] 3. The present invention provides more accurate and faster decision support for power retailers through intelligent decision-making of the Transformer model. The model can analyze a large amount of user data, learn and predict user behavior patterns, and help companies make more forward-looking and effective decisions. By more accurately understanding and predicting market demand, companies can reduce risks and losses caused by wrong decisions.

[0049] 4. The present invention can be adaptively adjusted and optimized according to market changes and user feedback. Enterprises can update the model at any time according to demand to maintain competitive advantage and adapt to the ever-changing market environment.

[0050] Other advantages, objectives, and features of the present invention will be set forth in part in the following description, and in part will be apparent to those skilled in the art based on an examination of the following or may be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flowchart of an embodiment of a method for generating a power retail package based on a prompt-driven Transformer model in the present invention;

[0052] Figure 2 This is a flow chart of sentiment analysis based on the RNN model in the present invention;

[0053] Figure 3 This is an example of the Pareto optimal solution in the present invention;

[0054] Figure 4 This is a flowchart of the prompt-driven Transformer model architecture in the present invention. DETAILED DESCRIPTION

[0055] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] Embodiment 1

[0057] The implementation method in this embodiment can be implemented in the system, can be implemented in the server, and can also be implemented in the terminal, and the specific implementation is not clearly limited. The following will introduce the method for generating a power retail package based on a prompt-driven Transformer model in this application from the perspective of system implementation. Figure 1 , the method provided in the embodiment of the present application comprises the following steps:

[0058] S11. Obtain all historical electricity retail packages, package demand information, user purchase records, user feedback information and relevant policy information, and perform data preprocessing on the acquired data information;

[0059] In this embodiment, all historical electricity retail packages are collected from the platform. All package data, including historical packages. Packages include optional purchase time, minimum purchase time of packages, whether buyers are allowed to unilaterally terminate the contract, electricity price type, transaction price type, transaction price, performance deposit kWh value, performance deposit minimum limit and other attributes. Each package contains different attributes. Package i is represented by p i ={(k1,v1),…,(k n ,v n ),…}, where k n Indicates the nth attribute in the package, v n Represents the corresponding value, for example, {(delivery time, 2024.06-2024.12), (minimum purchase time, 90), (transaction price, 0.18)}. The set of all packages is represented by p = {p1,…,p i ,…}.

[0060] Collect the specific requirements of each package i, either by documenting them when setting up the package or by manually annotating them. Denote the requirements of each package i as n i ={q1,…,q n,…}, for example: {delivery time can be selected, price should be cheap, users should use more electricity, early termination of package is not allowed}. The set of all package requirements is represented as: N = {n1,…,n n ,…}.

[0061] Collect data user purchase records from the platform, including package name, purchase time, purchase quantity, etc., and record user purchase behavior, such as whether it is the first purchase or renewal, whether there is a regular purchase pattern, etc. The data is represented by U.

[0062] Collect user evaluations of purchased packages and other feedback data, including user satisfaction, suggested improvements, etc., such as "This package is suitable for users with stable electricity consumption and high electricity consumption", "This package is too expensive and not recommended", "This package is very cost-effective". And the data is formatted as R = {r1,…,r i ,…;p j}, where r i represents the user's i-th comment or suggestion, p j Indicates the package i purchased by the user.

[0063] Data preprocessing can ensure the quality and consistency of data and provide a good foundation for subsequent model training. Data preprocessing includes:

[0064] 1. Splice the collected data to generate complete data in the format of {u, P, N, R};

[0065] 2. All data in the data set are represented by OneHot vectors, and the K-Means algorithm is used to filter out outliers, and the outliers are eliminated;

[0066] 3. Filter missing values ​​in the data set. Use mean, median, mode, etc. to fill in the missing values ​​for numerical data. Use KNN prediction to fill in the missing values ​​for other data. KNN uses Euclidean distance. The formula is as follows:

[0067]

[0068] Where: x 1k and x 1k They are two adjacent data respectively.

[0069] 4. Calculate the profit of the electricity sales company: According to the historical sales records of each package and the corresponding electricity consumption of the user, calculate the corresponding profit f1 according to the package rules and add it to the data set to get D =

[0070] {U,P,N,R;f1};

[0071] 5. Perform satisfaction analysis on the data in the dataset, and map the satisfaction value result to [0, 1], recorded as f2, and obtain D = {U, P, N, R; f1, f2};

[0072] 6. The data set is divided into K parts, and then divided using K-fold cross-validation.

[0073] S12. Calculate the profit of the power sales company based on the pre-processed historical power retail packages and user purchase records, and analyze user satisfaction based on the pre-processed user feedback information;

[0074] Specifically, here, the profit of the power sales company can be calculated based on the historical electricity retail packages and user purchase records. The profit of a single user can also be calculated for all users. The profit of a single user is calculated by calculating the basic profit based on the package price purchased by the user, and the basic profit and the profit of the excess electricity are added together to obtain the total profit contribution of the single user. The profit of all users can be calculated by summarizing the profit contributions of all users by time period such as month, quarter or year. In the process of summarization, some special circumstances and adjustment factors need to be considered, such as package discounts, preferential activities, arrears, etc.

[0075] Sentiment analysis is a key technology used to quantify user satisfaction with a service or product. In the electricity retail industry, user evaluation of purchased packages is an important indicator for measuring packages. However, the collected user evaluation of purchased packages is in text form and cannot be used directly, so sentiment analysis is needed to quantify user satisfaction. Figure 2 , Figure 2 The process of sentiment analysis of electricity user reviews using recurrent neural network (RNN) is demonstrated.

[0076] The preprocessed user feedback information is input into the trained recurrent neural network model to predict the user satisfaction score, including the following steps:

[0077] 1. Collect all historical feedback information of users who purchase retail packages, and determine the corresponding word vector based on the feedback information;

[0078] 2. Input the word vector into the constructed recurrent neural network model for training, and obtain the trained recurrent neural network model by adjusting and optimizing the model loss;

[0079] 3. Input the preprocessed user feedback information into the trained recurrent neural network and output a satisfaction score between 0 and 1.

[0080] The training data passes through the Embedding layer to generate word vectors that can capture the semantic information of the vocabulary;

[0081] Build the RNN model, use stochastic gradient descent (SGD) as the optimizer, and use the sigmoid function in the activation layer to ensure that the model output can be mapped to the satisfaction range of 0-1;

[0082] In the training phase, the word vector data generated by the Embedding layer is input into the RNN model. The model adjusts the weights by calculating the binary cross entropy loss. The specific loss function is defined as follows:

[0083]

[0084] Where: y i represents the actual satisfaction label, p i is the satisfaction probability predicted by the model, and N is the number of samples.

[0085] In order to improve the prediction accuracy, the model uses an adaptive learning rate optimizer (Adam) to adjust the learning rate during training to avoid overfitting. At the same time, by adjusting other hyperparameters (such as batch size and hidden layer size), the model performance is further improved.

[0086] After training is completed, the user's evaluation text on the purchased package is input into the model, and the model will output a satisfaction score between 0 and 1. This score will be used as the label F2 of the data in the dataset for the subsequent electricity package generation and optimization process.

[0087] In order to evaluate the performance of the model in predicting user satisfaction, a systematic experiment was designed and quantitatively verified. The experimental details are as follows:

[0088] Dataset division: The experiment used historical sales records of electricity packages and user feedback data. The dataset was divided into training set and test set in a ratio of 7:3.

[0089] Evaluation Metrics: The performance of the model is measured by accuracy, precision, recall, and F1 score. In order to quantify the error of the model in predicting satisfaction, we introduced the mean square error to measure the gap between the model output score and the true label.

[0090] Experimental results:

[0091] On the test set, the model achieved an accuracy of 92% and an F1 score of 0.89, indicating that the model can effectively distinguish between positive and negative reviews from users.

[0092] Through the measurement of mean square error, the average error of the model in satisfaction score is 0.03, indicating that the model can predict the user's satisfaction score more accurately.

[0093] S13. The pre-processed historical electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction are input as data set samples into the constructed Transformer model for training to obtain a trained Transformer model;

[0094] In this embodiment, step S13 further includes:

[0095] The word vector corresponding to the package demand information is used as a query vector, and a prompt vector is selected from the constructed prompt pool based on the query vector. The prompt pool includes all electricity retail packages, package demand information, and related policy information;

[0096] The query vector and the prompt vector are combined and input into the encoder of the Transformer model. At the same time, the feature vectors corresponding to the historical electricity retail packages and user purchase records are input into the decoder of the Transformer model to obtain a trained Transformer model.

[0097] like Figure 3 As shown, it can be broken down into the following steps:

[0098] 1. Standardize the numerical data in the power package P and user information U to reduce the imbalance caused by the large value gap between different attributes;

[0099] 2. Perform word segmentation on the text data in demand N, power package P, and user information U to obtain the word units of the text, and remove stop words according to the stop word list;

[0100] 3. The word elements and feature values ​​of demand N, power package P, and user information U are passed through the Embedding layer to obtain the corresponding word vectors;

[0101] 4. Use the word vector of requirement N as the query and select the highest scoring hint vector from the hint pool. The score matching function between each hint vector in the hint pool and the query vector is as follows:

[0102]

[0103] Where: w i Represents the i-th word vector of demand N, k j represents the jth prompt vector in the prompt pool, ‖w i ‖ and ‖k j ‖ are the corresponding vector absolute values.

[0104] 5. Combine the word vector with the prompt vector, add the mask tensor and input it into the Transformer encoder;

[0105] 6. Input the word vectors and feature values ​​of the electricity package P and user information U into the Transformer decoder;

[0106] 7. Train the Transformer. The output of the Transformer includes the profit f1 of the power sales company, the user satisfaction f2, and the package details. The results are evaluated based on the profit f1 and the user satisfaction f2.

[0107] 8. Repeat steps 1 to 7 until the mean absolute percentage error value reaches the threshold or the maximum number of cycles is reached.

[0108] S14. Input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction;

[0109] S15. Optimize candidate electricity retail packages based on the profits of electricity sales companies and user satisfaction, and determine the target electricity retail package.

[0110] In this embodiment, step S15 further includes:

[0111] The six-year maximization of the electricity sales company and the maximization of user satisfaction are taken as the two optimization objectives as the Pareto optimal solution;

[0112] The profits and user satisfaction of the power sales company are compared with the Pareto optimal solution in the Pareto frontier, and the target electricity retail package is determined by updating the Pareto optimal solution.

[0113] The evaluation objectives of power packages are to maximize the profits of power sales companies and maximize user satisfaction. However, these two optimization objectives are usually contradictory. Satisfying the objectives of one party will inevitably affect the objectives of the other party. Therefore, the Pareto optimal solution is used. Figure 4 , Figure 4 A set of Pareto optimal solutions is shown.

[0114] The two objectives (f1, f2) of the package generated by the power model are compared with the Pareto optimal solution in the Pareto frontier, and the Pareto optimal solution is updated. The Pareto frontier is expressed as in represents the profit of the nth solution on the Pareto front, where represents the user satisfaction of the nth solution on the Pareto front.

[0115] The present invention assumes an ideal optimal solution (F1, F2), and uses the mean absolute percentage error to represent the distance between the solution in the Pareto front and the optimal solution, and the calculation formula is as follows:

[0116]

[0117] Where: L is the mean absolute percentage error.

[0118] The above embodiment inputs the basic requirements of the package into the trained Transformer model, which will comprehensively consider the profit of the power sales company, user satisfaction and policy requirements to generate a series of candidate packages. Each package will be evaluated for its position on the Pareto frontier to ensure that the package provided strikes the best balance between the profit of the power sales company and user satisfaction. The power sales company makes a decision and selects the package that best suits the current market conditions and user needs.

[0119] Embodiment 2

[0120] An embodiment of a system for generating a power retail package based on a prompt-driven Transformer model in the present invention includes the following steps:

[0121] A data acquisition and preprocessing unit is used to acquire all historical electricity retail packages, package demand information, user purchase records, user feedback information, and relevant policy information, and to perform data preprocessing on the acquired data information;

[0122] A profit and user satisfaction determination unit of a power sales company, used to calculate the profit of the power sales company based on pre-processed historical power retail packages and user purchase records, and to analyze user satisfaction based on pre-processed user feedback information;

[0123] The Transformer model training unit is used to input the pre-processed historical electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction as data set samples into the constructed Transformer model for training to obtain a trained Transformer model;

[0124] The candidate electricity retail package determination unit is used to input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction;

[0125] The target electricity retail package determination unit is used to optimize candidate electricity retail packages through the profit of the electricity sales company and user satisfaction and determine the target electricity retail package.

[0126] Embodiment 3

[0127] The present invention provides a computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the above method are implemented.

[0128] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0129] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored. In addition, each functional unit in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.

[0131] It can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

Claims

1. A method for generating electricity retail packages based on a prompt-driven Transformer model, characterized in that: include: Obtain all historical electricity retail packages, package demand information, user purchase records, user feedback information and relevant policy information, and perform data preprocessing on the acquired data information; Calculate the profit of the power sales company based on the pre-processed historical electricity retail packages and user purchase records, and analyze user satisfaction based on the pre-processed user feedback information; The preprocessed historical electricity retail packages, package demand information, user purchase records, relevant policy information, power sales company profits and user satisfaction are input as data set samples into the constructed Transformer model for training to obtain a trained Transformer model; Input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction; The candidate electricity retail packages are optimized based on the profit and user satisfaction of the electricity sales company, and a target electricity retail package is determined.

2. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 1, characterized in that: The profit of the power sales company is calculated based on the pre-processed historical power retail packages and user purchase records, and the user satisfaction is analyzed based on the pre-processed user feedback information, including: Determine the user's electricity usage based on the pre-processed historical electricity retail packages and user purchase records, and use the package rules to calculate the profit of the electricity sales company; The preprocessed user feedback information is input into the trained recurrent neural network model to predict the user satisfaction score.

3. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 2, characterized in that: The pre-processed user feedback information is input into the trained recurrent neural network model to predict the user satisfaction score, including: Collect all historical feedback information of users who purchase retail packages, and determine the corresponding word vector based on the feedback information; The word vector is input into the constructed recurrent neural network model for training, and a trained recurrent neural network model is obtained by adjusting and optimizing the model loss; The preprocessed user feedback information is input into the trained recurrent neural network, and a satisfaction score between 0 and 1 is output.

4. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 3, characterized in that: The word vector is input into the constructed recurrent neural network model for training, and the trained recurrent neural network model is obtained by adjusting and optimizing the model loss, including: Loss function: Where: y i represents the actual satisfaction label, p i is the satisfaction probability predicted by the model, and N is the number of samples.

5. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 1, characterized in that: The pre-processed electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction are input as data set samples into the constructed Transformer model for training, and a trained Transformer model is obtained, including: Using the word vector corresponding to the package demand information as a query vector, and filtering a prompt vector from a constructed prompt pool based on the query vector, wherein the prompt pool includes all electricity retail packages, package demand information, and related policy information; The query vector and the prompt vector are combined and input into the encoder of the Transformer model, and the feature vectors corresponding to the historical electricity retail packages and user purchase records are input into the decoder of the Transformer model to obtain a trained Transformer model.

6. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 5, characterized in that: The word vector corresponding to the package demand information is used as a query vector, and a prompt vector is screened from a constructed prompt pool based on the query vector, wherein the prompt pool includes all electricity retail packages, package demand information, and related policy information, including: The prompt vector is selected by calculating the similarity between the word vector corresponding to the user demand information and the vector in the constructed prompt pool. The expression is as follows: Where: w i Represents the i-th word vector of demand N, k j represents the jth prompt vector in the prompt pool, ‖w i ‖ and ‖k j ‖ are the corresponding vector absolute values.

7. The method for generating a power retail package based on a prompt-driven Transformer model according to claim 1, characterized in that: The step of optimizing the candidate electricity retail packages and determining the target electricity retail package based on the profit and user satisfaction of the electricity sales company includes: The six-year maximization of the electricity sales company and the maximization of user satisfaction are taken as the two optimization objectives as the Pareto optimal solution; The profit and user satisfaction of the power sales company are compared with the Pareto optimal solution in the Pareto frontier, and the target power retail package is determined by updating the Pareto optimal solution.

8. A system for generating electricity retail packages based on a prompt-driven Transformer model, characterized in that: include: A data acquisition and preprocessing unit is used to acquire all historical electricity retail packages, package demand information, user purchase records, user feedback information, and relevant policy information, and to perform data preprocessing on the acquired data information; A profit and user satisfaction determination unit of a power sales company, used to calculate the profit of the power sales company based on pre-processed historical power retail packages and user purchase records, and to analyze user satisfaction based on pre-processed user feedback information; The Transformer model training unit is used to input the pre-processed historical electricity retail packages, package demand information, user purchase records, relevant policy information, profits of power sales companies and user satisfaction as data set samples into the constructed Transformer model for training to obtain a trained Transformer model; A candidate electricity retail package determination unit is used to input the target package demand information obtained in real time into the trained Transformer model to obtain the candidate electricity retail packages, the profit of the electricity sales company and the user satisfaction; The target electricity retail package determining unit is used to optimize the candidate electricity retail packages according to the profit and user satisfaction of the electricity sales company and determine the target electricity retail package.

9. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, including executing the method for generating a power retail package based on a prompt-driven Transformer model according to any one of claims 1 to 7; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

10. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, enable the computer to execute the method for generating a retail electricity package based on a prompt-driven Transformer model as claimed in any one of claims 1 to 7.