Power transaction agent system based on AI auxiliary decision-making

The AI-based intelligent agent system for power trading solves the problems of low data processing efficiency and poor prediction accuracy in traditional power trading, and realizes intelligent and lightweight power trading decision support, thereby improving market circulation efficiency and overall benefits.

CN120894133APending Publication Date: 2025-11-04ELU TECHNOLOGY HOLDINGS (ZHEJIANG)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511050994.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Traditional power trading suffers from low data processing efficiency, poor forecasting accuracy, traders burdened by heavy transactional work, information silos and difficulties in decision-making collaboration, insufficient user interaction and understanding, and a lack of lightweight and intelligent services, which limits market circulation efficiency and overall benefits.

Method used

It provides an AI-assisted decision-making intelligent agent system for power trading, including a data acquisition and processing layer, an intelligent analysis layer, and an interaction and application layer. It utilizes machine learning models for data cleaning, feature engineering, prediction, and knowledge retrieval, and provides an interactive interface and intelligent services.

Benefits of technology

It has improved data processing efficiency and forecasting accuracy, relieved traders of their heavy workload, enhanced decision support, realized the intelligentization and lightweighting of power trading, and improved market circulation efficiency and overall benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894133A_ABST
    Figure CN120894133A_ABST
Patent Text Reader

Abstract

The invention provides a power transaction agent system based on AI auxiliary decision making, the system can provide intelligent power transaction service based on an intelligent contract, the system is responsible for processing massive, high-frequency and multi-dimensional data, providing deep insight and accurate prediction, liberating traders from heavy data work, and improving the working efficiency of the traders. The method focuses on strategy formulation and risk control of transactions. The system can provide questioning and answering services for power transactions for users, and can perform power transaction prediction and visualization in each mode based on collected power transaction big data, so that power market intelligent analysis, retrieval and other services of traders, analysts and decision makers can be deeply endowed, multiple functions are integrated, and the user experience is improved. The system assists traders, users, managers and the like, realizes intelligent service and lightweight service of power transaction, reduces transaction cost, and improves market circulation efficiency and benefits of power transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power trading technology, and in particular to a smart contract-based power trading intelligent agent and its application method, electronic device, and computer-readable storage medium. Background Technology

[0002] Traditional electricity trading relies heavily on analysts for trading operations, and users generally lack access to and retrieval of relevant trading knowledge because this aspect is typically controlled by the trading market. Therefore, the traditional electricity trading process suffers from numerous shortcomings and pain points:

[0003] 1. Low data processing efficiency and superficial insights:

[0004] Limitations: Traditional methods rely on manual processing of massive, high-frequency (minute-level or even second-level changes), multi-source, heterogeneous power and related data (load, weather, generating units, fuel, economy, etc.), resulting in low efficiency and a high susceptibility to errors. Deep data fusion and correlation mining are difficult to achieve, and analysis often remains superficial, lacking a profound, timely, and comprehensive understanding of potential price drivers. Effective tools are lacking for real-time complex calculations and big data modeling.

[0005] 2. Poor forecasting accuracy and weak decision support:

[0006] Limitations: Traders' predictions rely heavily on personal experience and simple models, making it difficult to effectively capture all the complex nonlinear factors affecting electricity prices (especially highly volatile renewable energy). Low prediction accuracy increases the risk of trading strategies based on this approach, and the potential for returns is not fully realized.

[0007] 3. Traders are burdened by heavy transactional work:

[0008] Drawbacks: Traders and analysts spend a lot of time and energy on tedious, low-value-added transactional work such as data collection, cleaning, organization, and basic calculation report generation, making it difficult for them to focus their valuable energy on core strategy development, risk control, and creative trading opportunity discovery.

[0009] 4. Low transaction execution efficiency and high costs:

[0010] OTC trading drawbacks include: high communication costs (repeated back-and-forth), low execution efficiency (prolonged processing time), and high operational risks (order placement errors, confirmation errors). It also lacks transparency.

[0011] 5. Information silos and difficulties in collaborative decision-making:

[0012] Drawbacks: Departments such as trading, risk control, finance, settlement, and compliance may use different systems or tools, making data sharing difficult or inconsistent, resulting in information silos. Decision-making lacks real-time, comprehensive view support, and cross-departmental collaboration is costly.

[0013] 6. Insufficient user (trader / analyst) interaction and understanding:

[0014] Limitations: Traders struggle to quickly obtain intuitive interpretations of market data or key insights based on current market conditions (unless consulting manuals or asking colleagues). Limited visualization tools make it difficult to intuitively understand complex market dynamics or forecasts.

[0015] 7. Lack of lightweight and intelligent services:

[0016] Drawbacks: Traditional processes are complex and tools are cumbersome (potentially multiple separate software programs), making them not "lightweight" enough. They lack the ability to be highly integrated and proactively provide intelligent suggestions and services.

[0017] 8. Market circulation efficiency and overall benefits are limited:

[0018] The combined impact of core defects: All the aforementioned problems of inefficiency, high cost, low accuracy, and high risk ultimately lead to limited overall market operation efficiency (speed and accuracy of information transmission, price discovery, transaction completion, and settlement performance), waste of resources (funds, manpower, and time), and failure to optimize the overall transaction benefits for market participants (electricity buyers, electricity sellers, and intermediaries). Summary of the Invention

[0019] To address the technical problems existing in the prior art, the present invention provides the following technical solution:

[0020] On the one hand, an AI-assisted decision-making intelligent agent system for power trading is provided, the system comprising the following functional layers:

[0021] The data acquisition and processing layer is used to collect big data from power transactions in real time and perform data ETL cleaning and classification processing.

[0022] The intelligent analysis layer is used to perform intelligent analysis on the power trading big data based on machine learning models and predict and output corresponding power trading prediction results; and to provide users with power trading knowledge based on the power trading knowledge database or RAG retrieval model.

[0023] The interaction and application layer is used to provide users with an interactive interface for intelligent electricity trading services.

[0024] In a preferred embodiment of the present invention, the system further includes the following functional layer:

[0025] The network layer is used to provide data upsampling, downsampling, and data transmission services based on data encryption.

[0026] In a preferred embodiment of the present invention, the system further includes the following functional layer:

[0027] The storage layer is used to provide distributed data storage services.

[0028] In a preferred embodiment of the present invention, the data acquisition and processing layer includes:

[0029] (1) A data acquisition system, including:

[0030] The local data sampling port is used to collect static datasets of electricity transactions from the local database, including electricity transaction data in different dimensions;

[0031] An online data sampling engine is used to collect relevant data from electricity transactions in real time, including meteorological data, power grid operation data, and fuel cost data.

[0032] (2) A data processing system, including:

[0033] The data cleaning module is used to clean the collected data.

[0034] The ETL standardization module is used to retrieve the corresponding sampling data according to the established sampling rules and input it into the preset ETL standardization template for standardization processing.

[0035] In a preferred embodiment of the present invention, the intelligent analysis layer includes:

[0036] The data fusion and feature engineering module is used to perform feature engineering on the historically collected power trading big data. It uses a multimodal machine learning algorithm model to extract the features of each modality of power trading data in the power trading big data and perform feature fusion to generate several power trading data features.

[0037] The intelligent prediction engine for electricity trading is used to deploy several electricity trading prediction models with different functional attributes, which are trained and generated based on machine learning algorithms; and, according to the prediction instructions input by the user, to retrieve the electricity trading features of the corresponding attributes and input them into the electricity trading prediction model of the corresponding attributes, predict and output the electricity trading prediction results of the corresponding attributes.

[0038] The power trading knowledge database is used to vectorize the features of power trading data from different dimensions based on the embedding model vectorization technology and store them in a MySQL database to generate a power trading knowledge database and provide users with SQL-based power trading knowledge retrieval services.

