Large language model driven conditional diffusion new energy output scene generation method

By using a conditional diffusion model driven by a large language model, combined with a deep residual network and one-dimensional convolution, the problems of low computational efficiency and insufficient accuracy in the generation of new energy power output scenarios are solved, achieving efficient and accurate generation of new energy power output scenarios and improving the stability and computational efficiency of power grid dispatch.

CN121580862BActive Publication Date: 2026-06-05DALIAN UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN UNIV OF TECH
Filing Date
2026-01-20
Publication Date
2026-06-05

Smart Images

  • Figure CN121580862B_ABST
    Figure CN121580862B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electricity, and particularly relates to a large language model driven conditional diffusion new energy output scene generation method. First, a conditional diffusion model suitable for new energy output scene generation of the power grid side is constructed, the conditional probability distribution of the actual output of new energy is learned implicitly by embedding the conditional information, and a scene set is generated based on a Markov chain. Second, a thinking chain optimization framework driven by a large language model is proposed, the semantic reasoning capability of the large language model is used to analyze the training state, and the optimal parameter interval is quickly locked under extremely low computing budget. The example verification result shows that the average Euclidean distance of the generated scene set is improved by more than 30.7% compared with the traditional method; the optimization efficiency and timeliness are greatly improved, under the extremely low computing budget of only allowing 10 iterations, the scene generation accuracy is further improved by about 1% compared with the Bayesian optimization method, and the scene set generation time is reduced by 87% compared with the Copula model; the reliability and timeliness of the dispatching decision are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electrical technology, specifically relating to a method for generating new energy output scenarios driven by a large language model. Background Technology

[0002] Against the backdrop of the global energy structure's low-carbon transformation, the installed capacity of wind and solar power has continued to grow rapidly. However, the inherent strong intermittency and spatiotemporal fluctuations of their output pose a severe challenge to the safe operation of the power system. When formulating day-ahead plans for new energy sources, power grids often adopt a deterministic dispatch mode where "the forecast value is the planned value." While this approach reduces computational complexity, large forecast deviations can lead to problems such as a surge in curtailment rates and insufficient reserve capacity. Especially when wind and solar clusters expand to the grid level, the multi-energy coupling effect and high-dimensional spatiotemporal correlation significantly amplify the output uncertainty. Therefore, developing a precise quantification method for the uncertainty of new energy output on the grid side is crucial to solving this problem.

[0003] Uncertainty quantification methods mainly include scenario generation, interval optimization, robust optimization, and information gap decision theory. Among these, scenario generation is a commonly used method for quantifying the uncertainty of renewable energy output. By constructing a random scenario set to simulate the actual renewable energy output process, it provides a data foundation and decision support for power system dispatch optimization. Scenario generation mainly includes three steps: probabilistic modeling, scenario sampling, and scenario reduction. However, not all methods need to cover all of these steps. It is worth noting that while using scenario reduction to select typical scenarios in optimization problems can significantly improve computational efficiency, it can lead to a loss of feasibility across all scenarios and introduce optimization bias. Based on existing research, scenario generation methods can be divided into three categories:

[0004] 1) Probability distribution-based methods: These methods construct joint probability models based on Copula functions, multidimensional Gaussian distributions, or kernel density estimation, and generate scenario sets through sampling. While these methods can characterize complex dependencies, their effectiveness is limited by model assumptions, making it difficult to capture the temporal correlation of new energy output.

[0005] 2) Time series methods: Linear methods such as ARIMA and state-space models are used to generate time series scenarios. These methods are computationally efficient but have limited scenario diversity and cannot characterize nonlinear interactions under multi-energy coupling. Since the first and second types of methods are usually designed for specific application goals, but the power generation characteristics of wind and solar combined output and wind and solar single output are different, the generality of the methods is lacking, which to some extent limits the promotion value of these methods in practical applications.

[0006] 3) Artificial Intelligence Algorithms: Artificial neural networks, support vector machines, or more advanced deep learning methods, such as generative adversarial networks (GANs) and diffusion models, offer advantages in high-dimensional nonlinear feature extraction. However, GANs are difficult to train, especially conditional GANs, which struggle to effectively provide implicit probability distribution information under given conditions when the conditional information is complex. Existing research on scene generation based on diffusion models can be mainly divided into unconditional input and conditional input. Diffusion models typically sample directly from prior distributions, making it difficult to consider the influence of factors such as weather, leading to biases in representing the conditional probability distribution of actual output. In contrast, conditional diffusion models have advantages in characterizing spatiotemporal correlations and multidimensional complex distributions, but their complex network architecture results in significant computational time consumption, which in turn greatly extends the hyperparameter optimization cycle, making it difficult to adapt to short-term scheduling scenarios requiring rapid online updates and responses. Furthermore, the feature selection and hyperparameter sensitivity issues of deep learning further exacerbate this dilemma. Given that hyperparameters directly determine the model's inductive bias and generalization boundary, how to efficiently lock in the optimal parameters within a limited computational budget has become a critical problem that urgently needs to be solved. Currently, hyperparameter optimization mainly relies on methods such as grid search, random search, and Bayesian optimization. Among them, grid search and random search are essentially computationally intensive, blind trial-and-error methods, and their efficiency is limited by the curse of dimensionality. Although Bayesian optimization utilizes historical information through surrogate models, it often faces cold-start difficulties in the initial search phase. In contrast, large language models, with their pre-trained prior knowledge, can understand the physical meaning and magnitude characteristics of parameters, directly eliminating invalid regions in the initial stage. At the same time, large language models rely on expert experience for logical reasoning rather than simple statistical fitting, enabling them to identify the impact of parameter adjustments on performance and quickly identify high-potential parameter domains with very few iterations.

[0007] From the perspective of research objects, scene generation can be divided into power plant scene generation and regional scene generation. Power plant scene generation mainly focuses on the generation of scenes for single or multiple power plants, with its core being the characterization of spatial correlations between power plants. However, power plant scene generation has significant limitations in characterizing the overall characteristics of a region, especially in the context of large-scale renewable energy grid connection, making it difficult to fully reflect the complex spatiotemporal coupling relationships within the region, thus limiting its applicability at the regional scale. Regional scene generation focuses on the generation of scenes in single or multiple regions, emphasizing the characterization of the complex spatiotemporal relationships of power plants within the region and the spatiotemporal correlations between multiple regions. However, in actual dispatching, the demand for grid-side scene generation is more prominent. Due to the significantly expanded spatial scope of grid-side scene generation, spatial correlations are often smoothed out, so its research focus tends to be more inclined towards temporal correlations and the accurate characterization of uncertainties in renewable energy output. However, existing methods are difficult to meet the grid-side's demand for accurate characterization of dynamic changes in renewable energy output. It is worth noting that the evaluation systems of existing scene generation methods are mostly limited to the theoretical level, lacking empirical research on the application effects of scene sets in actual dispatching, which may lead to a disconnect between theory and engineering practice. Summary of the Invention

