Fusion terminal carbon emission prediction method and system based on LSTM
By constructing working condition interval blocks and extracting multi-dimensional features, quantifying the adaptability of candidate window lengths, and training multiple LSTM models, the problem of insufficient window length adaptability of LSTM models in carbon emission prediction is solved, achieving high-precision and stable carbon emission prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-24
- Publication Date
- 2026-03-24
Smart Images

Figure CN121724221A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of carbon emission prediction. In particular, it relates to a terminal carbon emission prediction method and system based on LSTM. BACKGROUND
[0003] At present, LSTM (Long Short-Term Memory) is applied to the field of carbon emission prediction due to its excellent modeling ability for time series data, but there are still some problems in the existing technical solutions. On the one hand, the time sequence candidate window length of the LSTM model depends on manual experience setting, and the significant differences in the time sequence rules of total power consumption and carbon emission under different environmental conditions are not fully considered, resulting in insufficient adaptability of the candidate window length to the actual working conditions, which directly affects the capture of time sequence features by the model and reduces the prediction accuracy. On the other hand, the existing technology generally uses a single fixed candidate window length LSTM model for prediction, which makes the model's capture of time sequence rules single-dimensional and difficult to consider both long-term trends and short-term fluctuations of carbon emission data. When the working conditions change dynamically, the generalization ability of the model decreases significantly, and the prediction performance stability is insufficient. SUMMARY
[0004] To solve the problems of relying on manual experience for time sequence candidate window length, not adapting to the differences in time sequence rules of total power and carbon emission under different working conditions, resulting in low prediction accuracy, and single fixed candidate window length, which is difficult to consider both long-term trends and short-term fluctuations, and the generalization ability and prediction stability of the model decrease when the working conditions change, the present application provides solutions in the following aspects.
[0005] In a first aspect, the LSTM-based fusion terminal carbon emission prediction method comprises: obtaining a total power time sequence, a temperature time sequence and a humidity time sequence of a fusion terminal, dividing and combining the temperature time sequence and the humidity time sequence according to a preset division number to construct a plurality of working condition interval blocks; a candidate window length set is constructed, any length in the candidate window length set is taken as a target window length, the total power time sequence is divided based on the target window length to generate a corresponding historical sample set, the target window length is divided into periods, the overall feature and the detail feature of each historical sample are extracted, the effect score of each working condition interval block is calculated, the effect scores of all working condition interval blocks are weighted and summed to obtain the global adaptability of the target window length, the global adaptability is sorted, and a preset number of target window lengths are selected as model training window lengths; the historical sample set corresponding to each model training window length is called, the total power time sequence is taken as input and the carbon emission is taken as label to train the LSTM model, and the significant LSTM model corresponding to each model training window length is obtained; the real-time total power time sequence is obtained according to each model training window length, the corresponding significant LSTM model is input, the initial carbon emission prediction value of each significant LSTM model is output, the global adaptability of each model training window length is taken as the confidence of the significant LSTM model, all initial carbon emission prediction values are weighted and fused to obtain the real-time carbon emission prediction value, and the fusion terminal carbon emission prediction is completed.
[0006] Preferably, the plurality of working condition interval blocks are constructed, comprising the steps of: The number of temperature and humidity intervals is preset respectively, the temperature time sequence and the humidity time sequence are divided into intervals respectively to obtain a plurality of temperature intervals and humidity intervals, and a Cartesian product combination operation is performed on all temperature intervals and humidity intervals to match any one temperature interval with any one humidity interval to form a plurality of working condition interval blocks.
[0007] Preferably, the historical sample set is generated, comprising the steps of: A plurality of LSTM model candidate window lengths of different lengths are preset to construct a candidate window length set, after the historical multi-dimensional time sequence data is preprocessed based on any one candidate window length in the candidate window length set, a plurality of historical samples are divided without overlap to generate a historical sample set exclusive to the corresponding candidate window length.
[0008] Preferably, the overall feature comprises: The temperature mean and the humidity mean in the corresponding candidate window length of each historical sample are calculated, the temperature mean and the humidity mean are matched to the corresponding temperature interval and humidity interval respectively to determine the working condition interval block corresponding to each historical sample, and a plurality of block sample sets are formed. Taking any operating condition interval block as a target interval block, for each historical sample in the block sample set of the target interval block, a variance of the total electric energy time sequence of each historical sample is calculated, and a concentration degree of all historical sample variances is taken as a total electric energy overall feature of the historical sample.
[0009] Preferably, the detail feature includes: A number of preset time periods is obtained for any historical sample, and the historical sample is uniformly divided according to the number of preset time periods to obtain a plurality of sub-sample sequences, variances of the total electric energy sub-sample sequences are calculated to obtain a variance sequence of the historical sample, a trend test is performed on the variance sequence to obtain a p value, and the p value is taken as a total electric energy detail feature.
[0010] Preferably, the global adaptability includes the steps of: A proportion of the number of samples of the target interval block in the total number of samples of the historical sample set is taken as a weight, and the effect score of the target interval block is weighted to obtain a weighted effect score of the target block, the weighted effect scores of all operating condition interval blocks are iteratively calculated and summed to obtain the global adaptability of the target interval block corresponding to the candidate window length.
[0011] Preferably, the step of training the LSTM model includes: The historical sample set corresponding to the model training window length set and the carbon emission corresponding to the historical sample set are obtained as the training sample set of the LSTM model, the LSTM model is trained based on the training sample set, the input is the total electric energy time sequence corresponding to a historical sample set, the output is a predicted value of a carbon emission, the mean square error loss function is taken as the optimization target of model training, the parameters of the LSTM model are dynamically adjusted, and the iteration is performed until the loss function value converges to a preset threshold or a preset iteration number is reached, the model training is completed, and a significant LSTM model is obtained.
[0012] Preferably, the calculation method of the mean square error loss function includes: The difference between the actual value of the carbon emission of each historical sample and the predicted value of the carbon emission is calculated by traversing all historical sample sets corresponding to each model training window length, the difference is squared to obtain the prediction error square of a single sample, the error square is multiplied by the weight corresponding to the block sample set to which the historical sample belongs to obtain the loss value of the weighted single historical sample, and finally the loss values of all single historical samples in the historical sample set are added to obtain the total loss corresponding to the model training window length.
[0013] In a second aspect, a fusion terminal carbon emission prediction system based on an LSTM includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, the above-mentioned fusion terminal carbon emission prediction method based on an LSTM is realized.
[0014] The present application has the following effects: 1、The present application realizes precise matching of window length and time sequence rules of total electric energy and carbon emissions under different working conditions by constructing working condition interval blocks and quantifying the global adaptability of candidate window length, completely gets rid of the limitations of window length relying on artificial experience, effectively solves the problem that a single fixed window cannot balance long-term trends and short-term fluctuations, and greatly improves the accuracy of carbon emission prediction.
[0015] 2、The present application extracts features in two dimensions of overall features and detail features, and combines targeted training of working condition interval blocks, so that the model can fully learn the correlation rules of total electric energy and carbon emissions under different working conditions, especially under rare working conditions, avoids model bias caused by differences in sample quantity, and significantly enhances the generalization ability and prediction stability of the model when the working condition changes. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a method flowchart of steps S1-S4 in the fusion terminal carbon emission prediction method based on LSTM according to an embodiment of the present application.
[0017] Figure 2 is a structural block diagram of the fusion terminal carbon emission prediction system based on LSTM according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments.
[0019] Referring to Figure 1 The fusion terminal carbon emission prediction method based on LSTM includes steps S1-S4, as follows: S1: Obtain the total electric energy time sequence, temperature time sequence and humidity time sequence of the fusion terminal, divide the temperature time sequence and humidity time sequence into intervals according to a preset division number and combine them, and construct a plurality of working condition interval blocks.
[0020] Set a fixed sampling frequency, which is 1 min / time in this embodiment, and collect historical multi-dimensional time sequence data in the coverage area of the fusion terminal based on the sampling frequency. The historical multi-dimensional time sequence data specifically includes: a regional total electric energy historical time sequence, a regional carbon emission historical time sequence, an environmental temperature historical time sequence and an environmental humidity historical time sequence, wherein the data value corresponding to each sampling time represents the cumulative value of regional total electric energy consumption, the cumulative value of carbon emissions, and the average monitoring value of environmental temperature and the average monitoring value of environmental humidity in the 1-minute sampling period.
[0021] To eliminate the dimensional differences between different data types, the historical multi-dimensional time series data is standardized and preprocessed. Specifically, for the historical multi-dimensional time series data of the region, the Min-Max normalization algorithm is used for processing, wherein the value of each time after normalization can accurately reflect the relative level of the total energy generation and carbon emission of the region in the corresponding 1-minute sampling period, realizing the unified quantization of energy consumption and emission data of different orders of magnitude; and the temperature time series and the humidity time series after normalization are convenient for discrete division and combination construction of working condition interval blocks.
[0022] To accurately divide different environmental conditions, the number of intervals of temperature and humidity is preset respectively, and in this embodiment, the temperature and humidity are each divided into 5 equal-interval intervals. Based on the set number of intervals, the normalized temperature time series and humidity time series are divided into intervals, the continuous temperature value range is divided into a plurality of non-overlapping temperature intervals, and the continuous humidity value range is divided into a plurality of non-overlapping humidity intervals, each interval corresponding to a discretized environmental state identifier.
[0023] To realize comprehensive coverage of temperature and humidity conditions, Cartesian product combination operation is performed on all temperature intervals and humidity intervals, any one temperature interval is matched with any one humidity interval, and finally work condition interval blocks are formed, each work condition interval block corresponds to a specific temperature-humidity combined environmental condition, and all work condition interval blocks jointly constitute a complete environmental condition space, ensuring that time series data under different environmental conditions can be accurately classified into corresponding work condition interval blocks.
[0024] For example, based on the value range of the normalized temperature time series , the value range is uniformly divided into 3 non-overlapping intervals, T1: , low temperature interval; T2: , normal temperature interval; and T3: , high temperature interval. Similarly, based on the value range of the normalized humidity time series , the value range is uniformly divided into 3 non-overlapping intervals, and the intervals are defined and identified as follows: H1: , low humidity interval; H2: , medium humidity interval; and H3: , high humidity interval. Each temperature interval is matched with each humidity interval one by one, and the number of work condition interval blocks formed = temperature interval number x humidity interval number, which is in this example.
[0025] In the prior art, the determination of the candidate window length of the LSTM model has limitations, mainly relying on the expert experience of technical personnel for manual setting or using a grid search or other conventional hyperparameter optimization method to select. The above methods do not fully consider the possible significant differences in the time sequence variation rules of the total power consumption and carbon emissions in different environmental conditions, resulting in the determined candidate window length being unable to adapt to the time sequence characteristics in all conditions: when the candidate window length does not match the time sequence rules in a specific condition, the model cannot accurately capture the correlation characteristics of the total power and carbon emissions in that condition, thereby causing the overall prediction accuracy of the LSTM model to be insufficient and unable to meet the carbon emission prediction requirements in all scenarios.
[0026] Therefore, by independently quantifying and evaluating the time sequence data in different condition interval blocks, the ability of each candidate window length to capture the time sequence rules of the total power consumption and carbon emissions in different conditions is analyzed, and finally multiple candidate window lengths with excellent adaptability are selected from the candidate window length set. The specific steps are as follows: S2: Construct a candidate window length set, take any length in the candidate window length set as a target window length, divide the total power time sequence based on the target window length, generate the corresponding historical sample set, divide the target window length period, extract the overall features and detailed features of each historical sample, calculate the effect score of each condition interval block, take the sample proportion of each condition interval block as the weight, and weightedly sum the effect scores of all condition interval blocks to obtain the global adaptability of the target window length, sort according to the global adaptability, and select a preset number of target window lengths as the model training window length.
[0027] Pre-set multiple LSTM model candidate window lengths (unit: minutes) of different lengths, construct a candidate window length set, for example, the candidate window lengths are: 10min, 20min, 30min, 40min, 50min, and 60min, and for any one of the candidate window lengths in the candidate window length set The preprocessed total power time sequence is divided into several historical samples without overlap, one window corresponds to one historical sample, and the historical sample set corresponding to the candidate window length is generated; Take any candidate window length as a target window length, divide the total power time sequence based on the target window length Each historical sample, for example, 10 minutes, contains temperature time series data and humidity time series data for 10 consecutive time points. To accurately match the environmental conditions within the corresponding window time of each historical sample, the average temperature and humidity within the candidate window length of each historical sample are calculated to represent the overall environmental condition state corresponding to the historical sample. According to the preset condition interval block division rule (i.e., the Cartesian product combination rule of temperature interval and humidity interval), the average temperature and humidity are matched to the corresponding temperature interval and humidity interval, respectively, to determine the condition interval block corresponding to each historical sample, forming a number of block sample sets, each containing only historical samples belonging to the same condition interval block. Each condition interval block corresponds to a block sample set, reflecting a condition scenario and providing a structured historical sample basis for subsequent condition-specific quantitative evaluation of the adaptability of the candidate window length.
[0028] The core purpose of dividing each historical sample into the corresponding condition interval block is to achieve consistent classification of historical samples under the same condition, ensuring that subsequent adaptability analysis is based on the same condition sample set, eliminating the interference of different environmental conditions on the overall power time series from the root, and improving the accuracy and reliability of window length adaptability evaluation.
[0029] To avoid the distortion of the law caused by general analysis of the time series characteristics of the entire historical sample, and to improve the accuracy of window length adaptability evaluation, the specific steps are as follows: For any condition interval block as the target interval block, the variance of the overall power time series of each historical sample in the block sample set of the target interval block is calculated, and the concentration of the variances of all historical samples is calculated to obtain the overall characteristics of the total power of the historical sample, which is used to represent the overall variation of the total power of the overall sample within the candidate window length. The size of the variance reflects the overall fluctuation degree of the total power sequence of the sample.
[0030] The concentration is calculated by the kurtosis index, which is used to quantify the distribution density of the sample characteristics within a single condition interval block. This technique is well known in the art and will not be described in detail.
[0031] The number of preset time periods is determined for any historical sample, and the historical sample is evenly divided into a number of sub-sample sequences. The variances of the total power sub-sample sequences are calculated to obtain the variance sequence of the historical sample. The p-value obtained by trend test of the variance sequence is used as the detailed feature of the total power.
[0032] The smaller the p-value, the more significant the trend of the variance sequence, indicating that the fluctuation degree of the total power in different sub-periods within the candidate window length of the historical sample has obvious regularity changes. The larger the p-value, the less significant the trend of the variance sequence, indicating that there is no significant difference in the fluctuation degree of the total power in each sub-period.
[0033] The sum of the overall feature and the detail feature is taken as the effect score of the target interval block.
[0034] By introducing the two-dimensional feature combination of the overall feature and the detail feature, the influence of the candidate window length on the sample feature extraction is comprehensively characterized, wherein the overall feature reflects the overall change law of the total electric energy of a single sample in the candidate window, and the detail feature reflects the change law difference of the total electric energy, temperature and humidity of the sample in different sub-periods in the window; the distribution concentration of the two-dimensional feature is calculated, wherein the higher the concentration, the smaller the discrete degree of the sample feature value under the same working condition, the stronger the law uniformity, and the greater the adaptation value obtained by fusion, indicating that the stability of the time sequence law of the total electric energy, temperature and humidity reflected by the features extracted by the target window length is stronger, and the adaptation to the working condition interval block is also stronger, so as to realize the accurate quantitative evaluation of the adaptation ability of the candidate window length.
[0035] In order to comprehensively quantify the comprehensive adaptation ability of the candidate window length to the whole working condition and avoid one-sidedness caused by single working condition adaptation evaluation, therefore, the effect scores of the working condition interval blocks need to be weighted and summarized in combination with the frequency of each working condition in the actual scene, and then the global adaptation is obtained, and the specific steps are as follows: The proportion of the number of samples of the target interval block in the total number of samples of the historical sample set is taken as the weight, the effect score of the target interval block is weighted, the weighted effect score of the target block is obtained, the weighted effect scores of all working condition interval blocks are calculated, and the sum is obtained, and the global adaptation of the corresponding target interval block under the candidate window length is obtained.
[0036] Specifically, the global adaptation of the corresponding target interval block under the candidate window length satisfies the following relationship: ; In the formula, the global adaptation of the current candidate window length, the total number of working condition interval blocks, the total number of samples of the block sample set of the i-th working condition interval block, the total number of samples of the historical sample set, the effect score of the i-th working condition interval block; the sample proportion of the i-th interval block; The greater the value, the stronger the adaptation of the current candidate window length to different working conditions, and the more suitable it is as the input window length of the prediction model.
[0037] According to the global adaptability corresponding to all lengths in the preset candidate window length set, the global adaptability corresponding to the preset number of candidate window lengths is selected as the model training window length set in descending order, and the historical sample set corresponding to each model training window length, the block sample set of each working condition interval block, and the global adaptability are obtained synchronously.
[0038] Through the above preferred manner, each selected candidate window length can be matched with one or more types of time sequence characteristics under actual working conditions, and the combination of multiple candidate window lengths can comprehensively cover multiple working conditions, effectively solve the problem of insufficient adaptability of a single candidate window length, lay a foundation for subsequent construction of a multi-model fusion prediction system, and ensure that the model can maintain good prediction performance under different environmental conditions.
[0039] S3: retrieve the historical sample set corresponding to each model training window length, take the total energy time sequence as the input and the carbon emission as the label, train the LSTM model, and obtain the significant LSTM model corresponding to each model training window length.
[0040] The historical sample set corresponding to the model training window length set and the carbon emission corresponding to the historical sample set are obtained as the training sample set of the LSTM model.
[0041] Based on the training sample set, the LSTM model is trained, the input is the total energy time sequence corresponding to a historical sample set, the output is a predicted value of carbon emission, the mean square error loss function is used as the optimization objective of model training, the error signal calculated by the loss function is returned layer by layer through the back propagation algorithm, the core parameters such as the hidden layer neuron weight and the bias term of the LSTM model are dynamically adjusted, and the model training is completed until the loss function value converges to a preset threshold or reaches a preset iteration number, and the significant LSTM model is obtained.
[0042] All historical samples corresponding to each model training window length are traversed, the difference between the actual value of the carbon emission of each historical sample and the predicted value of the carbon emission is calculated, the difference is squared to obtain the prediction error square of a single sample, the error square is multiplied by the weight corresponding to the block sample set to which the historical sample belongs to obtain the loss value of the weighted single historical sample, and finally the loss values of all single historical samples in the historical sample set are added to obtain the total loss corresponding to the model training window length, so as to quantify the prediction error of the model, and through the working condition interval block weight, the rare working condition sample is given a higher training priority, and the adaptation ability of the model to the whole working condition is improved.
[0043] Specifically, the mean square error loss function satisfies the following relationship: ; In the formula, This represents the total loss corresponding to the model training window length. This represents the total number of samples in the historical sample set corresponding to the model training window length. Indicates the first The sample belongs to the first The weights of the block sample sets corresponding to each working condition interval block. Indicates the first The error between the actual and predicted carbon emissions of a sample.
[0044] Among them, based on the ratio of the total number of samples in the block sample set to the total number of samples in the historical sample set, a negative exponential function is used for exponential mapping to obtain the weight of the block sample set corresponding to the working condition interval block to which the historical sample belongs.
[0045] By tilting the training weights towards scarce operating condition samples, the model can fully learn the correlation between electricity and carbon emissions in low-frequency operating conditions during training, avoid model bias caused by differences in the number of samples, and improve the model's adaptability to all operating conditions.
[0046] The mapping properties of the negative exponential function determine that the smaller the sample proportion, the larger the output weight; conversely, the larger the sample proportion, the smaller the output weight. In real-world scenarios, operating condition blocks with a small sample size often correspond to special environmental scenarios, such as extreme high temperatures or extreme humidity. Although these conditions occur infrequently, their energy consumption patterns differ significantly from those of conventional operating conditions. If the model does not adequately learn about these conditions, the accuracy of carbon emission predictions under extreme scenarios will drop sharply. By assigning higher weights to scarce operating conditions through negative exponential mapping, the loss contribution of these samples can be increased during model training, forcing the model to focus on learning the characteristic patterns of low-frequency operating conditions and compensating for the learning bias caused by insufficient sample size.
[0047] S4: Obtain the real-time total energy time series according to the training window length of each model, input the corresponding significant LSTM model, output the initial carbon emission prediction value of each significant LSTM model, use the global adaptability of the training window length of each model as the confidence of the significant LSTM model, perform weighted fusion of all initial carbon emission prediction values to obtain the real-time carbon emission prediction value, and complete the fusion terminal carbon emission prediction.
[0048] The global adaptability corresponding to the model training window length set is normalized to obtain the confidence score of the corresponding model.
[0049] Specifically, the real-time carbon emission forecasts satisfy the following relationship: ; in, This represents the real-time carbon emission forecast. This represents the total number of LSTM models. Indicates the first a confidence of the LSTM model, refers to an initial carbon emission prediction value of the output of the LSTM model.
[0050] The present application also provides an LSTM-based fusion terminal carbon emission prediction system. As shown in Figure 2 , the system comprises a processor and a memory, and the memory stores computer program instructions which, when executed by the processor, implement the LSTM-based fusion terminal carbon emission prediction method according to the first aspect of the present application. The system also comprises a communication bus and a communication interface and other components well known to those skilled in the art, the settings and functions of which are known in the art, and thus will not be described here.
[0051] It should be pointed out that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, which all fall within the scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.
Claims
1. A fusion-based terminal carbon emission prediction method based on LSTM, characterized in that, include: The total power time series, temperature time series and humidity time series of the fusion terminal are obtained. According to the preset number of divisions, the temperature time series and humidity time series are divided into intervals and combined to construct several operating condition interval blocks. A candidate window length set is constructed, and any length in the candidate window length set is used as the target window length. The total power time series is divided based on the target window length to generate a corresponding historical sample set. The target window length is divided into time periods, and the overall and detailed features of each historical sample are extracted. The effect score of each working condition interval block is calculated. The sample proportion of each working condition interval block is used as the weight, and the effect scores of all working condition interval blocks are weighted and summed to obtain the global adaptability of the target window length. The target window lengths are sorted according to the global adaptability, and a preset number of target window lengths are selected as the model training window lengths. Retrieve the historical sample set corresponding to the training window length of each model, use the total electricity time series as input and carbon emissions as label, train the LSTM model, and obtain the salient LSTM model corresponding to the training window length of each model. The real-time total energy time series is obtained according to the training window length of each model. The corresponding significant LSTM model is input, and the initial carbon emission prediction value of each significant LSTM model is output. The global adaptability of each model's training window length is used as the confidence of the significant LSTM model. All initial carbon emission prediction values are weighted and fused to obtain the real-time carbon emission prediction value, thus completing the fusion terminal carbon emission prediction.
2. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, Constructing several operating condition interval blocks includes the following steps: The number of temperature and humidity intervals is preset respectively. The temperature time series and humidity time series are divided into intervals respectively to obtain several temperature intervals and humidity intervals. The Cartesian product combination operation is performed on all temperature intervals and humidity intervals to match any temperature interval with any humidity interval to form several operating condition interval blocks.
3. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, Generating the historical sample set includes the following steps: Multiple LSTM model candidate window lengths with different durations are preset to construct a candidate window length set. Based on any candidate window length in the candidate window length set, the historical multi-dimensional time series data is preprocessed and then divided into several historical samples without overlap to generate a historical sample set specific to the corresponding candidate window length.
4. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, The overall features include: Calculate the average temperature and average humidity within the candidate window length corresponding to each historical sample, match the average temperature and average humidity to the corresponding temperature and humidity intervals respectively, determine the operating condition interval block corresponding to each historical sample, and form several block sample sets. Taking any operating condition interval block as the target interval block, for each historical sample in the block sample set of the target interval block, calculate the variance of the total power time series of each historical sample, and take the concentration of the variance of all historical samples as the overall characteristic of the total power of the historical samples.
5. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, The detailed features include: For any historical sample, a preset number of time periods are defined, and the sample is evenly divided according to the preset number of time periods to obtain several sub-sample sequences. The variance of each total energy sub-sample sequence is calculated to obtain the variance sequence of the historical sample. A trend test is performed on the variance sequence to obtain the p-value, which is used as a detailed feature of the total energy.
6. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, The global adaptability includes the following steps: The weighted performance score of the target interval block is obtained by using the proportion of the number of samples in the target interval block to the total number of samples in the historical sample set. The weighted performance score of the target interval block is calculated by iterating through all the working condition interval blocks and summing them to obtain the global adaptability of the target interval block corresponding to the candidate window length.
7. The LSTM-based fusion terminal carbon emission prediction method according to claim 1, characterized in that, The steps for training the LSTM model include: Obtain the historical sample set corresponding to the model training window length set and the corresponding carbon emissions of the historical sample set as the training sample set for the LSTM model. Train the LSTM model based on the training sample set. The input is a total electricity time series corresponding to a historical sample set, and the output is a predicted value of carbon emissions. Use the mean squared error loss function as the optimization objective for model training, dynamically adjust the parameters of the LSTM model, and iterate until the loss function value converges to a preset threshold or reaches a preset number of iterations to complete the model training and obtain a significant LSTM model.
8. The LSTM-based fusion terminal carbon emission prediction method according to claim 7, characterized in that, The calculation method of the mean squared error loss function includes: Iterate through all historical sample sets corresponding to the training window length of each model, calculate the difference between the actual carbon emission value and the predicted carbon emission value of each historical sample, square the difference to obtain the squared prediction error of a single sample, multiply the squared error by the weight corresponding to the block sample set to which the historical sample belongs to obtain the weighted loss value of a single historical sample, and finally sum the loss values of all single historical samples in the historical sample set to obtain the total loss corresponding to the training window length of the model.
9. A fusion terminal carbon emission prediction system based on LSTM, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the LSTM-based fusion terminal carbon emission prediction method according to any one of claims 1-8.
Citation Information
Patent Citations
Carbon emission prediction method and system based on hybrid machine learning
CN115423215A
Carbon emission integrated prediction method considering driving factor fluctuation, equipment and medium
CN119514868A
Construction method of carbon emission prediction model based on artificial intelligence
CN120297470A
Multi-step time sequence prediction method and system based on double-segmentation conformal prediction
CN121365221A
Method and device for predicting daily granularity monthly scale carbon emission of provincial power system
CN121526051A