[0039] The RAG retrieval system is used to retrieve first power trading knowledge adapted to user queries from the power trading knowledge database based on the RAG model, and transmit the context of the first power trading knowledge to the LLM Agent via API. The LLM Agent then generates corresponding second power trading knowledge based on the context enhancement and outputs the second power trading knowledge to the user.

[0040] In a preferred embodiment of the present invention, the intelligent analysis layer further includes:

[0041] The Agent scheduler is used to parse and understand the natural speech instructions in the user's question based on the context of the first power trading knowledge, and to call the corresponding LLM Agent according to the instructions.

[0042] In a preferred embodiment of the present invention, the interaction and application layer includes:

[0043] A conversational interface is provided to offer users a chat window to interact with the intelligent analysis layer.

[0044] The dashboard is used to visually display preset electricity trading information;

[0045] API interfaces are used to provide APIs for accessing the system;

[0046] The proactive alarm push module is used to proactively push alarm messages to users when a preset power trading early warning event is detected;

[0047] The transaction evidence storage module is used to store and record the electricity transaction logs in which users participate, and generate corresponding electricity transaction evidence storage logs.

[0048] On the other hand, an application method for an AI-assisted decision-making intelligent agent system for power trading is provided, the method comprising:

[0049] (1) Through the data acquisition and processing layer, real-time big data of power trading is collected and data ETL cleaning and classification are performed, and then uploaded to the intelligent analysis layer;

[0050] The intelligent analysis layer performs intelligent analysis on the power trading big data based on machine learning models and predicts and outputs the corresponding power trading prediction results to the interaction and application layer.

[0051] The interaction and application layer displays the power trading big data and the corresponding power trading prediction results in real time.

[0052] The power transaction logs of the users mentioned above are stored and recorded through the interaction and application layers to generate corresponding power transaction storage logs.

[0053] (2) User questions are input into the intelligent analysis layer through the interaction and application layer;

[0054] The intelligent analysis layer provides users with electricity trading knowledge tailored to their questions, based on the electricity trading knowledge database or the RAG retrieval model, and feeds it back to the interaction and application layer.

[0055] The interaction and application layer outputs and displays the electricity trading knowledge to the user;

[0056] The power transaction logs of the aforementioned users are stored and recorded through the interaction and application layers, generating corresponding power transaction evidence logs.

[0057] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the application method of the power trading intelligent agent system based on AI-assisted decision-making as described above is implemented.

[0058] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-described application method of the power trading intelligent agent system based on AI-assisted decision-making.

[0059] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0060] This system provides intelligent electricity trading services based on smart contracts. It processes massive, high-frequency, and multi-dimensional data, offering profound insights and accurate predictions. This frees traders from tedious data processing, allowing them to focus on strategy development and risk control. The system provides a user-answered question service regarding electricity trading and can perform and visualize electricity trading predictions across various modalities based on collected big data. Therefore, it deeply empowers traders, analysts, and decision-makers with intelligent analysis and retrieval services in the electricity market. Integrating multiple functions, it assists traders, users, and managers in achieving intelligent and lightweight electricity trading services, reducing transaction costs, and improving the market circulation efficiency and effectiveness of electricity trading. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1This is a schematic diagram of the architecture of an AI-assisted decision-making intelligent agent system for power trading, provided in an embodiment of the present invention.

[0063] Figure 2 This is a schematic diagram of the architecture of another AI-assisted decision-making power trading intelligent agent system provided in an embodiment of the present invention;

[0064] Figure 3 This is a flowchart illustrating an application method of a smart contract-based power trading intelligent agent system provided by an embodiment of the present invention. Figure 3 Figure a shows the business process diagram of the system actively predicting and outputting electricity trading forecast results. Figure 3 Figure b shows the business process diagram of a user retrieving the electricity trading knowledge they need based on the system. Detailed Implementation

[0065] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0066] like Figure 1 As shown in the figure, this embodiment of the invention provides an AI-assisted decision-making intelligent agent system for power trading, the system comprising the following functional layers:

[0067] The data acquisition and processing layer is used to collect big data from power transactions in real time and perform data ETL cleaning and classification processing.

[0068] The intelligent analysis layer is used to perform intelligent analysis on the power trading big data based on machine learning models and predict and output corresponding power trading prediction results; and to provide users with power trading knowledge based on the power trading knowledge database or RAG retrieval model.

[0069] The interaction and application layer is used to provide users with an interactive interface for intelligent electricity trading services.

[0070] This invention is not just a simple question-and-answer robot, but a smart agent for the power market that can deeply empower traders, analysts, and decision-makers.

[0071] This system is an intelligent tool to assist and enhance traders' decision-making. It processes massive amounts of high-frequency, multi-dimensional data, providing profound insights and accurate predictions, freeing traders from tedious data work so they can focus on strategy development and risk control.

[0072] Basic principles of system design:

[0073] Modular design: Each functional module is decoupled, facilitating independent testing and upgrades.

[0074] Data-driven: All analysis and prediction must be based on solid, clean, real-time multi-source data.

[0075] Explanatory: Provide evidence for predictions and recommendations whenever possible;

[0076] User-friendly interface: Supports natural language interaction, while providing a structured data display interface and API interface.

[0077] The following will describe each function in detail:

[0078] The first layer is the data acquisition and processing layer, which is used to collect big data on power transactions in real time and perform data ETL cleaning and classification processing.

[0079] Data is the foundation of all large models and agents. This layer is responsible for acquiring data from internal and external sources, and then cleaning, aligning, and storing it.

[0080] 1. Data source collection:

[0081] The local database is a database created for each province, where different tables represent data from different dimensions of that province.

[0082] Online data: If more real-time data is required.

[0083] Meteorological data: National Meteorological Agency, commercial meteorological services (such as various weather sources integrated by GeoDelGen, or "collected directly from official data sources"), AP, to obtain wind speed, light intensity, etc.

[0084] Power grid operation data includes load, renewable energy output, transmission restrictions on critical lines, and unit maintenance plans. Market data includes electricity prices, transaction announcements, and news. This data can be obtained through the SDK provided on the official website or by writing function calls or MCPs on the request page.

[0085] Fuel cost data, including coal and natural gas price indices, can be obtained through MCP or function 'calling'.

[0086] 2. Core processing tasks:

[0087] ETL process: Standardize data from different sources and in different formats by triggering scheduled tasks or message queues.

[0088] Data cleaning: Handling missing values ​​and outliers, and aligning them with timestamps.

[0089] In a preferred embodiment of the present invention, the data acquisition and processing layer includes:

[0090] (1) A data acquisition system, including:

[0091] The local data sampling port is used to collect static datasets of electricity transactions from the local database, including electricity transaction data in different dimensions;

[0092] The local data sampling port is mainly responsible for collecting static datasets of electricity transactions from the local database, including electricity transaction data of different dimensions.

[0093] The local data sampling port can use the following database connection protocol:

[0094] JDBC Connection: Utilizes the Java Database Connectivity standard interface, enabling cross-platform access by loading a specific database driver. JDBC provides a unified API interface, supporting connection management, SQL statement execution, and result set processing, and is suitable for relational databases such as MySQL and Oracle.

[0095] ODBC Bridging: For legacy systems, JDBC-ODBC bridging technology is used to access ODBC-based databases. The bridger implements protocol conversion by loading the sun.jdbc.odbc.JdbcOdbcDriver class, and the ClassNotFoundException exception must be caught when establishing a connection.

[0096] Divided by data dimension:

[0097] Time dimension: The data is divided into medium- and long-term transaction data such as multi-year, annual, quarterly, monthly, weekly, and multi-day data, as well as spot market data such as daily, intraday, and real-time data.