[0008] To address the aforementioned issues, this invention proposes a large language model-driven method for generating conditional diffusion renewable energy output scenarios. First, a conditional diffusion model is constructed using a deep residual network and one-dimensional convolution. A progressive denoising mechanism captures the complex temporal correlations of the target, significantly improving computational efficiency while maintaining generation accuracy. Second, a large language model hyperparameter optimization method is developed, incorporating training information feedback and expert knowledge embedding. This allows the large language model to infer the training state based on the training loss trajectory and convergence state, and to adjust hyperparameters accordingly, solving the problems of poor stability and slow startup in traditional hyperparameter optimization methods. Then, the total renewable energy output of the region is directly modeled, effectively reducing the problem dimensionality and meeting the requirements of power grid operation. Finally, this invention applies all generated and retained high-fidelity output scenarios to the scheduling simulation of a certain river basin, and constructs a scenario quality evaluation system to replace traditional indicators, verifying the effectiveness of the method and its application value in practical engineering.

[0009] To achieve the above-mentioned technical objectives, the present invention is implemented through the following technical solution:

[0010] A large language model-driven method for generating renewable energy output scenarios first constructs a conditional diffusion model suitable for generating renewable energy output scenarios on the grid side. This model embeds conditional information to implicitly learn the conditional probability distribution of actual renewable energy output and generates scenario sets based on Markov chains. Then, a hyperparameter optimization model is constructed based on the large language model to achieve automatic iterative optimization of hyperparameters. Finally, high-quality renewable energy output scenarios are generated. The specific steps are as follows:

[0011] Step 1: Construct a conditional diffusion model:

[0012] The accuracy of renewable energy output scenarios directly affects the stability and security of the power grid. Therefore, constructing a high-quality renewable energy output scenario set on the power grid side is an important method to achieve renewable energy consumption.

[0013] This invention organizes the predicted power output of new energy sources into a tensor. The tensor is constructed using the actual output as a conditional input. The target data is shown in formulas (1) and (2).

[0014] (1)

[0015] (2)

[0016] In the formula: , They are respectively The predicted output of wind and solar power at any given time, among which , The total number of time periods in a day; , They are respectively The actual output of wind and solar power at any given moment.

[0017] Because the actual output of new energy sources is affected by factors such as weather conditions and equipment characteristics, its relationship with the predicted output is not a deterministic function, but rather follows a probability distribution conditioned on the predicted output. This invention, based on the known predicted output of new energy sources, implicitly learns the conditional probability of the actual output through deep learning and a large language model, and samples from this probability to obtain output scenarios that conform to actual statistical laws. As shown in equation (3).

[0018] (3)

[0019] In the formula: Implicit conditional probability distribution of the actual output of new energy sources.

[0020] This invention constructs a conditional diffusion model based on a deep residual network and a one-dimensional convolutional architecture. Using the predicted output of new energy sources as the conditional input, the model fits Gaussian noise during the reverse denoising process. In the generation stage, initial noise is sampled from a standard normal distribution, and the trained conditional diffusion model, combined with the prediction conditions, is used to gradually remove noise, reconstructing a set of output scenarios that conform to actual statistical laws. Compared with traditional statistical modeling methods, this method can fully explore the potential patterns in historical data, significantly improving the rationality and diversity of the scenarios, thus providing high-quality new energy output scenarios for subsequent peak shaving optimization.

[0021] The conditional diffusion model learns Markov chains from simple to complex distributions and generates different renewable energy output scenarios through progressive stochastic transformations. The model includes a diffusion process and a denoising process. The diffusion process gradually adds noise to the original data, while the denoising process gradually removes the noise to recover the original input data. The core of the conditional diffusion model lies in predicting the noise in the denoising process and regenerating new sample data through the denoising process.

[0022] Conditional diffusion models, through diffusion and denoising processes, Modeling. The diffusion process and the denoising process can be described using two Markov chains, whose Markov chain transition probabilities are respectively used... and It means that among them For tensor At time step Data at that time.

[0023] The diffusion process gradually adds noise to the data, causing it to deviate from the original distribution of actual new energy output. It gradually evolves into a standard normal distribution, and the transition probability of the Markov chain is shown in formula (4).

[0024] (4)

[0025] In the formula: For time steps The corresponding variance, the total number of time steps is ; It is the identity matrix; express Obey For the mean, The covariance follows a normal distribution.

[0026] The denoising process uses the constructed model to gradually recover the new energy output samples from the noise, and its Markov chain transition probability is shown in formula (5).

[0027] (5)

[0028] In the formula: These are the learnable parameters in the constructed model; For the noise reduction process, the time step hour The variance of is homoscedastic; The mean of the Gaussian distribution calculated for the constructed model is shown in formula (6).

[0029] (6)

[0030] In the formula: ; ; The constructed model is based on time steps tensor and tensor The generated noise.

[0031] Will , and As input, the noise component at the current time step is predicted based on the constructed conditional diffusion model. This noise component is used to guide the reverse denoising process, thereby gradually reconstructing the new energy output scenario that meets the conditional constraints from Gaussian noise, realizing the reverse process of the conditional diffusion model. This is to accurately characterize... To avoid gradient explosion caused by excessive network layers, this invention constructs a conditional diffusion model based on a deep residual network, which consists of four core modules: target data processing module, conditional input data processing module, time step processing module, and residual module.

[0032] The target data processing module and the conditional input data processing module extract features and transform shapes from the data using one-dimensional convolutional and fully connected layers, respectively, providing input for the subsequent residual module. The time-step processing module transforms time-step information into continuous values ​​through an embedding layer and embeds them into the processed target data via a fully connected layer to enhance the model's ability to capture dynamic temporal features. The residual layer consists of one-dimensional convolutional and fully connected layers, mitigating the gradient vanishing problem through skip connections and residual connections, thereby improving the model's training stability and feature learning ability. This structural design not only enhances the model's ability to fit complex data distributions but also ensures the efficiency and robustness of the training process.

[0033] The training and scene generation process of the conditional diffusion model is as follows:

