A regional short-term carbon emission prediction method and related equipment

The SSA-Transformer-SVR model screens out the influencing factors of carbon emissions and optimizes hyperparameters, which solves the problem of low regional carbon emission prediction accuracy in the prior art, and achieves higher short-term carbon emission prediction accuracy.

CN119783988BActive Publication Date: 2025-08-12XIANGJIANG LAB
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510276725.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-08-12
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

The existing regional carbon emission forecasting technology has the problem of low prediction accuracy, mainly due to the failure to effectively consider relevant factors.

Method used

The SSA-Transformer-SVR model is adopted to screen the factors influencing carbon emissions, optimize the hyperparameters of Transformer and SVR modules, and combine deep feature extraction and accurate prediction capabilities to build a carbon emission prediction model.

Benefits of technology

It significantly improves the prediction accuracy of short-term carbon emissions, and enhances the processing capability and prediction accuracy of time series data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783988B_ABST
    Figure CN119783988B_ABST
Patent Text Reader

Abstract

The present invention provides a regional short-term carbon emission prediction method and related equipment. The method comprises the following steps: inputting historical time-series carbon emission data of a target area into an SSA-Transformer-SVR model, training the SSA-Transformer-SVR model, and obtaining a carbon emission prediction model; inputting the time-series carbon emission data of the target area in the current period and the carbon emission impact data in the current state into the carbon emission prediction model for prediction, and obtaining a short-term carbon emission prediction result of the target area; the SSA-Transformer-SVR model comprises an input module for screening out carbon emission influencing factors, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module, and an output module; and significantly improving the accuracy of short-term carbon emission prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a regional short-term carbon emission prediction method and related equipment. Background Art

[0002] In recent years, global warming has been recognized as one of the most pressing environmental challenges in the world today, and carbon emissions are considered to be the most important factor influencing global temperature changes. Therefore, predicting carbon emissions is of great significance for controlling carbon emissions; however, existing regional carbon emission prediction technologies have limitations. Time series prediction methods based solely on carbon emissions do not take relevant factors into account, resulting in low prediction accuracy. Summary of the Invention

[0003] The present invention provides a regional short-term carbon emission prediction method and related equipment, the purpose of which is to improve the accuracy of regional short-term carbon emission prediction.

[0004] To achieve the above objectives, the present invention provides a method for regional short-term carbon emissions prediction, comprising:

[0005] Step 1: Collect historical time-series carbon emission data of the target area. The historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data.

[0006] Step 2: Input the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model;

[0007] Step 3: Input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model to obtain the short-term carbon emission prediction result of the target area;

[0008] The SSA-Transformer-SVR model includes an input module for screening out factors affecting carbon emissions, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module.

[0009] More specifically, step 1 includes:

[0010] Collect historical carbon emission data and corresponding carbon emission impact data in chronological order. Carbon emission impact data includes gross domestic product, total population, urbanization rate, labor force, employment rate, industrial output share, energy efficiency, total energy consumption, renewable energy consumption share, commodity imports, and commodity exports;

[0011] Use normalization methods to process historical carbon emission data and corresponding carbon emission impact data to obtain normalized data;

[0012] Construct historical time series carbon emission data of the target area based on normalized data.

[0013] Specifically, the connection relationship of the SSA-Transformer-SVR model is:

[0014] The input of the input module is the input of the SSA-Transformer-SVR model;

[0015] The output of the input module is connected to the input of the activation module and the input of the optimized Transformer module respectively;

[0016] The output of the activation module is connected to the input of the feature fusion module, and the output of the feature fusion module is connected to the input of the optimized SVR module;

[0017] The output of the optimized SVR module and the output of the optimized Transformer module are connected to the input of the model fusion module;

[0018] The output end of the model fusion module is connected to the input end of the output module;

[0019] The output end of the output module is the output end of the SSA-Transformer-SVR model.

[0020] Furthermore, the optimized Transformer module is optimized using the SSA algorithm, including:

[0021] Set initial values for the Transformer module's hyperparameters, including the learning rate, number of layers, and number of heads;