[0098] Regional dimension: Distinguish between intra-provincial transactions (such as the Gansu power market) and inter-provincial transactions (such as Northwest to East China transmission), and record the power grid region to which the transacting parties belong.

[0099] Transaction types include wholesale market transactions such as bilateral negotiations, centralized bidding, and listing transactions, as well as retail market transactions between retail users and electricity sales companies.

[0100] Sampling strategies can be adopted as follows:

[0101] Full data collection: A full table scan is performed once a day to ensure the integrity of basic data;

[0102] Incremental data collection: Based on timestamps or version numbers, change data is collected every hour, reducing system load;

[0103] Abnormal retry: When the network is interrupted, an exponential backoff retry mechanism is initiated (initial interval 500ms, maximum 5s) to ensure that no data is lost.

[0104] An online data sampling engine is used to collect relevant data from electricity transactions in real time, including meteorological data, power grid operation data, and fuel cost data.

[0105] The online data sampling engine is responsible for collecting relevant data from electricity transactions in real time, including dynamic information such as meteorological data, power grid operation data, and fuel cost data.

[0106] The online data sampling engine utilizes Kafka message queues for real-time data acquisition. As a distributed streaming platform, it provides high throughput (millions of messages per second) and low latency (milliseconds) data buffering. High availability is ensured through partitioning and replication mechanisms, and a single cluster supports horizontal scaling. Simultaneously, a real-time computing pipeline is built based on Flink stream processing, supporting event-time processing, exactly-once semantics, and state management. Data is consumed through the KafkaSource connector, with parallelism dynamically adjusted according to the data volume.

[0107] The online data sampling engine can connect to the following data sources:

[0108] Power grid operation data: Real-time measurement data such as voltage, current, and power are collected by connecting to the SCADA system via the IEC 61850 protocol, with a sampling frequency of ≥1Hz;

[0109] Meteorological data: Connects to the meteorological bureau's API to obtain indicators such as temperature, wind speed, and light intensity, updated every 15 minutes;

[0110] Fuel Costs: Integrates data streams from trading platforms for bulk commodities such as coal and natural gas, and uses the WebSocket protocol to maintain long-term connections.

[0111] The online data sampling engine can employ dual-channel transmission: the primary channel uses a dedicated fiber optic network (TCP / IP, latency <100ms), while the backup channel uses a LoRaWAN wireless network (coverage radius 3km). This ensures the effectiveness and reliability of data acquisition and transmission.

[0112] Local caching and data verification: Edge nodes deploy a 30-minute data cache to temporarily store data during network outages and automatically retransmit it upon recovery. Each message is appended with an HMAC-SM3 authentication code to prevent transmission tampering.

[0113] (2) A data processing system, including:

[0114] The data cleaning module is used to clean the collected data.

[0115] The ETL standardization module is used to retrieve the corresponding sampling data according to the established sampling rules and input it into the preset ETL standardization template for standardization processing.

[0116] The data cleaning module performs quality verification and standardization on the collected raw data:

[0117] The cleaning rules can be as follows:

[0118] Missing value handling:

[0119] Direct deletion: When the missing value ratio is less than 5% and randomly distributed, directly delete records containing missing values;

[0120] Interpolation filling: Time series data are filled using linear interpolation or seasonally adjusted ARIMA model predictions;

[0121] Default value replacement: Categorical variables are marked with "unknown", and numerical variables are replaced with the median of the data in the same dimension;

[0122] Outlier detection:

[0123] Statistical tests: Grubbs' Test was used to detect single outliers, and ESD Test was used to handle an unknown number of outliers;

[0124] Business rule: Power load data exceeding 120% of the historical maximum value is marked as abnormal and requires manual review;

[0125] Machine learning: Identifying abnormal access patterns based on the Isolation Forest algorithm improves accuracy.

[0126] 2. ETL Standardization Module

[0127] The ETL standardization module transforms the data into a unified model according to established rules:

[0128] The standardized template can be configured with the following ETL operators:

[0129] Field mapping rules:

[0130] One-to-one mapping: such as "transaction_date" directly mapping to "transaction date";

[0131] Many-to-one conversion: Combine "peak_load" and "off_peak_load" into "average daily load";

[0132] Derived field: "Cost per kilowatt-hour" = Fuel cost / Electricity generation + Transmission and distribution price;

[0133] Data type specifications:

[0134] The amount is uniformly set to DECIMAL(18,4);

[0135] The timestamp uses the ISO 8601 format;

[0136] The regional coding follows the GB / T 2260-2007 standard.

[0137] Operator configurations in the ETL standardized template can be defined by the user.

[0138] II. Intelligent Analysis Layer

[0139] The intelligent analysis layer primarily provides AI prediction and retrieval services: it performs intelligent analysis on the power trading big data based on machine learning models and outputs corresponding power trading prediction results; and it provides power trading knowledge to users based on the power trading knowledge database or RAG retrieval model.

[0140] The intelligent analysis layer can be understood as the brain of the intelligent agent, containing multiple collaborative intelligent modules. It can provide the following functional services:

[0141] 1. Data Fusion and Feature Engineering: Linking data from different sources (such as weather and load) to generate features for model training. For example, generating derived or combined features such as "weekdays / holidays", "nonlinear relationship between temperature and load", and "100m wind shear".

[0142] 2. Prediction Model Engine: Integrates various locally developed prediction models (load forecasting, electricity price forecasting, wind and solar power output forecasting, etc.) into the Agent, encapsulates them as services, and registers them as tools in the Agent.

[0143] 3. Enhanced knowledge base and retrieval generation:

[0144] Knowledge base construction: Unstructured texts such as electricity market trading rules (e.g., PDF, Word documents), historical news, and announcements from various provinces are vectorized using an embedding model and stored in a vector database.

[0145] RAG retrieval: When a user asks a question, the system first retrieves the most relevant rule texts from the vector database, and then provides these texts as context to the large language model to generate a more accurate and evidence-based answer.

[0146] 4. Agent Core Scheduling:

[0147] It is built using an existing framework. It is responsible for understanding the user's natural language commands and determining which tool to invoke.

[0148] In a preferred embodiment of the present invention, the intelligent analysis layer includes:

[0149] 1. Data fusion and feature engineering module, used to perform feature engineering on the historically collected power transaction big data, using a multimodal machine learning algorithm model to extract the features of each modality of power transaction data in the power transaction big data and perform feature fusion to generate several power transaction data features;

[0150] The data fusion and feature engineering module employs a multimodal machine learning algorithm model to extract and fuse features from big data on electricity trading. Its core technologies include:

[0151] Multimodal data classification system:

[0152] Structured data includes tabular data such as electricity transaction settlement data (e.g., transaction volume and price) and power grid operation data (e.g., load curves, voltage and current measurements). Time-series feature extraction methods, such as STL decomposition (Seasonal-Trend decomposition using Loess), are used to separate periodic and trend components.

[0153] Unstructured data: including electricity market policy documents (PDF / Word), transaction announcement texts, equipment operation logs, etc. Semantic features are extracted using pre-trained models such as BERT-wwm or RoBERTa-wwm to generate 768-dimensional dense vectors;

[0154] Temporal-spatial data: meteorological raster data (wind speed, irradiance) in wind and solar power output prediction. ConvLSTM network is used to capture spatiotemporal features simultaneously, and local meteorological model features are extracted through 3D convolutional kernels.

[0155] Feature extraction algorithm architecture:

[0156] Parallel encoder design:

[0157] Text modality: Using the lightweight architecture of the ALBERT model, the number of model parameters is reduced by 70% through parameter sharing, while maintaining more than 90% semantic understanding accuracy;

[0158] Numerical Mode: TCN (Temporal Convolutional Network) is used to replace the traditional LSTM. By expanding the receptive field through dilated convolution, MSE is reduced in the electricity price forecasting task.