[0034] Training process: First, the pre-processed actual power output of new energy sources is used as the target data. Using the predicted output of new energy sources as a conditional input These are input together into the training system. Then, a time step is randomly selected within the total time step range. Based on this time step, the target data is diffused through a forward diffusion process. Gaussian noise is added to generate corresponding noise samples. Then, the generated noise samples and the selected time step are combined... and conditional input Simultaneously, the noise is input into the constructed conditional diffusion model. The conditional diffusion model outputs predicted noise based on the current parameters. Then, the loss function value between the predicted noise and the actual added noise is calculated. The gradient is calculated using the backpropagation algorithm, and the model parameters of the constructed conditional diffusion model are updated to minimize the prediction error. Finally, an iterative process is performed to determine if training is complete, i.e., whether the maximum number of iterations has been reached or whether the loss value has converged. If not, a new time step is selected and the above process is repeated; if training is complete, the final trained model parameters are output.

[0035] Scene generation process: First, initialize the current time step. Total diffusion steps Next, enter the input conditions. And a random noise sample is generated by sampling from the standard normal distribution. Then it enters a denoising loop to determine the current time step. Is it greater than 0: If Then the current noise sample Time step and conditional input The input model produces prediction noise, which is then used to calculate the denoised samples. And update the current sample, then decrement the time step by 1. And return to the decision step; if If the loop ends, the current sample is output as the final new energy power output scenario.

[0036] Step 2, Hyperparameter tuning driven by a large language model:

[0037] Hyperparameter optimization plays a crucial role in deep learning, directly impacting model performance, training efficiency, and generalization ability. Optimizing hyperparameters can significantly improve model convergence speed, prediction accuracy, and stability, thus providing a more reliable guarantee for solving complex tasks. Traditional methods in hyperparameter optimization have significant limitations: grid search is hampered by the curse of dimensionality, Bayesian optimization is limited by the cold start problem, and random search, while computationally simple, is ineffective. However, large language models can effectively propose hyperparameters in the initial search phase, making them suitable for scenarios with limited computational resources as well as for supplementing traditional methods when larger computational resources are available. Therefore, large language models are introduced to achieve intelligent hyperparameter optimization for conditional diffusion models. Hyperparameter optimization is expressed by formulas (7) and (8).

[0038] (7)

[0039] (8)

[0040] In the formula: and These are the training and validation objectives, respectively. and These are hyperparameters and model parameters, respectively. The optimal combination of hyperparameters found; Given hyperparameters The optimal model parameters after training convergence; The objective function value is calculated based on the optimal model parameters. Equations (7) and (8) are used to find the hyperparameters that minimize the validation loss when the training objective is trained to convergence. When computational power is limited, manual search through repeated trials is usually adopted, and hyperparameters are selected based on prior knowledge or experience.

[0041] First, a problem description and hyperparameter search space are provided to the large language model, which then outputs a set of hyperparameters to be validated. Next, a loop optimization process is initiated, comprising two core steps: training with the current hyperparameters and evaluating performance using validation metrics; and feeding the validation metrics back to the large language model as new hints to guide the generation of the next set of hyperparameters. These steps are repeated until a predetermined number of iterations are reached, ultimately yielding the optimized hyperparameter combination.

[0042] The prompt design method of this invention consists of six parts: character and role, state observation, reasoning, format constraints, historical information, and exception handling. It generates prompt words by integrating general knowledge and specific hyperparameters. The specific construction content of each part is as follows:

[0043] Tasks and Roles: Define the identity and specific task objectives of the large language model. In this invention, the large language model is defined as "a machine learning expert in scene generation and denoising diffusion models"; the task objective is clearly defined as "optimizing the hyperparameters of a ResNet-based conditional diffusion model, with the goal of improving the validation set accuracy to above a preset threshold (e.g., 85%)"; simultaneously, the model is provided with basic dataset information (e.g., 110,000 training data points and 28,000 validation data points) to establish the optimization context.

[0044] State observation: Used to provide real-time feedback on the current training state of the model, providing quantitative metrics to the large language model through dynamic variable injection. Specifically, this includes: the current validation set accuracy, the current hyperparameter combination used (learning rate, batch size, number of iterations), and the statistical characteristics of the current training loss, including "loss curve sampling" (e.g., "0.85, 0.61, ..., 0.31") and "tail stability standard deviation," to help the model determine its convergence trend.

[0045] Reasoning and reasoning: Embedding expert experience and logic guides the large language model in reasoning. Specific reasoning rules include parameter effect analysis and trend diagnosis. Parameter effect analysis: Judging whether the learning rate is too large by combining training loss oscillations; analyzing batch size by combining generalization performance and memory usage; judging whether the number of iterations is underfitting based on whether the training loss has converged. Trend diagnosis: Analyzing the loss curve sampling to determine the rate of descent; checking the tail stability standard deviation; if the value is extremely small and the training loss no longer changes significantly, consider stopping training due to convergence or fine-tuning the learning rate.

[0046] Search space: Define the physical constraints of hyperparameters to prevent the model from generating invalid parameters. Set the learning rate range to [0.00001, 0.1], the batch size range to [16, 512], and the number of iterations to [10, 500].

[0047] Format constraints: Enforce the standardized output format of large language models to facilitate automated parsing by the program. The model must provide only one set of hyperparameters in the order of learning rate, batch size, and number of iterations; output only three numbers separated by commas; any additional text, explanations, JSON tags, or code blocks are strictly prohibited (example: 0.001,32,150).

[0048] Historical Information and Anomaly Handling: This section mainly includes two parts: historical information and anomaly handling. Historical Information: Provides a complete record of the previous round, including the round index, the hyperparameters used, and their corresponding accuracy and training loss features. Contrastive learning is used to assist in parameter adjustment. Anomaly Handling: If a program error occurred in the previous round, the specific error type and error details are fed back to the large language model, requiring it to avoid the error in the current adjustment.

[0049] The complete algorithm flow for parsing the results of a large language model and embedding a conditional diffusion model mainly includes the following three steps.

[0050] Initialization phase: First, initialize the hyperparameters and read the initial prompt words and the configuration file of the large language model.

[0051] Iterative optimization phase: Determine if the current number of optimization attempts is less than the set maximum number of attempts. If so, proceed with the following loop: First, train the conditional diffusion model based on the current hyperparameters and calculate the model's validation set accuracy. Then, proceed to the sub-process of obtaining the large language model response. (The number of attempts is not specified in the original text.) If the number of attempts is less than the maximum, obtain the response from the large language model based on the prompt words and configuration file, and process it according to the following logic: (a) If the response status code indicates that the request failed, then... (a) Increment by 1, wait for a period of time and then retry; (b) If the response status is normal but the content does not conform to the specified format, then... (c) If the generated parameters exceed the set boundaries, then... Add 1, requiring the large language model to regenerate parameters that meet the constraints and retry; (d) if the format check passes, exit the sub-process. If after the sub-process ends, If the number of attempts exceeds the maximum, an abnormal interruption is triggered, and an error log is output for subsequent analysis. After successfully obtaining a response, the response content is parsed to read the new hyperparameter combination, and the model is retrained based on this combination, calculating accuracy and loss trend characteristics. At this point, a convergence check is performed: if continuous... If the accuracy improvement of a round is less than a preset threshold, the entire iteration loop is terminated; otherwise, the current hyperparameter combination, accuracy, and loss trend features are saved to a JSON file, and this information is injected into the prompt word template for the next iteration. At the same time, historical calculation results are read and the prompt words are updated before entering the next loop.

