An energy data synchronization processing method, system, device and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2026-08-11
AI Technical Summary
在碳核算过程中,这种时间维度上的数据错位使得无法精确匹配同一时间段内的各类能源消耗总量,只能通过估算或简化处理来弥补数据缺口,这直接导致核算结果与实际能耗情况存在偏差,难以真实反映生产过程的碳排放水平,严重影响了碳核算数据的应用价值,制约了减排措施的精准实施
[0052]本申请提供的能源数据同步处理方法中,旨在解决现有产品碳核算中因能源消耗数据(如电力、天然气、燃油等)采集颗粒度、时间及方式不一致导致的核算不准确问题。该方法针对产品生产制造过程中能源数据收集不同步的情况,分两种场景处理:当核算时间节点处于两次能源数据采集时间之间时,采用差值法推算该节点的能源消耗数据;当核算时间节点无对应能源数据采集时,利用LSTM(长短期记忆网络)算法进行预测,具体包括提取时间间隔与特征构建、数据标准化与序列构建、LSTM训练模型构建及训练、预测与结果反标准化等步骤。通过上述方法,可实现对能源消耗数据的同步处理,为产品碳核算提供准确数据支撑,有效提高了产品碳核算的准确性。
Smart Images

Figure CN121327326B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of carbon accounting technology, and more specifically relates to a method, system, device and medium for synchronous processing of energy data. Background Technology
[0002] In the process of environmental governance, climate change caused by greenhouse gas emissions has received increasing attention. The continued advancement of industrialization and the ever-growing demand for energy have made the massive consumption of fossil fuels a major source of carbon emissions, posing a serious challenge to ecological balance and sustainable development. To address this issue, relevant organizations are committed to reducing greenhouse gas emission intensity and building a green and low-carbon development model by setting emission reduction targets and other means.
[0003] Guided by emission reduction targets, carbon emission accounting throughout the entire product lifecycle has become a crucial basis for measuring the level of low-carbon development in industries. Among these, the manufacturing process, as a concentrated stage of energy consumption, directly determines the reliability of carbon accounting results based on the accuracy of its energy consumption data. Consumption data for conventional energy sources such as electricity, natural gas, and fuel oil are the core foundation for calculating the total carbon emissions from the production process. The quality of this data not only affects companies' own low-carbon transformation decisions but also relates to the effectiveness of achieving regional emission reduction targets.
[0004] However, the management and application of energy data in the current product carbon accounting process has significant shortcomings. Most production enterprises' energy consumption data are scattered across different management systems or recording media, lacking a unified and standardized management mechanism, leading to significant difficulties in data integration. In actual accounting, various types of energy data often come from different collection channels, with differences in data formats and recording standards, making it difficult to form a coherent and complete energy consumption dataset, thus creating a fundamental obstacle to accurate carbon emission accounting.
[0005] A more prominent problem is the asynchrony in energy data collection. Due to differences in metering methods, collection frequencies, and recording times for energy sources such as electricity, natural gas, and fuel oil, the timestamps of their consumption data are often inconsistent, with some data even exhibiting significant time gaps. In carbon accounting, this data misalignment in the time dimension makes it impossible to accurately match the total consumption of various energy types within the same time period. Estimation or simplification is necessary to fill the data gaps, directly leading to discrepancies between the accounting results and actual energy consumption. This makes it difficult to accurately reflect the carbon emission levels of the production process, severely impacting the application value of carbon accounting data and hindering the precise implementation of emission reduction measures. Summary of the Invention
[0006] To address the above problems, the present invention aims to provide an energy data synchronization processing method, system, device, and medium. By continuously collecting consumption data of different energy types, and combining the interpolation method and LSTM algorithm to accurately fill in the collection gaps at the accounting time points, a synchronized energy dataset is efficiently generated, significantly improving the accuracy and real-time performance of carbon accounting, and providing strong support for achieving accurate carbon emission accounting for products.
[0007] To achieve the above objectives, the present invention employs the following technical solution:
[0008] In a first aspect, embodiments of this application provide an energy data synchronization processing method, including:
[0009] Collect energy consumption data of different energy types and their data collection time points during the production and manufacturing process to generate energy consumption datasets for different energy types; the energy types include electricity, natural gas, and fuel oil;
[0010] Take any moment as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node;
[0011] For uncollected energy consumption data, determine whether there is energy consumption data before and after the energy data accounting time point based on the energy type.
[0012] If yes, then the energy consumption data at the energy data accounting time point is calculated using the difference method; if not, then the energy consumption data at the energy data accounting time point is predicted using the LSTM algorithm.
[0013] In an optional implementation, the step of collecting energy consumption data of different energy types and their data collection time points during the production process to generate energy consumption datasets of different energy types includes:
[0014] Electricity consumption data is continuously collected during the manufacturing process to generate an electricity consumption dataset W[w1,w2,w3,……,w i ,w j ];
[0015] Natural gas consumption data is continuously collected during the production process to generate a natural gas consumption dataset Q[q1,q2,q3,……,q m ,q n ];
[0016] Fuel consumption data is continuously collected during the production process to generate a fuel consumption dataset R[r1,r2,r3,……,r k ,r l ];
[0017] Record the data collection time point for each energy consumption data point.
[0018] In an optional implementation, the step of using any given moment as the energy data accounting time node, and determining the energy consumption data and its energy type that were not collected at the energy data accounting time node based on the energy consumption data and its data collection time point, includes:
[0019] Determine whether there are identical data collection time points based on the energy data accounting time nodes;
[0020] If so, then record the energy consumption data collected at the data collection time point according to the energy consumption dataset, and determine the corresponding energy type as the energy consumption data of the corresponding energy type at the energy data accounting time point;
[0021] If not, record the energy consumption data and its type that were not collected at the energy data accounting time point.
[0022] In an optional implementation, determining whether there is energy consumption data both before and after the energy data accounting time point for uncollected energy consumption data, based on its energy type, includes:
[0023] For uncollected energy consumption data, obtain all data collection time points for that energy type as reference time points;
[0024] Determine whether there are reference time points before and after the energy data accounting time point;
[0025] If so, then determine whether there is energy consumption data for this energy type both before and after the energy data accounting time point;
[0026] If not, then it is determined that there is no energy consumption data for this energy type before and / or after the energy data accounting time point.
[0027] In an optional implementation, the step of calculating energy consumption data at the energy data accounting time point using the interpolation method includes:
[0028] For uncollected energy consumption data, determine the energy consumption dataset and reference time point based on the energy type;
[0029] Based on the energy data accounting time node t0, the nearest data collection time points t1 and t2 before and after t0 are obtained based on the determined energy consumption dataset and reference time point, and the corresponding energy consumption data N1 and N2 are further obtained.
[0030] Through formula Calculate the uncollected energy consumption data N0 at the energy data accounting time node t0.
[0031] In an optional implementation, the step of predicting energy consumption data at the energy data accounting time point using the LSTM algorithm includes:
[0032] For uncollected energy consumption data, based on the energy consumption dataset of that energy type and the corresponding data collection time point, the time interval between adjacent collection times is calculated to form a time interval vector;
[0033] Pair each energy consumption data point with its corresponding time interval to construct a feature sample;
[0034] The min-max normalization method is used to scale the energy consumption data and its corresponding time intervals to the range [0,1] and update the feature samples;
[0035] Set the length of the input sequence of the LSTM model to L, and construct a three-dimensional input sequence sample array based on the feature samples, with the format [number of samples, sequence length, number of features];
[0036] Construct an LSTM model and receive sequence data of dimension (L,2) through the input layer of the LSTM model; set up a 2-layer LSTM network in the hidden layer of the LSTM model, with 50 neurons in each layer; set the output layer of the LSTM model as a fully connected layer to output a single predicted value.
[0037] Select the first N feature samples as the training set and the remaining samples as the test set;
[0038] The LSTM model is trained using the training set and its accuracy is verified using the test set until the model converges, at which point an energy data prediction model is generated.
[0039] Select the L energy consumption data of this energy type closest to time t0 and the corresponding L-1 time intervals, and use the min-max standardization method to standardize them as input data. Then, input the input data into the energy data prediction model.
[0040] The standardized predicted values of energy consumption data at the energy data accounting time node are output by the energy data prediction model, and the original dimensions are restored by destandardization to obtain the uncollected energy consumption data at the energy data accounting time node t0.
[0041] In an optional implementation, the method further includes:
[0042] Based on the energy consumption data of all energy types at the energy data accounting time point, an energy dataset is formed that is synchronized at the energy data accounting time point.
[0043] Secondly, embodiments of this application also provide an energy data synchronization processing system, including:
[0044] The data acquisition module is used to collect energy consumption data of different energy types and their data acquisition time points during the production and manufacturing process, and generate energy consumption datasets of different energy types; the energy types include electricity, natural gas and fuel oil;
[0045] The node data and type identification module is used to take any time as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node.
[0046] The data relationship judgment module is used to determine, based on the energy type, whether there is energy consumption data before and after the energy data accounting time point for uncollected energy consumption data.
[0047] The calculation module is used to calculate the energy consumption data at the time point of energy data accounting based on the difference method;
[0048] The prediction module is used to predict energy consumption data at the time point of energy data accounting using the LSTM algorithm.
[0049] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the energy data synchronization processing method described in any of the above descriptions.
[0050] Fourthly, embodiments of this application also provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the energy data synchronization processing method described in any of the above claims.
[0051] As can be seen from the above technical solutions, the present invention has the following advantages:
[0052] The energy data synchronization processing method provided in this application aims to solve the problem of inaccurate calculations in existing product carbon accounting caused by inconsistencies in the granularity, timing, and methods of energy consumption data (such as electricity, natural gas, and fuel oil) collection. This method addresses the asynchronous collection of energy data during product manufacturing by handling two scenarios: when the calculation time point falls between two energy data collection times, the difference method is used to estimate the energy consumption data for that time point; when no corresponding energy data is collected for the calculation time point, the LSTM (Long Short-Term Memory) algorithm is used for prediction, specifically including steps such as extracting time intervals and constructing features, data standardization and sequence construction, LSTM training model construction and training, prediction, and result de-standardization. Through this method, synchronous processing of energy consumption data can be achieved, providing accurate data support for product carbon accounting and effectively improving the accuracy of product carbon accounting.
[0053] This application solves the problem of asynchronous energy data acquisition by using the interpolation method and LSTM algorithm, achieving accurate data completion and prediction, significantly improving the efficiency and accuracy of carbon accounting, and providing strong support for energy management optimization and corporate carbon emission reduction decisions. Attached Figure Description
[0054] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A flowchart illustrating the energy data synchronization processing method provided in this application.
[0056] Figure 2 A schematic diagram showing the timing of energy consumption data collection provided in this application.
[0057] Figure 3 The t provided for this application r19 =A diagram showing electricity consumption at 175 hours.
[0058] Figure 4 A schematic diagram of the energy data synchronization processing system provided in this application.
[0059] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0060] The various embodiments of this disclosure will be described more fully in the detailed steps of the energy data synchronization processing method described below. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0061] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions, operations, or elements, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or the possibility of adding one or more combinations of the foregoing.
[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0063] Please see Figure 1 The diagram shown is a flowchart of an energy data synchronization processing method according to a specific embodiment. The method includes:
[0064] S1: Collect energy consumption data of different energy types and their data collection time points during the production and manufacturing process, and generate energy consumption datasets of different energy types; the energy types include electricity, natural gas and fuel oil.
[0065] In a specific implementation, power consumption data is continuously collected during the manufacturing process to generate a power consumption dataset W[w1,w2,w3,……,w i ,w j During the production process, natural gas consumption data is continuously collected to generate a natural gas consumption dataset Q[q1,q2,q3,……,q]. m ,q n During the production process, fuel consumption data is continuously collected to generate a fuel consumption dataset R[r1,r2,r3,……,r] k ,r l ].
[0066] Simultaneously, the data collection time point for each energy consumption data point is recorded. The data collection method can be either equal-interval or non-equal-interval collection.
[0067] S2: Take any time point as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node.
[0068] In a specific implementation, the first step is to determine whether there are identical data collection time points based on the energy data accounting time points.
[0069] If so, the energy consumption data collected at the data collection time point is recorded according to the energy consumption dataset, and the corresponding energy type is determined as the energy consumption data of the corresponding energy type at the energy data accounting time point.
[0070] If not, record the energy consumption data and its type that were not collected at the energy data accounting time point.
[0071] S3: For uncollected energy consumption data, determine whether there is energy consumption data before and after the energy data accounting time point based on the energy type; if yes, proceed to step S4; if no, proceed to step S5.
[0072] In a specific implementation, firstly, for the uncollected energy consumption data, all data collection time points of that energy type are obtained according to its energy type and used as reference time points; then, it is determined whether there are reference time points before and after the energy data accounting time point.
[0073] If yes, then determine whether there is energy consumption data for that energy type both before and after the energy data accounting time point; if no, then determine whether there is energy consumption data for that energy type before and / or after the energy data accounting time point.
[0074] S4: Calculate the energy consumption data at the energy data accounting time point using the difference method, and then proceed to step S6.
[0075] Specifically, for uncollected energy consumption data, the energy consumption dataset and reference time point are first determined based on the energy type; then, based on the energy data accounting time point t0, the nearest data collection time points t1 and t2 before and after t0 are obtained based on the determined energy consumption dataset and reference time point, and the corresponding energy consumption data N1 and N2 are further obtained.
[0076] Finally, through the formula Calculate the uncollected energy consumption data N0 at the energy data accounting time node t0.
[0077] S5: Predict the energy consumption data at the energy data accounting time node using the LSTM algorithm, and then execute step S6.
[0078] In a specific implementation, feature construction is first performed, including calculating the time interval between adjacent collection times based on the energy consumption dataset of the energy type and the corresponding data collection time point for the uncollected energy consumption data, forming a time interval vector; and pairing each energy consumption data with its corresponding time interval to construct feature samples.
[0079] Then, data standardization is performed. This includes: using the min-max standardization method to scale energy consumption data and its corresponding time intervals to the range [0,1], and updating feature samples;
[0080] The formula used is:
[0081]
[0082] Where x represents the consumption data or time interval to be standardized, x min x is the minimum value in this type of data. max This represents the maximum value in this type of data.
[0083] Next, sequence sample construction is performed. The length of the input sequence of the LSTM model is set to L, and a three-dimensional input sequence sample array is constructed based on the feature samples, with the format [number of samples, sequence length, number of features].
[0084] At this point, LSTM model training is performed. This includes: constructing an LSTM model, receiving sequence data of dimension (L,2) through the input layer of the LSTM model; setting up a 2-layer LSTM network in the hidden layers of the LSTM model, with 50 neurons in each layer; setting the output layer of the LSTM model as a fully connected layer to output a single predicted value; selecting the first N feature samples as the training set and the remaining samples as the test set; training the LSTM model using the training set and verifying the model accuracy using the test set until the model converges, generating an energy data prediction model.
[0085] Finally, data prediction and destandardization are performed at the accounting node. First, the L energy consumption data points of this energy type closest to time t0 and their corresponding L-1 time intervals are selected and standardized using the min-max standardization method. These are then used as input data and fed into the energy data prediction model. Next, the standardized predicted values of energy consumption data at the energy data accounting time node are output by the energy data prediction model and destandardized to restore them to their original dimensions, thus obtaining the uncollected energy consumption data at the energy data accounting time node t0.
[0086] S6: Based on the energy consumption data of all energy types at the energy data accounting time node, form an energy dataset that is synchronized at the energy data accounting time node.
[0087] This step integrates the synchronized electricity, natural gas, and fuel oil data to form a complete energy consumption dataset.
[0088] In this embodiment, firstly, the method effectively solves the technical challenge of asynchronous acquisition of multiple types of energy data. By designing differentiated processing strategies for energy data with different timestamps, the method uses the interpolation method for accurate interpolation of data within the time interval of the accounting node, and uses the LSTM algorithm for scientific prediction of data beyond the most recent acquisition time. This achieves accurate alignment of heterogeneous energy data such as electricity, natural gas, and fuel oil in the time dimension, breaking the information gap problem caused by time misalignment in traditional data processing, and providing a time-consistent data foundation for subsequent carbon accounting.
[0089] Secondly, this method significantly improves the accuracy and completeness of energy consumption data. Through standardized data preprocessing procedures and sequence feature construction methods, it effectively eliminates differences in the dimensions and formats of different energy data. Combined with the deep mining capabilities of the LSTM model for historical data patterns, it can output reliable prediction results even in scenarios with missing data or large intervals, avoiding the error accumulation caused by traditional estimation methods. This allows energy consumption data to more realistically reflect the actual production situation and provides a key guarantee for the reliability of carbon accounting results.
[0090] Finally, this method provides technical support for enterprises' low-carbon transformation and precise emission reduction. By establishing a standardized energy data synchronization and processing mechanism, enterprises can obtain standardized energy consumption data in real time, accurately grasp the dynamics of energy consumption and carbon emission levels in the production process, and provide data basis for optimizing energy allocation and formulating emission reduction measures. At the same time, this method reduces the difficulty of integrating multi-source energy data, improves the efficiency and automation level of carbon accounting, and helps promote enterprises to establish a refined energy management system, thus contributing to the achievement of emission reduction targets.
[0091] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to fully illustrate the specific implementation process in this embodiment, another energy data synchronization processing method is provided, which specifically includes the following steps:
[0092] 1. During the production and manufacturing process, the following energy consumption data are collected:
[0093] Electricity consumption data: W[w1,w2,w3,……,w i ,w j], where the subscripts 1, 2, 3, ..., i, j only indicate the order of data collection time, which can be collected at equal time intervals or at non-equal time intervals;
[0094] Natural gas consumption data: Q[q1,q2,q3,……,q m ,q n ], where the subscripts 1, 2, 3, ..., m, n are similar to those in the power data acquisition above, only indicating the order of data collection. They can be collected at equal time intervals or at non-equal time intervals;
[0095] Fuel consumption data: R[r1,r2,r3,……,r k ,r l ], where the subscripts 1, 2, 3, ..., k, l are the same as those above, except that they indicate the order of data collection. They can be collected at equal time intervals or at non-equal time intervals.
[0096] During the production process, the two most recent power consumption data collections were in W. i w j The two most recent natural gas consumption data collections were q. m q n The two most recent fuel consumption data collections were r k r l .
[0097] Based on the above data, a schematic diagram of energy consumption data collection times can be generated, as shown below. Figure 2 As shown, the most recent time for collecting electricity, natural gas, and fuel consumption data was t. wj , t qn , t rl , t qn >t wj >t rl The second most recent energy consumption (w) i q m r k The collection times t are respectively wi , t qm , t rk , (t qm >t wi >t rk ).
[0098] 2. Set energy data accounting time nodes, and process various types of energy consumption data synchronously according to the data status and time nodes in the following two situations.
[0099] A: Assume the time t is the most recent time when electricity consumption data was collected. wj When used as a time node for energy data accounting, for twj Given that energy consumption data has already been collected (e.g., t), qm t qn Real-time natural gas consumption data q m q n , t qm <t wj <t qn ), the difference method can be used to obtain t. wj Real-time natural gas consumption data is as follows:
[0100] (1)
[0101] Similarly, t can be calculated. wj Real-time fuel consumption data.
[0102] At this point, t can be determined. wj Real-time data on electricity, natural gas, and fuel consumption.
[0103] B: If t rl The time point is used as the accounting time node for calculating carbon emissions, t rl Since there is no electricity consumption data collected at any time, gas consumption data can be estimated using equation (1). However, electricity consumption data and fuel consumption data need to be predicted. The principles used are exactly the same. Taking electricity consumption data as an example, electricity consumption data needs to be predicted based on the data collected in the previous j times, t wi t wj The power consumption data collected at any time is w i w j , (t wi <t wj <t rl Using the LSTM (Long Short-Term Memory) algorithm to analyze t rl The power consumption data at any given time is used to predict the following:
[0104] a. Extraction time interval and feature construction:
[0105] First, based on the collected power consumption data W[w1,w2,w3,……,w i ,w j ], corresponding to the timestamp [t] w1 ,t w2 ,t w3 ,...,t wi ,t wj (e.g., t) w1 =1 hour, t w2 =7 hours, t w3 =15 hours...). The difference Δt between adjacent timestamps...w0 =0,Δt w1 =t w2 -t w1 ,Δt w2 =t w3 -t w2 ,...,Δt wi =t wi -t wj , forming an interval vector [Δt] w1 ,Δt w2 ,...,Δt wi Finally, each electricity consumption value is paired with its corresponding time interval to construct a feature value. For example, the i-th sample is (w i ,Δt wi (where Δt) wi It is t wi to t wj (Time interval).
[0106] b. Data standardization and sequence construction:
[0107] The power consumption and time interval values with different dimensions are standardized using the following formula (2), scaling the data to the same range of 0~1 to avoid the model being affected by the magnitude of the features. For any value x, the standardized x can be identified as:
[0108] (2)
[0109] Since the LSTM algorithm requires a sequence input, for example, if the sequence length is set to 3, then [w1,w2,w3] and [Δt] are used. w1 , Δt w2 Predict w4 using [w2, w3, w4] and [Δt]. w2 , Δt w3 Predict w5, and so on. A three-dimensional sample array can be constructed [number of samples, sequence length, number of features (consumption value + interval)]. For example, the monitored electricity consumption data is shown in Table 1 below. The following data is needed to predict time t. r19 =Electricity consumption over 175 hours:
[0110] Based on the power data collected in Table 1, training sample data can be constructed:
[0111] Sample 1:
[0112] Input: X1=[w1,w2,w3], Output: Y1=[w4];
[0113] Sample 2:
[0114] Input: X2=[w2,w3,w4], Output: Y2=[w5];
[0115] ...
[0116] Sample 16:
[0117] Input: X16=[w 16 ,w 17 ,w 18 ] , Output Y1=[w 19 ].
[0118] Table 1: Reference Table for Electricity Consumption Data
[0119]
[0120] c. LSTM model construction and training:
[0121] The LSTM training model's input layer receives fuel consumption and time interval features in dimensions (3,2). The hidden layers consist of two LSTM layers, each with 50 neurons, capturing long-term dependencies in the sequence (e.g., whether power consumption fluctuates regularly over long time intervals). The output layer outputs a single predicted value (the next power consumption) through a fully connected layer.
[0122] The model training process uses the first 12 sample data constructed above for training, and the remaining sample data is used as test data.
[0123] d. Destandardization of predictions and results:
[0124] Take the power consumption and time interval data from the last few time steps, which are equal to the sequence length, standardize them, and input them into the trained model for prediction. The model outputs the standardized result of the next consumption value, which is then de-standardized (e.g., scaler.inverse_transform) to restore it to the original dimensions, yielding the final predicted value.
[0125] For example, regarding t r19 =Predicting electricity consumption over 175 hours, with a sequence length of 3, then taking the last 3 consumption values [w] 17 ,w 18 ,w 19 ] and 2 intervals [Δt w17 ,Δt w18 Input model, predict t r19 =Electricity consumption over 175 hours. Specific forecast values are as follows: Figure 3 As shown, this model predicts t. r19 The electricity consumption at time 175 is 108.99 kWh.
[0126] As can be seen, by using the above methods, relatively accurate energy consumption data can be obtained under both scenario A and scenario B, thus providing data support for accurate carbon accounting.
[0127] like Figure 4 As shown, the following are embodiments of the energy data synchronization processing system provided in this disclosure. This system and the energy data synchronization processing methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the energy data synchronization processing system, please refer to the embodiments of the above energy data synchronization processing methods.
[0128] An energy data synchronization processing system, comprising:
[0129] The data acquisition module is used to collect energy consumption data of different energy types and their data acquisition time points during the production and manufacturing process, and generate energy consumption datasets of different energy types; the energy types include electricity, natural gas and fuel oil;
[0130] The node data and type identification module is used to take any time as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node.
[0131] The data relationship judgment module is used to determine, based on the energy type, whether there is energy consumption data before and after the energy data accounting time point for uncollected energy consumption data.
[0132] The calculation module is used to calculate the energy consumption data at the time point of energy data accounting based on the difference method;
[0133] The prediction module is used to predict energy consumption data at the time point of energy data accounting using the LSTM algorithm.
[0134] The energy data synchronization processing system provided in this embodiment accurately fills in data acquisition gaps using the interpolation method and the LSTM algorithm, effectively solving the problem of energy data asynchrony and significantly improving the accuracy and efficiency of carbon accounting. It also provides strong support for energy management optimization and corporate carbon reduction decisions. Specifically, the interpolation method can quickly estimate energy consumption data at missing points by performing linear interpolation based on known data points, achieving data synchronization. Meanwhile, the LSTM algorithm utilizes the powerful predictive capabilities of time series data to capture long-term dependencies, further improving the accuracy of data prediction. The combination of these two techniques not only improves the completeness and reliability of energy data but also optimizes the carbon accounting process, reduces accounting errors, and provides a solid data foundation for enterprises to formulate scientific and reasonable energy management strategies and carbon reduction measures.
[0135] Figure 5A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0136] The energy data synchronization processing method provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0137] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.
[0138] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0139] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0140] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.
[0141] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.
[0142] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0143] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.
[0144] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0145] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0146] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0147] Electronic devices can achieve display functions through GPUs, displays, and application processors.
[0148] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0149] A display screen is used to display images, videos, etc. A display screen includes a display panel.
[0150] The aforementioned electronic device realizes the energy data synchronization processing method of this application, which uses the difference method to interpolate and complete the data, and uses the LSTM algorithm combined with time interval characteristics to predict energy consumption, achieving the beneficial effects of data synchronization, improved integrity, and enhanced efficiency and accuracy of carbon accounting.
[0151] The storage medium provided in this application stores a program product capable of implementing a method for synchronous processing of energy data.
[0152] Energy data synchronization processing methods include:
[0153] Collect energy consumption data of different energy types and their data collection time points during the production and manufacturing process to generate energy consumption datasets for different energy types; the energy types include electricity, natural gas, and fuel oil;
[0154] Take any moment as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node;
[0155] For uncollected energy consumption data, determine whether there is energy consumption data before and after the energy data accounting time point based on the energy type.
[0156] If yes, then the energy consumption data at the energy data accounting time point is calculated using the difference method; if not, then the energy consumption data at the energy data accounting time point is predicted using the LSTM algorithm.
[0157] In some possible implementations, the energy data synchronization processing method of this disclosure can be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0158] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0159] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for synchronizing energy data, characterized in that, include: Collect energy consumption data of different energy types and their data collection time points during the production and manufacturing process to generate energy consumption datasets for different energy types; the energy types include electricity, natural gas, and fuel oil; Take any moment as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node; For uncollected energy consumption data, determine whether there is energy consumption data before and after the energy data accounting time point based on the energy type. If yes, then the energy consumption data at the energy data accounting time point is calculated using the difference method; if no, then the energy consumption data at the energy data accounting time point is predicted using the LSTM algorithm. The method of predicting energy consumption data at specific time points using the LSTM algorithm includes: For uncollected energy consumption data, based on the energy consumption dataset of that energy type and the corresponding data collection time point, the time interval between adjacent collection times is calculated to form a time interval vector; Pair each energy consumption data point with its corresponding time interval to construct a feature sample; The min-max normalization method is used to scale the energy consumption data and its corresponding time intervals to the range of [0,1] and update the feature samples; Set the length of the input sequence of the LSTM model to L, and construct a three-dimensional input sequence sample array based on the feature samples, with the format [number of samples, sequence length, number of features]; Construct an LSTM model and receive sequence data of dimension (L,2) through the input layer of the LSTM model; set up a 2-layer LSTM network in the hidden layer of the LSTM model, with 50 neurons in each layer; set the output layer of the LSTM model as a fully connected layer to output a single predicted value. Select the first N feature samples as the training set and the remaining samples as the test set; The LSTM model is trained using the training set and its accuracy is verified using the test set until the model converges, at which point an energy data prediction model is generated. Select the L energy consumption data of this energy type closest to time t0 and the corresponding L-1 time intervals, and use the min-max standardization method to standardize them as input data. Then, input the input data into the energy data prediction model. The standardized predicted values of energy consumption data at the energy data accounting time node are output by the energy data prediction model, and the original dimensions are restored by destandardization to obtain the uncollected energy consumption data at the energy data accounting time node t0.
2. The energy data synchronization processing method according to claim 1, characterized in that, The process involves collecting energy consumption data of different energy types during the production and manufacturing process, along with the data collection time points, to generate energy consumption datasets for different energy types, including: Electricity consumption data is continuously collected during the manufacturing process to generate an electricity consumption dataset W[w1,w2,w3,……,w i ,w j ]; Natural gas consumption data is continuously collected during the production process to generate a natural gas consumption dataset Q[q1,q2,q3,……,q m ,q n ]; Fuel consumption data is continuously collected during the production process to generate a fuel consumption dataset R[r1,r2,r3,……,r k ,r l ]; Record the data collection time point for each energy consumption data point.
3. The energy data synchronization processing method according to claim 1, characterized in that, The step of using any given moment as the energy data accounting time node, and determining the energy consumption data and its energy type that were not collected at the energy data accounting time node based on the energy consumption data and its data collection time point, includes: Determine whether there are identical data collection time points based on the energy data accounting time nodes; If so, then record the energy consumption data collected at the data collection time point according to the energy consumption dataset, and determine the corresponding energy type as the energy consumption data of the corresponding energy type at the energy data accounting time point; If not, record the energy consumption data and its type that were not collected at the energy data accounting time point.
4. The energy data synchronization processing method according to claim 3, characterized in that, The determination of whether energy consumption data exists both before and after the energy data calculation time point, based on the energy type, for uncollected energy consumption data includes: For uncollected energy consumption data, obtain all data collection time points for that energy type as reference time points; Determine whether there are reference time points before and after the energy data accounting time point; If so, then determine whether there is energy consumption data for this energy type both before and after the energy data accounting time point; If not, then it is determined that there is no energy consumption data for this energy type before and / or after the energy data accounting time point.
5. The energy data synchronization processing method according to claim 4, characterized in that, The method of calculating energy consumption data at the time point of energy data accounting using the difference method includes: For uncollected energy consumption data, determine the energy consumption dataset and reference time point based on the energy type; Based on the energy data accounting time node t0, the nearest data collection time points t1 and t2 before and after t0 are obtained based on the determined energy consumption dataset and reference time point, and the corresponding energy consumption data N1 and N2 are further obtained. Through formula Calculate the uncollected energy consumption data N0 at the energy data accounting time node t0.
6. The energy data synchronization processing method according to claim 1, characterized in that, The method further includes: Based on the energy consumption data of all energy types at the energy data accounting time point, an energy dataset is formed that is synchronized at the energy data accounting time point.
7. An energy data synchronization processing system, characterized in that, The system employs the energy data synchronization processing method as described in any one of claims 1 to 6; The system includes: The data acquisition module is used to collect energy consumption data of different energy types and their data acquisition time points during the production and manufacturing process, and generate energy consumption datasets of different energy types; the energy types include electricity, natural gas and fuel oil; The node data and type identification module is used to take any time as the energy data accounting time node, and based on the energy consumption data and its data collection time point, determine the energy consumption data and its energy type that were not collected at the energy data accounting time node. The data relationship judgment module is used to determine, based on the energy type, whether there is energy consumption data before and after the energy data accounting time point for uncollected energy consumption data. The calculation module is used to calculate energy consumption data at the time point of energy data accounting using the difference method; The prediction module is used to predict energy consumption data at the time point of energy data accounting using the LSTM algorithm; The method of predicting energy consumption data at specific time points using the LSTM algorithm includes: For uncollected energy consumption data, based on the energy consumption dataset of that energy type and the corresponding data collection time point, the time interval between adjacent collection times is calculated to form a time interval vector; Pair each energy consumption data point with its corresponding time interval to construct a feature sample; The min-max normalization method is used to scale the energy consumption data and its corresponding time intervals to the range of [0,1] and update the feature samples; Set the length of the input sequence of the LSTM model to L, and construct a three-dimensional input sequence sample array based on the feature samples, with the format [number of samples, sequence length, number of features]; Construct an LSTM model and receive sequence data of dimension (L,2) through the input layer of the LSTM model; set up a 2-layer LSTM network in the hidden layer of the LSTM model, with 50 neurons in each layer; set the output layer of the LSTM model as a fully connected layer to output a single predicted value. Select the first N feature samples as the training set and the remaining samples as the test set; The LSTM model is trained using the training set and its accuracy is verified using the test set until the model converges, at which point an energy data prediction model is generated. Select the L energy consumption data of this energy type closest to time t0 and the corresponding L-1 time intervals, and use the min-max standardization method to standardize them as input data. Then, input the input data into the energy data prediction model. The standardized predicted values of energy consumption data at the energy data accounting time node are output by the energy data prediction model, and the original dimensions are restored by destandardization to obtain the uncollected energy consumption data at the energy data accounting time node t0.
8. An electronic 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 program, it implements the steps of the energy data synchronization processing method as described in any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the energy data synchronization processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Accumulated time error prediction method based on time window LSTM model
CN119558348A
Substation GIS equipment LCC prediction method based on improved Attention-LSTM algorithm
CN120086756A