[0159] Image modality: Based on the Patch Embedding technique of Vision Transformer, the satellite cloud image is segmented into 16×16 pixel blocks for feature encoding;

[0160] Cross-modal attention mechanism: A Cross-Modal Attention layer is designed to calculate the similarity weights between features from different modalities. For example, in load forecasting, the attention score between meteorological text reports ("continuous high temperature") and temperature sensor data can reach 0.83, which is significantly higher than the combination of unrelated modalities.

[0161] Feature fusion strategy:

[0162] Hierarchical fusion: First, intra-modal feature aggregation is performed (e.g., aggregating load data from different substations using GraphSAGE), followed by cross-modal fusion. A provincial power grid practice shows that this method improves prediction accuracy by 2.3% compared to direct fusion.

[0163] Dynamic weight allocation: The contribution of each mode is automatically adjusted based on a gating network mechanism. When predicting day-ahead market electricity prices, the weight coefficient of fuel cost data can reach 0.65, while the weight of meteorological data exceeds 0.83 in wind and solar power output forecasting.

[0164] Adversarial training enhancement: Introducing a discriminator network to distinguish feature sources forces the generator to produce modality-independent general features.

[0165] Feature Engineering Implementation Case 1:

[0166] # Example of multimodal feature processing: class FeatureEngineer:

[0167] def process_numerical(self, data):

[0168] # Temporal Feature Extension

[0169] features = []

[0170] for window in [24h, 7d, 30d]: # Sliding window

[0171] features.extend([

[0172] data.rolling(window).mean(), # Moving average

[0173] data.diff(window), # Difference

[0174] data.pct_change(window) # Rate of change ])

[0176] return pd.concat(features, axis=1) .

[0178] Feature-based quality control:

[0179] Drift detection: KL divergence is used to monitor changes in feature distribution. An alarm is triggered when the KL value of the feature on the current day is greater than 0.1 compared with the historical baseline.

[0180] Importance Assessment: By quantifying the contribution of features through the SHAP value, it was found that the "day-ahead load forecasting deviation" feature in a certain regional market has a SHAP value of 0.32 for electricity price forecasting, which is significantly higher than other features;

[0181] Version Management: Use MLflow to track feature pipeline versions to ensure experimental reproducibility. Each feature update generates a unique feature_set_id, associated with the corresponding data snapshot and code commit.

[0182] Production Deployment:

[0183] Real-time feature service: Based on Flink Stateful Functions, a feature computation pipeline is built with a processing latency of <200ms, supporting real-time feature generation of 100,000 records per second;

[0184] Incremental computation optimization: The Ring Buffer data structure is adopted for sliding window features, which reduces memory usage by 60% and improves computation efficiency by 3 times;

[0185] Feature storage: Feature datasets are stored using the Apache Iceberg format, supporting Time Travel queries and ACID transactions to ensure feature consistency.

[0186] 2. An intelligent prediction engine for power trading, used to deploy several power trading prediction models with different functional attributes, trained and generated based on machine learning algorithms; and, according to the prediction instructions input by the user, to retrieve the power trading features of the corresponding attributes and input them into the power trading prediction model of the corresponding attributes, predict and output the power trading prediction results of the corresponding attributes.

[0187] The intelligent forecasting engine for electricity trading deploys a variety of machine learning models, and its core architecture includes:

[0188] (1). Load forecasting model:

[0189] 1) Input Feature Engineering:

[0190] Basic load characteristics: such as historical load data (96 points / day), year-on-year comparison (YoY), and moving average (7 days / 30 days);

[0191] External factors: temperature (daily average temperature, temperature range), holiday markers, economic activity index (PMI);

[0192] Spatial correlation characteristics: load correlation between adjacent areas (nodes with Pearson coefficient > 0.8 are included);

[0193] 2) Model Structure:

[0194] Backbone network: Informer model, which adopts the Prob sparse self-attention mechanism to calculate attention scores in a 256-dimensional latent space, reducing memory consumption by 50% compared to the traditional Transformer;

[0195] Auxiliary modules:

[0196] Holiday Adapter: Learns scaling factors for specific date patterns (e.g., load drops by 30-50% during Chinese New Year).

[0197] Anomaly robust layer: Filters out the effects of extreme values ​​through MAD (Median Absolute Deviation).

[0198] Performance indicators: According to the implementation of a provincial power grid, the MAPE of short-term load forecasting at 96 points is 1.2%, and the peak-valley error is controlled within 3%.

[0199] (2) Electricity price forecasting model:

[0200] 1) Market mechanism modeling:

[0201] Supply and demand balance characteristics: Fitting the nonlinear relationship between system marginal price (SMP) and load factor (using piecewise cubic splines).

[0202] Game theory simulation: The pricing strategy of generators is simulated using the Fictitious Play algorithm. Nash equilibrium is reached after more than 1000 iterations.

[0203] 2) Integrated prediction framework:

[0204] Historical electricity price data (peak electricity consumption periods, times, historical electricity prices, etc.) is first input into XGBoost, and then its output is input into the meta-model: LightGBM for enhanced prediction, performing a second prediction, and outputting the final prediction result. The model parameters are updated online based on the latest transaction data, and a Kalman Filter is used to adjust the prediction bias, reducing the day-ahead market prediction error from 8% to 5%.

[0205] (3) Forecast of wind and solar power output:

[0206] 1) Multi-scale prediction system:

[0207] Ultra-short time (0-4h): ConvLSTM processes radar echo image sequences with a spatial resolution of 1km×1km and a temporal resolution of 15min.

[0208] Short-term (24-72h): The wind speed prediction RMSE is <1.5m / s when the WRF meteorological model output is fused with CNN features.

[0209] Medium to long term (7 days): ECMWF numerical forecasting combined with climate models, using transfer learning to solve the small sample problem;

[0210] 2) Quantification of uncertainty:

[0211] Quantile regression: Simultaneously outputs the predicted values ​​of P10 / P50 / P90 and constructs a probability interval;

[0212] Extreme weather warning: When the predicted wind speed is >25m / s, a red warning will be automatically triggered and backup capacity will be activated.

[0213] 2. Implementation of Predictive Service

[0214] Model deployment architecture:

[0215] Microservice encapsulation: Each prediction model is packaged as an independent container, and the prediction interface is exposed through gRPC, defining a protocol buffer (user-defined).

[0216] Elastic scaling: Based on Kubernetes HPA, automatic scaling is achieved. The load prediction service automatically scales up to 20 replicas during peak transaction periods (8:00-10:00).

[0217] Heterogeneous computing acceleration: The electricity price prediction model is deployed on an NVIDIA T4 GPU, supporting FP16 mixed-precision computing, which improves inference speed by 2.5 times.

[0218] 3. Predictive instruction processing flow:

[0219] Command parsing: Receives JSON format requests. Example:

[0220] {

[0221] "command": "predict",

[0222] "target": "day_ahead_price",

[0223] "params": {

[0224] "region": "East China",

[0225] "date": "2025-07-05",

[0226] resolution: "1h"

[0227] }} .

[0229] Feature acquisition: Retrieve the required features from the Feature Store, including:

[0230] Static characteristics: historical electricity prices, fuel cost index;

[0231] Dynamic characteristics: real-time load data, weather forecasts;

[0232] Model routing: Select the corresponding model based on the target, supporting A / B test traffic allocation (e.g., directing 5% of requests to the experimental model);

[0233] Results generation: Returns the prediction results including confidence intervals. Example format:

[0234] {

[0235] "prediction": [0.38, 0.42, ..., 0.39], / / Unit: yuan / kWh

[0236] "confidence": [0.02, 0.03, ..., 0.02], / / 95% confidence interval half-width

[0237] "model_version": "price_xgb_v2.1"} .