[0052] Output phase: When the iteration loop ends or the termination condition is met, the final optimal combination of hyperparameters and the corresponding model accuracy are output.

[0053] For the task of generating new energy output scenarios, a verification index adapted to the actual needs of the power grid is constructed according to relevant power grid specifications, as shown in formula (9). This formula focuses on the accuracy of the high-output range, which is of most concern to power grid dispatch, and is more in line with engineering requirements than the traditional Wasserstein distance index.

[0054] (9)

[0055] In the formula: ACC is the validation metric; Cap is the new scenario. time The output power, of which , This represents the total number of scenes. , For time indexing, there are a total of 96 time periods throughout the day, with a 15-minute step size.

[0056] Step 3, New Energy Output Scenario Generation Process:

[0057] Based on the conditional diffusion model in step 1 and the hyperparameter tuning method in step 2, the process for generating new energy power output scenarios can be obtained, as follows:

[0058] First, Z-score normalization is used to preprocess the actual and predicted power output data of new energy sources to eliminate dimensional differences and ensure data distribution consistency. Then, a conditional diffusion model is constructed to generate a set of new energy power output scenarios by learning from the preprocessed data. Based on this, the generated scenario set is systematically evaluated, and the evaluation results, along with initial prompts, are input into a large language model for hyperparameter optimization. Through multiple rounds of iterative optimization, a set of optimal hyperparameters is finally obtained. Finally, based on the optimized hyperparameters, the conditional diffusion model is retrained to generate a high-quality set of new energy power output scenarios.

[0059] The beneficial effects of this invention are:

[0060] This invention differs from other scene generation methods by proposing a conditional diffusion renewable energy output scene generation method driven by a large language model. The method then simulates actual cascade hydropower dispatch to comprehensively evaluate the quality of the scene set. The proposed method demonstrates excellent versatility and practicality, significantly outperforming traditional methods in both combined wind and solar power generation and single-power generation. The Euclidean distance and mean absolute error of the scene set are reduced by at least 14.9%, while the computation time is reduced by more than 87% compared to autoencoder and Copula methods, significantly improving computational efficiency. Furthermore, hyperparameter optimization of the conditional diffusion model based on the large language model achieves significant results with extremely low computational cost, improving accuracy by approximately 1% compared to traditional methods. In a typical monthly simulated dispatch of cascade hydropower stations in a certain river basin, the proposed method effectively optimizes dispatch decisions, reducing system residual load fluctuations to 20.5%. Simultaneously, the study reveals an inconsistency between scene generation quality evaluation indicators and actual dispatch effects. This finding highlights the necessity of comprehensive evaluation and provides important reference for future research on renewable energy output scene generation methods. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the conditional diffusion model;

[0062] Figure 2 This is a structural diagram of the conditional diffusion model;

[0063] Figure 3 It refers to the model training and scene generation process;

[0064] Figure 4 It is a hyperparameter optimization process;

[0065] Figure 5 This is a flowchart for generating new energy power output scenarios;

[0066] Figure 6This is an ablation experiment and efficiency comparison of hyperparameter optimization methods for large language models; among them, (a) is the iterative process of four methods, including large language model optimization, random sampling, Latin hypercube sampling and Bayesian optimization, and (b) is the iterative process of random search to achieve the same accuracy.

[0067] Figure 7 The comparison shows the average Euclidean distance between the new energy power output scenarios and the actual power output using different methods; where (a) is the wind-solar combined power output scenario, (b) is the wind power output scenario, and (c) is the photovoltaic power output scenario.

[0068] Figure 8 This is a comparison of the scene sets generated by different methods on days with high prediction errors; where (a)~(l) are respectively the scene sets of conditional diffusion type wind and solar power output, Copula model wind and solar power output, autoencoded model wind and solar power output, empirical model wind and solar power output, conditional diffusion type wind power output, Copula model wind power output, autoencoded model wind power output, empirical model wind power output, conditional diffusion type photovoltaic power output, Copula model photovoltaic power output, autoencoded model photovoltaic power output, and empirical model photovoltaic power output.

[0069] Figure 9 These are the spectrum analysis diagrams of different method scenario sets; where (a)~(l) are the spectrum analysis diagrams of the following scenarios, respectively: conditional diffusion type wind-solar joint power output scenario set, Copula model wind-solar joint power output scenario set, autoencoded model wind-solar joint power output scenario set, empirical model wind-solar joint power output scenario set, conditional diffusion type wind power output scenario set, Copula model wind power output scenario set, autoencoded model wind power output scenario set, empirical model wind power output scenario set, conditional diffusion type photovoltaic power output scenario set, Copula model photovoltaic power output scenario set, autoencoded model photovoltaic power output scenario set, and empirical model photovoltaic power output scenario set.

[0070] Figure 10 These are the simulation scheduling results of different scenario generation methods; among them, (a) is the simulation scheduling result of a typical dry month, and (b) is the simulation scheduling result of a typical flood month. Detailed Implementation

[0071] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.

[0072] 1) Taking the total photovoltaic and wind power output of a certain region as the research object, the data includes the output process every 15 minutes from January 1, 2017 to December 31, 2023. The actual output of this dataset is the data collected and aggregated by the new energy power plant acquisition terminal, and then uploaded to the dispatch center for further aggregation. In the data preprocessing stage, this invention performs linear interpolation on missing values, and based on the installed capacity data of a certain province from January 2017 to December 2023, normalizes the actual and predicted output of new energy into an output rate index to eliminate the long-term pattern changes caused by the expansion of the scale of new energy, i.e., the concept drift problem. The dataset is divided into a training set (January 1, 2017 - May 31, 2021), a validation set (June 1, 2021 - May 31, 2022), and a test set (June 1, 2022 - December 31, 2023). To address the issue of declining historical data reliability due to the rapid development of new energy sources and changes in power grid structure, a rolling scenario generation strategy is adopted. This strategy generates the next month's output scenario based on the current training set, dynamically adapting to data evolution and effectively improving the timeliness of scenario generation. Experiments were conducted on a computer equipped with an NVIDIA GeForce RTX4060 graphics card and an AMD R9-7945HX processor. The model was developed using PyTorch 1.8.0 backend. The large language model used in this invention is DeepSeek-V3.1-Terminus (hereinafter referred to as DeepSeek), and a third-party cloud service platform is called via API, eliminating the need to occupy local GPU memory resources. Table 1 summarizes the hyperparameter settings used in the large language model hyperparameter optimization process. The large language model parameters adopt the standard recommended values ​​of the third-party cloud service platform. Except for adjusting the frequency penalty coefficient for the characteristics of power terminology, all other parameters remain in the platform's preset state to ensure the standardization and reproducibility of the experimental environment. A larger number of scenarios helps to approximate the original probability distribution of new energy sources, but it also significantly increases the computational complexity of the scheduling model, affecting its feasibility in practical applications. Based on the conventional settings in the process of integrating power grid use and balancing the scale and complexity of scheduling problems, this invention sets the number of scenarios generated to 100.

