Electric power spot transaction decision generation method and device based on AI, medium and program product
By introducing large-language model and load prediction model of AI technology into the power spot trading decision system, the problem that existing systems fail to deeply explore and comprehensively analyze data is solved, and accurate and real-time decision-making support for power spot trading is achieved, improving the Responsiveness to market changes.
Patent Information
- Application Number
- CN202411229244.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-13
AI Technical Summary
The existing power spot trading decision-making system fails to deeply explore and comprehensively analyze historical transaction data and external data, resulting in insufficient use of information and being unable to respond quickly to market changes, and lacks flexibility and adaptability.
Adopt AI-based large language model and load prediction model to obtain and process electricity spot market data, generate real-time decision-making suggestions, use natural language models to quickly process real-time data, dynamically adjust the model to deal with market and policy changes, improve prediction accuracy and Decision-making efficiency.
It realizes in-depth mining and comprehensive analysis of massive data, improves the accuracy and timeliness of electricity spot trading decisions, reduces data acquisition and processing costs, and enhances the adaptability and responsiveness of the decision-making system.
Smart Images

Figure CN119130519A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power spot trading, and in particular to a method, device, medium and program product for generating power spot trading decisions based on AI. Background Art
[0002] At present, electricity spot trading is in a rapid development stage. How to provide decision support for electricity spot trading is of great research significance.
[0003] Electricity spot trading is an important part of the electricity market, which needs to consider factors such as market prices, supply and demand, and weather forecasts. Traditional decision-making systems often rely on rules and experience, lack flexibility and adaptability, and fail to conduct in-depth mining and comprehensive analysis of a large amount of historical transaction data, power grid operation data, and external related data (such as meteorological and economic data), missing a lot of valuable information. In addition, the existing decision-making system cannot respond to the rapid changes in the market in a timely manner, and it is difficult to quickly adjust the decision-making strategy under the new market situation and policy environment.
[0004] Existing technical solutions also include using AI (Artificial Intelligence) technology to assist decision-making in electricity spot trading, but these technical solutions are often complicated in terms of the acquisition and processing of data information. Summary of the invention
[0005] The first objective of the present invention is to provide an AI-based method for generating electricity spot trading decisions with simple data information acquisition, high real-time performance and accurate prediction.
[0006] The second object of the present invention is to provide a computer device for implementing the above-mentioned method for generating AI-based electricity spot trading decisions.
[0007] The third object of the present invention is to provide a computer-readable storage medium for implementing the above-mentioned method for generating AI-based electricity spot trading decisions.
[0008] A fourth object of the present invention is to provide a computer program product for implementing the above-mentioned method for generating AI-based electricity spot trading decisions.
[0009] In order to achieve the first purpose mentioned above, the present invention provides a method for generating decisions on power spot trading based on AI, which includes the following steps: continuously acquiring power spot market data through a preset large language model, and processing to obtain basic data; processing the basic data according to a preset load forecasting model, and outputting load forecasting data; obtaining a decision request; processing the decision request through a preset large language model in combination with the currently set question template, basic data and load forecasting data, and generating a decision suggestion. The present invention can provide users with accurate and real-time power spot trading decision suggestions, and improve transaction efficiency and benefits.
[0010] It can be seen from the above scheme that the present invention solves the problem that the existing spot power trading decision system fails to conduct in-depth mining and comprehensive analysis of existing data, and misses a lot of valuable information. It introduces artificial intelligence technology, and through the study of massive historical data, discovers the nonlinear relationship between electricity, price and various influencing factors, thereby improving the accuracy of prediction. In addition, the present invention solves the problem that the existing spot power trading decision system cannot quickly respond to new market conditions and policy environments. By introducing a natural language model, real-time data can be quickly processed without setting up a crawler, and the cost of purchasing data and manual collection can be avoided. There is no need to develop an additional news consultation module, and the pre-processed data has high real-time performance, which improves the timeliness and adaptability of decision-making.
[0011] A further solution is that the preset big language model is trained based on the pre-trained big language model, which specifically includes the following steps: obtaining electricity spot trading decision-making needs; obtaining electricity spot market training data; preprocessing the electricity spot market training data; extracting key features from the preprocessed electricity spot market training data; obtaining the pre-trained big language model, and training it in combination with the electricity spot trading decision-making needs, the electricity spot market training data and the key features; and obtaining the preset big language model after adjusting the pre-trained big language model according to the training evaluation results.
[0012] It can be seen that the present invention utilizes the open source pre-trained large language model training to carry out targeted training in the field of power spot trading, which can improve the model training efficiency.
[0013] A further solution is to process the basic data according to a preset load forecasting model, and when outputting the load forecasting data, it includes processing the basic data through feature engineering, and then predicting through a target prediction algorithm to obtain the load forecasting data.
[0014] A further solution is to process the basic data through feature engineering, including outlier processing and feature selection.
[0015] It can be seen that the effect of short-term load forecasting can be improved.
[0016] A further solution is to determine prediction error information based on electricity spot market data and adjust the target preset algorithm based on the prediction error information.
[0017] A further solution is that the target prediction algorithm is one of the following: Xgboost, LGBM, Catboost, Randomforest, CNN, BPNN, Decisi ontree, KNN, SVR, MA.
[0018] It can be seen that different budget algorithms can be adjusted dynamically to improve the prediction effect.
[0019] A further solution is to further include: obtaining a question template to be updated; and adjusting the question template currently set in the preset large language model according to the question template to be updated.
[0020] It can be seen from this that the preset large language model can be updated by adjusting the question template to respond to new market conditions and policy environments. That is, only the question template needs to be modified, and there is no need to perform operations such as code modification and deployment upgrade operations, thereby improving prediction efficiency.
[0021] In order to achieve the above-mentioned second purpose, the present invention provides a computer device, including a processor and a memory, wherein: a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned method for generating AI-based electricity spot trading decisions is implemented.
[0022] In order to achieve the third purpose mentioned above, the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program is executed by a processor, the above-mentioned method for generating AI-based electricity spot trading decisions is implemented.
[0023] In order to achieve the fourth purpose mentioned above, the present invention provides a computer program product, including computer instructions, wherein: when the computer instructions are executed by a processor, the above-mentioned method for generating AI-based electricity spot trading decisions is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a system block diagram of a spot trading decision-making support system in an embodiment of a method for generating power spot trading decisions based on AI of the present invention.
[0025] Figure 2 It is a flowchart of the preset large language model training in the method embodiment of the present invention for generating power spot trading decisions based on AI.
[0026] Figure 3 It is a flow chart of an embodiment of a method for generating power spot trading decisions based on AI of the present invention.
[0027] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0028] The method for generating power spot trading decisions based on AI of the present invention responds to user decision requests based on a large language model and a load forecasting model, and outputs corresponding decision suggestions.
[0029] Embodiment of the method for generating power spot trading decisions based on AI:
[0030] See also Figure 1 The spot trading decision support system 1 implementing this embodiment includes a large language model module 11, a natural language template setting module 21, a load forecasting module 31, and a data format processing module 41.
[0031] The spot transaction decision-making auxiliary system 1 of this embodiment is integrated into the existing spot power transaction decision-making system.
[0032] The large language model module 11 includes a preset large language (Large Language Model 1, LLM) model, which processes the acquired power spot market data based on the preset large language model to obtain basic data, and responds to the decision request input by the user to feedback decision suggestions.
[0033] Specifically, the power spot market data includes market-related data such as power market prices, supply and demand, weather forecasts, policy information, and in particular, system business data, which can be directly derived from the existing spot power trading decision-making system. The preset large language model can read a large amount of key news or indicator data to extract basic data.
[0034] The natural language template setting module 21 is used to maintain the set question templates, which are used to enable the preset large language model to respond to the user's decision request and output decision suggestions according to the provisions of the question template. The question template is set according to different decision requirements, for example, different question templates correspond to specific requirements such as prediction, analysis, and suggestions. After the preset large language model obtains the decision request, it gives a decision suggestion according to the question template specifically corresponding to the decision request.
[0035] The load forecasting module 31 includes a load forecasting model, which implements short-term load forecasting for power users to provide support for power spot trading decisions. The basic data obtained by the large language model module 11 provides data support for the prediction of the load forecasting module 31.
[0036] The data format processing module 41 is used to convert the basic data processed by the large language model module 11 into the data format of the existing spot power trading decision system so as to save it in the existing spot power trading decision system.
[0037] In this embodiment, the preset large language model is trained for the power spot trading business field, and specifically includes the following steps:
[0038] S11: Obtaining power spot trading decision requirements.
[0039] Among them, the specific needs of the electricity spot trading decision-making system are determined, including functions such as prediction, analysis, and recommendations.
[0040] S12: Obtain electricity spot market training data.
[0041] Among them, the electricity spot market training data is data related to the electricity spot market, including but not limited to historical transaction data, electricity supply and demand data, weather data, policies and regulations, holidays, etc.
[0042] S13: Preprocessing the electricity spot market training data.
[0043] Preprocessing includes cleaning, sorting and classification to ensure the quality and availability of data. For example, duplicate and erroneous data can be removed and data from different sources can be sorted into a unified format.
[0044] S14: Extract key features from the preprocessed electricity spot market training data.
[0045] Among them, valuable features are extracted from the preprocessed electricity spot market training data. These features should be able to reflect the key factors and potential laws of the electricity spot market. For example, the power supply and demand ratio in different time periods, the impact of weather on power demand, etc.
[0046] S15: Obtain a pre-trained large language model and train it based on the power spot trading decision requirements, power spot market training data and key features.
[0047] Among them, the pre-trained large language model can select open source large language models such as LLaMA and Al paca, and use the parameters of the pre-trained large language model as the starting point, and use the above-mentioned electricity spot trading decision-making requirements and key features to train and adjust the model parameters.
[0048] S16: After adjusting the pre-trained large language model according to the training evaluation result, a preset large language model is obtained.
[0049] The trained model is evaluated using the reserved test data, and the evaluation indicators include but are not limited to accuracy, recall, etc. The model is optimized and improved based on the evaluation results.
[0050] When new market conditions and policies emerge and the spot trading decision-making needs need to be changed, the natural language template setting module can be used to obtain the question template to be updated input by the user. The question template to be updated is set by the user according to the needs of the change, so that the preset large language model can be iteratively updated according to the question template to be updated, so that the preset large language model can output decision recommendations according to the needs of the change.
[0051] In addition, during the actual use of the preset large language model, user feedback can be collected, and the model can be iteratively optimized based on the feedback and performance evaluation results.
[0052] Therefore, corresponding auxiliary decision suggestions can be generated based on the preset large language model, such as optimal quotation strategy, transaction timing selection, etc. Specifically, the spot transaction auxiliary decision system implements this embodiment including the following steps:
[0053] S21: Continuously obtain electricity spot market data through a preset large language model and process it to obtain basic data.
[0054] Among them, the preset large language model continuously obtains electricity spot market data and processes the electricity spot market data into basic data required for prediction and decision-making.
[0055] S22: Process the basic data according to the preset load forecasting model and output the load forecasting data.
[0056] Among them, the preset load forecasting model processes the basic data through feature engineering. Specifically, feature engineering includes outlier processing and feature selection. Outlier processing includes using the isolation forest method to give a spatial region to normal samples, and regards samples that are not in this region as outliers. At the same time, linear interpolation is used to fill in the outliers to prevent overfitting of load forecasting. Feature selection includes using the correlation coefficient method / Lasso model to perform correlation analysis on potential features such as holidays, weekly cycles, temperature, dew point temperature, relative temperature, sea level pressure, and loads at different times, thereby achieving feature dimensionality reduction to improve the performance of the prediction model.
[0057] Then, the preset load forecasting model is predicted by the target preset algorithm, and the target preset algorithm is one of the following: Xgboost (eXtreme Gradient Boosting), LGBM (Light Gradient Boosting Machine), Catboost (Categorical Boosting), Randomforest, CNN (Convolutional Neural Networks), BPNN (Backpropagation Neural Network), Decisiontree, KNN (K-Nearest Neighbors), SVR (Support Vector Regression), SES (Single Exponential Smoothing), DES (Secondary Exponential Smoothing), TES (Third Exponential Smoothing), MA (Moving Average), Yesterday, Anteye and Sdw (Same Day Last Week).
[0058] Since the spot trading decision-making support system continuously obtains the power spot market data, the current prediction results can be verified in the subsequent actual power spot market data obtained, so that the prediction error information can be obtained. The prediction error information includes time-sharing error results, daily error results, prediction accuracy, error warning, error characteristics, error cause analysis or any combination thereof. When predicting, multiple preset algorithms are used for prediction (when generating decision recommendations, the preset large language model only obtains the load prediction data obtained by the target preset algorithm, and does not obtain the load prediction data obtained by other preset algorithms), so that the prediction error information corresponding to different preset algorithms can be obtained. By comparing the prediction error information, the preset algorithm with the highest prediction accuracy in the prediction error information can be determined, and the preset algorithm is used as the target prediction algorithm, so that the optimal prediction algorithm can be automatically selected as the target prediction algorithm every period of time according to the prediction error information.
[0059] S23: Get a decision request.
[0060] S24: Process the decision request through the preset large language model combined with the currently set question template, basic data and load forecast data to generate decision suggestions.
[0061] For example, for the electricity spot market in a specific region, the spot trading decision-making system collects electricity spot market data from the past two years, including hourly transaction prices, transaction volumes, local weather data (temperature, humidity, wind speed, etc.), and relevant policy change information, based on the preset large language model. The spot trading decision-making system provides accurate quotation suggestions for market users in the region to improve transaction benefits. Based on the decision request for quotation suggestions input by the user, on a day in the summer with high temperature and high humidity, the spot trading decision-making system predicts that electricity demand will increase significantly, market prices are expected to rise, and recommends that suppliers increase their quotations and increase supply. The quotation strategy is automatically generated for the user through the preset large language model.
[0062] In summary, the present invention introduces a natural language model to quickly process real-time data with low cost, and the method of obtaining data information is simple and real-time, thereby improving the timeliness of decision-making and adaptability when policies or rules change.
[0063] Computer device embodiment:
[0064] The computer device of this embodiment includes a processor and a memory. The memory stores a computer program. When the processor executes the computer program, the above-mentioned method embodiment of the AI-based electricity spot trading decision generation is implemented.
[0065] The computer device may include but is not limited to a processor and a memory. Those skilled in the art will appreciate that the computer device may include more or fewer components, or a combination of certain components, or different components, for example, the computer device may also include input and output devices, network access devices, buses, etc.
[0066] For example, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microcontroller or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0067] The memory can be used to store computer programs and / or modules, and the controller realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. For example, the memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound receiving function, a sound conversion to text function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, text data, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0068] Computer readable storage medium embodiment:
[0069] If the module integrated in the computer device of the above embodiment 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, all or part of the process of the method embodiment for realizing the generation of power spot trading decisions based on AI can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the controller, the steps of the method embodiment for generating power spot trading decisions based on AI can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-On l yMemory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunications signals.
[0070] Computer program product embodiment:
[0071] The computer program product of this embodiment includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes each step of the above-mentioned method embodiment for generating a decision on power spot trading based on AI.
Claims
1. A method for generating power spot trading decisions based on AI, characterized in that: The following steps are involved: Continuously obtain electricity spot market data through a preset large language model and process it to obtain basic data; Processing the basic data according to a preset load forecasting model and outputting load forecasting data; Get decision request; The decision request is processed by combining the preset large language model with the currently set question template, the basic data and the load forecast data to generate a decision suggestion.
2. The method for generating power spot trading decisions based on AI according to claim 1, characterized in that: The preset large language model is obtained based on the pre-trained large language model training, and specifically includes the following steps: Obtaining decision-making requirements for electricity spot trading; Obtaining electricity spot market training data; Preprocessing the electricity spot market training data; extracting key features from the preprocessed electricity spot market training data; Obtain a pre-trained large language model, and train it in combination with the power spot trading decision-making requirements, the power spot market training data, and the key features; After adjusting the pre-trained large language model according to the training evaluation result, the preset large language model is obtained.
3. The method for generating power spot trading decisions based on AI according to claim 1, characterized in that: The basic data is processed according to the preset load forecasting model, and when the load forecasting data is output, it includes processing the basic data through feature engineering, and then predicting through a target prediction algorithm to obtain the load forecasting data.
4. The method for generating power spot trading decisions based on AI according to claim 3, characterized in that: When the basic data is processed through feature engineering, it includes outlier processing and feature selection.
5. The method for generating power spot trading decisions based on AI according to claim 3, characterized in that: The following steps are also included: Determine prediction error information according to the electricity spot market data, and adjust the target preset algorithm according to the prediction error information.
6. The method for generating power spot trading decisions based on AI according to claim 4, characterized in that: The target prediction algorithm is one of the following: Xgboost, LGBM, Catboost, Randomforest, CNN, BPNN, Decisiontree, KNN, SVR, MA.
7. The method for generating power spot trading decisions based on AI according to any one of claims 1 to 6, characterized in that: The following steps are also included: Get the question template to be updated; The currently set question template in the preset large language model is adjusted according to the question template to be updated.
8. A computer device comprising a processor and a memory, characterized in that: The memory stores a computer program, which, when executed by the processor, implements the method for generating an AI-based electricity spot trading decision as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating power spot trading decisions based on AI as described in any one of claims 1 to 7 above is implemented.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the method for generating power spot trading decisions based on AI as described in any one of claims 1 to 7 above is implemented.
Citation Information
Cited By
Electric power spot transaction dynamic decision generation method and system based on AI big language model
CN120725298A
A method and system for dynamic decision generation in electricity spot trading based on AI large language models
CN120725298B