[0239] 3. The power trading knowledge database is used to vectorize the features of power trading data from different dimensions based on the embedding model vectorization technology and store them in a MySQL database to generate a power trading knowledge database and provide users with SQL-based power trading knowledge retrieval services;

[0240] The power trading knowledge database uses embedding technology to convert various types of unstructured text into vector representations (structured text is automatically stored):

[0241] (1) Document preprocessing workflow:

[0242] Format conversion:

[0243] PDF parsing: Uses Apache PDFBox to extract text and tables, preserving chapter structure information, and integrates OCR (Tesseract 5.0) when processing scanned documents;

[0244] Word processing: Read paragraph styles using the python-docx library, identify heading levels (h1-h6), and construct a document logic tree;

[0245] Text cleaning:

[0246] Rule engine: Delete headers and footers (such as "National Energy Administration document"), and replace consecutive line breaks (more than 2 line breaks with 1).

[0247] Terminology standardization: unify synonyms such as "grid-connected electricity price" and "benchmark electricity price" into "provincial power grid transmission and distribution price";

[0248] Block partitioning strategy:

[0249] Semantic segmentation: The TextTiling algorithm is used to detect topic boundaries based on word frequency changes, and the block size is controlled within 512 tokens;

[0250] Overlap handling: 15% content overlap is retained between adjacent blocks to avoid semantic fragmentation, such as continuous clauses in electricity market rules;

[0251] (2) Vectorized modeling:

[0252] Model selection:

[0253] General model: m3e-base (Chinese optimized version of Sentence-BERT), after fine-tuning on power regulations text, achieves a similarity calculation accuracy of 92%;

[0254] Domain adaptation: Lightweight fine-tuning of BERT based on LoRA can improve the quality of power terminology vectors by training only 0.1% of the parameters;

[0255] (3) Vector augmentation:

[0256] Metadata injection: Concatenate structured information such as document source (e.g., "North China Energy Regulatory Bureau") and timeliness (publication date) into a text vector;

[0257] Hierarchical coding: Chapter titles are coded separately and then weighted and merged with the text vector (title weight 0.3, text weight 0.7).

[0258] (4) Quality assessment:

[0259] Manual evaluation: Construct a dataset of 500 pairs of electrical terminology similarity and calculate the Spearman correlation coefficient between model predictions and expert scores (ρ>0.85 is acceptable).

[0260] Adversarial test: Inject 10% typos (e.g., "point price" → "power price"), and require the vector similarity to decrease by no more than 15%.

[0261] MySQL integration Hybrid storage architecture (schematic in SQL pseudocode):

[0262] CREATE TABLE power_knowledge (

[0263] id BIGINT PRIMARY KEY,

[0264] doc_id VARCHAR(64), -- Original text ID

[0265] chunk_text TEXT, -- Content of the text chunk

[0266] vector BLOB, -- 1024-dimensional FP32 vector <000,0540>metadata JSON, -- {source: "North China Energy Regulatory Bureau", publish_date: "2025-01-01"}

[0268] FULLTEXT INDEX (chunk_text) -- Full-text search

[0269] ) ENGINE=InnoDB; .

[0271] Approximate search optimization:

[0272] Use the FAISS plugin to build an IVF2048 index and control the search latency of one billion vectors within 50 ms;

[0273] Establish a cache layer for high-frequency queries (such as "transmission and distribution power price"), with a hit rate of up to 80%;

[0274] Data synchronization:

[0275] Implement CDC (Change Data Capture) based on Debezium, with vector update latency < 1 second;

[0276] Regularly execute VACUUM OPTIMIZE to compress the vector storage space and save 40% of the storage cost.

[0277] 2. Knowledge retrieval service

[0278] SQL extended interface:

[0279] Retrieval using vector search functions (SQL example 1):

[0280] SELECT doc_id, chunk_text FROM power_knowledge WHERE VECTOR_DISTANCE(vector, ?) < 0.2 -- cosine similarity threshold ORDER BY VECTOR_DISTANCE(vector, ?)

[0281] LIMIT 10.

[0282] Mixed Queries (SQL Example 2):

[0283] SELECT * FROM (

[0284] -- Keyword Search

[0285] SELECT id, 0.5 AS score FROM power_knowledge

[0286] WHERE MATCH(chunk_text) AGAINST('Electricity Spot Market' IN BOOLEAN MODE)

[0287] UNION ALL.

[0288] -- Vector Search

[0289] SELECT id, 1 - VECTOR_DISTANCE(vector, ?) AS score

[0290] FROM power_knowledge

[0291] WHERE VECTOR_DISTANCE(vector, ?) < 0.3

[0292] ) t ORDER BY score DESC LIMIT 20; .

[0294] 4. A RAG retrieval system is used to retrieve first power trading knowledge adapted to user queries from the power trading knowledge database based on the RAG model, and transmit the context of the first power trading knowledge to the LLM Agent via API. The LLM Agent then generates corresponding second power trading knowledge based on the context enhancement and outputs the second power trading knowledge to the user.

[0295] The RAG retrieval system implements knowledge-enhanced question-answering services through the following process:

[0296] (1) Retrieval stage:

[0297] 1) Query and understand:

[0298] Query expansion: Expand the user question "How to calculate transmission and distribution price" to ["Transmission and distribution price calculation formula", "Transmission and distribution price policy basis", "Electricity price composition structure"];

[0299] Intent classification: Based on SVM, identify the question type (policy query / computation guidance / case reference), and dynamically adjust the recall strategy;

[0300] 2) Hybrid Search:

[0301] Sparse retrieval: The BM25 algorithm quickly screens the data, recalling the Top 200 candidates from 10 million documents;

[0302] Dense Search: Search the vector database using question vectors and sort by cosine similarity;

[0303] Reordering: Cross-Encoder performs fine scoring on the initial screening results, with a computational cost 10 times higher than Bi-Encoder but a 25% improvement in accuracy;

[0304] 3) Context building:

[0305] Paragraph aggregation: merges adjacent and semantically similar text blocks (such as consecutive policy clauses), with a maximum length limit of 1024 tokens;

[0306] Evidence labeling: The source of the search segment is automatically marked (such as "Article 3.2 of the East China Electricity Market Rules") to facilitate user verification.

[0307] (2) Generation stage:

[0308] Hint Project (Pseudocode Example):

[0309] You are an electricity market expert. Please answer the question strictly according to the following context:

[0310] Question: {question}

[0311] Answer requirements:

[0312] 1. When citing specific clauses, please indicate the source.

[0313] 2. If the information is insufficient, please indicate "further verification required".

[0314] 3. Avoid subjective speculation .

[0316] (3) Model selection:

[0317] Basic model: Qwen-72B-Chat, with minor adjustments to command data in the power sector;

[0318] Lightweight deployment: Using GPTQ quantization to 4-bit, the memory usage is reduced from 140GB to 12GB, making it suitable for edge nodes;

[0319] (4) Generation control:

[0320] Citation validation: The model is required to output the [citation:doc_id] tag during generation and cross-validate it with the search results;

[0321] Toxicity filtering: Deploy the Perspective API to detect generated content in real time, and trigger manual review when the toxicity score is >0.7;

[0322] API Transport Specification:

[0323] Request format: JSON

[0324] POST / v1 / rag{

[0325] "question": "Inter-provincial transaction settlement rules",

[0326] "region": "East China",

[0327] "response_length": "medium", / / short / medium / long

[0328] "temperature": 0.3 / / Control creativity} .

[0330] Response structure (JSON):

[0331] {

[0332] "answer": "According to Article 5 of the 'Inter-Provincial Electricity Trading Measures'...",

[0333] "sources": [

[0334] {"doc_id": "EC-2025-001", "excerpt": "Inter-provincial transaction settlement should be based on...", "score": 0.87}

[0335] ],

[0336] "latency_ms": 345} .