[0073] The overall flowchart of this invention is shown in Figure 5. The conditional diffusion model constructed by the method of this invention learns Markov chains from simple distributions to complex distributions, and generates different new energy output scenarios through progressive random transformations. This model includes a diffusion process and a denoising process, and its diffusion principle is as follows: Figure 1 As shown in the figure, the process involves gradually adding noise to the original data through diffusion and then gradually removing the noise through denoising to recover the original input data. The core of the conditional diffusion model lies in predicting the noise during the denoising process and regenerating new sample data through the denoising process. The specific structure is as follows: Figure 2As shown, it consists of four core modules: target data processing module, conditional input data processing module, time step processing module, and residual module. The training and scene generation process of the conditional diffusion model is as follows: Figure 3 As shown.

[0074] The conditional diffusion model constructed by the method of this invention mainly adjusts the learning rate, training batch size, and number of iterations. Among these, the learning rate is one of the most crucial hyperparameters during training, directly affecting the direction and step size of model parameter updates. Furthermore, the conditional diffusion model requires gradual denoising and sample generation; an excessively large learning rate leads to instability in the denoising process, while an excessively small learning rate results in slow convergence. The training batch size directly affects the accuracy of gradient estimation and training efficiency, while the number of iterations determines whether the model converges sufficiently, directly impacting the generation quality. Hyperparameter optimization is as follows: Figure 4 As shown.

[0075] Table 1. Large Language Model Parameter Settings

[0076]

[0077] Figure 6 (a) compares the accuracy of four hyperparameter optimization methods on the validation set as a function of iterations. The optimization method based on the large language model shows a highly consistent convergence trajectory across 10 experiments, with a final accuracy of 77.1%, which is superior to 76.3% for random search, 76.4% for Latin hypercube sampling, and 76.3% for Bayesian optimization. The results demonstrate the significant advantages of semantic reasoning over traditional numerical fitting in low-budget scenarios.

[0078] Figure 6 The statistical results in (b) show that to achieve the same level of accuracy, random search requires approximately 110 iterations, while the method of this invention requires only 10. This confirms that the thought chain reasoning effectively reduces the invalid search space and significantly improves the algorithm's efficiency. It is worth noting that, in addition to low time cost, the economic cost of the method of this invention is also controllable. Statistical results show that completing a full 10-round optimization requires approximately 26,500 tokens as input and only 70 tokens as output, making the cost negligible.

[0079] Furthermore, to verify the importance of expert prior knowledge in prompt word design, this invention further compares the simple prompt word strategy after removing the loss trend. Table 3 shows that, in the absence of training state feedback, the large language model struggles to perceive its convergence, and the optimal parameters it searches for only achieve an accuracy of 75.44%. This indicates that the structured prompt framework constructed in this invention, which includes physical constraints and state feedback, is the key factor in overcoming the performance bottleneck, rather than the random exploration of the large language model itself.

[0080] Finally, to verify the generality and robustness of the proposed framework, this invention, in addition to DeepSeek, also introduced Kimi-k2-thinking (hereinafter referred to as Kimi) and qwen3-235b-a22b-instruct-2507 (hereinafter referred to as Qwen) for cross-platform testing. Experimental results show that, while keeping the prompt words and hyperparameters of the large language model unchanged, Kimi and Qwen achieve accuracies of 76.1% and 76.7%, respectively. It is worth noting that although different base models exhibit significant behavioral differences—for example, Kimi's complex output format relies on the multiple parsing mechanism of this invention, and Qwen's exploration strategy is more conservative—thanks to structured prompt engineering and robust parsing mechanisms, all the above models successfully converged, and their performance was significantly better than traditional Bayesian optimization. This indicates that the method of this invention has good cross-platform transferability and can stably achieve better hyperparameter tuning results than traditional methods on different base models. However, DeepSeek has the highest compatibility with the complex semantic prompt framework constructed in this invention. Therefore, DeepSeek remains the preferred large language model for this invention.

[0081] Table 2. Comparison of optimization effects and final hyperparameters under different prompt word strategies.

[0082]

[0083] 2) To verify the effectiveness of the proposed method, three commonly used methods were selected for comparison: the Gaussian Copula method, the autoencoder method, and the empirical method. The Gaussian Copula method generates scenes by constructing a joint probability distribution and is suitable for data with clear statistical characteristics; the autoencoder method generates scenes by dimensionality reduction and reconstruction and has strong nonlinear fitting ability; the empirical method generates scenes based on empirical rules, which has high computational efficiency but limited accuracy.

[0084] To comprehensively evaluate the quality of the generated scenarios, this invention uses Euclidean distance, mean absolute error, effective coverage, and dynamic time warping as quantitative indicators. Euclidean distance and mean absolute error measure the overall deviation between the generated scenario and the actual output; smaller values ​​indicate that the generated scenario is closer to the actual output. Effective coverage, as shown in formula (10), indicates that the scenario generation method can include more actual output data within a smaller output rate range, serving as a comprehensive evaluation of the scenario set coverage and the width of the output rate range. Dynamic time warping measures the similarity between the scenario and the actual output, eliminating the influence of temporal differences through flexible alignment of the time axis; smaller values ​​indicate higher similarity.

[0085] (10)

[0086] In the formula: For effective coverage; , Time periods The minimum and maximum output rates of the generated scene. The longest time period; For time period Actual output rate; It is a binary variable that takes the value 1 if the condition in parentheses is met, and takes the value 0 otherwise. , As an adjustable parameter, the present invention takes , The aim is to emphasize the impact of the power output range.

[0087] Figure 7 The table compares the average Euclidean distance between the new energy output scenarios and actual output of each method. For further quantitative analysis, Table 4 details the calculation results of various indicators for each method's scenario set and calculates the relative differences compared to the proposed method. A positive relative difference indicates an advantage of the proposed method, while a negative one indicates a disadvantage. Table 3 sets up three typical wind-solar power output ratio schemes: 1:1 combined output (wind-solar combined), 1:2 combined (high proportion of solar), and 2:1 combined (high proportion of wind), aiming to compare and analyze the performance of each method under different wind and solar penetration rates.