[0022] Define the parameters for the SSA algorithm to optimize the Transformer module, including the size of the sparrow population, the number of iterations, the safety threshold, and the step size, and select the mean square error as the fitness function in the optimization process;

[0023] Randomly generate the positions of the sparrow population, and each position of the sparrow population represents a set of hyperparameters of the Transformer module;

[0024] The position of the sparrow group is iteratively updated according to the SSA algorithm. The fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the minimum fitness value is used as the optimal hyperparameter combination of the Transformer module.

[0025] The hyperparameters of the Transformer module are set according to the optimal hyperparameter combination to obtain the optimized Transformer module.

[0026] Furthermore, the position of the sparrow group is iteratively updated according to the SSA algorithm, and the update formula is:

[0027]

[0028] in, Indicates the The updated position of the sparrow group, Indicates the current iteration number, represents the step length, 、 represents a random number in the interval [0,1], represents random numbers that follow a normal distribution, represents the identity matrix, Indicates the The current location of the sparrow colony, Indicates the safety threshold.

[0029] Furthermore, the optimized SVR module is optimized by the SSA algorithm, including:

[0030] Set initial values for the hyperparameters of the SVR module, including kernel function, penalty parameter, and kernel parameter;

[0031] Define the parameters of the SSA algorithm to optimize the SVR module, including the size of the sparrow population, the number of iterations, the safety threshold and the step size, and select the mean square error as the fitness function in the optimization process;

[0032] Randomly generate the position of the sparrow population, each position of the sparrow population represents a set of hyperparameters of the SVR module;

[0033] The position of the sparrow group is iteratively updated according to the SSA algorithm. The fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the minimum fitness value is used as the optimal hyperparameter combination of the SVR module.

[0034] The hyperparameters of the SVR module are set according to the optimal hyperparameter combination to obtain the optimized SVR module.

[0035] Furthermore, the expression used by the model fusion module to fuse the first depth feature with the result of predicting the comprehensive feature vector is:

[0036]

[0037] in, represents the prediction result after fusion, represents the weight of the optimized Transformer module, represents the weight of the optimized SVR module, represents the first depth feature, Represents the prediction result of the comprehensive feature vector.

[0038] The present invention also provides a regional short-term carbon emission prediction device, comprising:

[0039] A collection module is used to collect historical time-series carbon emission data of the target area, where the historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data;

[0040] The training module is used to input historical time-series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model;

[0041] The prediction module is used to input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model for prediction, and obtain the short-term carbon emission prediction result of the target area;

[0042] The SSA-Transformer-SVR model includes an input module for screening out factors affecting carbon emissions, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module.

[0043] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for predicting regional short-term carbon emissions is implemented.

[0044] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for predicting regional short-term carbon emissions is implemented.

[0045] The above solution of the present invention has the following beneficial effects:

[0046] The present invention obtains a carbon emission prediction model by inputting the historical time series carbon emission data of the target area into the constructed SSA-Transformer-SVR model, training the SSA-Transformer-SVR model; inputting the time series carbon emission data of the target area in the current period and the carbon emission impact data in the current state into the carbon emission prediction model for prediction, and obtaining the short-term carbon emission prediction result of the target area; the SSA-Transformer-SVR model includes an input module for screening out carbon emission influencing factors, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module; compared with the prior art, the SSA-Transformer-SVR model provided by the present invention combines the deep feature extraction capability of Transformer and the precise prediction capability of SVR, captures the complex patterns in the time series data through the optimized Transformer module, and accurately models the comprehensive feature vector output by the feature fusion module through the optimized SVR module, thereby significantly improving the accuracy of short-term carbon emission prediction.

[0047] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of a flow chart of an embodiment of the present invention;

[0049] Figure 2 Schematic diagram of the structure of the SSA-Transformer-SVR model in an embodiment of the present invention;

[0050] Figure 3 Optimization flow chart of the Transformer module in an embodiment of the present invention;

[0051] Figure 4 Optimization flow chart of the SVR module in an embodiment of the present invention;

[0052] Figure 5 This is a schematic diagram of the structure of a regional short-term carbon emission prediction device according to an embodiment of the present invention;