[0338] Streaming: Supports Server-Sent Events (SSE) to return generation results step by step, with the first token delay being less than 500ms.

[0339] Hierarchical indexing improves retrieval performance: Hierarchical indexing creates independent indexes for high-frequency access policies (such as spot market rules), improving query speed by 5 times. Using Redis to cache the top 100,000 query results achieves a 65% hit rate, reducing average latency from 120ms to 15ms.

[0340] 5. An Agent scheduler, used to parse and obtain the natural speech instructions in the user's question based on the context of the first power trading knowledge, and to call the corresponding LLM Agent according to the instructions.

[0341] 5.1 As a core component of the intelligent analysis layer for power trading, the Agent scheduler undertakes the key functions of parsing user instructions and coordinating the execution of LLM Agents.

[0342] The agent scheduler employs a layered parallel inference architecture to achieve high-throughput request processing capabilities. The system consists of a front-end interface layer, a scheduling core layer, and an agent execution layer, with each layer decoupled via a message queue. Its functional architecture is as follows:

[0343] (1) Front-end interface layer receives context enhancement requests from the RAG retrieval system, uses the HTTP / 2 protocol to support multiplexing, and a single node can handle 5000+ concurrent connections. The request includes the user's original question, fragments of electricity trading knowledge retrieved by RAG (such as market rule clauses), and session history context.

[0344] (2) Scheduling Core Layer: Contains three key modules:

[0345] Command parsing engine: Based on a fine-tuned BERT model, it achieves domain adaptation and an accuracy of 92.3% in recognizing power trading terminology. The model input is "user question + RAG context" and the output is a structured command object, including intent classification (e.g., "load forecast query"), entity extraction (e.g., "Gansu power grid July 2025"), and operation type (e.g., "generate report").

[0346] Routing Decision Module: Employs a multi-level routing strategy. First, it matches a predefined skill matrix based on intent classification (e.g., electricity price analysis → EconomyAgent). Then, it combines entity information for fine-grained routing (e.g., regional characteristics → GansuSpecialAgent). Routing rules support dynamic loading with an update latency of <100ms.

[0347] Priority Manager: Implements the Weighted Fair Queuing (WFQ) algorithm, which divides requests into three categories: real-time transactions (weight 0.6), analysis reports (0.3), and system management (0.1), ensuring that the average response time of high-priority tasks is <200ms.

[0348] (3) Agent Execution Layer: Consists of multiple specialized LLM Agent instances, each running in an independent Docker container and communicating with the scheduling core via the gRPC protocol. Execution configuration information includes:

[0349] Hot standby pool mechanism: Maintain 20% redundant instances, and complete the switchover within 30 seconds in case of failure;

[0350] Batch processing optimization: Supports merging similar requests into batch tasks (such as electricity price queries for multiple regions), increasing throughput by 3-5 times;

[0351] Tool Invocation Gateway: Unifies the management of external API access (such as data interfaces of power trading platforms), and implements authentication, rate limiting and auditing.

[0352] 5.2 Instruction parsing is the core technology of the Agent scheduler, and its accuracy directly affects the execution effect of subsequent processes.

[0353] (1) Multi-stage analysis

[0354] The system employs a five-stage processing flow to progressively convert natural language into executable instructions:

[0355] Domain terminology standardization: Text replacement is performed based on the electricity trading terminology database (containing 37,000 standard terms), such as uniformly converting user-inputted "green electricity" to "renewable energy electricity". A dual-array Trie tree is used to achieve efficient matching, with a processing speed of 500,000 words / second.

[0356] Syntactic Structure Analysis: Dependency parsing was performed using an ELECTRA-based domain adaptation model, with particular optimization for expression patterns specific to electricity trading, such as complex queries like "comparing [region A] and [region B] in [time period] [indicators]". The model achieved a UAS (Unlabeled Dependency Analysis) accuracy of 91.2% on the electricity trading corpus.

[0357] Intent-Slot Joint Recognition: Employing a pointer network architecture, this system synchronously outputs intent classifications (12 predefined categories) and entity slots (28 types of electricity trading-related entities). A specialized recognition mode is designed for composite entities unique to electricity trading (such as "day-ahead market D-3 session").

[0358] Contextualization: Maintain a session-level state machine to handle referential resolution (e.g., "last month" → specific month) and abbreviation supplementation (e.g., "load forecast" → defaults to "province-wide day-ahead load forecast"). Long-term dependencies are modeled using a gated graph neural network (GGNN).

[0359] Operation chain generation: Convert the parsed results into a DAG-style workflow. For example, a "electricity price analysis" request may be broken down into three sub-tasks: "acquire historical data → run the prediction model → generate visualization charts".

[0360] (2) Special handling of electricity transactions

[0361] Specific optimizations implemented to address industry characteristics:

[0362] Numerical-Unit Joint Parsing: Develop a dedicated numerical expression processor to correctly handle power industry-specific expressions such as "350 million kWh / month" and support automatic unit conversion (e.g., MWh → kWh).

[0363] Standardized time expressions: Built-in electricity market time system (e.g., "D-1 day" means the day before the trading day), supports relative time expressions such as "first month of this quarter", with an accuracy of 98.7%.

[0364] Compliance pre-verification: Basic compliance checks are performed during the parsing phase, such as identifying illegal requests like "Please predict competitor quotes" and directly returning a rejection response.

[0365] 5.3 LLM Agent Invocation and Management Mechanism

[0366] The Agent scheduler manages the collaborative work of multiple specialized LLM Agents through a standardized invocation framework, ensuring the reliable execution of power trading tasks.

[0367] (1) Multi-Agent Collaboration Model

[0368] The system adopts a hybrid collaborative architecture that balances centralized control and autonomous decision-making.

[0369] Agent type classification:

[0370] Specialized functional agents, such as LoadForecastAgent and PriceAnalysisAgent, are finely tuned for specific tasks and outperform general models by 15-20% on the test set.

[0371] Tool-type Agents: These encapsulate external system interfaces, such as MarketDataAgent (transaction data acquisition) and ReportGenAgent (report generation), and support standardized tool description languages ​​(TDL).

[0372] Coordination Agent: Responsible for the decomposition of complex tasks and the integration of results, using the ReAct framework to implement multi-step reasoning.

[0373] Communication Protocol: Standardized interaction is achieved based on MCP (Model Context Protocol). The protocol includes: task description (JSON Schema format); input data (supports multimodal); execution constraints (such as timeout settings); and compliance requirements (such as data anonymization rules).

[0374] Conflict resolution mechanism: When multiple agents return contradictory results (e.g., the difference between different prediction models > 15%), an evidence-weighted consensus algorithm is activated.

[0375] Calculate the historical accuracy weights for each agent;

[0376] Assess the confidence level of this input;

[0377] Generate a weighted average result and mark any discrepancies with warnings.

[0378] (2) Dynamic context management

[0379] Dynamic context injection: Automatically appends relevant rule clauses when the Agent is invoked, using a template JSON:

[0380] {

[0381] "context": {

[0382] "rules": ["Article 3.2 of the Implementation Rules for the Shanxi Electricity Spot Market"],

[0383] "effective_date": "2025-07-01",

[0384] "region": "Shanxi Province"

[0385] }} .

[0387] Application scenarios are shown below:

[0388] Load forecasting service:

[0389] Receive natural language queries from users (such as "predict the peak load in Zhejiang next week");

[0390] After the scheduler parses the data, it calls LoadForecastAgent;

[0391] Agent combines a time series model (ARIMA) and a deep learning model (LSTM);

[0392] Return the predicted value, confidence interval, and analysis of key influencing factors.

[0393] In addition, the Agent can call up models such as LSTM, Informer, TFT, DLinear, baseline models, N-BEATS, and hybrid models. The Agent can decide which optimal prediction model to call based on the user's needs.