[0088] Table 3. Evaluation and Comparison of Scene Generation Methods Based on Multiple Indicators

[0089]

[0090] Depend on Figure 7 It can be seen that the conditional diffusion model exhibits the smallest Euclidean distance under both combined wind and solar power output and single wind and solar power output, indicating that the generated scene has the smallest error compared to the actual power output and the best quality. In contrast, the empirical model fluctuates more, the generated scene deviates more from reality, and the stability is poor. The Copula model and the autoencoder model perform better in some cases, but their overall error is still higher than that of the conditional diffusion model.

[0091] Table 3 shows that the conditional diffusion model exhibits optimal performance in most power output scenarios. Although its effective coverage is slightly lower than the empirical model under high-proportion photovoltaic conditions, all other indicators are significantly better than the comparative methods, with a minimum improvement of 14.9% and a maximum improvement of 201.8% in the Euclidean average distance. The autoencoder model and the Copula model perform similarly, while the empirical model yields the worst results. To further analyze the time-segmented scenario quality, extreme condition performance, and computational efficiency of the conditional diffusion model, this invention is based on... The principle divides the combined wind and solar power output into peak, average, and low periods, and compares the scene quality of each method across different time periods using Euclidean distance, as shown in Table 4. The scene quality evaluation results for extremely high and extremely low combined wind and solar power outputs according to this invention are shown in Table 5.

[0092] Table 4. Comparison of Euclidean distances between different scenario sets and actual output at different time periods (unit: MW)

[0093]

[0094] Table 4 shows that the conditional diffusion model has the smallest deviation between the output and the actual output in each time period, the autoencoder method is slightly better than the Copula method, while the empirical model still has the worst time period index evaluation results.

[0095] Table 5 Comparison of various indicators for extreme events using different methods

[0096]

[0097] Analysis of the results in Table 5 shows that under extreme output conditions, the conditional diffusion model exhibits significant performance advantages: all indicators of the extremely high and extremely low output scenarios generated by the model are significantly improved compared to other methods. This result demonstrates the reliability and practicality of the conditional diffusion model under extreme scenarios.

[0098] Table 6 shows the 30-day computation time (in seconds) for different methods in both combined wind and solar power output and single wind and solar power output scenarios. The results show that the conditional diffusion model's computation time is within 400 seconds, representing a reduction of over 87% compared to the autoencoder model and the Copula model, demonstrating significantly higher computational efficiency. The empirical model has the fastest computation speed, but its generated scenario error is the largest, making it difficult to meet practical application requirements.

[0099] Table 6 Comparison of calculation time for 30-day scene sets (unit: seconds)

[0100]

[0101] Considering both computational efficiency and scene quality, the conditional diffusion model ensures high-quality scene generation while having a shorter computation time. It has a significant advantage in generating large-scale new energy power output scenarios and has strong application value.

[0102] The accuracy of renewable energy output forecasting has a significant impact on the stable operation of the power grid. Larger forecast errors require increased reserve capacity to ensure power supply and load balance, leading to higher costs. This invention selects typical days with significant forecast errors as the research object. These typical days are chosen from the top 10% of days with the largest Euclidean distance between predicted and actual renewable energy output. Different methods are used to generate corresponding wind-solar combined output and single wind-solar output scenarios, which are then compared with actual and predicted outputs. Figure 8 As shown.

[0103] Depend on Figure 8It can be seen that the conditional diffusion model exhibits significant advantages in generating both combined wind and solar power output and single wind and solar power output scenarios. The generated scenario sets are densely distributed and free of outliers, closely matching the actual power output. In contrast, the scenario sets generated by the other three methods are more loosely distributed, and the accuracy and stability of the scenarios are reduced, indicating that their ability to fit complex data distributions is limited.

[0104] To further explore the frequency distribution characteristics of new energy power output scenarios, this invention uses discrete Fourier transform to perform spectral analysis on typical daily scenarios, as shown in formula (11). By studying the high-frequency and low-frequency components of the scenario set, its consistency with the actual power output fluctuation pattern is evaluated, thereby verifying the quality and reliability of the scenario set, as shown in formula (11). Figure 10 As shown.

[0105] (11)

[0106] In the formula: It is a frequency signal, for In frequency index Frequency components at that location, , The total number of data; For data at a point in time The sampled value at that location, ; The imaginary unit, .

[0107] Figure 9 Spectral analysis results show that the energy output of new energy sources is mainly concentrated in the low-frequency components, with a significantly lower proportion of high-frequency components. The low-frequency components primarily characterize the long-term trend and overall time-series dependence of the output curve, while the high-frequency components correspond to short-term random fluctuations. Calculations revealed that the energy proportion of the first seven frequency components is as high as 99%, verifying its characteristic of low high-frequency noise. Comparison shows that the proposed method, compared to other methods generating combined wind and solar power output and single-output scenario sets, most closely approximates the actual output in the low-frequency components, while exhibiting lower high-frequency components. This indicates that the proposed method not only more accurately captures the trend characteristics of actual output but also effectively avoids the introduction of additional noise.

[0108] 3) Case Study Analysis Based on Cascade Hydropower Dispatch

[0109] The method proposed in this invention is mainly aimed at power grid operation scenarios. To verify its engineering applicability, a short-term dispatching empirical analysis was conducted on a cascade hydropower station in a river basin within the province. Hydropower has long been an important peak-shaving and frequency-regulating power source for the power grid due to its flexible regulation and fast response speed. To meet the actual needs of the power grid, wind and solar combined output is used to represent new energy output. Table 7 shows the basic information of the cascade hydropower station.

[0110] Table 7 Basic Information of Cascade Hydropower Stations

[0111]

[0112] A certain provincial power grid regards the consumption of new energy as the primary purpose of hydropower dispatch. Therefore, a short-term peak-shaving model is constructed to meet this requirement. The objective function is shown in formulas (12) to (15).

[0113] (12)

[0114] (13)

[0115] (14)

[0116] (15)

[0117] In the formula: and These are the scene code and the total number of scenes, respectively. This invention sets... It is 100; and To separately schedule time period numbers and total number of time periods, this invention sets... It is 96; For the scene Mid-term The absolute value of the anomaly; For the scene Time period The remaining load; This represents the average remaining load of the system. For time period The system load; For hydroelectric power station During the period contribution; For the scene Time period The new energy source is contributing power.