[0053] Figure 6 Schematic diagram of the structure of the terminal device in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] To make the technical problems, technical solutions, and advantages to be solved by the present invention more clear, the following is a detailed description with reference to the accompanying drawings and specific embodiments. It is obvious that the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0055] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0056] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to a locking connection, a detachable connection, or an integral connection; they may refer to a mechanical connection or an electrical connection; they may refer to a direct connection or an indirect connection through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0057] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0058] In response to existing problems, the present invention provides a regional short-term carbon emission prediction method and related equipment.

[0059] like Figure 1 As shown, an embodiment of the present invention provides a method for regional short-term carbon emission prediction, comprising:

[0060] Step 1: Collect historical time-series carbon emission data of the target area. The historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data.

[0061] Step 2: Input the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model;

[0062] Step 3: Input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model to obtain the short-term carbon emission prediction result of the target area;

[0063] The SSA-Transformer-SVR model includes an input module for screening out factors affecting carbon emissions, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module.

[0064] In an embodiment of the present invention, the Transformer module processes input data through a self-attention mechanism to capture long-distance dependencies in time series. By optimizing the hyperparameters of the Transformer module, the model's deep feature extraction capability for time series data can be enhanced; the SVR module improves the prediction accuracy of the comprehensive feature vector by optimizing its hyperparameters. The introduction of the SVR module allows the model to find the optimal hyperplane in the feature space, thereby improving the prediction performance; and the SSA-Transformer-SVR model optimizes the key hyperparameters of Transformer and SVR to improve the accuracy of short-term carbon emission prediction. This model combines the deep feature extraction capability of Transformer and the precise prediction capability of SVR, and is suitable for processing time series data with highly nonlinear characteristics.

[0065] Specifically, step 1 includes:

[0066] Collect historical carbon emission data and corresponding carbon emission impact data in chronological order. Carbon emission impact data includes gross domestic product, total population, urbanization rate, labor force, employment rate, industrial output share, energy efficiency, total energy consumption, renewable energy consumption share, commodity imports, and commodity exports;

[0067] Use normalization methods to process historical carbon emission data and corresponding carbon emission impact data to obtain normalized data;

[0068] Construct historical time series carbon emission data of the target area based on normalized data.

[0069] The embodiment of the present invention adopts the min-max normalization method to process data and obtain normalized data.

[0070] Specifically, if Figure 2 As shown, the connection relationship of the SSA-Transformer-SVR model is:

[0071] The input of the input module is the input of the SSA-Transformer-SVR model;

[0072] The output of the input module is connected to the input of the activation module and the input of the optimized Transformer module respectively;

[0073] The output of the activation module is connected to the input of the feature fusion module, and the output of the feature fusion module is connected to the input of the optimized SVR module;

[0074] The output of the optimized SVR module and the output of the optimized Transformer module are connected to the input of the model fusion module;

[0075] The output end of the model fusion module is connected to the input end of the output module;

[0076] The output end of the output module is the output end of the SSA-Transformer-SVR model.

[0077] The most preferred method is to first use the STIRPAT model to screen the influencing factors of carbon emissions in the input module, and determine the key factors including economy, society, technology, energy consumption and trade, among which the indicator of economic factors is gross domestic product (GDP), the indicators of social factors are total population, urbanization rate, labor force and employment rate, the indicators of technical factors are industrial output share and energy efficiency, the indicators of energy consumption factors are total energy consumption and renewable energy consumption share, and trade factors include commodity imports and commodity exports; then the carbon emission time series data and the screened influencing factors are preprocessed, including normalization and serialization, to meet the input requirements of the model.

[0078] In this embodiment of the present invention, the hyperparameters of the Transformer module are optimized by the SSA algorithm, including the learning rate , number of layers and the number of heads , in order to improve the model's ability to extract deep features of carbon emission time series data.

[0079] Most preferably, Figure 3 As shown in Figure 2, the optimization process of the optimized Transformer module using the SSA algorithm includes:

[0080] is the hyperparameter of the Transformer module Set the initial value, the hyperparameters of the Transformer module include the learning rate , number of layers and the number of heads ;