[0394] III. Interaction and Application Layer

[0395] The interaction and application layer provides front-end interaction, offering users an interactive interface for intelligent power trading services.

[0396] In a preferred embodiment of the present invention, the interaction and application layer includes:

[0397] A conversational interface, similar to a chat window in ChatGPT, is the primary interaction method, providing users with a chat window to interact with the intelligent analysis layer.

[0398] The dashboard visualizes key data and is used to display preset electricity trading information such as charted load forecast curves, electricity price heat maps, and market news summaries.

[0399] API interfaces are used to provide APIs for accessing the system and to provide data and prediction results to other platforms or systems.

[0400] The proactive alarm push module is used to proactively push alarm messages to users when preset power trading early warning events are detected. For example, when major market events (such as sudden changes in electricity prices or the release of important policies) are detected, messages are proactively pushed to users.

[0401] The transaction evidence storage module is used to store and record the electricity transaction logs in which users participate based on smart contracts, and generate corresponding electricity transaction evidence storage logs.

[0402] However, the background technology suffers from the lack of smart contracts in electricity trading: transaction contracts are mostly paper-based or static PDFs, with complex terms, and execution relies on manual review of performance (such as electricity delivery, price difference payment, and penalty calculation), resulting in low efficiency, susceptibility to disputes, and long default handling cycles. It cannot achieve automated, trustless execution and settlement after transaction conditions are met. Therefore, this embodiment also includes a transaction notarization module to record and store user-participated electricity transaction logs based on smart contracts, generating corresponding electricity transaction notarization logs. A smart contract is an automatically executed contract that exists in code form on the blockchain. In the electricity transaction notarization scenario, when a user participates in electricity trading, relevant transaction information is triggered and executed according to preset smart contract rules. These rules clarify the notarization conditions, content format, etc. For example, once the transaction is completed, the smart contract automatically obtains key transaction information, such as the trading parties, electricity volume, electricity price, and transaction time. The smart contract runs on a blockchain platform. Blockchain has the characteristics of a distributed ledger, maintained by multiple nodes. When the smart contract performs the notarization operation, it packages the relevant data of the electricity transaction log into a block and adds it to the blockchain. Each block contains the hash value of the previous block, forming a chain structure to ensure the immutability and traceability of the data. For example, any attempt to tamper with the evidence log will result in a change in the hash value, making it easy for other nodes to detect the anomaly. The smart contract organizes and maps the acquired electricity transaction information, generating electricity transaction evidence logs in a specific format. These logs are stored in encrypted form on the blockchain, accessible and verifiable only by nodes or users with the appropriate permissions.

[0403] Storing evidence records on a system has the following technical advantages:

[0404] Immutability: Due to the chain structure and hash encryption technology of blockchain, once the electricity transaction record is recorded on the blockchain, any attempt to tamper with the data will be detected. This ensures the authenticity and integrity of the transaction data, providing a reliable data foundation for both parties in the electricity transaction and relevant parties such as regulatory agencies, and avoiding disputes caused by malicious data modification.

[0405] Traceability: Each block of the blockchain records historical transaction information, allowing the traceability of every electricity transaction back to its source through the chain structure. This helps to quickly locate and ascertain the entire transaction process when problems arise, providing a clear historical context for both compliance reviews of the transaction process and troubleshooting.

[0406] Automated execution: The automatic execution feature of smart contracts reduces human intervention. There is no need for manual recording and processing of electricity transaction records, reducing the risk of human error and improving the efficiency and accuracy of record keeping. As long as the conditions set by the smart contract are met, the record keeping process will be executed immediately, ensuring that transaction information is recorded in a timely and accurate manner.

[0407] Enhancing Trust: For all parties involved in electricity transactions, whether power generation companies, power consumption companies, or grid companies, blockchain-based smart contracts provide a transparent and fair platform for evidence storage. All parties can verify the authenticity of the stored data through blockchain nodes, enhancing mutual trust and contributing to the healthy development of the electricity market.

[0408] Based on the above-mentioned system interaction applications, the system can also provide application strategy suggestions: based on predictions of future electricity prices, its own load, power generation curves and other data dimensions, it recommends the optimal bidding strategy (volume and price) to users (such as electricity sales companies or power plants, based on the main body of the target customer in the market).

[0409] like Figure 2 As shown: In a preferred embodiment of the present invention, the system further includes the following functional layer:

[0410] The network layer provides data upsampling / downsampling and data transmission services based on data encryption. The network layer hardware configuration can be found below:

[0411] Server: A high-performance multi-core server, such as the Dell PowerEdge R740xd, is selected, possessing powerful data processing capabilities to handle the massive computational demands during data upsampling, downsampling, and transmission. Its multi-core architecture can process encryption and sampling tasks in parallel, improving efficiency.

[0412] Encryption Equipment: Utilizing professional hardware encryption devices, such as the Weishitong encryption device, provides high-strength encryption algorithms to ensure data security during upsampling, downsampling, and transmission. Compared to software encryption, hardware encryption devices offer higher encryption speed and security.

[0413] Network switches: Deploy 10 Gigabit Ethernet switches, such as the Huawei CloudEngine 12800 series, to provide high-speed and stable network connections, ensure fast data transmission at the network layer, and meet the network bandwidth requirements for data upsampling, downsampling, and transmission.

[0414] In a preferred embodiment of the present invention, the system further includes the following functional layer:

[0415] The storage layer is used to provide distributed data storage services.

[0416] The storage layer hardware configuration can be referenced as follows:

[0417] Distributed storage servers: Multiple Inspur AS13000G5 distributed storage servers are selected to build a distributed storage cluster. Each server is equipped with a large-capacity hard drive, such as a 16TB SATA hard drive, to provide ample storage space. These servers have powerful I / O processing capabilities to meet the needs of distributed data storage and retrieval.

[0418] High-speed network connection equipment: 10 Gigabit Ethernet switches are also used to connect the distributed storage servers to ensure high-speed and stable data transmission between servers, enabling rapid data interaction and synchronization in distributed storage.

[0419] Redundant Power Supply and Cooling System: Equip the servers and network equipment in the storage layer with redundant power supplies, such as the APC Symmetra LX series uninterruptible power supplies, to prevent data loss due to unexpected power outages. Simultaneously, install an efficient cooling system, such as a precision air conditioner, to ensure the equipment operates at a suitable temperature during extended periods, guaranteeing the stability and reliability of stored data.

[0420] like Figure 3 As shown, on the other hand, an application method for an AI-assisted decision-making power trading intelligent agent system is provided, the method comprising:

[0421] (1) such as Figure 3 Figure a shows the business process diagram for the system to proactively predict and output electricity trading forecast results. The process is as follows:

[0422] Through the data acquisition and processing layer, real-time big data of power transactions is collected, and data ETL cleaning, classification and processing are performed before being uploaded to the intelligent analysis layer.

[0423] The intelligent analysis layer performs intelligent analysis on the power trading big data based on machine learning models and predicts and outputs the corresponding power trading prediction results to the interaction and application layer.

[0424] The interaction and application layer displays the power trading big data and the corresponding power trading prediction results in real time.

[0425] The power transaction logs of the users mentioned above are stored and recorded through the interaction and application layers to generate corresponding power transaction storage logs.

[0426] This business process can provide electricity trading forecasts to traders, predicting the trends of various electricity trading factors. Implementation can be tailored to the specific principles and functions of the system described above.

[0427] (2) For example Figure 3Figure b shows the business process diagram of a user retrieving the electricity trading knowledge they need based on the system. The process is as follows:

[0428] User questions are input from the interaction and application layer and then sent to the intelligent analysis layer.