[0118] Due to abundant water flow during the flood season, cascade hydropower stations mainly undertake flood control tasks and fully meet the base load demand of the power grid. Therefore, this invention mainly focuses on the operation scenario where there is no water wastage during the dry season and the power grid undertakes peak shaving tasks. Figure 10This table displays the residual load fluctuation values ​​of hydropower dispatch schemes optimized based on renewable energy output scenario sets generated by various methods during typical months of the dry and flood seasons, under actual renewable energy output. The vertical axis represents the residual load fluctuation value; a lower value indicates a better peak-shaving effect. Table 8 shows the average residual load fluctuation, peak-valley difference, and relative differences compared to the conditional diffusion model under different methods. A positive relative difference indicates that the conditional diffusion model is superior to the comparison methods. A smaller peak-valley difference indicates a smaller demand for output adjustment range for other power units, such as thermal power units. When the residual load peak-valley difference exceeds the regulation capacity of thermal power units, it is necessary to maintain power balance by starting and stopping the units. It is worth noting that the cost of a single thermal power unit start-up and shutdown operation is high, approximately hundreds of thousands of yuan. Therefore, reducing the residual load peak-valley difference can effectively reduce the frequency of unit start-ups and shutdowns and related costs.

[0119] Table 8. Remaining load fluctuation and peak-valley difference under different generation methods in different scenarios.

[0120]

[0121] comprehensive Figure 10 As shown in Table 8, the conditional diffusion model has the best peak-shaving effect, especially during the dry season, where it is significantly better than other methods. Its residual load fluctuation is reduced by at least 20.5%, and the peak-to-valley difference is reduced by at least 10.4%, which significantly improves the stability of system operation and reduces the power generation cost caused by the start-up and shutdown of thermal power units.

Claims

1. A method for generating conditional diffusion renewable energy output scenarios driven by a large language model, characterized in that, First, a conditional diffusion model suitable for generating renewable energy output scenarios on the grid side is constructed. This model implicitly learns the conditional probability distribution of actual renewable energy output by embedding conditional information, and generates scenario sets based on Markov chains. Then, a hyperparameter optimization model is built based on a large language model to achieve automatic iterative optimization of hyperparameters. Finally, high-quality renewable energy output scenario generation is achieved. The specific steps are as follows: Step 1: Construct a conditional diffusion model: Organize the predicted output of new energy sources into a tensor The tensor is constructed using the actual output as a conditional input. The target data is shown in formulas (1) and (2); (1) (2) In the formula: , They are respectively The predicted output of wind and solar power at any given time, among which , The total number of time periods in a day; , They are respectively The actual output of wind and solar power at any given moment; Based on the known predicted output of new energy sources, the conditional probability of actual output is implicitly learned through deep learning and large language models, and output scenarios that conform to actual statistical laws are sampled from this. As shown in equation (3); (3) In the formula: Implicit conditional probability distribution of actual output from new energy sources; Using the predicted output of new energy sources as the input condition, Gaussian noise in the reverse denoising process is fitted through a conditional diffusion model. In the generation stage, initial noise is sampled from a standard normal distribution, and noise is gradually removed by combining the trained conditional diffusion model with the prediction conditions to reconstruct an output scenario set that conforms to the actual statistical law. The conditional diffusion model includes a diffusion process and a denoising process. Noise is gradually added to the original data through the diffusion process, and noise is gradually removed through the denoising process to restore the original input data, thus regenerating new sample data. Step 2, Hyperparameter tuning driven by a large language model: A large language model is introduced to realize intelligent hyperparameter optimization of the conditional diffusion model; hyperparameter optimization is expressed by formulas (8) and (9); (8) (9) In the formula: and These are the training and validation objectives, respectively. and These are hyperparameters and model parameters, respectively. The optimal combination of hyperparameters found; Given hyperparameters The optimal model parameters after training convergence; The objective function value is calculated based on the optimal model parameters; Formulas (8) and (9) are the hyperparameters that minimize the validation loss when the training objective is trained to convergence; First, a problem description and hyperparameter search space are provided to the large language model, which then outputs a set of hyperparameters to be verified. Subsequently, an iterative optimization process is initiated, which consists of two steps: training based on the current hyperparameters and evaluating performance using validation metrics; and feeding the validation metrics as new cues back to the large language model and guiding the generation of the next set of hyperparameters. The above steps are repeated until the predetermined number of iterations is reached, and finally the optimized hyperparameter combination is obtained. For the task of generating new energy power output scenarios, in accordance with the power grid specifications, verification indicators adapted to the actual needs of the power grid are constructed, as shown in formula (10); (10) In the formula: ACC is the validation metric; Cap is the new scenario. time The output power, of which , This represents the total number of scenes. , For time-based indexing, with a 15-minute step size, there are a total of 96 time periods throughout the day; Step 3, New Energy Output Scenario Generation Process: Based on the conditional diffusion model in step 1 and the hyperparameter tuning method in step 2, the process for generating new energy power output scenarios is obtained, as follows: First, the Z-score standardization method is used to preprocess the actual and predicted power output data of new energy sources to eliminate differences in units and ensure the consistency of data distribution. Then, a conditional diffusion model is constructed to generate a set of new energy power output scenarios by learning from the preprocessed data. On this basis, the generated scenario set is systematically evaluated, and the evaluation results and initial prompts are input into a large language model for hyperparameter optimization. Through multiple rounds of iterative optimization, a set of optimal hyperparameters was finally obtained. Finally, based on the optimized hyperparameters, the conditional diffusion model was retrained to generate a high-quality set of new energy power output scenarios.

2. The method for generating conditional diffusion renewable energy output scenarios driven by a large language model according to claim 1, characterized in that, Conditional diffusion models, through diffusion and denoising processes, Modeling; the diffusion and denoising processes are described using two Markov chains, whose Markov chain transition probabilities are respectively used... and It means that among them For tensor At time step Data at that time; The diffusion process gradually adds noise to the data, causing it to deviate from the original distribution of actual new energy output. It gradually evolves into a standard normal distribution, and the transition probability of the Markov chain is shown in formula (5); (5) In the formula: For time step The corresponding variance, the total number of time steps is ; It is the identity matrix; express Obey For the mean, The covariance follows a normal distribution. The denoising process uses a neural network to gradually recover the new energy output samples from the noise, and its Markov chain transition probability is shown in formula (6). (6) In the formula: These are the learnable parameters of the neural network; For the noise reduction process, the time step hour The variance of is homoscedastic; The mean of the Gaussian distribution calculated by the neural network is shown in formula (7); (7) In the formula: ; ; For neural networks based on time steps tensor and tensor The generated noise; Will , and As input, the noise component at the current time step is predicted based on the constructed conditional diffusion model. This noise component is used to guide the reverse denoising process, thereby gradually reconstructing the new energy output scenario that meets the conditional constraints from Gaussian noise, realizing the reverse process of the conditional diffusion model.