[0081] Define the parameters for the SSA algorithm to optimize the Transformer module, including the size of the sparrow group , number of iterations , safety threshold and step length , and select the mean square error As the fitness function in the optimization process;

[0082] Randomly generate the location of sparrow flocks , each position of the sparrow colony A set of hyperparameters that characterize the Transformer module;

[0083] The position of the sparrow group is iteratively updated according to the SSA algorithm, the fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the smallest fitness value is used as the optimal hyperparameter combination of the Transformer module ;

[0084] The hyperparameters of the Transformer module are set according to the optimal hyperparameter combination to obtain the optimized Transformer module.

[0085] In this embodiment of the present invention, the fitness function during the Transformer module optimization process is:

[0086]

[0087] in, represents the fitness value, Indicates the actual value, Represents the predicted value of the Transformer module, Indicates the sample size.

[0088] In the embodiment of the present invention, after each iteration, the performance of each set of hyperparameter combinations of the Transformer module is evaluated according to the MSE, and the position of the sparrow is updated, gradually approaching the optimal solution. , number of layers and the number of heads , the update can be specifically:

[0089]

[0090] or

[0091]

[0092]

[0093]

[0094] in, 、 and It is the step size determined according to the SSA algorithm rules.

[0095] Specifically, the position of the sparrow group is iteratively updated according to the SSA algorithm, and the update formula is:

[0096]

[0097] in, Indicates the The updated position of the sparrow group, Indicates the current iteration number, represents the step length, 、 represents a random number in the interval [0,1], represents random numbers that follow a normal distribution, represents the identity matrix, Indicates the The current location of the sparrow colony, Indicates the safety threshold.

[0098] Specifically, the activation module processes the output of the SSA-optimized Transformer module through the Leaky ReLU function to enhance the nonlinear expression ability of the model, thereby obtaining an output result that includes the nonlinear characteristics of the time series data. .

[0099] Specifically, the feature fusion module combines the output of the activation module with the carbon emission influencing factors screened by the STIRPAT model to form a comprehensive feature vector, specifically:

[0100] Vectorize the influencing factor index F screened by the STIRPAT model and the output A from the Leaky ReLU activation module;

[0101] The comprehensive feature vector output by the feature fusion module It can be expressed as:

[0102]

[0103] in, 、 Represents the weight of the corresponding feature.

[0104] In the embodiment of the present invention, the hyper parameters of the SVR module are optimized by the SSA algorithm, including the kernel function, penalty parameter , kernel parameters , in order to improve the model's prediction accuracy for the comprehensive eigenvector.

[0105] Most preferably, Figure 4 As shown in Figure 2, the optimization process of the optimized SVR module using the SSA algorithm includes:

[0106] is the hyperparameter of the SVR module Set the initial value, the hyperparameters of the SVR module include kernel function, penalty parameter and kernel parameters ;

[0107] Define the parameters for optimizing the SVR module using the SSA algorithm, including the size of the sparrow population. , number of iterations , safety threshold and step length , and select the mean square error as the fitness function in the optimization process;

[0108] Randomly generate the location of sparrow flocks , each position of the sparrow colony A set of hyperparameters that characterize the SVR module;

[0109] The position of the sparrow group is iteratively updated according to the SSA algorithm, the fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the minimum fitness value is used as the optimal hyperparameter combination of the SVR module ;

[0110] The hyperparameters of the SVR module are set according to the optimal hyperparameter combination to obtain the optimized SVR module.

[0111] In the embodiment of the present invention, the fitness function in the SVR module optimization process is:

[0112]

[0113] in, represents the fitness value, Indicates the actual value, represents the predicted value of the SVR module, Indicates the sample size.

[0114] In the embodiment of the present invention, the position of each sparrow is iteratively searched. In each iteration, the position of the sparrow is updated according to the SSA algorithm. The updating formula is:

[0115]

[0116] in, Represents a penalty parameter and kernel parameters A vector of changes.

[0117] In the embodiment of the present invention, after each iteration, the performance of each hyperparameter combination of the SVR module is evaluated according to the MSE, and the position of the sparrow is updated to gradually approach the optimal solution.

