Regional short-term carbon emission prediction method and related equipment
By adopting the SSA-Transformer-SVR model in regional carbon emission prediction technology, screening factors affecting carbon emissions and optimizing Transformer and SVR modules, the problem of low prediction accuracy in the existing technology is solved and higher short-term carbon emission prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510276725.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-10
AI Technical Summary
The existing regional carbon emission prediction technology has the problem of low prediction accuracy, and the time series prediction method alone fails to effectively consider relevant factors.
The SSA-Transformer-SVR model is used to screen the factors influencing carbon emissions through the input module. The optimized Transformer module captures complex patterns in the time series data. The optimized SVR module accurately models the comprehensive feature vectors output by the feature fusion module, and finally improves the accuracy of short-term carbon emission prediction through the model fusion module.
The accuracy of regional short-term carbon emission prediction is significantly improved, and combined with Transformer's deep feature extraction capability and SVR's accurate prediction capability, it is suitable for processing time series data with highly nonlinear characteristics.
Smart Images

Figure CN119783988A_ABST
Abstract
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 challenges to the world's environmental problems, and carbon emissions are considered to be the most important factor affecting global temperature changes. Therefore, predicting carbon emissions is of great significance for controlling carbon emissions; however, existing regional carbon emissions prediction technologies have limitations, and 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] In order to achieve the above object, the present invention provides a method for predicting regional short-term carbon emissions, comprising: Step 1: 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; 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 for prediction, and obtain the short-term carbon emission prediction result of the target area; 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.
[0005] More specifically, step 1 includes: Collect historical carbon emission data and corresponding carbon emission impact data in chronological order. Carbon emission impact data include 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; The historical carbon emission data and the corresponding carbon emission impact data are processed using the normalization method to obtain normalized data; Construct historical time series carbon emission data of the target area based on normalized data.
[0006] Specifically, 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 of the input module is connected to the input of the activation module and the input 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 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.
[0007] Furthermore, the optimized Transformer module is optimized by the SSA algorithm, including: Set initial values for the hyperparameters of the Transformer module, including the learning rate, number of layers, and number of heads; Define the parameters of 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; Randomly generate the position of the sparrow population, each position of the sparrow population represents a set of hyperparameters of the Transformer module; Iteratively update the position of the sparrow group according to the SSA algorithm, calculate the fitness value corresponding to the position of the sparrow group after each update, and use the position with the smallest fitness value 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 the optimized Transformer module.
[0008] Furthermore, the position of the sparrow group is iteratively updated according to the SSA algorithm, and the update formula is: in, Indicates 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 current location of the sparrow colony, Indicates the safety threshold.
[0009] Furthermore, the optimized SVR module is optimized by the SSA algorithm, including: Set initial values for the hyperparameters of the SVR module, which include kernel function, penalty parameter, and kernel parameter; 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; 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 smallest 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 the optimized SVR module.
[0010] Specifically, the model fusion module is used to fuse the first deep feature with the result of predicting the comprehensive feature vector as follows: 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 result of prediction based on the comprehensive feature vector.
[0011] The present invention also provides a regional short-term carbon emission prediction device, comprising: 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; A 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; A 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, so as to obtain the short-term carbon emission prediction result of the target area; 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.
[0012] 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, wherein the processor implements a method for predicting regional short-term carbon emissions when executing the computer program.
[0013] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a method for predicting regional short-term carbon emissions is implemented.
[0014] The above scheme of the present invention has the following beneficial effects: 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 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.
[0015] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of a flow chart of an embodiment of the present invention; Figure 2Schematic diagram of the structure of the SSA-Transformer-SVR model in an embodiment of the present invention; Figure 3 is an optimization flow chart of the Transformer module in an embodiment of the present invention; Figure 4 is an optimization flow chart of the SVR module in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a regional short-term carbon emission prediction device in an embodiment of the present invention; Figure 6 Schematic diagram of the structure of a terminal device in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0019] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a locking connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0020] 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.
[0021] In view of the existing problems, the present invention provides a regional short-term carbon emission prediction method and related equipment.
[0022] like Figure 1As shown, an embodiment of the present invention provides a method for predicting regional short-term carbon emissions, comprising: Step 1: 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; 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 for prediction, and obtain the short-term carbon emission prediction result of the target area; 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.
[0023] In an embodiment of the present invention, the Transformer module processes input data through a self-attention mechanism to capture long-distance dependencies in the 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. The 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.
[0024] Specifically, step 1 includes: Collect historical carbon emission data and corresponding carbon emission impact data in chronological order. Carbon emission impact data include 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; The historical carbon emission data and the corresponding carbon emission impact data are processed using the normalization method to obtain normalized data; Construct historical time series carbon emission data of the target area based on normalized data.
[0025] The embodiment of the present invention adopts the min-max normalization method to process data and obtain normalized data.
[0026] Specifically, if Figure 2 As shown, 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 of the input module is connected to the input of the activation module and the input 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 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.
[0027] 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.
[0028] In the embodiment of the present invention, the hyperparameters of the Transformer module are optimized by the SSA algorithm, including the learning rate , Number of layers Number of heads , in order to enhance the model’s ability to extract deep features from carbon emission time series data.
[0029] Most preferably, Figure 3 As shown in the figure, the optimization process of the optimized Transformer module through the SSA algorithm includes: is the hyperparameter of the Transformer module Set the initial value, the hyperparameters of the Transformer module include the learning rate , Number of layers Number of heads ; Define the parameters for optimizing the Transformer module using the SSA algorithm, including the size of the sparrow population , Iterations , safety threshold and step length , and select mean square error As the fitness function in the optimization process; Randomly generate the location of the sparrow colony , each position of the sparrow colony A set of hyperparameters that characterize 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 smallest 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 the optimized Transformer module.
[0030] In the embodiment of the present invention, the fitness function in the Transformer module optimization process is: in, represents the fitness value, Indicates the actual value, Represents the predicted value of the Transformer module, Indicates the sample size.
[0031] 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 to gradually approach the optimal solution. , Number of layers Number of heads , the update can be specifically:
[0032] or in, , and It is the step size determined according to the SSA algorithm rules.
[0033] Specifically, the position of the sparrow group is iteratively updated according to the SSA algorithm, and the update formula is: in, Indicates 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 current location of the sparrow colony, Indicates the safety threshold.
[0034] 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. .
[0035] 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, which is: Vectorize the influencing factor index F screened by the STIRPAT model and A output from the Leaky ReLU activation module; The comprehensive feature vector output by the feature fusion module It can be expressed as: in, , Represents the weight of the corresponding feature.
[0036] In the embodiment of the present invention, the hyper parameters of the SVR module are optimized by the SSA algorithm, including the kernel function, the penalty parameter , kernel parameters , in order to improve the prediction accuracy of the model for the comprehensive feature vector.
[0037] Most preferably, Figure 4 As shown in FIG. 1 , the process of optimizing the optimized SVR module by the SSA algorithm includes: is the hyperparameter of the SVR module Set the initial value. The hyperparameters of the SVR module include kernel function and penalty parameter. and kernel parameters ; Define the parameters for optimizing the SVR module using the SSA algorithm, including the size of the sparrow population , Iterations , safety threshold and step length , and select the mean square error as the fitness function in the optimization process; Randomly generate the location of the sparrow colony , each position of the sparrow colony A set of hyperparameters that characterize 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 smallest 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 the optimized SVR module.
[0038] In the embodiment of the present invention, the fitness function in the SVR module optimization process is: in, represents the fitness value, Indicates the actual value, represents the predicted value of the SVR module, Indicates the sample size.
[0039] In the embodiment of the present invention, the position of each sparrow is iteratively searched, and in each iteration, the position of the sparrow is updated according to the SSA algorithm, and the updating formula is: in, represents a penalty parameter and kernel parameters Vector of changes.
[0040] In the embodiment of the present invention, after each iteration, the performance of each set of hyperparameter combinations of the SVR module is evaluated according to the MSE, and the position of the sparrow is updated to gradually approach the optimal solution.
[0041] 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, so that the advantages of the two modules can be utilized to reduce the deviation and uncertainty that may exist in a single module. The specific steps include: The weights are assigned according to the MSE values of the two modules. The model with a lower MSE value will receive a higher weight because it has better prediction performance. The weight assignment formula is: in, represents the weight of the optimized Transformer module, Represents the weight of the optimized SVR module; The expression for fusing the first deep 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 first depth feature, Represents the result of prediction based on the comprehensive feature vector.
[0042] Specifically, the output module is used to output the prediction results of short-term carbon emissions.
[0043] Specifically, step 2 includes: The historical time-series carbon emission data of the target area are collected and divided into the time-series carbon emission data based on carbon emission influencing factors according to a preset ratio to obtain a training set and a test set; 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, and the optimizer is used to update the model parameters based on the loss value and network gradient information. Input the training set into the SSA-Transformer-SVR model to start the model training process;
[0044] 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, as well as the penalty parameters and kernel parameters of the SVR module. 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.
[0045] Specifically, the training set is input into the SSA-Transformer-SVR model to start the model training process, including: 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; 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; 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; 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; The output module provides the model's final prediction results for short-term carbon emissions.
[0046] 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.
[0047] 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 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 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.
[0048] Corresponding to the regional short-term carbon emission prediction method described in the above embodiment, Figure 5 As shown, the present invention also provides a regional short-term carbon emission prediction device 100, and the regional short-term carbon emission prediction device 100 includes: A collection module 101 is used to collect historical time series carbon emission data of a target area, where the historical time series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data; A training module 102 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; 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 for prediction, so as to obtain the short-term carbon emission prediction result of the target area; 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.
[0049] 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 the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0050] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which will not be repeated here.
[0051] The embodiment of the present invention also 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.
[0052] The terminal device D10 may 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. Those skilled in the art will appreciate that Figure 6 This is only 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, it may also include input and output devices, network access devices, etc.
[0053] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0054] 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, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also 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, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0055] 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 the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0056] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which will not be repeated here.
[0057] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a method for predicting regional short-term carbon emissions is implemented.
[0058] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the construction device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0059] 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 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 of the target area, wherein the historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data; Step 2, inputting the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, training the SSA-Transformer-SVR model, and obtaining a carbon emission prediction model; Step 3, 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.
2. The regional short-term carbon emission prediction method according to claim 1 is characterized in that: The step 1 comprises: Collect historical carbon emission data and corresponding carbon emission impact data in chronological order, where 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; The historical carbon emission data and the corresponding carbon emission impact data are processed by 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 2 is characterized in that: 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.
4. The regional short-term carbon emission prediction method according to claim 3 is characterized in that: The optimized Transformer module is optimized by the SSA algorithm, including: Set initial values for the hyperparameters of the Transformer module, including the learning rate, number of layers, and number of heads; Define the parameters for optimizing the Transformer module using the SSA algorithm, 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; Randomly generate the position of the sparrow population, each position of the sparrow population represents a set of hyperparameters of the Transformer module; Iteratively update the position of the sparrow group according to the SSA algorithm, calculate the fitness value corresponding to the position of the sparrow group after each update, and use the position with the smallest fitness value 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.
5. The regional short-term carbon emission prediction method according to claim 4 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 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 current location of the sparrow colony, Indicates the safety threshold.
6. The regional short-term carbon emission prediction method according to claim 3 is characterized in that: The optimized SVR module is optimized by the SSA algorithm, including: Set initial values for the hyperparameters of the SVR module, which include kernel function, penalty parameter, and kernel parameter; Defining parameters for optimizing the SVR module using the SSA algorithm, the parameters include 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 smallest 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.
7. The regional short-term carbon emission prediction method according to claim 6, characterized in that: The expression used by 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 first depth feature, Represents the result of prediction based on the comprehensive feature vector.
8. A regional short-term carbon emission prediction device, characterized in that: include: A collection module, used to collect historical time-series carbon emission data of a target area, wherein the historical time-series carbon emission data includes historical carbon emission data and corresponding carbon emission impact data; A training module, used for inputting the historical time series carbon emission data into the constructed SSA-Transformer-SVR model, training the SSA-Transformer-SVR model, and obtaining a carbon emission prediction model; A prediction module, used to input 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, so as to obtain 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.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for predicting regional short-term carbon emissions as described in any one of claims 1 to 7 is implemented.
10. 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 as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Carbon dioxide emission prediction method
CN108846526A
Carbon emission medium and long term prediction method based on social economic data
CN114154703A
Carbon emission prediction method and system based on hybrid machine learning
CN115423215A
Lithium ion battery SOH estimation method based on SSA-SVR model
CN115684972A
Carbon emission prediction method and system, storage medium and equipment
CN117852702A