3. The method for generating conditional diffusion new energy output scenarios driven by a large language model according to claim 1, characterized in that, The conditional diffusion model consists of four modules: target data processing module, conditional input data processing module, time step processing module, and residual module; The target data processing module and the conditional input data processing module extract features and transform shapes from the data through one-dimensional convolutional and fully connected layers, respectively, to provide input for the subsequent learning of the residual module. The time step processing module transforms the time step information into continuous values ​​through the embedding layer and embeds them into the processed target data through the fully connected layer to enhance the model's ability to capture dynamic features over time. The residual layer consists of one-dimensional convolutional and fully connected layers, which alleviate the gradient vanishing problem through skip connections and residual connections, thereby improving the model's training stability and feature learning ability.

4. The method for generating conditional diffusion new energy output scenarios driven by a large language model according to claim 1, characterized in that, The training and scene generation process of the conditional diffusion model is as follows: Training process: First, the pre-processed actual power output of new energy sources is used as the target data. Using the predicted output of new energy sources as a conditional input Both are input into the training system; then, a time step is randomly selected within the total time step range. Based on this time step, the target data is diffused through a forward diffusion process. Add Gaussian noise to generate corresponding noise samples; then, combine the generated noise samples with the selected time step. and conditional input Simultaneously, the input is fed into the constructed conditional diffusion model; the conditional diffusion model outputs predicted noise based on the current parameters; Next, the loss function value between the noise predicted by the conditional diffusion model and the actual added noise is calculated; the gradient is calculated using the backpropagation algorithm, and the model parameters of the conditional diffusion model are updated to minimize the prediction error; finally, the training is iterated to determine whether the training is over, i.e., whether the maximum number of iterations has been reached or whether the loss value has converged; if it is not over, a new time step is selected and the above process is repeated; if the training is over, the final trained model parameters are output. Scene generation process: First, initialize the current time step. Total diffusion steps Next, enter the conditions. And generate a random noise sample from the standard normal distribution. Then it enters the noise reduction loop to determine the current time step. Is it greater than 0: If Then the current noise sample Time step and conditional input Input the model to obtain prediction noise, and use the prediction noise to calculate the denoised samples. And update the current sample, then decrement the time step by 1 and return to the decision step; if If the loop ends, the current sample is output as the final new energy power output scenario.

5. The method for generating conditional diffusion new energy output scenarios driven by a large language model according to claim 1, characterized in that, The prompts described in step 2 consist of six parts: characters and roles, state observation, reasoning, format constraints, historical information, and exception handling. Prompt words are generated by integrating general knowledge and specific hyperparameters. The specific content of each part is as follows: Tasks and Roles: Define the identity and specific task objectives of the large language model; define the large language model as "a machine learning expert for scene generation and denoising diffusion models"; the task objective is clearly defined as "optimizing the hyperparameters of the conditional diffusion model based on the ResNet architecture, with the goal of improving the validation set accuracy to above a preset threshold"; at the same time, provide the model with basic information about the dataset and establish the background environment for optimization. State observation: used to provide real-time feedback on the current training state of the model, providing quantitative indicators to the large language model through dynamic variable injection; specifically including: current validation set accuracy, current hyperparameter combination, and statistical characteristics of the current training loss, including loss curve sampling and tail stability standard deviation; Reasoning and reasoning: Embedding expert experience and logic to guide the large language model in reasoning; specific reasoning rules include two types: parameter effect analysis and trend diagnosis; parameter effect analysis: judging whether the learning rate is too large by combining the training loss oscillation; analyzing the batch size by combining generalization performance and memory usage; judging whether the number of iterations is underfitting based on whether the training loss has converged; trend diagnosis: analyzing the loss curve sampling to judge the rate of descent; checking the tail stability standard deviation, if the value is extremely small and the training loss no longer changes significantly, then consider stopping training or fine-tuning the learning rate due to convergence; Search space: Define the physical constraints of hyperparameters to prevent the model from generating invalid parameters; set the learning rate range to [0.00001, 0.1], the batch size range to [16, 512], and the number of iterations range to [10, 500]. Format constraints: Enforce a standardized output format for large language models to facilitate automated parsing; require the model to "provide only one set of hyperparameters, in the order of learning rate, batch size, and number of iterations"; output only three numbers separated by commas; strictly prohibit the output of any additional text, explanations, JSON tags, or code blocks; Historical Information and Anomaly Handling: This includes two parts: historical information and anomaly handling. Historical Information: Provides a complete record of the previous round, including the round index, the hyperparameters used, and their corresponding accuracy and training loss features. Contrastive learning is used to assist in parameter adjustment. Anomaly Handling: If a program error occurred in the previous round, the specific anomaly type and error details are fed back to the large model, requiring it to avoid the error in this adjustment.

6. The method for generating conditional diffusion new energy output scenarios driven by a large language model according to claim 1, characterized in that, In step 2, the complete algorithm flow for parsing the large language model results and embedding the conditional diffusion model includes the following three steps; Initialization phase: First, initialize the hyperparameters and read the initial prompt words and the configuration file of the large language model; Iterative optimization phase: Determine if the current number of calculations is less than the set maximum number of calculations. If so, proceed with the following loop: First, train the conditional diffusion model based on the current hyperparameters and calculate the model's validation set accuracy; then, proceed to the sub-process of obtaining the large model response; and finally, within the number of attempts... If the number of attempts is less than the maximum, obtain the response from the large model based on the prompt words and configuration file, and process it according to the following logic: (a) If the response status code indicates that the request failed, then... (a) Increment by 1, wait for a period of time and then retry; (b) If the response status is normal but the content does not conform to the specified format, then... (c) If the generated parameters exceed the set boundaries, then... Add 1, requiring the large model to regenerate parameters that meet the constraints and retry; (d) if the format check passes, exit the subprocess; if after the subprocess ends, If the number of attempts exceeds the maximum, an abnormal interruption is triggered, and manual intervention is required to fix the prompt words and code. After successfully obtaining the response, the response content is parsed to read the new hyperparameter combination, and the model is retrained based on the combination to calculate the accuracy and loss trend features. At this point, a convergence test is performed: if continuous... If the accuracy improvement of the cycle is less than the preset threshold, the entire iteration loop will be terminated. Otherwise, save the current hyperparameter combination, accuracy, and loss trend features to a JSON file, and inject this information into the prompt word template for the next iteration. At the same time, read the historical calculation results and update the prompt words, and enter the next loop. Output phase: When the iteration loop ends or the termination condition is met, the final optimal combination of hyperparameters and the corresponding model accuracy are output.