[0118] In an embodiment of the present invention, the first deep feature and the result of predicting the comprehensive feature vector are fused through a model fusion module, which can take advantage of the advantages of the two modules and reduce the deviation and uncertainty that may exist in a single module. The specific steps include:

[0119] The weights are assigned based on the MSE values of the two modules. The model with the lower MSE value will receive a higher weight because it has better prediction performance. The weight assignment formula is:

[0120]

[0121]

[0122] in, represents the weight of the optimized Transformer module, Represents the weight of the optimized SVR module;

[0123] The expression for fusing the first depth feature with the result of predicting the comprehensive feature vector is:

[0124]

[0125] in, represents the prediction result after fusion, represents the weight of the optimized Transformer module, represents the weight of the optimized SVR module, represents the first depth feature, Represents the prediction result of the comprehensive feature vector.

[0126] Specifically, the output module is used to output the prediction results of short-term carbon emissions.

[0127] Specifically, step 2 includes:

[0128] The historical time-series carbon emission data of the target area is collected and divided into the time-series carbon emission data based on the carbon emission influencing factors according to the preset ratio to obtain the training set and the test set;

[0129] Set the loss function and optimizer for the SSA-Transformer-SVR model. The loss function is used to evaluate the difference between the model prediction and the actual carbon emission data, while the optimizer is used to update the model parameters based on the loss value and network gradient information.

[0130] Input the training set into the SSA-Transformer-SVR model to start the model training process;

[0131] In each training iteration, the loss value is calculated based on the current loss function. The optimizer uses these loss values and network gradient information to adjust the model's hyperparameters, including the learning rate, number of layers, and number of heads of the Transformer module, and the penalty parameter and kernel parameter of the SVR module.

[0132] A preset loss threshold is set as the termination condition for model training; if the loss value of the model after a certain training iteration is lower than this threshold, it indicates that the model has achieved satisfactory prediction performance and the training process ends; otherwise, the model will continue to use the training set for further training.

[0133] Specifically, the training set is fed into the SSA-Transformer-SVR model to start the model training process, which includes:

[0134] The training set is input into the optimized Transformer module, which processes the input time series data through its internal multi-head self-attention mechanism to extract key time-dependent features;

[0135] The feature fusion module combines the time-dependent features extracted by the optimized Transformer module with the carbon emission influencing factors screened by the input module to form a comprehensive feature vector;

[0136] The optimized SVR module receives the comprehensive feature vector, further extracts high-level features related to carbon emissions, and integrates this information to generate prediction results;

[0137] The model fusion module fuses the time-dependent features extracted by the optimized Transformer module with the prediction results generated by the optimized SVR module, and transmits the output results to the output module;

[0138] The output module provides the model's final prediction results for short-term carbon emissions.

[0139] After obtaining the carbon emission prediction model, the performance of the model is evaluated using the test set to ensure that the model can accurately predict new carbon emission data.

[0140] The embodiment of the present invention obtains a carbon emission prediction model by inputting the historical time series carbon emission data of the target area into the constructed SSA-Transformer-SVR model, training the SSA-Transformer-SVR model; inputting the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model for prediction, and obtaining the short-term carbon emission prediction result of the target area; the SSA-Transformer-SVR model includes an input module for screening out carbon emission influencing factors, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module; compared with the prior art, the SSA-Transformer-SVR model provided by the embodiment of the present invention combines the deep feature extraction capability of the Transformer and the precise prediction capability of the SVR, captures the complex patterns in the time series data through the optimized Transformer module, and accurately models the comprehensive feature vector output by the feature fusion module through the optimized SVR module, thereby significantly improving the accuracy of the short-term carbon emission prediction.

[0141] Corresponding to the regional short-term carbon emission prediction method described in the above embodiment, Figure 5 As shown, the present invention further provides a regional short-term carbon emission prediction device 100, which includes:

[0142] The collection module 101 is used to collect historical time-series carbon emission data of the target area, where the historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data;

[0143] A training module 102 is configured to input historical time series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model;

[0144] The prediction module 103 is used to input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model to perform prediction and obtain the short-term carbon emission prediction result of the target area;