[0429] The intelligent analysis layer provides users with electricity trading knowledge tailored to their questions, based on the electricity trading knowledge database or the RAG retrieval model, and feeds it back to the interaction and application layer.

[0430] The interaction and application layer outputs and displays the electricity trading knowledge to the user;

[0431] The power transaction logs of the aforementioned users are stored and recorded through the interaction and application layers, generating corresponding power transaction evidence logs.

[0432] Through the retrieval service, based on RAG retrieval and large-model enhanced retrieval, we can achieve precise question-and-answer pair services for knowledge. Specific implementation can be achieved by combining the above-mentioned system functional application principles.

[0433] The following technologies can be used to support this architecture during development (users can choose for themselves):

[0434] Backend framework: Python's FastAPI or Flask / Java's Spring Boot.

[0435] Data processing libraries: Pandas, Polars, Dask.

[0436] Time-series databases: TimescaleDB or InfluxDB.

[0437] Vector databases: ChromaDB or Pinecone.

[0438] Agent / LLM frameworks: Qwen-Agent, LangChain, or LlamaIndex.

[0439] Large language models: OpenAI API (GPT-4 / GPT-3.5); or deploy open-source models locally such as Llama3, Qwen.

[0440] Frontend: React or Vue.js.

[0441] Therefore, this system has the following technical advantages compared to traditional power trading methods:

[0442] 1. Data Processing Layer

[0443] This system automatically processes massive amounts of high-frequency, multi-dimensional data, providing "deep insights" by using algorithms to uncover potential patterns and correlations.

[0444] 2. Prediction accuracy

[0445] This system performs "precise prediction" (prediction of each modality), reduces human experience errors, significantly improves the accuracy and scientific nature of prediction, and provides strong support for strategy formulation.

[0446] 3. Trader's work constraints

[0447] The system has a clear objective: "to liberate traders from heavy data-related work, allowing them to focus on strategy development and risk control."

[0448] 4. Transaction execution efficiency and cost

[0449] The core of this system is "smart contract-based power trading service", which enables automatic on-chain execution and settlement, reduces friction, improves efficiency, ensures security, reduces human error, and "reduces transaction costs".

[0450] 5. Information silos and collaborative decision-making

[0451] This system emphasizes providing a platform that integrates multiple functions, empowering analysts, risk managers, and others to achieve services such as intelligent analysis and retrieval, thereby improving overall collaboration efficiency and decision-making quality.

[0452] 6. User (trader / analyst) interaction and understanding

[0453] Advantages of this system: The system can provide "user inquiry and response service for electricity trading" and powerful data "visualization" function, improving user understanding and decision-making efficiency;

[0454] The system aims to provide "lightweight services" and "intelligent services," using AI to make complex power trading processes smoother and more convenient.

[0455] 7. Market circulation efficiency and overall benefits

[0456] This system aims to "improve the market circulation efficiency and effectiveness of electricity trading" through comprehensive intelligence, automation, cost reduction and efficiency improvement.

Claims

1. A power trading intelligent agent system based on AI-assisted decision-making, characterized in that, The system includes the following functional layers: The data acquisition and processing layer is used to collect big data from power transactions in real time and perform data ETL cleaning and classification processing. The intelligent analysis layer is used to perform intelligent analysis on the power trading big data based on machine learning models and predict and output corresponding power trading prediction results; and to provide users with power trading knowledge based on the power trading knowledge database or RAG retrieval model. The interaction and application layer is used to provide users with an interactive interface for intelligent electricity trading services.

2. The power trading intelligent agent system based on AI-assisted decision-making according to claim 1, characterized in that, The system also includes the following functional layers: The network layer is used to provide data upsampling, downsampling, and data transmission services based on data encryption.

3. The power trading intelligent agent system based on AI-assisted decision-making according to claim 1, characterized in that, The system also includes the following functional layers: The storage layer is used to provide distributed data storage services.

4. The power trading intelligent agent system based on AI-assisted decision-making according to claim 1, characterized in that, The data acquisition and processing layer includes: (1) A data acquisition system, including: The local data sampling port is used to collect static datasets of electricity transactions from the local database, including electricity transaction data in different dimensions; An online data sampling engine is used to collect relevant data from electricity transactions in real time, including meteorological data, power grid operation data, and fuel cost data. (2) A data processing system, including: The data cleaning module is used to clean the collected data. The ETL standardization module is used to retrieve the corresponding sampling data according to the established sampling rules and input it into the preset ETL standardization template for standardization processing.

5. The power trading intelligent agent system based on AI-assisted decision-making according to claim 1, characterized in that, The intelligent analysis layer includes: The data fusion and feature engineering module is used to perform feature engineering on the historically collected power trading big data. It uses a multimodal machine learning algorithm model to extract the features of each modality of power trading data in the power trading big data and perform feature fusion to generate several power trading data features. The intelligent prediction engine for electricity trading is used to deploy several electricity trading prediction models with different functional attributes, which are trained and generated based on machine learning algorithms; and, according to the prediction instructions input by the user, to retrieve the electricity trading features of the corresponding attributes and input them into the electricity trading prediction model of the corresponding attributes, predict and output the electricity trading prediction results of the corresponding attributes. The power trading knowledge database is used to vectorize the features of power trading data from different dimensions based on the embedding model vectorization technology and store them in a MySQL database to generate a power trading knowledge database and provide users with SQL-based power trading knowledge retrieval services. The RAG retrieval system is used to retrieve first power trading knowledge adapted to user queries from the power trading knowledge database based on the RAG model, and transmit the context of the first power trading knowledge to the LLM Agent via API. The LLM Agent then generates corresponding second power trading knowledge based on the context enhancement and outputs the second power trading knowledge to the user.

6. The power trading intelligent agent system based on AI-assisted decision-making according to claim 4, characterized in that, The intelligent analysis layer also includes: The Agent scheduler is used to parse and understand the natural speech instructions in the user's question based on the context of the first power trading knowledge, and to call the corresponding LLM Agent according to the instructions.

7. The power trading intelligent agent system based on AI-assisted decision-making according to claim 1, characterized in that, The interaction and application layer includes: A conversational interface is provided to offer users a chat window to interact with the intelligent analysis layer. The dashboard is used to visually display preset electricity trading information; API interfaces are used to provide APIs for accessing the system; The proactive alarm push module is used to proactively push alarm messages to users when a preset power trading early warning event is detected; The transaction evidence storage module is used to store and record the electricity transaction logs in which users participate, and generate corresponding electricity transaction evidence storage logs.

8. An application method of the AI-assisted decision-making-based intelligent agent system for power trading as described in any one of claims 1-7, characterized in that, The method includes: (1) Through the data acquisition and processing layer, real-time big data of power trading is collected and data ETL cleaning and classification are performed, and then uploaded to the intelligent analysis layer; The intelligent analysis layer performs intelligent analysis on the power trading big data based on machine learning models and predicts and outputs the corresponding power trading prediction results to the interaction and application layer. The interaction and application layer displays the power trading big data and the corresponding power trading prediction results in real time. The power transaction logs of the users mentioned above are stored and recorded through the interaction and application layers to generate corresponding power transaction storage logs. (2) User questions are input into the intelligent analysis layer through the interaction and application layer; The intelligent analysis layer provides users with electricity trading knowledge tailored to their questions, based on the electricity trading knowledge database or the RAG retrieval model, and feeds it back to the interaction and application layer. The interaction and application layer outputs and displays the electricity trading knowledge to the user; The power transaction logs of the aforementioned users are stored and recorded through the interaction and application layers, generating corresponding power transaction evidence logs.

9. An electronic device, characterized in that, The electronic device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in claim 8.

Citation Information

Cited By

  • Software and hardware integrated intelligent terminal power transaction system and method

    CN121120245A

  • Space-time task processing method and system and storage medium

    CN121349705A