Time sequence data few-sample generation method, device and equipment based on power time sequence large model, medium and product
By constructing a small-sample cue vector and a conditional cue vector based on a large-scale power time series model, and conducting multiple rounds of training, consistency correction, and boundary verification, the problem of insufficient historical data in new power systems is solved, and the stability and efficiency of time series data generation are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
- Filing Date
- 2026-04-15
- Publication Date
- 2026-05-15
AI Technical Summary
In new power systems, especially in newly built industrial parks, newly commissioned power plants, the initial stage of distributed power generation integration, and under extreme weather conditions, insufficient historical data or incomplete sample distribution make it difficult for traditional methods to maintain stable performance in scenarios with few samples or cold starts, and they are prone to overfitting.
A method based on a large power time series model is adopted. By acquiring enhanced feature vectors, constructing few-sample cue vectors and conditional cue vectors, and using joint loss function and multi-scale constraint function for multi-round training, combined with consistency correction and operational boundary verification, power time series data is generated.
It improves the stability of time series data generation in power time series models under data-scarce or cold-start scenarios, reduces the need for historical samples, and reduces redundant modeling and computing power consumption.
Smart Images

Figure CN122045827A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a method, apparatus, equipment, medium and product for generating time series data with few samples based on a large power time series model. Background Technology
[0002] With the accelerated construction of new power systems, large-scale integration of new energy sources, and increasingly complex power load structures, power grid operation exhibits high volatility, strong randomness, and multi-scale periodicity. In newly built industrial parks, newly commissioned power plants, the initial stages of distributed power generation integration, and under extreme weather conditions, there is often a lack of historical data or incomplete sample distribution.
[0003] Traditional methods often rely on diffusion models or generative adversarial networks to model historical loads, renewable energy output, and other data. These are then trained with a large number of samples to generate scenario curves, or on basic time-series models to perform predictions with few samples. However, these methods primarily focus on distribution fitting or improving prediction accuracy. When faced with few samples or cold starts, they are prone to overfitting and struggle to maintain stable performance in scenarios with limited samples. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, equipment, medium, and product for generating few samples of time series data based on a large power time series model, which can improve the stability of sample generation, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a method for generating few-sample time-series data based on a large-scale power time-series model, including:
[0006] A large-scale power time-series model is obtained; the large-scale power time-series model is obtained based on pre-training of enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors, and location encoding vectors from historical time-series data of multiple regions;
[0007] Based on historical power data of the target area, a few-sample cue vector is constructed, and based on external time-series variables of the target area, a conditional cue vector is constructed. The sample cue vector is used to characterize the historical change characteristics of the target area, and the conditional cue vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model.
[0008] Using few-sample cue vectors and conditional cue vectors as input data for a large-scale power time-series model, and using the joint loss function and multi-scale constraint function as optimization objectives, the large-scale power time-series model is trained in multiple rounds. During each round of training, consistency correction is performed on the current time-series data output by the large-scale power time-series model.
[0009] Obtain power time series data generated by the large power time series model after multiple rounds of training, and perform operational boundary verification on the power time series data.
[0010] In one embodiment, the process of obtaining the enhanced feature vector includes:
[0011] Historical time-series data from multiple regions are preprocessed, and time feature vectors are extracted from the preprocessed historical time-series data; the historical time-series data includes load data, wind power data, photovoltaic data, meteorological data, and time variables;
[0012] Periodic encoded features are obtained from the time feature vector, and the periodic encoded features are converted into time embedding vectors.
[0013] The location encoding vector is obtained from historical time series data, and the time feature vector, time embedding vector and location encoding vector are fused to obtain the enhanced feature vector.
[0014] In one embodiment, the step of constructing a few-sample cue vector based on historical power data of the target area includes:
[0015] Historical power data is feature-encoded to obtain statistical feature vectors, and then the statistical feature vectors are normalized to obtain normalized vectors.
[0016] The normalized vector is converted into a few-sample cue vector through a feature mapping function; the feature mapping function can be a linear transformation function or a nonlinear mapping model.
[0017] In one embodiment, the joint loss function is obtained by weighting the model loss function, power balance constraint function, operating boundary constraint function, and ramp rate constraint function; wherein the weighting coefficient of the operating boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function; the multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
[0018] In one embodiment, the step of performing consistency correction on the current time-series data output by the large power time-series model includes:
[0019] Constraint checks are performed on the current time series data output by the large power time series model to obtain the corresponding check results; among them, the constraint checks include power outage check, power balance check, and ramp rate anomaly check;
[0020] If the test results do not meet the constraints, obtain the abnormal data in the current time series data and correct the abnormal data.
[0021] In one embodiment, the step of performing operational boundary verification on power time-series data includes:
[0022] Under the condition that the power time series data meets the comprehensive evaluation conditions, the power time series data is subjected to operation boundary verification. The comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation and cycle consistency evaluation; the operation boundary verification includes equipment rated value verification, historical statistics verification and power grid dispatch verification.
[0023] If the verification passes, a structured report is generated based on the power time-series data; the structured report includes the time interval, power range, confidence level, and application scenario description.
[0024] Secondly, this application also provides a device for generating few-sample time-series data based on a large-scale power time-series model, comprising:
[0025] The model acquisition module is used to acquire a large-scale power time-series model; the large-scale power time-series model is obtained based on pre-training of enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors, and location encoding vectors from historical time-series data of multiple regions.
[0026] The vector construction module is used to construct a few-sample cue vector based on historical power data of the target area, and to construct a conditional cue vector based on external time-series variables of the target area. The sample cue vector is used to characterize the historical change characteristics of the target area; the conditional cue vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model.
[0027] The model training module is used to train the large-scale power time series model in multiple rounds, using a small number of cue vectors and conditional cue vectors as input data and a joint loss function and a multi-scale constraint function as optimization objectives. In each round of training, consistency correction is performed on the current time series data output by the large-scale power time series model.
[0028] The sample generation module is used to acquire power time series data generated by the large power time series model after multiple rounds of training, and to perform operational boundary verification on the power time series data.
[0029] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps of any one of the first aspects.
[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method steps of any one of the first aspects.
[0031] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method steps of any one of the first aspects.
[0032] The aforementioned method, apparatus, equipment, medium, and product for generating time-series data with few samples based on a large-scale power time-series model acquires the large-scale power time-series model, constructs a few-sample cue vector based on historical power data of the target region, and constructs a conditional cue vector based on external time-series variables of the target region. Using the few-sample cue vector and conditional cue vector as input data to the large-scale power time-series model, and employing a joint loss function and multi-scale constraint function as optimization objectives, the large-scale power time-series model is trained in multiple rounds. The resulting power time-series data is then obtained, and the operational boundaries of the power time-series data are validated. This approach reduces the need for historical samples in the large-scale power time-series model, minimizes redundant modeling and computational consumption, and improves the stability of time-series data generation in scenarios with scarce data or cold starts. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is an application environment diagram of a method for generating few samples of time series data based on a large power time series model in one embodiment;
[0035] Figure 2 This is a flowchart illustrating a method for generating few samples of time-series data based on a large-scale power time-series model in one embodiment.
[0036] Figure 3 This is a flowchart illustrating a method for generating few samples of time-series data based on a large-scale power time-series model, as described in another embodiment.
[0037] Figure 4 This is a structural block diagram of a time series data few-sample generation device based on a large power time series model in one embodiment;
[0038] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] The method for generating few samples of time-series data based on a large power time-series model provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 is used to acquire a large-scale power time-series model. Based on historical power data of the target area, it constructs a few-sample cue vector and a conditional cue vector based on external time-series variables of the target area. Using the few-sample cue vector and the conditional cue vector as input data to the large-scale power time-series model, and using the joint loss function and multi-scale constraint function as optimization objectives, it performs multiple rounds of training on the large-scale power time-series model, acquires the power time-series data generated by the multi-round training model, and performs boundary verification on the power time-series data. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0041] In one exemplary embodiment, such as Figure 2 As shown, a method for generating few-sample time-series data based on a large-scale power time-series model is provided, and this method is applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 208. Wherein:
[0042] S202: Obtain a large-scale power time series model; the large-scale power time series model is obtained based on pre-training of enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors and location encoding vectors from historical time series data of multiple regions.
[0043] Optionally, the construction and pre-training of a large-scale power time-series model is a fundamental step in achieving high-quality generation with few samples. Its core objective is to establish a basic power time-series model with cross-regional and cross-scenario generalization capabilities. This involves collecting historical load data from multiple regions, wind and solar power output data, meteorological data, and exogenous variables such as holiday information, and constructing a unified data standard and normalization processing flow. Differentiated preprocessing strategies are adopted for different types of data, including periodic decomposition and standardization of load data, physical characteristic transformation and rated power normalization of wind power data, irradiance normalization and time encoding of solar power data, multivariate standardization and lag feature construction of meteorological data, and embedding and encoding of calendar variables. A standardized input representation is formed through a unified time alignment and multi-source splicing mechanism. Subsequently, self-supervised pre-training was performed using a transformer-based encoder-decoder structure or a decoder-only structure. Through tasks such as mask reconstruction, sequence prediction, and multi-scale contrastive learning, the model learned the periodicity, trend, and random fluctuation characteristics of power time series. At the same time, location encoding and time embedding mechanisms were introduced to enhance the model's ability to express intraday, intraweek, and seasonal patterns. Finally, a basic power time series model with general representation capabilities was formed, laying a unified representation foundation for subsequent few-sample adaptation and generation.
[0044] S204: Based on historical power data of the target area, construct a few-sample cue vector and based on external time-series variables of the target area, construct a conditional cue vector; the sample cue vector is used to characterize the historical change characteristics of the target area; the conditional cue vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model.
[0045] Optionally, by feature encoding limited historical data of the target area, statistical distribution features, periodic structure features, and fluctuation intensity features are extracted. Structured feature extraction is performed on the limited historical data of the target area to achieve few-sample statistical feature encoding, which is then converted into a few-sample cue vector through a feature mapping function. The few-sample cue vector is injected into the hidden representation layer of the power time-series basic model through a cross-attention fusion module, enabling the model to dynamically adjust the generated distribution based on limited sample information during the generation phase. The statistical features include: daily periodic power distribution features, used to describe the power variation patterns at different times of the day; peak-valley load ratio features, used to reflect the proportional relationship between the system's peak load and valley load; fluctuation intensity index, used to characterize the degree of fluctuation in the power sequence over a continuous time period; and meteorological sensitivity index, used to describe the correlation between power changes and meteorological factors.
[0046] Optionally, power system operation constraints are introduced during sample generation, and a constraint loss function is used to optimize model parameters, ensuring that the generated sequence satisfies statistical distribution characteristics and the physical laws of the power system during the generation stage. Specifically, a conditional cue vector is constructed based on meteorological forecast information, load level information, and power grid operating condition information to characterize the impact of the current or future operating environment on the prediction results. Exogenous variables include meteorological forecast information, load level information, and power grid operating condition information. Meteorological forecast information includes variables such as temperature, humidity, wind speed, and irradiance; load level information includes load level and load state characteristics; and power grid operating condition information includes power generation output, system load, and operating constraint parameters.
[0047] S206: Using the few-sample cue vector and conditional cue vector as input data for the large-scale power time series model, and using the joint loss function and multi-scale constraint function as optimization objectives, the large-scale power time series model is trained in multiple rounds; wherein, during each round of training, consistency correction is performed on the current time series data output by the large-scale power time series model.
[0048] Optionally, the few-sample cue vector is constructed based on historical data to characterize the long-term statistical characteristics and historical change patterns of the target object; the conditional cue vector is constructed based on exogenous variables to characterize the impact of the current or future operating environment on the prediction results. Applying both to the large-scale power time-series model allows the model to maintain consistency with historical trends while dynamically adjusting to changes in external conditions, enabling the model to generate corresponding power time-series data under different operating scenarios. Specifically, the large-scale power time-series model uses an autoregressive or diffusion generation method to progressively output future time-series data.
[0049] Optionally, to ensure that the generated data conforms to the operating laws of the power system, a physical constraint embedding mechanism is introduced during model training and generation. This transforms the power system operating constraints into differentiable constraint functions and incorporates them into the model optimization objective. Furthermore, to ensure structural consistency across different time scales, daily-scale features, weekly-scale periodic features, and seasonal-scale trend features are extracted from the generated sequences, and the distribution distance between the generated sequences and historical sequences is calculated. Based on this, a joint loss function and multi-scale constraint functions are used as optimization objectives to train the large-scale power time-series model in multiple rounds. During training, after each round of generated sequence output, consistency correction is performed on the current time-series data output by the large-scale power time-series model to ensure that the final output power time-series data meets engineering operation requirements.
[0050] Optionally, during training, low-rank adaptation (LoRA) is used to locally update the model parameters, ensuring that the newly added parameters account for only 1% to 5% of the original model parameters. This allows for rapid transfer while maintaining the main structure of the original model. Simultaneously, a meta-learning strategy is introduced to optimize the few-sample transfer path. This strategy enhances the model's transferability across different regions or scenarios. It learns the model's general initialization parameters through multi-task training and rapidly updates these parameters based on a small amount of sample data from the target region. This enables the model to effectively transfer from the general model to the target model, thereby improving prediction stability and trend consistency in cold-start scenarios. Ultimately, this results in a lightweight adaptive generative model tailored to a specific region or device.
[0051] S208: Obtain the power time series data generated by the large power time series model after multiple rounds of training, and perform operational boundary verification on the power time series data.
[0052] Optionally, power time-series data for the target region is generated using the trained power time-series model. The generated data is then validated against actual operating boundaries to identify potential deviations. These actual operating boundaries ensure that the generated data remains within the limits of power system safety and equipment capacity. If the validation passes, a structured report is output, including the time interval, power range, confidence level, and application scenario description. If the validation fails, model parameter updates are returned. This ultimately forms a complete closed-loop process from data input, few-sample adaptation, physical constraint generation to result evaluation, providing highly reliable time-series data support for initial modeling of renewable energy integration, extreme condition simulation, and planning analysis.
[0053] The aforementioned method for generating time-series data with few samples based on a large-scale power time-series model involves acquiring the large-scale power time-series model, constructing a few-sample cue vector based on historical power data of the target region, and constructing a conditional cue vector based on external time-series variables of the target region. The few-sample cue vector and conditional cue vector are used as input data for the large-scale power time-series model, and the joint loss function and multi-scale constraint function are used as optimization objectives. The large-scale power time-series model is trained in multiple rounds to obtain the power time-series data generated by the trained model. Furthermore, the operational boundaries of the power time-series data are validated. This approach reduces the need for historical samples in the large-scale power time-series model, minimizes redundant modeling and computational consumption, and improves the stability of time-series data generation in scenarios with scarce data or cold starts.
[0054] In an exemplary embodiment, the process of obtaining the enhanced feature vector includes: preprocessing historical time-series data from multiple regions and extracting time feature vectors from the preprocessed historical time-series data; the historical time-series data includes load data, wind power data, photovoltaic data, meteorological data, and time variables; obtaining periodic encoded features based on the time feature vectors and converting the periodic encoded features into time embedding vectors; obtaining location encoded vectors based on the historical time-series data and fusing the time feature vectors, time embedding vectors, and location encoded vectors to obtain the enhanced feature vector.
[0055] Optionally, during the data input stage, the timestamp information in the time series is parsed to extract time features such as hour, date, day of the week, and month, forming a time feature set. Based on these time features, periodic codes for daily, weekly, and seasonal cycles are constructed. The daily cycle is used to characterize the changing patterns of intraday load and renewable energy output, the weekly cycle is used to represent the differences between weekdays and weekends, and the seasonal cycle is used to reflect the changing trends on an annual scale. On this basis, the periodic information is converted into a time embedding vector of a unified dimension using sine / cosine functions or embedding mapping. Simultaneously, to preserve the positional information of the sequence, a positional encoding vector is constructed for each time step in the input sequence to represent the relative or absolute position of the data in the time series. The time feature vector, positional encoding vector, and time embedding vector are fused to obtain an enhanced feature vector, enabling the model to simultaneously perceive temporal sequence information and multi-scale periodic features, achieving effective modeling and prediction of intraday, intraweekly, and seasonal patterns.
[0056] In this embodiment, historical time-series data from multiple regions are preprocessed, and time feature vectors are extracted from the preprocessed historical time-series data. Periodic coding features are obtained based on the time feature vectors, and the periodic coding features are converted into time embedding vectors. Location coding vectors are obtained based on the historical time-series data, and the time feature vectors, time embedding vectors, and location coding vectors are fused to obtain enhanced feature vectors. This can improve the model's ability to model continuous temporal dependencies, improve the accuracy of time-series representation, thereby improving the model's feature expression ability and few-sample generalization ability, and ensuring the periodic consistency and temporal rationality of subsequently generated data.
[0057] In an exemplary embodiment, the step of constructing a few-sample cue vector based on historical power data of a target area includes: performing feature encoding on the historical power data to obtain a statistical feature vector, and normalizing the statistical feature vector to obtain a normalized vector; converting the normalized vector into a few-sample cue vector through a feature mapping function; the feature mapping function is a linear transformation function or a nonlinear mapping model.
[0058] Optionally, structured feature extraction is performed on a small amount of historical power data from the target area to obtain statistical feature vectors that characterize the load output distribution, periodicity, peak-to-valley ratio, and fluctuation intensity of the area, used to depict the inherent operating patterns of the target object. The statistical feature vectors are then scaled to eliminate dimensional differences and numerical deviations between different features, ensuring stability and consistent numerical ranges in subsequent feature mapping processes, and avoiding model training anomalies due to uneven feature magnitudes. After normalizing the input statistical feature vectors, feature transformation is performed through linear transformation or a nonlinear mapping model to obtain a fixed-dimensional vector representation, the mathematical expression of which is:
[0059]
[0060] in, For statistical feature vectors, For mapping functions, This is a few-sample cue vector. The few-sample cue vector is used to characterize the statistical properties of historical data and is input into the prediction model as prior information to improve the model's prediction accuracy under few-sample conditions.
[0061] In this embodiment, by performing feature encoding on historical power data to obtain statistical feature vectors, and then normalizing the statistical feature vectors to obtain normalized vectors, the normalized vectors are converted into few-sample cue vectors through a feature mapping function. This enables efficient encoding and injection of few-sample information, thereby improving the generation stability in few-sample scenarios.
[0062] In an exemplary embodiment, the joint loss function is obtained by weighting the model loss function, power balance constraint function, operating boundary constraint function, and ramp rate constraint function; wherein, the weighting coefficient of the operating boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function; the multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
[0063] Optionally, to ensure that the generated data meets the operating rules of the power system, a physical constraint embedding mechanism is introduced during the model training and generation process. The power system operating constraints are transformed into differentiable constraint functions and added to the model optimization objective, including: power balance constraint function, operating boundary constraint function and ramp rate constraint function.
[0064] For example, power balance constraints are used to ensure that the system's generating power and load power satisfy a balance relationship, and their mathematical expression is:
[0065]
[0066] in, Indicates power generation capacity. Indicates the amount of electricity purchased from external sources. This indicates the load power.
[0067] Operating boundary constraints are used to ensure that the unit output does not exceed the equipment operating range, and their mathematical expression is:
[0068]
[0069] in, To the maximum output of the unit, This is the minimum output of the unit.
[0070] The rate-of-climb constraint is used to limit the rate of power change between adjacent time points, and its mathematical expression is:
[0071]
[0072] in, This represents the maximum gradeability.
[0073] The final joint loss function is as follows:
[0074]
[0075] in, The model loss function, These are the weighting parameters. The weighting parameters are used to balance the impact of each loss term on model training. Their values are set or adaptively adjusted according to the dimensions and constraint importance of each loss term to ensure that the model meets both prediction accuracy and physical constraints. Preferably, the relationship between the weighting parameters is as follows: Among them, the operational boundary constraints are used to ensure the safe operation of the equipment and are of the highest importance, with a relatively large weight; the power balance constraints are used to maintain the energy consistency of the system, and are second in importance; the ramp constraints mainly limit the rate of change and have a certain degree of flexibility in actual operation, with a relatively small weight, thereby achieving a reasonable balance between model accuracy and physical constraints.
[0076] The multi-scale constraint function is used to calculate the distribution distance between the model output sequence and the real input sequence at multiple time scales such as daily, weekly, and seasonal, ensuring that the generated sequence remains consistent with the real sequence in terms of overall statistical distribution, periodic structure, and trend pattern. Its mathematical expression is:
[0077]
[0078] in, Indicates daily cycle characteristics, Indicates the periodic characteristics, Indicates seasonal trend characteristics, This represents the distribution distance function.
[0079] In an exemplary embodiment, the step of performing consistency correction on the current time series data output by the large power time series model includes: performing constraint checks on the current time series data output by the large power time series model to obtain corresponding check results; wherein, the constraint checks include power outage checks, power balance checks, and ramp rate anomaly checks; if there are check results that do not meet the constraint conditions, obtaining abnormal data in the current time series data and correcting the abnormal data.
[0080] Optionally, after generating the sequence output, the generated results are subjected to constraint verification, which includes: power outage verification, power balance verification, and ramp rate anomaly verification. Power outage verification is achieved by determining whether the predicted power exceeds preset upper and lower limits; power balance verification is achieved by calculating the deviation between the generated power and the load power; ramp rate anomaly verification is achieved by comparing the power change at adjacent times with the maximum ramp rate. If any verification result does not meet the corresponding constraint condition, it is determined to be abnormal data. If a time point that does not meet the constraint condition is detected, the abnormal data is corrected using a local adjustment algorithm. Specifically, when power outage is detected, the corresponding data is limited to the preset upper and lower limits; when power imbalance is detected, power is compensated through proportional adjustment or allocation; when ramp rate anomaly is detected, the power change at adjacent times is limited.
[0081] In this embodiment, constraint checks are performed on the current time series data output by the large power time series model to obtain the corresponding check results. If the check results do not meet the constraint conditions, abnormal data in the current time series data is obtained and corrected. The corrected sequence that meets the constraint conditions ensures that the output power time series data meets the engineering operation requirements, thereby improving the stability of time series data generation of the large power time series model in data-scarce or cold-start scenarios.
[0082] In an exemplary embodiment, the step of performing operational boundary verification on power time-series data includes: performing operational boundary verification on the power time-series data if the power time-series data meets the comprehensive evaluation conditions; wherein, the comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation, and cycle consistency evaluation; the operational boundary verification includes equipment rated value verification, historical statistics verification, and grid dispatch verification; if the verification passes, a structured report is generated based on the power time-series data; the structured report includes time interval, power range, confidence level, and application scenario description.
[0083] Optionally, the generated power time-series data is comprehensively assessed for statistical and temporal characteristics using three indicators: distribution distance evaluation, peak-valley error evaluation, and periodic consistency evaluation. This ensures that the data is consistent with actual patterns in overall distribution, extreme points, and fluctuation cycles. Subsequently, the generated data undergoes physical consistency verification against the actual operating boundaries to identify potential deviations. The actual operating boundaries ensure that the generated data remains within the limits of power system safety and equipment capacity. This includes: equipment rated value verification (e.g., upper and lower limits of generator power, energy storage charging and discharging capacity, and line transmission capacity); historical statistical verification (calculating upper and lower limit ranges based on historical load and output data); and grid dispatch verification (e.g., verification of reserve capacity, peak-valley regulation capacity, and dynamic safety margin). By comparing the generated data with the actual operating boundaries, physical consistency verification is achieved, identifying potential deviations. These boundaries include both preset fixed values and dynamic adjustments based on historical and real-time dispatch data to balance safety and flexibility. After all assessments and verifications meet the standards, the generated data is compiled into a structured report containing time intervals, power ranges, confidence levels, and application scenario descriptions, ensuring the results are quantifiable, traceable, and directly usable.
[0084] In this embodiment, by performing operational boundary verification on the power time series data when the comprehensive evaluation conditions are met, and generating a structured report based on the power time series data when the verification is passed, the statistical characteristics and time series patterns of the generated time series data can be ensured to be accurate and reliable, thereby improving the reliability and scalability of model engineering applications.
[0085] In one exemplary embodiment, such as Figure 3 As shown, a method for generating few samples of time series data based on a large-scale power time series model is provided. This method includes the following steps:
[0086] (1) Historical data standardization processing: The historical time series data of multiple regions are preprocessed and the time feature vector of the preprocessed historical time series data is extracted; the historical time series data includes load data, wind power data, photovoltaic data, meteorological data and time variables; periodic coding features are obtained based on the time feature vector and converted into time embedding vectors; the location coding vector is obtained based on the historical time series data and the time feature vector, time embedding vector and location coding vector are fused to obtain the enhanced feature vector.
[0087] (2) Pre-training of large-scale power time series model: Obtain the large-scale power time series model; the large-scale power time series model is obtained by pre-training based on the enhanced feature vector; the enhanced feature vector is obtained by fusing the time feature vector, time embedding vector and location encoding vector of historical time series data from multiple regions.
[0088] (3) Feature vector encoding: Historical power data is encoded to obtain statistical feature vectors, and the statistical feature vectors are normalized to obtain normalized vectors; the normalized vectors are converted into few-sample hint vectors through feature mapping functions; the feature mapping function is a linear transformation function or a nonlinear mapping model, and conditional hint vectors are constructed based on the external time series variables of the target area; the sample hint vectors are used to characterize the historical change characteristics of the target area; the conditional hint vectors are used to characterize the degree of influence of the current operating environment on the large power time series model.
[0089] (4) Physical constraints and multi-scale consistency constraints optimization: The power time series model is trained in multiple rounds using the few-sample cue vector and conditional cue vector as input data and the joint loss function and multi-scale constraint function as optimization objectives. During each round of training, the current time series data output by the power time series model is constrained and the corresponding test results are obtained. The constraint tests include power outage test, power balance test and ramp rate anomaly test. If the test results do not meet the constraints, abnormal data in the current time series data are obtained and the abnormal data is corrected.
[0090] The joint loss function is obtained by weighting the model loss function, power balance constraint function, operating boundary constraint function, and ramp rate constraint function. The weighting coefficient of the operating boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function. The multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
[0091] (5) Sample quality verification: Obtain the power time series data generated by the power time series large model after multiple rounds of training, and perform operation boundary verification on the power time series data if the power time series data meets the comprehensive evaluation conditions; among which, the comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation and cycle consistency evaluation; operation boundary verification includes equipment rated value verification, historical statistics verification and grid dispatch verification; if the verification is passed, obtain a structured generation report based on the power time series data; the structured generation report includes time interval, power range, confidence level and application scenario description.
[0092] In this embodiment, by acquiring a large-scale power time-series model, constructing a few-sample cue vector based on historical power data of the target region, and constructing a conditional cue vector based on external time-series variables of the target region, the few-sample cue vector and the conditional cue vector are used as input data for the large-scale power time-series model. The joint loss function and multi-scale constraint function are used as optimization objectives to train the large-scale power time-series model in multiple rounds. The power time-series data generated by the large-scale power time-series model after multiple rounds of training are obtained, and the running boundary of the power time-series data is verified. This can reduce the need for historical samples in the large-scale power time-series model, reduce redundant modeling and computing power consumption, and improve the stability of time-series data generation of the large-scale power time-series model in scenarios with scarce data or cold start.
[0093] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0094] Based on the same inventive concept, this application also provides an apparatus for generating few-shot time series data based on a large-scale power time series model, which is used to implement the aforementioned method for generating few-shot time series data based on a large-scale power time series model. The solution provided by this apparatus is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the apparatus for generating few-shot time series data based on a large-scale power time series model provided below can be found in the limitations of the method for generating few-shot time series data based on a large-scale power time series model described above, and will not be repeated here.
[0095] In one exemplary embodiment, such as Figure 4 As shown, a device for generating few samples of time-series data based on a large-scale power time-series model is provided, including: a model acquisition module 10, a vector construction module 20, a model training module 30, and a sample generation module 40, wherein:
[0096] The model acquisition module 10 is used to acquire a large-scale power time series model. The large-scale power time series model is obtained based on pre-training of enhanced feature vectors. The enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors and location encoding vectors from historical time series data of multiple regions.
[0097] The vector construction module 20 is used to construct a few-sample hint vector based on the historical power data of the target area, and to construct a conditional hint vector based on the external time-series variables of the target area. The sample hint vector is used to characterize the historical change characteristics of the target area, and the conditional hint vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model.
[0098] The model training module 30 is used to train the power time series model in multiple rounds using a small sample cue vector and a conditional cue vector as input data and a joint loss function and a multi-scale constraint function as optimization objectives. In each round of training, consistency correction is performed on the current time series data output by the power time series model.
[0099] The sample generation module 40 is used to acquire power time series data generated by the large power time series model after multiple rounds of training, and to perform operational boundary verification on the power time series data.
[0100] In an exemplary embodiment, the model acquisition module 10 is further configured to preprocess historical time-series data from multiple regions and extract time feature vectors from the preprocessed historical time-series data; the historical time-series data includes load data, wind power data, photovoltaic data, meteorological data, and time variables; periodic coding features are obtained based on the time feature vectors and converted into time embedding vectors; location coding vectors are obtained based on the historical time-series data, and the time feature vectors, time embedding vectors, and location coding vectors are fused to obtain an enhanced feature vector.
[0101] In an exemplary embodiment, the vector construction module 20 is further configured to perform feature encoding on historical power data to obtain statistical feature vectors, and to normalize the statistical feature vectors to obtain normalized vectors; the normalized vectors are then converted into few-sample cue vectors through a feature mapping function; the feature mapping function is a linear transformation function or a nonlinear mapping model.
[0102] In an exemplary embodiment, the joint loss function involved in the model training module 30 is obtained by weighting the model loss function, power balance constraint function, running boundary constraint function, and ramp rate constraint function; wherein, the weighting coefficient of the running boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function; the multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
[0103] In an exemplary embodiment, the model training module 30 is further configured to perform constraint checks on the current time series data output by the large power time series model and obtain corresponding check results; wherein, the constraint checks include power outage checks, power balance checks, and ramp rate anomaly checks; if there are check results that do not meet the constraint conditions, abnormal data in the current time series data is obtained and the abnormal data is corrected.
[0104] In an exemplary embodiment, the sample generation module 40 is further configured to perform operational boundary verification on the power time series data when the power time series data meets the comprehensive evaluation conditions; wherein, the comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation and cycle consistency evaluation; the operational boundary verification includes equipment rated value verification, historical statistics verification and grid dispatch verification; if the verification passes, a structured generated report is obtained based on the power time series data; the structured generated report includes time interval, power range, confidence level and application scenario description.
[0105] Each module in the aforementioned device for generating few samples of time-series data based on a large-scale power time-series model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0106] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for generating few-sample time-series data based on a large-scale power time-series model. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0107] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0108] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring a large-scale power time-series model; the large-scale power time-series model is pre-trained based on enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors, and location encoding vectors from historical time-series data of multiple regions; based on historical power data of a target region, a few-sample cue vector is constructed, and based on external time-series variables of the target region, a conditional cue vector is constructed; the few-sample cue vector is used to characterize the historical change characteristics of the target region; the conditional cue vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model; the large-scale power time-series model is trained in multiple rounds using the few-sample cue vector and the conditional cue vector as input data, and the joint loss function and multi-scale constraint function as optimization objectives; wherein, during each round of training, consistency correction is performed on the current time-series data output by the large-scale power time-series model; the power time-series data generated by the large-scale power time-series model after multiple rounds of training is acquired, and the operating boundary of the power time-series data is verified.
[0109] In one embodiment, the process of obtaining the enhanced feature vector involved when the processor executes a computer program includes: preprocessing historical time-series data from multiple regions and extracting time feature vectors from the preprocessed historical time-series data; the historical time-series data includes load data, wind power data, photovoltaic data, meteorological data, and time variables; obtaining periodic encoded features based on the time feature vectors and converting the periodic encoded features into time embedding vectors; obtaining location encoded vectors based on the historical time-series data and fusing the time feature vectors, time embedding vectors, and location encoded vectors to obtain the enhanced feature vector.
[0110] In one embodiment, when the processor executes a computer program, it constructs a few-sample cue vector based on historical power data of the target area, including: performing feature encoding on the historical power data to obtain a statistical feature vector, and normalizing the statistical feature vector to obtain a normalized vector; converting the normalized vector into a few-sample cue vector through a feature mapping function; the feature mapping function is a linear transformation function or a nonlinear mapping model.
[0111] In one embodiment, the joint loss function involved when the processor executes the computer program is obtained by weighting the model loss function, power balance constraint function, running boundary constraint function, and ramp rate constraint function; wherein, the weighting coefficient of the running boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function; the multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
[0112] In one embodiment, the consistency correction of the current time-series data output by the large power time-series model when the processor executes the computer program includes: performing constraint checks on the current time-series data output by the large power time-series model and obtaining corresponding check results; wherein, the constraint checks include power outage checks, power balance checks, and ramp rate anomaly checks; if there are check results that do not meet the constraint conditions, obtaining abnormal data in the current time-series data and correcting the abnormal data.
[0113] In one embodiment, the execution of a computer program by the processor involves performing operational boundary verification on power time-series data, including: performing operational boundary verification on the power time-series data when the power time-series data meets the comprehensive evaluation conditions; wherein, the comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation, and cycle consistency evaluation; the operational boundary verification includes equipment rated value verification, historical statistics verification, and grid dispatch verification; and, if the verification passes, obtaining a structured report based on the power time-series data; the structured report includes time interval, power range, confidence level, and application scenario description.
[0114] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0115] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating few samples of time-series data based on a large-scale power time-series model, characterized in that, The method includes: A large-scale power time-series model is obtained; the large-scale power time-series model is obtained based on pre-training of enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors, and location encoding vectors from historical time-series data of multiple regions. Based on historical power data of the target area, a few-sample cue vector is constructed, and based on external time-series variables of the target area, a conditional cue vector is constructed. The few-sample cue vector is used to characterize the historical change characteristics of the target area, and the conditional cue vector is used to characterize the degree of influence of the current operating environment on the power time-series large model. Using the few-sample cue vector and the conditional cue vector as input data for the large-scale power time series model, and using the joint loss function and multi-scale constraint function as optimization objectives, the large-scale power time series model is trained in multiple rounds; wherein, during each round of training, consistency correction is performed on the current time series data output by the large-scale power time series model. Obtain power time series data generated by the large power time series model after multiple rounds of training, and perform operational boundary verification on the power time series data.
2. The method according to claim 1, characterized in that, The process of obtaining the enhanced feature vector includes: Historical time-series data from multiple regions are preprocessed, and time feature vectors of the preprocessed historical time-series data are extracted; the historical time-series data includes load data, wind power data, photovoltaic data, meteorological data, and time variables; Periodic encoded features are obtained based on the time feature vector, and the periodic encoded features are converted into time embedding vectors; The location encoding vector is obtained based on the historical time series data, and the time feature vector, the time embedding vector and the location encoding vector are fused to obtain the enhanced feature vector.
3. The method according to claim 1, characterized in that, The few-sample cue vector constructed based on historical power data of the target area includes: The historical power data is feature-encoded to obtain a statistical feature vector, and the statistical feature vector is normalized to obtain a normalized vector. The normalized vector is converted into a few-sample cue vector by a feature mapping function; the feature mapping function is a linear transformation function or a nonlinear mapping model.
4. The method according to claim 1, characterized in that, The joint loss function is obtained by weighting the model loss function, power balance constraint function, operating boundary constraint function, and ramp rate constraint function; wherein, the weighting coefficient of the operating boundary constraint function is not less than the weighting coefficient of the power balance constraint function, and the weighting coefficient of the power balance constraint function is not less than the weighting coefficient of the ramp rate constraint function; the multi-scale constraint function is used to characterize the distribution distance between the output sequence and the input sequence of the large-scale power time series model.
5. The method according to claim 1, characterized in that, The consistency correction of the current time-series data output by the large power time-series model includes: Constraint checks are performed on the current time-series data output by the power time-series large model to obtain the corresponding check results; wherein, the constraint checks include power outage checks, power balance checks, and ramp rate anomaly checks; If the test results do not meet the constraints, abnormal data in the current time series data is obtained and the abnormal data is corrected.
6. The method according to claim 1, characterized in that, The step of performing operational boundary verification on the power time-series data includes: If the power time-series data meets the comprehensive evaluation conditions, the power time-series data is subjected to operational boundary verification; wherein, the comprehensive evaluation includes distribution distance evaluation, peak-valley error evaluation, and cycle consistency evaluation; the operational boundary verification includes equipment rated value verification, historical statistics verification, and power grid dispatch verification; If the verification passes, a structured report is generated based on the power time-series data; the structured report includes time interval, power range, confidence level, and application scenario description.
7. A device for generating few samples of time-series data based on a large-scale power time-series model, characterized in that, The device includes: The model acquisition module is used to acquire a large-scale power time-series model; the large-scale power time-series model is obtained based on pre-training of enhanced feature vectors; the enhanced feature vectors are obtained by fusing time feature vectors, time embedding vectors, and location encoding vectors from historical time-series data of multiple regions. The vector construction module is used to construct a few-sample hint vector based on historical power data of the target area, and to construct a conditional hint vector based on external time-series variables of the target area; the few-sample hint vector is used to characterize the historical change characteristics of the target area; the conditional hint vector is used to characterize the degree of influence of the current operating environment on the large-scale power time-series model. The model training module is used to train the power time series model in multiple rounds using the few-sample cue vector and the conditional cue vector as input data and the joint loss function and multi-scale constraint function as optimization objectives; wherein, during each round of training, the consistency correction of the current time series data output by the power time series model is performed. The sample generation module is used to acquire power time series data generated by the large power time series model after multiple rounds of training, and to perform operational boundary verification on the power time series data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.