[0145] The SSA-Transformer-SVR model includes an input module for screening out factors affecting carbon emissions, an optimized Transformer module, an activation module, a feature fusion module, an optimized SVR module, a model fusion module and an output module.

[0146] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0148] The embodiment of the present invention further provides a terminal device, such as Figure 6 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 6 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the above-mentioned regional short-term carbon emission prediction method when executing the computer program D102.

[0149] The terminal device D10 can be a computing device such as a desktop computer, a notebook, a PDA, a server, a server cluster, a cloud server, etc. The terminal device may include, but is not limited to, a processor D100 and a memory D101. It will be understood by those skilled in the art that Figure 6 This is merely an example of the terminal device D10 and does not constitute a limitation on the terminal device D10 . The terminal device D10 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device D10 may also include input and output devices, network access devices, etc.

[0150] The processor D100 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0151] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device D10. Furthermore, the memory D101 may include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory D101 may also be used to temporarily store data that has been output or is about to be output.

[0152] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0154] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, a method for predicting regional short-term carbon emissions is implemented.

[0155] If the integrated unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a construction device / terminal device, a recording medium, computer memory, read-only memory (ROM), random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Examples include a USB flash drive, a removable hard drive, a magnetic disk, or an optical disk.

[0156] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A regional short-term carbon emission prediction method, characterized in that: include: Step 1: Collect historical time-series carbon emission data for the target area. The historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data. The carbon emission impact data includes gross domestic product, total population, urbanization rate, labor force, employment rate, industrial output share, energy efficiency, total energy consumption, renewable energy consumption share, commodity imports, and commodity exports. Step 2: Input the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model; Step 3: Input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model to perform prediction, thereby obtaining a short-term carbon emission prediction result of the target area; The SSA-Transformer-SVR model includes an input module for screening out carbon emission influencing factors, an optimized Transformer module for processing input time series data, an activation module for extracting nonlinear features of the time series data, a feature fusion module for combining the time-dependent features extracted by the optimized Transformer module with the carbon emission influencing factors screened out by the input module, an optimized SVR module for extracting high-level features related to carbon emissions from the feature vector output by the feature fusion module and generating a prediction result, a model fusion module for fusing the time-dependent features extracted by the optimized Transformer module with the prediction result generated by the optimized SVR module, and an output module; The connection relationship of the SSA-Transformer-SVR model is: The input end of the input module is the input end of the SSA-Transformer-SVR model; The output end of the input module is connected to the input end of the activation module and the input end of the optimized Transformer module respectively; The output end of the activation module is connected to the input end of the feature fusion module, and the output end of the feature fusion module is connected to the input end of the optimized SVR module; The output end of the optimized SVR module and the output end of the optimized Transformer module are both connected to the input end of the model fusion module; The output end of the model fusion module is connected to the input end of the output module; The output end of the output module is the output end of the SSA-Transformer-SVR model; In the input module, the STIRPAT model is used to screen the factors affecting carbon emissions and determine the key factors; The expression for the model fusion module to fuse the first depth feature with the result of predicting the comprehensive feature vector is: ; in, represents the prediction result after fusion, represents the weight of the optimized Transformer module, represents the weight of the optimized SVR module, Represents the predicted value of the Transformer module, Represents the predicted value of the SVR module.

2. The regional short-term carbon emission prediction method according to claim 1, characterized in that: The step 1 comprises: Collect historical carbon emission data and corresponding carbon emission impact data in chronological order. The carbon emission impact data includes gross domestic product, total population, urbanization rate, labor force, employment rate, industrial output share, energy efficiency, total energy consumption, renewable energy consumption share, commodity imports, and commodity exports; Processing the historical carbon emission data and the corresponding carbon emission impact data using a normalization method to obtain normalized data; The historical time series carbon emission data of the target area is constructed based on the normalized data.

