Data processing method and device
By determining the characteristic data related to the electricity price to be predicted and calculating their statistical values, integrating these statistical values with the initial sample data, and generating target sample data, the problem of low accuracy of the electricity price prediction model due to the lack of training data is solved, and the output accuracy and stability of the model are improved.
Patent Information
- Application Number
- CN202411803874.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In electricity price prediction, the accuracy of the electricity price prediction model is low due to the lack of sufficient training data.
By determining multiple characteristic data related to the electricity price to be predicted, and determining the characteristic values within the time interval to be counted according to the electricity price type, calculating the data statistics of each characteristic data, integrating these statistical values with the initial sample data, and generating target sample data to enhance the comprehensiveness of the training data of the electricity price prediction model.
By adding statistical data, the comprehensiveness of the training data of the electricity price prediction model is enhanced, thereby improving the accuracy and stability of the model output results.
Smart Images

Figure CN119272178B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to a data processing method. Background Art
[0002] With the rapid development of artificial intelligence technology, more and more models have been put into use in daily life. By training the model with a large amount of corpus and fine-tuning it in a specific field, good results can usually be obtained. However, both the pre-training stage and the fine-tuning stage require a large amount of training data. In particular, when predicting electricity prices, the electricity price prediction model can be trained first, and then the electricity price prediction can be performed through the electricity price prediction model. However, in actual scenarios, due to the lack of sufficient training data, the accuracy of the electricity price prediction model in predicting electricity prices is low.
[0003] Therefore, how to expand the sample data used to train the electricity price prediction model has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, an embodiment of this specification provides a data processing method. One or more embodiments of this specification also relate to a data processing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a data processing method is provided, including:
[0006] Determine a plurality of characteristic data related to the electricity price to be predicted, and determine a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted;
[0007] Determine multiple characteristic values corresponding to each characteristic data in the time interval to be counted;
[0008] Determine, according to the data type corresponding to each feature data and the multiple feature values, at least one data statistic value corresponding to each feature data in the time interval to be counted;
[0009] At least one data statistic corresponding to each feature data is fused with the pre-acquired initial sample data to generate target sample data.
[0010] Optionally, the data type includes continuous data;
[0011] Correspondingly, determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values includes:
[0012] In the case where the target feature data is continuous data, determining the total number of feature values of a plurality of feature values corresponding to the target feature data, wherein the target feature data is each of the plurality of feature data;
[0013] At least one data statistic value corresponding to the target feature data in the time interval to be counted is determined according to the total number of feature values and a plurality of feature values corresponding to the target feature data.
[0014] Optionally, the data processing method further includes:
[0015] Determining mutually related target feature data among target feature data belonging to continuous data;
[0016] summing up a plurality of characteristic values corresponding to each target characteristic data in the mutually related target characteristic data;
[0017] The signal amplitude value corresponding to the mutually correlated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually correlated target feature data.
[0018] Optionally, the data processing method further includes:
[0019] Calculate the difference between the i+1th eigenvalue and the ith eigenvalue corresponding to each target feature data in the mutually associated target feature data, where i is a positive integer, and the value of i ranges from 1 to M-1, and M is the total number of eigenvalues of the multiple eigenvalues corresponding to any one of the mutually associated target feature data;
[0020] The difference values are summed, and the motion change value corresponding to the mutually associated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually associated target feature data.
[0021] Optionally, the data type also includes discrete data;
[0022] Correspondingly, determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values includes:
[0023] In the case where the target feature data is discrete data, determining the total number of feature values of a plurality of feature values corresponding to the target feature data, wherein the target feature data is each of the plurality of feature data;
[0024] Sum the total number of eigenvalues of multiple eigenvalues corresponding to each sub-feature data in the target feature data belonging to discrete data;
[0025] At least one data statistic value corresponding to each sub-feature data in the time interval to be counted is determined according to the summation result and the total number of eigenvalues of multiple eigenvalues corresponding to the target feature data belonging to discrete data.
[0026] Optionally, fusing the at least one data statistic value corresponding to each feature data with pre-acquired initial sample data includes:
[0027] In the case where the pre-acquired initial sample data is a two-dimensional array, determining the number of rows corresponding to the initial sample data;
[0028] Processing at least one data statistic value corresponding to each feature data to generate a one-dimensional array, and expanding the one-dimensional array according to the number of rows corresponding to the initial sample data to generate an expanded two-dimensional array, wherein the number of rows of the expanded two-dimensional array is equal to the number of rows corresponding to the initial sample data, and the data of each row in the expanded two-dimensional array is the same;
[0029] The expanded two-dimensional array is concatenated with the initial sample data.
[0030] Optionally, the data processing method further includes:
[0031] The target sample data is input into the electricity price prediction model to be trained to generate an electricity price prediction model.
[0032] According to a second aspect of an embodiment of this specification, there is provided a data processing device, including:
[0033] A first determination module is configured to determine a plurality of characteristic data related to the electricity price to be predicted, and determine a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted;
[0034] A second determination module is configured to determine a plurality of characteristic values corresponding to each characteristic data within the time interval to be counted;
[0035] A processing module, configured to determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values;
[0036] The data generation module is configured to fuse at least one data statistic corresponding to each feature data with pre-acquired initial sample data to generate target sample data.
[0037] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0038] Memory and processor;
[0039] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement any step of the data processing method.
[0040] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of any one of the data processing methods are implemented.
[0041] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, wherein when the computer program product is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0042] An embodiment of the present specification determines multiple feature data related to the electricity price to be predicted, and determines the time interval to be counted corresponding to the multiple feature data according to the electricity price type corresponding to the electricity price to be predicted; determines multiple feature values corresponding to each feature data in the time interval to be counted; determines at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type and multiple feature values corresponding to each feature data; fuses at least one data statistic value corresponding to each feature data with the initial sample data obtained in advance to generate target sample data. Through this processing method, statistical data is added on the basis of traditional time series data, which enhances the comprehensiveness of the training data of the electricity price prediction model, thereby facilitating the accuracy and stability of the model output results. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of a data processing method provided by an embodiment of this specification;
[0044] Figure 2 is a processing flow chart of a data processing method provided by an embodiment of this specification;
[0045] Figure 3 is a structural schematic diagram of a data processing device provided by an embodiment of this specification;
[0046] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0047] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0048] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0049] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0050] The embodiments of this specification propose a feature construction method of a statistical learning model for the problem of electricity price prediction faced in the electricity trading process. By enriching the diversity of feature data, the quantity and quality of the input features of the statistical learning model are significantly improved. Specifically, the embodiments of this specification not only increase the types of input features, but also more comprehensively consider the reference of historical data, so that the model can more deeply explore the potential laws and influencing factors of electricity price fluctuations. This improvement will help to improve the accuracy and reliability of electricity price prediction and provide more effective support for electricity trading decisions.
[0051] In this specification, a data processing method is provided. This specification also relates to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0052] Figure 1 A flow chart of a data processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0053] Step 102: determining a plurality of characteristic data related to the electricity price to be predicted, and determining a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted.
[0054] Specifically, the characteristic data related to the electricity price to be predicted includes: spot transaction prediction characteristic data, spot transaction real-time characteristic data and weather forecast data.
[0055] Among them, the spot trading forecast characteristic data include: non-market unit output forecast data (non-market unit power generation forecast data, in megawatts), wind power output forecast data (wind power generation forecast data), photovoltaic output forecast data (photovoltaic power generation forecast data), new energy output forecast data (the sum of all new energy equipment power generation capacity), provincial load forecast power data (estimated provincial power load data, in megawatts), spot clearing electricity data (the result of electricity settlement in the previous period, in megawatt-hours), total planned addition of interconnection lines (total planned addition of power grid interconnection lines, in megawatts), maintenance capacity data (capacity of units under maintenance, in megawatts), predicted total power generation output (the sum of all equipment power generation capacity forecast data), and electricity price (the electricity price in the previous period).
[0056] The real-time characteristic data of spot transactions include: actual output data of non-market units (real-time updated power generation value of non-market units, in megawatts), actual value of wind power (real-time wind power generation value), actual value of photovoltaic power (real-time photovoltaic power generation value), actual value of total new energy (real-time sum of power generation of all new energy equipment, in megawatts), real-time system load value, real-time system frequency value, actual rotating reserve (real-time updated reserve capacity), real-time spot clearing electricity, real-time total output data of interconnection lines, real-time total hydropower output data (real-time updated hydropower power generation value), and real-time clearing price (real-time electricity price).
[0057] Meteorological forecast data includes non-continuous meteorological forecast data variables and continuous meteorological forecast data variables. Among them, non-continuous meteorological forecast data variables include: weather conditions (used to describe weather conditions), wind force level (indicating wind strength level), wind direction (indicating wind direction). Continuous meteorological forecast data variables include: longitude, latitude, province ID (identifier corresponding to the province), city ID (identifier corresponding to the city), region ID (identifier corresponding to the region), temperature, wind direction angle (angle of wind direction, unit is degree), wind speed (wind speed, unit is meter per second), relative humidity (humidity percentage in air, unit is %), hourly cumulative precipitation (precipitation in the past hour, unit is millimeter), precipitation probability (probability of precipitation occurrence, unit is %), atmospheric pressure (current atmospheric pressure value, unit is hPa), cloud cover (cloud coverage in the sky, unit is %), dew point temperature (the temperature at which air cools to water vapor begins to condense, unit is Celsius).
[0058] The electricity price types corresponding to the electricity price to be predicted include: real-time electricity price, electricity price, and medium- and long-term electricity price. If the corresponding electricity price type is real-time electricity price, the time interval to be counted can be a time interval consisting of 3-5 moments before the current moment; if the corresponding electricity price type is electricity price, the time interval to be counted can be 24 hours before the current moment; if the corresponding electricity price type is medium- and long-term electricity price, the time interval to be counted can be 90 days before the current moment.
[0059] The embodiments of this specification construct target sample data based on historical data. Specifically, multiple feature data related to the electricity price to be predicted can be first determined, and then the time interval to be counted corresponding to the multiple feature data can be determined according to the electricity price type corresponding to the electricity price to be predicted, that is, the review time period.
[0060] Step 104: Determine a plurality of characteristic values corresponding to each characteristic data in the time interval to be counted.
[0061] Specifically, in the embodiments of this specification, the characteristic values of the characteristic data are usually collected at certain time intervals. For example, the time interval can be 15 minutes or 1 hour. If the time interval is 15 minutes, there are 4 data collection moments within 1 hour, and the characteristic data will also have 4 characteristic values within this 1 hour. Therefore, when the duration corresponding to the time interval to be counted is longer, there will be multiple data collection moments in the time interval to be counted. Based on this, after determining the time interval to be counted, that is, the replay time period, the embodiments of this specification can determine multiple characteristic values corresponding to each characteristic data in the replay time period.
[0062] Step 106: Determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values.
[0063] Specifically, after determining a plurality of characteristic values of each characteristic data, statistical processing may be performed on the characteristic data according to the data type of the characteristic data.
[0064] In an optional implementation, the data type includes continuous data;
[0065] Correspondingly, determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values includes:
[0066] In the case where the target feature data is continuous data, determining the total number of feature values of a plurality of feature values corresponding to the target feature data, wherein the target feature data is each of the plurality of feature data;
[0067] At least one data statistic value corresponding to the target feature data in the time interval to be counted is determined according to the total number of feature values and a plurality of feature values corresponding to the target feature data.
[0068] Specifically, when the target feature data is continuous data, at least one data statistic corresponding to the target feature data may include: mean, variance, standard deviation, minimum value, maximum value, range, median, first quartile, third quartile, quartile difference, square root, average strength, skewness and kurtosis.
[0069] The mean value corresponding to the target feature data It can be calculated by the following formula (1):
[0070] Formula (1)
[0071] Where M is the total number of eigenvalues of multiple eigenvalues corresponding to the target feature data, is the feature value corresponding to the target feature data.
[0072] In practical applications, in order to ensure the accuracy and comprehensiveness of the target sample data, multiple characteristic values corresponding to the target sample data in multiple different regions, that is, different power grids, can be collected. However, since the data collection intervals in different regions may be different, for example, the data collection interval in region A is 15 minutes, and the data collection interval in region B is 30 minutes, and the statistical time interval is 24 hours, then the total number of characteristic values corresponding to each characteristic data in region A is 96, and the total number of characteristic values corresponding to each characteristic data in region B is 48. Therefore, the total number of characteristic values corresponding to each characteristic data is 144.
[0073] Based on this, when the target feature data is continuous data, the mean corresponding to the target feature data is determined. Specifically, the multiple eigenvalues corresponding to the target feature data can be summed up first, and then the quotient of the summation result and the total number of eigenvalues corresponding to the target feature data can be determined as the mean of the target feature data.
[0074] The variance corresponding to the target feature data It can be calculated by the following formula (2):
[0075] Formula (2)
[0076] The standard deviation corresponding to the target feature data It can be calculated by the following formula (3):
[0077] Formula (3)
[0078] The characteristic value range corresponding to the target characteristic data It can be calculated by the following formula (4):
[0079] Formula (4)
[0080] in, is the maximum value among multiple feature values of the target feature data; It is the minimum value among multiple feature values of the target feature data.
[0081] The interquartile difference corresponding to the target feature data It can be calculated by the following formula (5):
[0082] Formula (5)
[0083] in, is the third quartile of multiple feature values of the target feature data; is the first quartile of multiple feature values of the target feature data.
[0084] The square root RMS corresponding to the target feature data can be calculated using the following formula (6):
[0085] Formula (6)
[0086] The average intensity AI corresponding to the target feature data can be calculated using the following formula (7):
[0087] Formula (7)
[0088] The skewness corresponding to the target feature data It can be calculated by the following formula (8):
[0089] Formula (8)
[0090] Kurtosis corresponding to target feature data It can be calculated by the following formula (9):
[0091] Formula (9)
[0092] The embodiments of this specification determine the most representative extreme values, quantiles, ranges and other statistical values within the time interval to be counted, as well as the median, mean and other statistical values that can reflect the overall trend within the time interval to be counted, which is conducive to ensuring that these statistical values comprehensively describe the data characteristics within the time interval to be counted.
[0093] In an optional implementation, the data processing method further includes:
[0094] Determining mutually related target feature data among target feature data belonging to continuous data;
[0095] summing up a plurality of characteristic values corresponding to each target characteristic data in the mutually related target characteristic data;
[0096] The signal amplitude value corresponding to the mutually correlated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually correlated target feature data.
[0097] Specifically, for continuous data, the embodiments of this specification can also determine the data statistics of the target feature data by means of multivariate joint analysis, that is, jointly analyzing the interrelated continuous data to determine their corresponding data statistics, and the data statistics can be signal amplitude values.
[0098] In the embodiment of the present specification, the interrelated target feature data in the continuous data include: wind power output prediction data, photovoltaic output prediction data and new energy total output prediction data.
[0099] The signal amplitude value SMA corresponding to the target characteristic data can be calculated by the following formula (10):
[0100] Formula (10)
[0101] in, Indicates the characteristic value corresponding to the wind power output forecast data; Indicates the characteristic value corresponding to the photovoltaic output prediction data; Indicates the eigenvalue corresponding to the new energy output forecast data.
[0102] Specifically, the eigenvalues corresponding to the wind power output prediction data are first summed to obtain a first summation result; then the eigenvalues corresponding to the photovoltaic output prediction data are summed to obtain a second summation result; then the eigenvalues corresponding to the new energy output prediction data are summed to obtain a third summation result; then the first summation result, the second summation result and the third summation result are summed to obtain a target summation result; finally, the quotient of the target summation result and the total number of eigenvalues corresponding to the wind power output prediction data or the photovoltaic output prediction data or the new energy output prediction data is determined as the signal amplitude value corresponding to the wind power output prediction data, the photovoltaic output prediction data and the new energy output prediction data.
[0103] The embodiment of this specification uses a joint analysis method to comprehensively consider the relative change patterns of three interrelated variables, study the change characteristics of the data from a new perspective, and obtain new data statistics. This method is conducive to enriching the diversity of feature data, thereby helping to improve the quantity and quality of the model's input features, enabling the model to more deeply explore the potential patterns and influencing factors of electricity price fluctuations, so as to improve the accuracy and reliability of the model's output results.
[0104] In an optional implementation, the data processing method further includes:
[0105] Calculate the difference between the i+1th eigenvalue and the ith eigenvalue corresponding to each target feature data in the mutually associated target feature data, where i is a positive integer, and the value of i ranges from 1 to M-1, and M is the total number of eigenvalues of the multiple eigenvalues corresponding to any one of the mutually associated target feature data;
[0106] The difference values are summed, and the motion change value corresponding to the mutually associated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually associated target feature data.
[0107] Specifically, as mentioned above, for continuous data, the embodiments of the present specification can also determine the data statistics of the target feature data by means of multivariate joint analysis, that is, jointly analyzing the interrelated continuous data to determine their corresponding data statistics, and the data statistics may include motion change values in addition to signal amplitude values.
[0108] The motion change value MV corresponding to the target feature data can be calculated using the following formula (11):
[0109] Formula (11)
[0110] in, represents the i-th eigenvalue corresponding to the wind power output forecast data; Indicates the i+1th eigenvalue corresponding to the wind power output forecast data; represents the i-th eigenvalue corresponding to the photovoltaic output forecast data; Indicates the i+1th eigenvalue corresponding to the photovoltaic output forecast data; Represents the i-th eigenvalue corresponding to the new energy output forecast data; Indicates the i+1th eigenvalue corresponding to the new energy output forecast data.
[0111] Specifically, first, the absolute value of the difference between the i+1th eigenvalue and the i-th eigenvalue corresponding to the wind power output prediction data is summed to obtain a first summation result; then, the absolute value of the difference between the i+1th eigenvalue and the i-th eigenvalue corresponding to the photovoltaic output prediction data is summed to obtain a second summation result; then, the absolute value of the difference between the i+1th eigenvalue and the i-th eigenvalue corresponding to the new energy output prediction data is summed to obtain a third summation result; then, the first summation result, the second summation result and the third summation result are summed to obtain a target summation result; finally, the quotient of the target summation result and the total number of eigenvalues corresponding to the wind power output prediction data or the photovoltaic output prediction data or the new energy output prediction data is determined as the motion change value corresponding to the wind power output prediction data, the photovoltaic output prediction data and the new energy output prediction data.
[0112] The embodiment of this specification uses a joint analysis method to comprehensively consider the relative change rules of three interrelated variables, study the change characteristics of the data from a new perspective, and obtain new data statistics. This method is conducive to enriching the diversity of feature data.
[0113] In an optional implementation, the data type further includes discrete data;
[0114] Correspondingly, determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values includes:
[0115] In the case where the target feature data is discrete data, determining the total number of feature values of the plurality of feature values corresponding to each sub-feature data in the target feature data;
[0116] Sum the total number of eigenvalues of multiple eigenvalues corresponding to each sub-feature data in the target feature data belonging to discrete data;
[0117] At least one data statistic value corresponding to each sub-feature data in the time interval to be counted is determined according to the summation result and the total number of eigenvalues of the multiple eigenvalues corresponding to each sub-feature data.
[0118] Specifically, when the target feature data is discrete data, the at least one data statistic corresponding to the sub-feature data may be a probability of the sub-feature data appearing within the time interval to be counted.
[0119] In the embodiments of the present specification, discrete data include: weather conditions, wind force level and wind direction, and the weather conditions may include sub-characteristic data such as sunny, cloudy, overcast, and light rain; the wind force level may include sub-characteristic data such as level 1, level 2, level 3, level 4, level 5, etc.; the wind direction may include sub-characteristic data such as east wind, west wind, south wind, north wind, southeast wind, etc.
[0120] Taking weather conditions as an example of discrete data, the data statistics corresponding to the sub-feature data are determined, specifically, the probability of the occurrence of the sub-feature data of sunny weather conditions, cloudy weather conditions, overcast weather conditions, and light rain weather conditions in the time interval to be counted. Taking the probability of the occurrence of the sub-feature data of light rain weather conditions in the time interval to be counted as an example, the total number of eigenvalues corresponding to all weather conditions can be determined first, that is, the total number of eigenvalues corresponding to each sub-feature data such as sunny, cloudy, overcast, and light rain can be summed; then the number of occurrences of the sub-feature data of light rain weather conditions in the time interval to be counted can be determined, that is, the total number of eigenvalues corresponding to the sub-feature data of light rain weather conditions can be determined; finally, the ratio of the total number of eigenvalues to the sum result can be determined as the probability corresponding to the sub-feature data of light rain weather conditions.
[0121] Based on this, the probability of the weather condition occurring within the statistical time interval can be calculated using the following formula (12):
[0122] Formula (12)
[0123] in, (Weather Condition) Indicates a specific category of weather conditions, e.g. (Weather conditions) can mean sunny, cloudy, light rain, etc.; It indicates the number of times the weather condition of this category occurs in the time interval to be counted; n indicates the total number of characteristic values corresponding to all weather conditions in the time interval to be counted.
[0124] The probability of the wind force level occurring within the statistical time interval can be calculated using the following formula (13):
[0125] Formula (13)
[0126] in, (Wind Force Level) indicates the specific category of wind force level, e.g. (Wind force level) can indicate level 1, level 2, level 3, level 4, level 5, etc.; It indicates the number of times the wind force level of this category appears in the time interval to be counted; n indicates the total number of characteristic values corresponding to all wind force levels in the time interval to be counted.
[0127] The probability of the wind direction appearing in the statistical time interval can be calculated by the following formula (14):
[0128] Formula (14)
[0129] in, (Wind direction) Indicates the specific type of wind direction, e.g. (Wind direction) can mean east wind, west wind, south wind, north wind, southeast wind, etc.; It indicates the number of times the wind direction of this category appears in the time interval to be counted; n indicates the total number of characteristic values corresponding to all wind directions in the time interval to be counted.
[0130] It should be noted that in the embodiments of this specification, the calculation method of the probability of other types of weather conditions, wind force levels and wind directions occurring in the time interval to be counted is the same as the calculation method of the probability of the sub-feature data of the weather condition being light rain occurring in the time interval to be counted, and will not be repeated here.
[0131] Step 108: Fusing at least one data statistic corresponding to each feature data with the pre-acquired initial sample data to generate target sample data.
[0132] In an optional implementation, the fusing of at least one data statistic corresponding to each feature data with pre-acquired initial sample data includes:
[0133] In the case where the pre-acquired initial sample data is a two-dimensional array, determining the number of rows corresponding to the initial sample data;
[0134] Processing at least one data statistic value corresponding to each feature data to generate a one-dimensional array, and expanding the one-dimensional array according to the number of rows corresponding to the initial sample data to generate an expanded two-dimensional array, wherein the number of rows of the expanded two-dimensional array is equal to the number of rows corresponding to the initial sample data, and the data of each row in the expanded two-dimensional array is the same;
[0135] The expanded two-dimensional array is concatenated with the initial sample data.
[0136] Specifically, the initial sample data is usually time series data, and it is usually a two-dimensional array. After obtaining at least one data statistic corresponding to each feature data, the embodiments of this specification usually combine them to generate a one-dimensional array. Therefore, in the case where the data statistic needs to be fused with the initial sample data to generate the target sample data, the generated one-dimensional array can be expanded based on the number of rows corresponding to the initial sample data to generate an expanded two-dimensional array, and the number of rows of the expanded two-dimensional array is equal to the number of rows corresponding to the initial sample data; then the expanded two-dimensional array can be horizontally spliced with the initial sample data.
[0137] In practical applications, assuming that the one-dimensional array generated by combining the statistical values of each data is 1 row and n columns, and the initial sample data is t rows and m columns, then the one-dimensional array is expanded according to the number of rows corresponding to the initial sample data. Specifically, the data in the one-dimensional array can be copied to t rows and n columns, with the data in each row being the same, and then the copied data is combined with the initial sample data to form the final target sample data.
[0138] The specific operation process is summarized as follows:
[0139] 1) Let the statistical data (data generated by combining the statistical values of each data) be R, whose dimension is 1×n, and let the initial sample data be T, whose dimension is t×m.
[0140] 2) Copy the statistics and get ,in, is the replicated statistical data, with a dimension of t×n.
[0141] 3) Splicing data: , where D is the target sample data with a dimension of t×(m+n).
[0142] In this way, the final target sample data D contains the aggregation results of the initial sample data and statistical data.
[0143] In the embodiments of the present specification, after the target training samples are generated, the target sample data can be input into the electricity price prediction model to be trained to generate the electricity price prediction model.
[0144] In the embodiments of this specification, the statistical features of historical data are added to the sample data used for model training. This method enables the model to have the ability to obtain historical data similar to recurrent neural networks and deep convolutional networks, significantly improving the sensitivity of prediction. At the same time, the model can effectively improve the sensitivity to the large rate of change of electricity prices, and can incorporate industry experience and mechanisms in the data extraction process, which is conducive to improving the accuracy of the model output results.
[0145] The embodiments of this specification determine multiple feature data related to the electricity price to be predicted, and determine the time interval to be counted corresponding to the multiple feature data according to the electricity price type corresponding to the electricity price to be predicted; determine multiple feature values corresponding to each feature data in the time interval to be counted; determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type and multiple feature values corresponding to each feature data; fuse the at least one data statistic value corresponding to each feature data with the initial sample data obtained in advance to generate target sample data. Through this processing method, statistical data is added on the basis of traditional time series data, which enhances the comprehensiveness of the training data of the electricity price prediction model, thereby facilitating the accuracy and stability of the model output results.
[0146] The following combination Figure 2 , taking the application of the data processing method provided in this specification in the field of electricity price prediction as an example, the data processing method is further explained. Figure 2 A processing flow chart of a data processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0147] Step 202: Determine a plurality of characteristic data related to the electricity price to be predicted, and determine a review time period corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted.
[0148] Step 204: Determine multiple feature values corresponding to each feature data within the review time period.
[0149] Step 206: When the target feature data is continuous data, determine the data statistics corresponding to the target feature data within the review time period.
[0150] Specifically, data statistics include mean, extreme value, variance, and quantile.
[0151] Step 208: Determine mutually related target feature data in the target feature data belonging to continuous data, and determine the signal amplitude value and motion change value corresponding to the mutually related target feature data.
[0152] Step 210: When the target feature data is discrete data, determine the probability of sub-feature data of different categories in the target feature data appearing within the review time period.
[0153] Step 212: The data statistics, signal amplitude values, motion change values corresponding to the continuous data and the probabilities corresponding to the discrete data are merged with the pre-acquired initial sample data to generate target sample data.
[0154] Step 214: input the target sample data into the electricity price prediction model to be trained to generate an electricity price prediction model.
[0155] The embodiments of this specification introduce replay content, digitize the replay content and integrate it into the initial sample data, so that when the integrated target sample data is used for model training, the electricity price prediction model can have a more comprehensive understanding of the overall situation and key characteristics of the recent electricity market, thereby improving the accuracy of the model prediction results.
[0156] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 3 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises:
[0157] The first determination module 302 is configured to determine a plurality of characteristic data related to the electricity price to be predicted, and determine a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted;
[0158] The second determination module 304 is configured to determine a plurality of characteristic values corresponding to each characteristic data in the time interval to be counted;
[0159] The processing module 306 is configured to determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values;
[0160] The data generation module 308 is configured to fuse at least one data statistic corresponding to each feature data with the pre-acquired initial sample data to generate target sample data.
[0161] Optionally, the data type includes continuous data;
[0162] Accordingly, the processing module 306 is further configured to:
[0163] In the case where the target feature data is continuous data, determining the total number of feature values of a plurality of feature values corresponding to the target feature data, wherein the target feature data is each of the plurality of feature data;
[0164] At least one data statistic value corresponding to the target feature data in the time interval to be counted is determined according to the total number of feature values and a plurality of feature values corresponding to the target feature data.
[0165] Optionally, the processing module 306 is further configured to:
[0166] Determining mutually related target feature data among target feature data belonging to continuous data;
[0167] summing up a plurality of characteristic values corresponding to each target characteristic data in the mutually related target characteristic data;
[0168] The signal amplitude value corresponding to the mutually correlated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually correlated target feature data.
[0169] Optionally, the processing module 306 is further configured to:
[0170] Calculate the difference between the i+1th eigenvalue and the ith eigenvalue corresponding to each target feature data in the mutually associated target feature data, where i is a positive integer, and the value of i ranges from 1 to M-1, and M is the total number of eigenvalues of the multiple eigenvalues corresponding to any one of the mutually associated target feature data;
[0171] The difference values are summed, and the motion change value corresponding to the mutually associated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually associated target feature data.
[0172] Optionally, the data type also includes discrete data;
[0173] Accordingly, the processing module 306 is further configured to:
[0174] In the case where the target feature data is discrete data, determining the total number of feature values of the plurality of feature values corresponding to each sub-feature data in the target feature data;
[0175] Sum the total number of eigenvalues of multiple eigenvalues corresponding to each sub-feature data in the target feature data belonging to discrete data;
[0176] At least one data statistic value corresponding to each sub-feature data in the time interval to be counted is determined according to the summation result and the total number of eigenvalues of the multiple eigenvalues corresponding to each sub-feature data.
[0177] Optionally, the data generation module 308 is further configured to:
[0178] In the case where the pre-acquired initial sample data is a two-dimensional array, determining the number of rows corresponding to the initial sample data;
[0179] Processing at least one data statistic value corresponding to each feature data to generate a one-dimensional array, and expanding the one-dimensional array according to the number of rows corresponding to the initial sample data to generate an expanded two-dimensional array, wherein the number of rows of the expanded two-dimensional array is equal to the number of rows corresponding to the initial sample data, and the data of each row in the expanded two-dimensional array is the same;
[0180] The expanded two-dimensional array is concatenated with the initial sample data.
[0181] Optionally, the data processing device further includes a training module 310 configured to:
[0182] The target sample data is input into the electricity price prediction model to be trained to generate an electricity price prediction model.
[0183] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.
[0184] Figure 4 The block diagram of a computing device 400 according to one embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0185] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0186] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0187] Computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 400 may also be a mobile or stationary server.
[0188] The processor 420 is used to execute the following computer executable instructions, which implement the steps of the above data processing method when executed by the processor.
[0189] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data processing method.
[0190] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned data processing method when executed by a processor.
[0191] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.
[0192] An embodiment of the present specification further provides a computer program product, wherein when the computer program product is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0193] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above data processing method.
[0194] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0195] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0196] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0197] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0198] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A data processing method, comprising: Determine a plurality of characteristic data related to the electricity price to be predicted, and determine a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted; Determine multiple characteristic values corresponding to each characteristic data in the time interval to be counted; Determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values, wherein the data type includes continuous data; In the case where the target feature data is continuous data, determining mutually related target feature data in the target feature data that is continuous data, wherein the target feature data is each of the plurality of feature data; summing up a plurality of characteristic values corresponding to each target characteristic data in the mutually related target characteristic data; Determine the signal amplitude value corresponding to the mutually associated target feature data according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually associated target feature data; At least one data statistic value corresponding to each feature data and a signal amplitude value corresponding to the mutually associated target feature data are fused with the pre-acquired initial sample data to generate target sample data.
2. The data processing method according to claim 1, wherein determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values comprises: In the case where the target feature data is continuous data, determining the total number of feature values of the plurality of feature values corresponding to the target feature data; At least one data statistic value corresponding to the target feature data in the time interval to be counted is determined according to the total number of feature values and a plurality of feature values corresponding to the target feature data.
3. The data processing method according to claim 1, further comprising: Calculate the difference between the i+1th eigenvalue and the ith eigenvalue corresponding to each target feature data in the mutually associated target feature data, where i is a positive integer, and the value of i ranges from 1 to M-1, and M is the total number of eigenvalues of the multiple eigenvalues corresponding to any one of the mutually associated target feature data; The difference values are summed, and the motion change value corresponding to the mutually associated target feature data is determined according to the summation result and the total number of feature values of multiple feature values corresponding to any one of the mutually associated target feature data.
4. The data processing method according to any one of claims 1 to 3, wherein the data type further comprises discrete data; Correspondingly, determining at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values includes: In the case where the target feature data is discrete data, determining the total number of feature values of the plurality of feature values corresponding to each sub-feature data in the target feature data; Sum the total number of eigenvalues of multiple eigenvalues corresponding to each sub-feature data in the target feature data belonging to discrete data; At least one data statistic value corresponding to each sub-feature data in the time interval to be counted is determined according to the summation result and the total number of eigenvalues of the multiple eigenvalues corresponding to each sub-feature data.
5. The data processing method according to claim 1, wherein the at least one data statistic value corresponding to each feature data and the signal amplitude value corresponding to the mutually associated target feature data are fused with the pre-acquired initial sample data, comprising: In the case where the pre-acquired initial sample data is a two-dimensional array, determining the number of rows corresponding to the initial sample data; Processing at least one data statistic value corresponding to each characteristic data and the signal amplitude value corresponding to the mutually associated target characteristic data to generate a one-dimensional array, and expanding the one-dimensional array according to the number of rows corresponding to the initial sample data to generate an expanded two-dimensional array, wherein the number of rows of the expanded two-dimensional array is equal to the number of rows corresponding to the initial sample data, and the data of each row in the expanded two-dimensional array is the same; The expanded two-dimensional array is concatenated with the initial sample data.
6. The data processing method according to claim 1, further comprising: The target sample data is input into the electricity price prediction model to be trained to generate an electricity price prediction model.
7. A data processing device, comprising: A first determination module is configured to determine a plurality of characteristic data related to the electricity price to be predicted, and determine a time interval to be counted corresponding to the plurality of characteristic data according to the electricity price type corresponding to the electricity price to be predicted; A second determination module is configured to determine a plurality of characteristic values corresponding to each characteristic data within the time interval to be counted; A processing module is configured to determine at least one data statistic value corresponding to each feature data in the time interval to be counted according to the data type corresponding to each feature data and the multiple feature values, wherein the data type includes continuous data; The processing module is further configured to, when the target feature data belongs to continuous data, determine mutually related target feature data in the target feature data belonging to the continuous data, wherein the target feature data is each of the multiple feature data; sum a plurality of feature values corresponding to each target feature data in the mutually related target feature data; and determine a signal amplitude value corresponding to the mutually related target feature data according to the summation result and the total number of feature values of the plurality of feature values corresponding to any one of the mutually related target feature data; The data generation module is configured to fuse at least one data statistic value corresponding to each feature data and the signal amplitude value corresponding to the mutually related target feature data with the pre-acquired initial sample data to generate target sample data.
8. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Agricultural product price risk early warning system and method
CN114549096A
Electric power spot price prediction method, device and system and storage medium
CN117557294A
Intelligent data analysis method and device, computer device, and storage medium
US20210158973A1