3. The regional short-term carbon emission prediction method according to claim 1, characterized in that: The optimized Transformer module is optimized using the SSA algorithm, including: Set initial values for the Transformer module's hyperparameters, including the learning rate, number of layers, and number of heads; Defining the parameters of the SSA algorithm for optimizing the Transformer module, including the size of the sparrow population, the number of iterations, the safety threshold, and the step size, and selecting the mean square error as the fitness function in the optimization process; Randomly generate the positions of the sparrow population, and each position of the sparrow population represents a set of hyperparameters of the Transformer module; The position of the sparrow group is iteratively updated according to the SSA algorithm. The fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the minimum fitness value is used as the optimal hyperparameter combination of the Transformer module. The hyperparameters of the Transformer module are set according to the optimal hyperparameter combination to obtain an optimized Transformer module.

4. The regional short-term carbon emission prediction method according to claim 3 is characterized in that: The position of the sparrow group is iteratively updated according to the SSA algorithm. The update formula is: ; in, Indicates the The updated position of the sparrow group, Indicates the current iteration number, represents the step length, represents the number of iterations, 、 represents a random number in the interval [0,1], represents a random number that follows a normal distribution, represents the identity matrix, Indicates the The current location of the sparrow colony, Indicates the safety threshold.

5. The regional short-term carbon emission prediction method according to claim 1, characterized in that: The optimized SVR module is optimized by the SSA algorithm, including: Set initial values for the hyperparameters of the SVR module, including kernel function, penalty parameter, and kernel parameter; Defining parameters for optimizing the SVR module using the SSA algorithm, including the size of the sparrow population, the number of iterations, the safety threshold, and the step size, and selecting the mean square error as the fitness function in the optimization process; Randomly generate the position of the sparrow population, each position of the sparrow population represents a set of hyperparameters of the SVR module; The position of the sparrow group is iteratively updated according to the SSA algorithm. The fitness value corresponding to the position of the sparrow group after each update is calculated, and the position with the minimum fitness value is used as the optimal hyperparameter combination of the SVR module. The hyperparameters of the SVR module are set according to the optimal hyperparameter combination to obtain an optimized SVR module.

6. A regional short-term carbon emission prediction device, characterized in that: include: A collection module is used to collect historical time-series carbon emission data of the target area, wherein the historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data, wherein the carbon emission impact data includes gross domestic product, total population, urbanization rate, labor force, employment rate, industrial output share, energy efficiency, total energy consumption, renewable energy consumption share, commodity imports, and commodity exports; A training module, configured to input the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, train the SSA-Transformer-SVR model, and obtain a carbon emission prediction model; A prediction module, configured to input the time series carbon emission data of the target area in the current period and the carbon emission impact data under the current state into the carbon emission prediction model for prediction, thereby obtaining a short-term carbon emission prediction result of the target area; The SSA-Transformer-SVR model includes an input module for screening out carbon emission influencing factors, an optimized Transformer module for processing input time series data, an activation module for extracting nonlinear features of the time series data, a feature fusion module for combining the time-dependent features extracted by the optimized Transformer module with the carbon emission influencing factors screened out by the input module, an optimized SVR module for extracting high-level features related to carbon emissions from the feature vector output by the feature fusion module and generating a prediction result, a model fusion module for fusing the time-dependent features extracted by the optimized Transformer module with the prediction result generated by the optimized SVR module, and an output module; The connection relationship of the SSA-Transformer-SVR model is: The input end of the input module is the input end of the SSA-Transformer-SVR model; The output end of the input module is connected to the input end of the activation module and the input end of the optimized Transformer module respectively; The output end of the activation module is connected to the input end of the feature fusion module, and the output end of the feature fusion module is connected to the input end of the optimized SVR module; The output end of the optimized SVR module and the output end of the optimized Transformer module are both connected to the input end of the model fusion module; The output end of the model fusion module is connected to the input end of the output module; The output end of the output module is the output end of the SSA-Transformer-SVR model; The expression for the model fusion module to fuse the first depth feature with the result of predicting the comprehensive feature vector is: ; in, Represents the prediction result after fusion, represents the weight of the optimized Transformer module, represents the weight of the optimized SVR module, Represents the predicted value of the Transformer module, Represents the predicted value of the SVR module.

7. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for predicting regional short-term carbon emissions according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting regional short-term carbon emissions according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Lithium ion battery SOH estimation method based on SSA-SVR model

    CN115684972A