A machine learning-based energy consumption prediction and scheduling control method
By collecting data through distributed sensing terminals, combining temporal recursive structures and attention weights to generate energy consumption distribution probability prediction results, and applying intervention signals within the device safety boundary, extreme disturbance scenarios are generated using digital twins for consistency verification. This solves the accuracy and reliability problems of existing energy consumption prediction and scheduling methods, and realizes continuous optimization and adaptive scheduling of energy consumption management.
Patent Information
- Application Number
- CN202511475773.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing energy consumption prediction and scheduling methods have limitations in handling complex environments, such as insufficient sensitivity of prediction models to sudden disturbances and dynamic changes in equipment, and lack of multi-domain consistency verification, resulting in limitations in the reliability and adaptability of prediction and scheduling results.
Data is collected by distributed sensing terminals, and energy consumption prediction results are generated by combining time-series recursive structures and attention weights. Extreme disturbance scenarios are generated using digital twins, and the consistency between the prediction results and the scheduling scheme is checked in the data domain and physical domain. The machine learning model is updated by combining feedback data.
It improves the accuracy of energy consumption forecasting and the reliability of scheduling decisions, and realizes continuous optimization and adaptive evolution of energy consumption management.
Smart Images

Figure CN120930892B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, in particular to an energy consumption prediction and scheduling control method based on machine learning. BACKGROUND
[0002] In the prior art, energy consumption prediction and scheduling control methods are mostly based on historical energy consumption curves and real-time monitoring data for statistical modeling or machine learning modeling, and combined with certain scheduling rules or optimization algorithms to achieve energy resource allocation and control. In practical applications, commonly used technologies include energy consumption prediction based on time series analysis, load trend judgment using deep learning models, and energy consumption optimization through demand response strategies, hierarchical scheduling mechanisms, etc. These methods have been widely applied to smart grids, data center management and industrial production processes, providing a foundation for improving energy utilization efficiency.
[0003] However, the existing technology still has many shortcomings in dealing with energy consumption prediction and scheduling in complex environments. First, the prediction model relies on static historical data and is not sensitive to sudden disturbances and dynamic changes in device operating status, making it difficult to detect potential risks in advance. Second, energy consumption scheduling is mostly based on a single optimization objective, lacking comprehensive consideration of device health status and task flexibility, resulting in limitations in reliability and adaptability of the scheduling results. In addition, the existing methods lack a mechanism for multi-domain consistency verification of prediction results and scheduling results, resulting in deviations between prediction and execution, making it difficult to achieve closed-loop optimization.
[0004] Therefore, it is necessary to propose a new energy consumption prediction and scheduling control method that can integrate prediction accuracy, risk assessment and scheduling optimization. SUMMARY
[0005] The present application provides an energy consumption prediction and scheduling control method based on machine learning to improve the accuracy of energy consumption prediction and the reliability of scheduling decisions.
[0006] The present application provides an energy consumption prediction and scheduling control method based on machine learning, comprising:
[0007] Collecting operating parameters, energy consumption curves and environmental disturbance data of multiple devices through distributed sensing terminals;
[0008] Inputting the operating parameters, energy consumption curves and environmental disturbance data into a pre-trained machine learning model, which generates a probability prediction result of energy consumption distribution in combination with a time series recursive structure and attention weight;
[0009] Applying an intervention signal within the device safety boundary, generating device response features based on intervention differences, and combining them with the probability prediction result to form an energy consumption risk map;
[0010] generate an extreme disturbance scenario based on the energy consumption risk map using digital twinning, and perform consistency checking on the probability prediction result and the scheduling scheme in the data domain and the physical domain, and perform multi-level scheduling according to the checked energy consumption risk map and task delay tolerance to form a scheduling result;
[0011] The scheduling result is sent to the device, and feedback data is returned, and the machine learning model is updated according to the feedback data.
[0012] The beneficial effects of the technical solutions provided in the present application include:
[0013] (1) By combining the machine learning model with the time sequence recursion structure and the attention weight, the long-term energy consumption trend and the short-term fluctuation feature can be considered in the prediction process, and the accuracy and robustness of the energy consumption distribution prediction are improved. (2) The intervention signal is applied within the device safety boundary, and the device response feature is generated, so that the energy consumption risk map can reflect the real dynamic behavior of the device to the disturbance, thereby identifying potential energy consumption abnormalities and operation risks in advance. (3) An extreme disturbance scenario is generated using digital twinning, and consistency checking is performed on the prediction result and the scheduling scheme in the data domain and the physical domain, so as to ensure that the scheduling scheme meets the data statistical law and the physical feasibility, and the reliability of the scheduling decision is improved. (4) Multi-level scheduling is introduced through task delay tolerance, and the machine learning model is updated combined with the feedback data, forming a closed-loop control of prediction, evaluation and execution, and realizing continuous optimization and self-adaptive evolution of energy consumption management. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 is a flowchart of an energy consumption prediction and scheduling control method based on machine learning provided by the first embodiment of the present application. DETAILED DESCRIPTION
[0015] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced in many different ways beyond the specific embodiments described herein, and it is understood that one of ordinary skill in the art can make similar modifications without departing from the spirit of the present application, so the present application is not limited to the specific implementations disclosed below.
[0016] The first embodiment of the present application provides an energy consumption prediction and scheduling control method based on machine learning. Please refer to Figure 1 , which is a schematic diagram of the first embodiment of the present application. The following will be described in detail Figure 1 The first embodiment of the present application provides an energy consumption prediction and scheduling control method based on machine learning.
[0017] Step S101: Collect the running parameters, energy consumption curves and environmental disturbance data of a plurality of devices through a distributed sensing terminal.
[0018] In step S101, first, distributed sensing terminals need to be deployed in the target application scenario, and each sensing terminal should have the ability to continuously monitor and data collect specified objects. The sensing terminals can include voltage sensors, current sensors, power factor sensors, temperature sensors, humidity sensors, and environmental noise or vibration sensors, etc., for comprehensively obtaining state parameters when the equipment is running. The operating parameters should at least include the voltage value, current value, active power, reactive power, power factor and frequency information of the equipment, so that the subsequent model can accurately depict the load characteristics and power usage of the equipment. The energy consumption curve is time series data calculated by sampling and accumulation based on the above electrical parameters, such as load curve and power consumption curve sampled at second or minute level, which can be stored as a serialized data structure with timestamp to ensure data continuity and traceability.
[0019] In addition to the device operating parameters and energy consumption curves, external environmental disturbance data also needs to be collected at the same time, which is used to describe external factors that may affect energy consumption fluctuations. Environmental disturbance data includes but is not limited to temperature, humidity, atmospheric pressure, air flow speed, environmental light intensity and production site start-up or shutdown events, which are obtained through environmental sensors, PLC signal acquisition modules or external data interfaces. For example, in an industrial production scenario, process start-stop signals and work order execution status can be directly collected by interfacing with the production control system, and stored in correspondence with the real-time energy consumption curve.
[0020] In specific implementation, each distributed sensing terminal needs to convert the original analog signal to digital signal through the local sampling module, and the sampling accuracy can be set to 16 bits or more, and the sampling frequency can be set to 1 kHz to 10 kHz according to the characteristics of the equipment, to ensure the ability to capture instantaneous fluctuations. The collected digital signals need to be pre-processed locally, including filtering and denoising, baseline correction, time synchronization and data compression, etc., to reduce the transmission bandwidth pressure. Time synchronization can be achieved through GPS time service or network time protocol, to ensure that the data collected by all distributed sensing terminals can be aligned at millisecond level, avoiding time sequence error to cause deviation to subsequent model training and prediction.
[0021] In the data transmission process, each distributed sensing terminal uploads the preprocessed data to the data aggregation node or central server through a wired communication interface (such as Ethernet, RS485) or a wireless communication protocol (such as Wi-Fi, 4G / 5G, LoRa). In order to ensure that the data is not tampered with and lost during transmission, a check value such as a CRC check code or a hash digest can be generated for each group of data at the sensing terminal end, and verified at the receiving end. Once a discrepancy is found, a retransmission mechanism is triggered. To improve data security, TLS encryption or lightweight encryption algorithms can also be added to the transmission protocol layer, ensuring data integrity and confidentiality during transmission.
[0022] In the data storage stage, the collected operating parameters, energy consumption curves and environmental disturbance data need to be archived in a unified data format. A storage structure based on a time series database, such as InfluxDB or other databases suitable for high-frequency time series data, can be used to store all data indexed by device ID, parameter type and timestamp. This ensures that the complete data sequence of any device in any time period can be extracted directly when calling the machine learning model, enabling fast data retrieval.
[0023] To facilitate subsequent processing, an edge computing function can be set up at the data aggregation node to fuse data from different sensing terminals. For example, synchronization alignment, outlier removal, missing value filling and other processing of multi-source data can be performed on the edge side to ensure that the data input into the subsequent model is consistent and of high quality. For missing data, linear interpolation, Kalman filtering or interpolation methods based on similar device data can be used for filling; for outliers, statistical thresholds or algorithms such as isolation forest can be used to automatically identify and remove them, thereby ensuring the stability and accuracy of the overall data set.
[0024] In summary, the implementation process of step S101 covers the entire process of deployment of sensing terminals, definition of collection content, data sampling and preprocessing, time synchronization and transmission guarantee, data storage and index management, and multi-source data fusion and cleaning.
[0025] Furthermore, the collection of operating parameters, energy consumption curves and environmental disturbance data of multiple devices by distributed sensing terminals includes:
[0026] High-frequency sampling of voltage signals, current signals and power signals of devices in distributed sensing terminals, and generating a timestamped initial sequence during sampling;
[0027] Performing multi-scale wavelet decomposition on the initial sequence in the distributed sensing terminal, extracting energy fluctuation components at different time scales, and reconstructing the energy fluctuation components into an energy multi-resolution feature sequence;
[0028] The energy consumption multi-resolution feature sequence is coupled with the environmental disturbance parameter in the distributed sensing terminal to construct an environmental labeled energy consumption vector, which contains running parameter features and environmental disturbance weights in the same time slice;
[0029] A dynamic credibility assessment is performed on the environmental labeled energy consumption vector in the distributed sensing terminal, a credibility factor is calculated through deviation test with historical distribution, and the credibility factor is attached to the environmental labeled energy consumption vector to form a credible energy consumption sample;
[0030] The credible energy consumption sample is received at a data aggregation node, and the credible energy consumption samples from different distributed sensing terminals are time-aligned and spatially fused to output a high-integrity energy consumption dataset in a unified format for subsequent machine learning model calling.
[0031] In this embodiment, a plurality of distributed sensing terminals are deployed on or near different devices, and each sensing terminal has independent data acquisition and preprocessing capability. The running parameters of the device are mainly obtained in real time through voltage sensors, current sensors and power sensors. High-frequency sampling mode is adopted during acquisition, and the sampling frequency can be set at kilohertz level to ensure that the subtle fluctuations of the device within a short time can be captured. Each sampling result is accompanied by an accurate time stamp, and through the synchronization and calibration of the internal clock and the global clock, the data of all distributed terminals can be accurately aligned in the time dimension. The initial sequence generated thereby is a set of multi-dimensional data points arranged continuously in time, each data point including voltage value, current value and power value, and being accompanied by corresponding time stamp information.
[0032] In order to further extract energy consumption features at different time scales, the sensing terminal performs multi-scale wavelet decomposition on the initial sequence. Specifically, the sensing terminal divides the signal into high-frequency components and low-frequency components, corresponding to short-period energy consumption burst changes and long-period energy consumption stable trends. Through multiple decompositions, a plurality of levels of energy consumption fluctuation components can be obtained, for example, the first layer represents second-level fluctuations, the second layer represents minute-level fluctuations, and the third layer represents hour-level fluctuations. After recombining these components, an energy consumption multi-resolution feature sequence is obtained. This sequence is constructed in such a way that feature values of different scales are retained at each time point, so that subsequent processing can not only see the overall trend, but also capture instantaneous anomalies.
[0033] After generating the energy consumption multi-resolution feature sequence, it needs to be coupled with environmental disturbance parameters. Environmental disturbance parameters include temperature, humidity, environmental noise, air flow speed, and other external data. The core of the coupling process is to bind the energy consumption features with the environmental disturbance parameters in the same time slice. For example, at a certain time point, if the energy consumption multi-resolution feature sequence shows high short-term fluctuations, and the environmental temperature is high and the humidity is rising, then the environmental labeled energy consumption vector at this time point contains both the operating parameter features and the environmental disturbance weights. The calculation method of the environmental disturbance weight is to allocate according to the change amplitude of the environmental disturbance and the correlation with energy consumption, for example, a rapid rise in temperature may be given a higher weight, while a stable humidity change may be given a lower weight. This process makes each vector not only reflect the device's own running situation, but also reflect the influence of external conditions on energy consumption behavior.
[0034] After generating the environmental labeled energy consumption vector, it needs to perform dynamic credibility evaluation. The evaluation method is to compare the currently collected environmental labeled energy consumption vector with the historical distribution to judge the deviation. If the current data point is very small compared to the historical average level, and the fluctuation amplitude is within the normal range, then the credibility factor is given a higher value; on the contrary, if the current data point is abnormal, the credibility factor is given a lower value. The calculation of the credibility factor does not depend on a single indicator, but is a comprehensive test through multiple dimensions, such as average value deviation, variance deviation, and distribution interval coverage. The calculation result is attached to the environmental labeled energy consumption vector as a credibility energy consumption sample.
[0035] Finally, these credible energy consumption samples are transmitted to the data aggregation node. At the aggregation node, first, the samples uploaded by different sensing terminals are time-aligned, and all samples are arranged according to the precise timestamp through a unified global time reference. Then spatial fusion is performed, that is, the credible energy consumption samples of different devices in the same time slice are combined to form a multi-device joint sample. For example, the voltage, current and power features of multiple servers in a data center in the same time slice are aggregated into a data matrix, which also contains temperature and humidity information at the same time. In this way, the high-complete energy consumption dataset output by the data aggregation node not only retains the independent features of each device, but also reflects the cooperative relationship between devices. The dataset is unified into a standard format to ensure that the subsequent machine learning model can be directly called without additional preprocessing.
[0036] This way ensures that the whole process from raw data collection to the generation of the final high-complete energy consumption dataset is implementable.
[0037] Step S102: input the running parameters, energy consumption curves and environmental disturbance data into the pre-trained machine learning model, which combines a time series recurrent structure and attention weights to generate a probabilistic prediction result of the energy consumption distribution.
[0038] In step S102, the collected running parameters, energy consumption curves and environmental disturbance data need to be organized and pre-processed according to a unified data format to ensure that they can be correctly accepted and processed by the machine learning model. First, the original data should be normalized or standardized to map data of different dimensions and different value ranges to a unified numerical interval. For example, voltage, current, temperature, humidity and other types of input parameters can be converted to the interval [0, 1] or [-1, 1] through linear scaling to avoid unreasonable weight deviation in model calculation due to some parameters with excessively large values. In handling missing values, mean interpolation based on historical sequences, nearest interpolation or estimation using correlation with other sensor terminals can be used to ensure the completeness of the input sequence in the time dimension. For abnormal values that are obviously beyond the normal range, threshold judgment, statistical distribution test or isolation forest algorithm can be used to identify and eliminate or correct them if necessary to ensure the quality of the input data.
[0039] After the data is cleaned and formatted, the input sequence needs to be constructed in chronological order, and the corresponding running parameters, energy consumption curves and environmental disturbance information are associated for each sampling time point. The input sequence is input into the pre-trained machine learning model as a multi-dimensional time series tensor. The core structure of the model is a hybrid architecture combining a time series recurrent network and an attention mechanism. The time series recurrent network part can use long short-term memory network (LSTM) or gated recurrent unit (GRU) to extract long-term dependencies and short-term fluctuation features in the input sequence. This part preserves important historical states and suppresses irrelevant or noisy information through the gating unit during information transmission, enabling the model to effectively characterize the periodicity and non-stationarity of the device energy consumption curve.
[0040] The attention mechanism is introduced based on the recurrent structure. Specifically, the correlation score between the current hidden state and the hidden vectors at all time steps in the input sequence is calculated at each time step. The attention weights are obtained by normalization, and the features at each time step are weighted and summarized using the weights. In this way, the model not only relies on the sequential memory of the recurrent network, but also automatically focuses on the time segments and feature variables that have the most impact on the prediction result through the attention mechanism, thereby strengthening the key disturbance signals and ignoring the secondary fluctuations.
[0041] In the training phase, the hybrid model is iteratively optimized using a large amount of historical energy consumption data, and the loss function can adopt probability distribution related indicators such as negative log likelihood or quantile loss, so that the model learns not only to output a single point prediction value, but also to output a complete probability distribution. After the model is trained, in the inference phase, the real-time collected and preprocessed operating parameters, energy consumption curves and environmental disturbance data are input into the model. The model first captures the time sequence rule of the data through the recursive structure, then highlights the key factors through the attention mechanism, and finally generates the energy consumption distribution prediction result of the future period in the output layer. The prediction result is given in the form of probability, for example, providing mean prediction, variance and energy consumption value distribution within a certain confidence interval, or directly outputting multiple quantile prediction values to describe the multiple scenarios that may occur in the future.
[0042] In order to realize the availability of the probability prediction result, a softmax layer or a parameterized output method based on Gaussian distribution and quantile regression can be introduced in the output stage, so that the model's prediction of future energy consumption is no longer limited to a single numerical value, but forms distribution information with uncertainty description.
[0043] Further, the machine learning model comprises a time sequence decomposition unit, a double-flow recursive unit, a mask attention unit, a constraint chimeric unit and a probability flow generation unit.
[0044] The time sequence decomposition unit is used to receive operating parameters, energy consumption curves and environmental disturbance data, align the received data by time stamp and perform multi-scale segmentation to obtain an initial interval feature sequence. The time sequence decomposition unit is realized by wavelet decomposition and sliding window method, so that energy consumption fluctuations and long-term trends at different time scales can be retained in the initial interval feature sequence.
[0045] The double-flow recursive unit is used to receive the initial interval feature sequence, generate steady-state hidden states and disturbance hidden states respectively, and obtain joint state sequences through affine coupling. The double-flow recursive unit captures the steady energy evolution law through a steady-state recursive channel, and captures the sudden disturbance response through another disturbance recursive channel. The two channels are combined into the joint state sequence through a nonlinear fusion layer at each time.
[0046] The mask attention unit is used to receive the joint state sequence and the initial interval feature sequence, and generate a context vector. The mask attention unit screens the attention weight by constructing a physically feasible mask, and screens the feature that does not meet the device rated power or safety boundary, so that only the time segment information that meets the physical constraints is retained after attention normalization, and the context vector is output.
[0047] The constraint embedding unit is configured to receive the joint state sequence and the context vector, combine power upper and lower limits, energy conservation constraints and climb rate constraints, generate conditional encoding, and implement the constraint embedding unit through a conditional vector construction and a nonlinear projection, so that the conditional encoding can simultaneously embed statistical prediction rules and physical constraint conditions, and ensure consistency of subsequent generated results.
[0048] The probability flow generation unit is configured to receive the conditional encoding, perform a layer-by-layer reversible transformation on a basic noise distribution and calculate a Jacobian determinant at each layer to obtain a probability prediction result of the energy consumption distribution, and implement the probability flow generation unit through a reversible probability flow network to provide quantile prediction, confidence interval prediction and probability density function estimation results at an output end, and the probability prediction result is used for subsequent energy consumption risk map construction and multi-level scheduling execution.
[0049] In the embodiment, the time series decomposition unit first receives operation parameters, energy consumption curves and environmental disturbance data, aligns all data according to time stamps, so that values from different sensing terminals and different data sources at the same time correspond to the same record line. After alignment, each continuous time series is divided by multiple scales: a shorter sliding window is used to capture rapid fluctuations, a medium-length window is used to depict daily periodicity, and a longer window is used to reflect slow changing trends. The step length of the sliding window is smaller than the window length, so that the adjacent windows partially overlap, so as not to excessively lose the information at the boundary. Wavelet decomposition splits the original sequence into a low-frequency part and a high-frequency part through a pair of analysis filters, and repeats the above splitting on the low-frequency part until the preset scale level is covered. When implemented, the sequence is sequentially passed through a high-pass and a low-pass filter to obtain a high-frequency system highlighting peaks and mutations and a low-frequency system representing slow trends; on each scale, the average value, the difference between the maximum value and the minimum value, the average change amount of adjacent samples and the duration exceeding the historical quantile level of the scale sequence in the window are calculated, and these amounts are spliced in time sequence to form an initial interval feature sequence. In order to facilitate the mixed use of different devices and different dimensions, each feature is subtracted by the average value of the device in a period of time, and then divided by the standard deviation of the same period of time to obtain a feature value with unified dimension and similar fluctuation amplitude, which is input into the subsequent module as an entry of the initial interval feature sequence.
[0050] The double-flow recurrent unit receives the initial interval feature sequence, and simultaneously maintains the steady-state hidden state and the disturbance hidden state for each time slice. The steady-state hidden state is used to accumulate the steady energy consumption evolution rule, and its update adopts a memory method with gating: first, the initial interval feature sequence of the current time slice is compressed into a candidate vector, then a reservation weight between zero and one is calculated to represent the proportion of "reserving history", and another update weight between zero and one is calculated to represent the proportion of "admitting new information", the steady-state hidden state at the previous moment is multiplied by the reservation weight, and the candidate vector is multiplied by the update weight, and then the new steady-state hidden state is obtained by adding the two. The disturbance hidden state is used to represent the response to the sudden disturbance, and its update process also adopts the same gating idea, but the generation of the candidate vector emphasizes more on the fields of high-frequency features, mutation amplitude and duration. The steady-state hidden state and the disturbance hidden state are coupled through an affine function to obtain a joint state sequence. Specifically, the disturbance hidden state is mapped into a scaling factor and a translation amount, the scaling factor is limited between a lower limit and an upper limit to ensure reversibility and stability, and then the scaling factor and the translation amount are used to stretch and translate the steady-state hidden state to generate the joint state sequence; at the same time, the joint state sequence and the disturbance hidden state are spliced as a complete time sequence representation for subsequent attention calculation.
[0051] The mask attention unit receives the joint state sequence and the initial interval feature sequence, and first constructs a vector representing "query", a vector representing "key" and a vector representing "value" for each time slice. The correlation between the query and the key is obtained by multiplying each dimension and then summing to obtain a similarity score, and then all the scores are translated and scaled to make them comparable. In order to ensure that the attention is only allocated within the physically feasible range, a physical feasibility mask is introduced: for any combination of time slices that will cause the power to exceed the rated power of the device, the current to exceed the maximum allowable current, the energy to exceed the upper limit of energy conservation within a given window, or the climbing rate to exceed the set limit, the attention score of the combination is directly set to zero. The remaining scores are normalized according to the sum of all unmasked scores, so that the sum of the remaining weights is one. The context vector is obtained by weighted averaging the "value" vector with the normalized weights; the vector is numerically more focused on those historical segments that are highly related to the current moment and do not violate the safety boundary of the device, so that statistical correlation and physical constraints are both taken into account in the attention result.
[0052] The constrained embedding unit receives the joint state sequence and the context vector, concatenates them into an intermediate representation after aligning them in time dimension, and introduces the power upper and lower bounds, the energy conservation constraint and the climb rate constraint. The power upper and lower bounds are embodied by normalizing the minimum and maximum power available for scheduling into a bound vector between zero and one according to device types; the energy conservation constraint is embodied by accumulating the energy of the candidate power trajectory in a given time window according to sampling time intervals, and encoding the normalized difference between the accumulated energy and the preset energy budget; the climb rate constraint is embodied by calculating the change rate of each segment by dividing the power difference of adjacent time slices by the time interval, and encoding the normalized difference between the change rate and the maximum allowed change rate. These constraint quantities and the intermediate representation are input into a nonlinear projector composed of several layers of feedforward transformation with bounded activation, which compresses the intermediate representation into a fixed-length conditional encoding vector. In order to avoid hard superposition of conflicting constraint information by conditional encoding, the nonlinear projector calculates a set of coordination weights between zero and one before output, which redistributes the components according to the importance of the constraints, so that the conditional encoding numerically takes into account both the statistical prediction law and the physical constraint condition.
[0053] The probability flow generator receives conditional codes, starting from a set of easily-sampled base noise vectors, and performs reversible transformations layer by layer to gradually deform the base noise into energy consumption samples that conform to the physically feasible region. Each layer adopts a coupled reversible structure: the vector is divided into two parts with fixed dimensions, the first part is used to calculate a per-dimension scaling factor and a per-dimension translation for the second part through several feed-forward operations with bounded activations, the scaling factor is limited between a non-zero lower bound and a finite upper bound to ensure reversibility, then the second part is stretched and translated per-dimension with the scaling factor and the translation. The next layer exchanges the roles of the two parts to ensure that all dimensions are fully transformed. To give the samples the correct density in a probabilistic sense, each layer records the per-dimension sum of the absolute values of the logarithm of the scaling factor, and the results of all layers are accumulated to obtain the total density correction; in this way, the density change when the base noise is mapped to the target distribution can be obtained by layer-by-layer accumulation of scaling information. To ensure that the generated energy consumption samples fall within the power upper and lower limits, after each layer transformation, it is immediately checked whether each dimension is out of bounds, if it is out of bounds, the scaling factor of that dimension is reduced towards the bound until the sample is back within the bound, while the corresponding boundary adjustment record is added to the density correction to keep the probability density consistent with the boundary processing. Finally, a batch of energy consumption samples is obtained by repeating sampling multiple times and through the same reversible transformation; these samples are arranged in ascending order of numerical value, and the position of the specified percentile is taken as the quantile prediction of that percentile; the upper and lower bounds of a large central region of the samples are taken as the confidence interval; the local density of the samples near a point is used to measure the estimated value of the probability density function, which can be obtained by setting a very small numerical range around the point, counting the number of samples falling within the range and dividing by the width of the range and the total number of samples. Combine these statistics with the density correction recorded during generation to form the probability prediction result of the energy consumption distribution.
[0054] The execution sequence of the whole process is output from the time decomposition unit to start the initial interval feature sequence, the double-flow recursive unit condenses the initial interval feature sequence into a joint state sequence, the mask attention unit calculates and outputs the context vector between the joint state sequence and the initial interval feature sequence, the constraint embedding unit combines the joint state sequence and the context vector to compress the power upper and lower limits, the energy conservation constraint and the climb rate constraint into conditional encoding, and the probability flow generation unit receives the conditional encoding and outputs the probability prediction result of the energy consumption distribution containing the quantile prediction, the confidence interval prediction and the probability density function estimation result. To ensure the reproducibility of the implementation, all gating weights and attention weights are obtained by linearly transforming the input values to a controllable range and passing through a monotonic bounded numerical compression function, so that the weights always fall between zero and one; all normalization steps are completed by the method of "subtracting the recent mean and dividing by the recent standard deviation"; all threshold judgments are based on the engineering parameters of the rated power of the device, the maximum allowed current, the energy budget and the maximum climb rate, and the shielding or adjustment is determined by comparing the ratio of the detected quantity to the reference quantity.
[0055] Step S103: Apply an intervention signal within the device safety boundary, generate device response characteristics according to the intervention difference, and combine with the probability prediction result to form an energy consumption risk map.
[0056] In step S103, the intervention signal needs to be applied to the device under the premise of ensuring the safety of the device operation, so as to observe the response characteristics of the device when it is subjected to slight external disturbance, and to obtain more rich dynamic behavior characteristics than simply relying on historical data. The so-called intervention signal usually refers to slight adjustment of the device operating parameters, and the amplitude of these adjustments must be strictly calculated and cannot exceed the safety boundary of the device. For example, for motor devices, a short-time pulse change within 1% to 5% of the rated voltage or current can be applied; for refrigeration units, a 0.5℃ adjustment can be applied to the control temperature set value; for lighting loads, a few seconds of duty cycle change within the brightness adjustment interval can be made. These signals must be reversible, short-time, and precisely injected through the control system to avoid long-term impact on the normal operation of the device.
[0057] After the intervention signal is applied, the changes in the device operating parameters, energy consumption curves, and related environmental disturbance data before and after the intervention need to be recorded in real time by the deployed distributed sensing terminals. To ensure the accuracy of the comparison, the triggering time of the intervention signal should be strictly aligned with the sensor sampling time, which can be achieved through the synchronization mechanism of the controller and the data acquisition system. By comparing the parameter differences before and after the intervention, the response vector of the device under the intervention can be obtained, such as the transient fluctuation amplitude of the current, the adjustment trend of the power factor, or the short-term offset of the energy consumption curve. After accumulating these response vectors through multiple interventions, a response feature set of the device under different intervention conditions can be formed, thereby characterizing the sensitivity, inertia, and recovery ability of the device.
[0058] The device response features are not used in isolation, but need to be fused with the probability prediction results obtained in step S102. Specifically, the device response features can be input as additional feature channels, cross-mapped with the probability prediction distribution, to correct or supplement the prediction results. For example, if the probability prediction result shows that there is a high possibility of energy consumption fluctuation in a certain period in the future, and the device response features indicate that the device has weak recovery ability to the disturbance under a specific intervention, the risk level of this period should be significantly improved. Conversely, if the device shows strong robustness in the intervention test, the corresponding risk level can be reduced accordingly.
[0059] On the basis of the above fusion, an energy consumption risk map is further constructed. The energy consumption risk map takes time and device as coordinate dimensions, superimposes and maps the probability prediction results and device response features, forming a risk matrix that changes over time. In the map, the color or value depth can identify different degrees of energy consumption abnormal risk, and the high-risk area corresponds to the combination of the period and the device with high energy consumption overrun or fluctuation, and the low-risk area corresponds to the combination of the period and the device with stable operation. The energy consumption risk map can be displayed in the form of a two-dimensional heat map, or stored in the database in the form of a matrix data structure for subsequent scheduling and decision calling.
[0060] Further, the intervention signal is applied within the device safety boundary, the device response features are generated according to the intervention difference, and the energy consumption risk map is formed in combination with the probability prediction results, comprising:
[0061] Based on the device rated power, maximum allowable current, temperature rise threshold, and climb rate constraint, the device safety boundary is calculated, and the amplitude upper limit, duration, rising edge, and spectrum limit of the intervention signal are determined accordingly, and an intervention signal configuration table is output;
[0062] According to the intervention signal configuration table, current operating parameters, energy consumption curves, and environmental disturbance data, and a time synchronization reference, an unrelated intervention plan covering different time slices and different devices is generated, the unrelated intervention plan uses mutually orthogonal pseudo-random binary sequences and sweep signals to avoid mutual crosstalk, and an intervention plan and a trigger timestamp set are obtained;
[0063] The intervention signal is injected into the device control interface according to the trigger timestamp set, and operating parameters, energy consumption curves, and environmental disturbance data are synchronously collected before and after the intervention within a fixed observation window, time alignment, detrending, and band-pass filtering are performed, and an intervention window data set is obtained;
[0064] Response estimation is performed on the intervention window data set, a subspace identification and deconvolution joint method is used to calculate impulse response, gain, time delay, time constant, recovery time, and steady-state offset, and tool variable regression is used to eliminate the confounding effect of environmental disturbance data on response estimation, and device response characteristics are obtained;
[0065] The device response characteristics and the probability prediction results are fused, the distribution parameters of the probability prediction results are corrected based on likelihood weighting and Bayesian updating, and corrected probability prediction results are obtained;
[0066] The over-limit probability, variance, and tail thickness of the corrected probability prediction results are compared with the device safety boundary with device and time slice as indexes, a graph entry containing risk intensity, source label, and time positioning is generated, and the energy consumption risk graph is aggregated according to the index.
[0067] In this embodiment, first, according to the equipment rated power, the maximum allowable current, the temperature rise threshold and the climb rate constraint, it is converted into the same dimension system of "power offset-duration-variation slope" one by one, so as to compare and take the most stringent boundary in the same table. The rated power and the maximum allowable current jointly limit the upper limit of the allowable power offset: taking the current operating point as the benchmark, the power increased upward should not make the instantaneous power exceed the rated power, and the converted current should not exceed the maximum allowable current; in order to avoid crossing the limit, the smaller margin given by the two is taken as the upper limit of the amplitude. The temperature rise threshold limits the allowable energy injection: first, the temperature rise caused by unit energy is obtained by using the temperature rise-energy correspondence in the historical operation, and then the temperature rise threshold is converted into the energy budget that can be injected, and it is required that "power offset multiplied by intervention duration" does not exceed the budget, and the upper limit of the duration is obtained accordingly. The climb rate constraint limits the minimum time of the rising edge: compare the allowable power change per unit time with the target amplitude, and obtain the shortest time required to smoothly increase the power from the current value to the amplitude upper limit as the lower limit of the rising edge. In order to avoid exciting the inherent resonance of the device or the sensitive frequency band of the power grid, combined with the past frequency response test records, the frequency intervals that are prohibited to appear are listed, and it is specified that the frequency spectrum of the intervention signal should not contain these intervals. The amplitude upper limit, the duration upper limit, the rising edge lower limit and the spectrum limit are recorded together with the device identification, the cooling interval and the maximum number of interventions per day to form an "intervention signal configuration table".
[0068] After obtaining the "intervention signal configuration table", "irrelevant intervention plan" is generated for multiple devices and multiple time slices. In order to avoid mutual interference between devices and interference between adjacent interventions of the same device, a pseudo-random binary sequence approximately orthogonal to other devices in the observation window is allocated to each device. The meaning of orthogonality is that the product of the same position of any two sequences is close to zero after accumulation, so that the mutual influence can be statistically offset. For devices that need frequency domain identification, sweep signals are added, but different devices are allocated non-overlapping sweep coverage, and the start and end frequencies of the sweep are avoided in the prohibited frequency band listed in the "intervention signal configuration table". Using a unified time synchronization reference, the exact start time and end time of each sequence and each sweep are specified, and it is ensured that the adjacent interventions are kept for not less than the cooling interval, so as to obtain "intervention plan and trigger timestamp set".
[0069] According to the "intervention plan and trigger timestamp set", inject the intervention signal at the specified trigger time through the device control interface. To ensure the comparability of subsequent comparative analysis, for each intervention, set a fixed observation window around the trigger time, which contains the baseline interval before intervention and the response interval after intervention. The length of the baseline interval is taken as several times of the known dominant time constant, so as to stably estimate the baseline mean and slow drift; the length of the response interval is taken to the upper limit of the time required for the output to recover to the small range fluctuation around the baseline. Record the running parameters, energy consumption curves and environmental disturbance data in the window. All data are first aligned with the trigger time, and if there is a sampling phase difference, the data of different sampling phases are aligned to the same time scale by interpolation; then the detrending is performed on each channel, and the slow slope in the baseline interval is estimated by local linear fitting and subtracted from the whole window, so as to remove the slow drift; then band-pass filtering is applied to retain the components in the frequency band allowed by the "intervention signal configuration table" and suppress low-frequency slow changes and high-frequency noise, to obtain the "intervention window data set".
[0070] The "intervention window data set" is used for response estimation. To extract the dynamic characteristics of the system, the intervention input and the corresponding output are first organized in time as overlapping blocks, the blocks are adjacent to each other, and the original order of the input and output is retained within the block, thereby forming stacked data that can depict the evolution of the system state. By orthogonal decomposition of the predictable and unpredictable parts between these overlapping blocks, the low-dimensional state trajectory that best explains the output change is separated, and the main dynamics of the system under disturbance and non-disturbance conditions are obtained. Since the intervention input is known, in the frequency domain, use the frequency spectrum of the input as a "template", divide the component of the output at the same frequency point by the amplitude of the template and correct the phase, to get the output change under unit input, after summarizing along the frequency axis and restoring to the time axis, the "impulse response" is obtained. In the time domain, in order to reduce the confusion caused by environmental disturbances, the environmental disturbance data is used as a instrumental variable for regression: select disturbance channels that have little correlation with intervention input but have an impact on output as instrumental variables, first predict the output using these instrumental variables, and then regress the prediction residual with the intervention input, so that the coefficients obtained by regression only reflect the direct effect of the intervention input on the output. The "gain" is read from the "impulse response", and its calculation method is to find the average change of the output in the response interval after stabilization, and express it as the ratio of this value to the amplitude of the intervention input; the "time delay" is the time from the trigger time to the first significant deviation of the output from the baseline, and the deviation threshold can be taken as a small part of the stable change; the "time constant" is the time required for the output to reach about two-thirds of the stable change in the rising process; the "recovery time" is the time required for the output to return to a small range around the stable change after the intervention ends; the "steady-state offset" is the residual difference of the output relative to the baseline after a long time after the intervention ends. The above numerical values and their uncertainties together constitute the "device response characteristics".
[0071] When the "device response characteristics" are fused with the "probability prediction result", the "probability prediction result" is regarded as a priori description of future energy consumption, generally including information for representing the center position and dispersion degree, and information related to the high energy consumption tail. The credibility of the priori is evaluated according to the "device response characteristics": if the average change predicted by the priori is consistent with the "gain" and "steady-state offset", and the uncertainty of the priori covers the typical range of the "time constant" and "time delay", it is considered that the priori scenario is more credible, and a higher weight is given; if the priori and the observed characteristics deviate greatly, a lower weight is given. The calculation method of the weight is to normalize each deviation by its allowed range, then take the weighted average of each normalized deviation and inversely map it to a score of zero to one, the smaller the deviation, the higher the score, and the score is used as the weight of the scenario. The parameters of all scenarios are weighted and summarized to obtain the center position of the "corrected probability prediction result"; the dispersion of each scenario from the center is also summarized by weight to obtain the dispersion of the "corrected probability prediction result"; for the tail-related indicators, the high tail quality of the scenario with a larger weight and consistent with the "gain" and "steady-state offset" is retained, and the contribution of the scenario with a smaller weight to the tail is compressed, thus completing the correction based on the ideas of likelihood weighting and Bayesian update.
[0072] Based on the "corrected probability prediction result" and the "device safety boundary", the entries for drawing the map are obtained by comparing each piece of data indexed by the device and the time slice. The calculation method of the over-limit probability is: in the distribution described by the "corrected probability prediction result", count the proportion of the probability mass above the "device safety boundary"; the variance is obtained by averaging the deviation of each possible value in the distribution from the center position according to its probability size; the tail thickness is described by comparing the proportion of the probability mass at the high quantile end to the probability mass in the middle region, the larger the proportion, the thicker the tail. After normalizing the over-limit probability, the variance and the tail thickness to a unified zero to one scale, they are combined into the "risk intensity", and the over-limit probability can be given a higher weight during the combination to reflect the priority of the risk of crossing the line; the "source label" is used to identify the main source of the risk, which is caused by intervention response sensitivity, caused by prediction uncertainty, or caused by environmental disturbance dominance, the determination method is to compare the contribution of the three factors to the change of the "corrected probability prediction result", and the largest contributor is the label; the "time positioning" is the specific time slice corresponding to the entry. The map entries of the same device in adjacent time slices are continuously spliced, and the entries of different devices in the same time slice are juxtaposed and aggregated to form an "energy consumption risk map" that can be indexed, searched and visualized, and is stored with the same time reference as the "intervention signal configuration table" and the "intervention plan and trigger timestamp set", ensuring that the subsequent digital twin simulation and multi-level scheduling can be seamlessly called.
[0073] Step S104: Based on the energy consumption risk map, use digital twin to generate extreme disturbance scenarios, and verify the consistency of probability prediction results and scheduling scheme in data domain and physical domain. According to the verified energy consumption risk map and task delay, perform multi-level scheduling to form the scheduling result.
[0074] In step S104, the energy consumption risk map generated in the previous step is first needed as input. Based on the high-risk areas and potential abnormal areas identified in the map, a digital twin model is driven to construct a virtual operating environment. The digital twin model should be a high-fidelity simulation of the actual device and system operation, with parameters including electrical characteristics, device performance curves, environmental disturbance models, and operating constraints. This model is initialized by aligning with the actual collected data, so that it can truly reflect the current system operating state. During simulation, extreme disturbance scenarios need to be artificially injected, such as simulating sudden load increase, drastic environmental temperature change, power supply voltage fluctuation, or multiple devices starting and stopping simultaneously, to test the system's energy consumption performance and stability under the most adverse conditions. The generation of these disturbance scenarios should be based on the risk level distribution in the risk map to ensure that the simulation can cover the extreme cases that may occur in actual operation.
[0075] After the digital twin generates extreme disturbance scenarios, the energy consumption response results output by the model need to be compared one by one with the probability prediction results in step S102. In the data domain verification process, the focus is on checking whether the distribution of the probability prediction results is consistent with the simulation results in statistical characteristics, including whether the mean, variance, and distribution interval are within a reasonable error range. If there is a significant deviation, for example, the prediction result is too optimistic and does not cover the extreme energy consumption value in the simulation, then the prediction result should be deemed as unreliable. In the physical domain verification process, it is necessary to verify whether the scheduling scheme meets the physical constraints of the device and system, such as the rated power of the device, the maximum allowed current, the temperature rise limit, and the power supply network capacity. If the scheduling scheme leads to an operating result that exceeds the physical boundary conditions in the simulation scenario, then the scheduling scheme should be deemed as unfeasible.
[0076] By completing the above double verification, the prediction results and scheduling schemes that meet both statistical distribution rationality and physical constraint conditions can be screened out. On this basis, further combined with task delay information, different tasks are classified according to their urgency and time flexibility. For tasks that can be delayed, they can be appropriately delayed during high-risk periods; for tasks that must be executed immediately, redundant resources need to be reserved in scheduling. The final multi-level scheduling process is based on the verified energy consumption risk map and task classification results to optimize the scheduling result that can meet the safe operation of the device and improve the overall energy efficiency.
[0077] This process ensures that the scheduling scheme does not rely solely on model predictions, but is verified through extreme simulations using digital twins and dual checks in the data and physical domains, making the final scheduling results more reliable and feasible.
[0078] Furthermore, the process of generating extreme disturbance scenarios using digital twins based on energy consumption risk maps, and verifying the consistency between probability prediction results and scheduling schemes in the data and physical domains, and performing multi-level scheduling based on the verified energy consumption risk maps and task delayability to form scheduling results, includes:
[0079] Based on the energy consumption risk map, high-risk areas and potential abnormal areas are extracted and marked. A risk triggering condition set is generated by combining operating parameters, energy consumption curves and environmental disturbance data.
[0080] A digital twin simulation environment is constructed based on the risk triggering condition set. The physical characteristics of the equipment, energy consumption curves and environmental disturbance models are loaded into the simulation environment, and the marked areas are initialized to obtain the initial state of the simulation.
[0081] Extreme disturbance trajectories are injected into the initial state of the simulation. These extreme disturbance trajectories include scenarios such as power surge, temperature change, voltage fluctuation, and concurrent switching of multiple devices, generating a corresponding simulation response dataset.
[0082] The simulation response dataset and the probability prediction result are compared in the data domain, the mean, variance and quantile deviation are calculated, and the probability prediction result is corrected when the deviation exceeds a set threshold to obtain the probability prediction result corrected by the data domain.
[0083] The probability prediction results corrected by the data domain are verified against the scheduling scheme in the physical domain to check whether the scheduling scheme meets the constraints of equipment rated power, maximum allowable current, energy conservation and ramp rate, and to obtain the scheduling scheme verified by the physical domain.
[0084] By combining the probability prediction results corrected by the data domain with the scheduling scheme verified by the physical domain, the energy consumption risk map is updated and the task delayability is marked. Multi-level scheduling is then performed according to the task delayability to obtain the confirmed scheduling results.
[0085] In the embodiment, first, the target area needing to enter the simulation is extracted relying on the energy consumption risk map. The risk intensity of all time slices and device combinations in an observation period in the energy consumption risk map is taken out, arranged from small to large, and the dividing value that makes 80% of the samples not higher than and 20% of the samples higher than is found. The bar goal higher than the dividing value is marked as a high-risk area; the bar goal in the range of one-tenth above and below the dividing value and still not significantly falling in risk intensity after the last intervention is marked as a potential abnormal area. For each marked bar goal, the running parameters, energy consumption curve, and environmental disturbance data of the same time slice are further read, and the center position, dispersion, and several high-order quantile values of the corresponding time slice in the "probability prediction result" are recorded. These information is combined into a risk trigger condition set, and one record in the condition set is composed of device identification, time slice identification, risk intensity, corresponding running parameters, current values and variation amplitudes of energy consumption curve and environmental disturbance data in the last period of time, and center position and key quantile values of probability prediction result.
[0086] When constructing the digital twin simulation environment according to the risk trigger condition set, the physical characteristics, energy consumption curve, and environmental disturbance model of the device need to be loaded respectively, and the state corresponding to the marked area is initialized. The physical characteristics of the device come from the device nameplate and acceptance archives, including rated power, maximum allowed current, heat capacity parameter, heat exchange capacity, allowed climbing rate, and efficiency curve; if there is a missing parameter, the data of the historical steady-state running section is used for calibration: in the time period without intervention, the power and temperature rise in the equal-length window are taken, the temperature rise caused by unit energy is calculated, that is, the energy is obtained by adding the power along time in the window, and then the energy is divided by the temperature rise to obtain the conversion coefficient; the heat capacity or heat exchange parameter is backfilled with the coefficient. The environmental disturbance model is constructed according to the environmental disturbance data recorded in the risk trigger condition set: the background trajectory is extrapolated according to the variation trend of temperature, humidity, and air flow in the last period of time, and occasional events such as access opening, material loading, etc. are implanted according to the trigger time. The energy consumption curve is initialized with the latest available baseline section, and the starting value of the baseline is corrected with the current running parameters at the initial moment of simulation, so that the digital twin model is aligned with the field state. After alignment, the above parameters and states are taken as the initial state of simulation.
[0087] When injecting extreme disturbance trajectories in the initial state of simulation, power ramp, temperature jump, voltage fluctuation and multi-device concurrent switching need to be converted into executable time series. The amplitude of power ramp does not exceed the upper limit of the amplitude in the safety boundary of the device, the duration does not exceed the upper limit of the duration, and the rising edge time is not less than the upper limit of the rising edge. First, the current power is taken as the starting point, then a linear rising segment is used to lift the power to the target amplitude, then the power is kept at this level until the end of the duration, and finally a linear falling segment is used to reduce the power to the baseline. Temperature jump is achieved by lifting or lowering the ambient temperature trajectory within a short time by a definite amplitude, the amplitude is taken from the historical extreme value or the upper limit of the external temperature jump given by safety evaluation, and the rising or falling time is not less than the time constant corresponding to the thermal inertia of the device, so as to avoid unrealistic instantaneous jump. Voltage fluctuation is achieved by setting symmetric offset above and below the rated voltage and applying in a short period of time in a sinusoidal or step manner, and the maximum offset does not exceed the upper limit of the voltage deviation allowed by the power supply. Multi-device concurrent switching is achieved by simultaneously executing start-stop or gear shifting for multiple devices in the same time slice, but to avoid power grid impact, millisecond to second level small staggered peaks are set according to the power from large to small, so that the total combined ramp rate does not exceed the upper limit allowed by the station. For each extreme disturbance trajectory, the power, temperature rise and key operating parameters of the affected devices are recorded in the simulation as a function of time, and the outputs under each trajectory are spliced to form a simulation response data set. In order to facilitate subsequent statistics, the simulation response data set saves the collection of multiple trajectories for each time slice, which is used to approximate the multiple extreme situations that may occur in the field.
[0088] When comparing the simulation response dataset with the probabilistic prediction result in the data domain, the calculation method of the mean, variance and quantile deviation needs to be given. The mean is obtained by adding all the simulation values of the same time slice and the same index (such as power) and then dividing by the number of simulation trajectories; the variance is obtained by first calculating the mean of the time slice, then calculating the difference between each simulation value and the mean, then accumulating the square of the difference and dividing by the number of trajectories; the quantile is obtained by sorting all simulation values of the same time slice from small to large, and taking the value at the position falling in the target percentage as the quantile, for example, to take the ninety-fifth percentile, locate the position near the top and read the value. When comparing, the mean deviation is obtained by subtracting the center position of the probabilistic prediction result from the simulation mean; the variance deviation is obtained by subtracting the dispersion of the probabilistic prediction result from the simulation variance; the quantile deviation is obtained by subtracting the quantile value corresponding to the probabilistic prediction result from the simulation quantile. The threshold setting adopts the quantile upper bound method of historical comparison: in the period when no abnormality has occurred in the past, repeat the above comparison process to obtain a set of historical deviation values, sort the historical deviation values from small to large, take the value near the top after sorting as the upper limit of the allowed bandwidth, and specifically take the value that only a small part of the historical deviation exceeds. If any of the current deviations exceeds the upper limit of the allowed bandwidth, it is determined that the probabilistic prediction result needs to be corrected. When correcting, first shift the center position of the probabilistic prediction result as a whole to the direction of the simulation mean, and the shift amount is equal to the mean deviation; then enlarge or reduce the dispersion of the probabilistic prediction result according to the ratio of the simulation variance to the original dispersion, that is, when the simulation variance is larger, it is enlarged, and when the simulation variance is smaller, it is contracted; for the quantile, the high quantile and the low quantile are respectively extrapolated or contracted in the same direction and at the same ratio, and the asymmetric feature consistent with the direction of the device response is preserved. After this shift and stretch, the probabilistic prediction result corrected in the data domain is obtained.
[0089] The data domain corrected probability prediction result and the scheduling scheme are verified in the physical domain, and it is necessary to check the power setting of each device and the current derived therefrom in each time slice whether it is within the safety boundary of the device. The calculation of the current is converted according to the relationship between the voltage and the power: under the premise of known voltage level and power factor, the estimated value of the current is obtained by dividing the power by the product of the voltage and the power factor, and then compared with the maximum allowed current; if the voltage fluctuates in the time slice, the same conversion is performed with the voltage value of the time slice. The verification method of energy conservation is to multiply the power of each time slice by the time length of the time slice to obtain the corresponding energy in a predetermined time window, and then add the energy of all time slices in the window as the total energy, and compare the total energy with the energy budget allowed in the window. If it exceeds, the scheduling scheme is unqualified. The verification method of the climbing rate is to subtract the power settings of two adjacent time slices, and then divide the time interval between the two time slices to obtain the change rate, and compare the rate with the maximum allowed climbing rate; the same method is used for station level constraints, but the sum of the device power is used as the check object. All items that do not meet the requirements will be marked and returned to the scheduler, and the scheduler must make the minimum adjustment to the marked items without changing the passed part of the check, and preferentially reduce the settings that exceed the constraints or move the tasks that exceed the limit to adjacent low-risk time slices until all constraints are met or it is determined that the task cannot be completed in the current window. After the above process is completed, the scheduling scheme verified in the physical domain is obtained.
[0090] When the data domain corrected probability prediction result and the physical domain checked scheduling scheme are used to update the energy consumption risk atlas and label the task delay, the original distribution parameters and risk intensity at the same index of the risk atlas are replaced first. The recalculation method of the risk intensity is to synthesize the normalized values of the three items of the overrun probability, the variance and the tail thickness with weights, wherein the highest weight is given to the overrun probability related to the overrun, the second is the dispersion, and the third is the tail thickness; the sum of the weights is one, and the synthesized value is the new risk intensity. The labeling of the task delay depends on the earliest start time, the latest completion time, the duration and the power demand of the task. First, all the time slices that can be covered by the task in the available window are listed, and the time slices whose risk intensity exceeds a certain upper limit and have no feasible checking through scheme are removed. Then, the longest continuous interval length that can be arranged continuously in the remaining time slices is calculated. If the length is not less than the task duration, the task is labeled as delayable, and the interval set where the task can be placed is labeled; if not, the task is labeled as non-delayable or needs to be split and executed. The multi-level scheduling is promoted by levels: the first layer moves the delayable tasks from the time slices with high risk intensity to the time slices with low risk intensity as much as possible in the device layer; the second layer redistributes the tasks among the same type of devices to flatten the peak power in the device group layer, while not destroying the low risk arrangement formed in the first layer; the third layer checks the power of all devices at the station level. If there are still situations that exceed the station level climbing rate or energy budget, the marginal time slices are fine-tuned according to the principle of minimizing the impact on operation, and the order of fine-tuning is to give priority to the time slices with the lowest risk intensity to ensure that the tasks are not pushed back to the high-risk period. After each adjustment, the data domain corrected probability prediction result is immediately called to quickly estimate the change of the overrun probability, and the corresponding entries of the risk atlas are updated synchronously until all constraints are met and no adjustment can continue to reduce the risk intensity or the station level overrun, i.e. the confirmed scheduling result is obtained.
[0091] Through the above process, starting from the energy consumption risk atlas, the risk trigger condition set can be objectively and repeatedly constructed, the simulation initial state consistent with the field can be established, the extreme disturbance trajectory covering the key adverse situation can be generated, the distribution comparison and correction based on mean, variance and quantile can be completed, the physical constraint verification at time slice, device and station level can be performed, and the data domain corrected probability prediction result and the physical domain checked scheduling scheme are written back to the risk atlas. Under the clear labeling of task delay, multi-level scheduling is completed, and finally the confirmed scheduling result directly issued is formed.
[0092] Step S105: issuing the scheduling result to the device and returning feedback data, and updating the machine learning model according to the feedback data.
[0093] In step S105, the scheduling result generated by consistency checking and multi-level scheduling in the previous step needs to be issued to each target device in the form of explicit control instructions. In order to ensure that the instructions can be accurately identified and executed by the device, the scheduling result should be converted into an instruction set that conforms to the device communication protocol, such as Modbus, BACnet, MQTT or a custom industrial control message format. These instructions not only contain the switch control information of the device, but also include power setting values, running time periods, load distribution ratios and necessary timestamp information, so that the device can run according to the scheduling requirements within the specified time window. During the issuance process, the instructions can be broadcasted uniformly by the centralized control server, or a distributed control strategy can be used, in which the edge node sends instructions to the devices under its jurisdiction one by one according to the scheduling result. In order to prevent the instructions from being tampered with or lost during transmission, the communication link needs to be superimposed with encryption and verification mechanisms, such as checksum, digital signature or two-way handshake confirmation mechanism, so as to ensure the integrity and reliability of the scheduling instructions.
[0094] When the device receives the scheduling instructions and executes them, real-time feedback data needs to be returned to confirm the execution. The feedback data includes the actual running parameters of the device, the execution result status, the energy consumption curve change and any abnormal information. For example, when the scheduling instruction issued requires a certain cooling unit to reduce the running power by 10%, the feedback data should reflect whether the actual output power of the unit has decreased as required, and at the same time record the change trend of energy consumption. If the device fails to execute the instructions due to physical limitations or sudden failures, an error code or abnormal state identifier should be attached in the feedback. The collection frequency of feedback data needs to match the time accuracy of scheduling, which can be set to seconds or minutes level sampling, and returned to the central control system through the same transmission link. All feedback data should be stored in a time series database and timestamped with the issued scheduling instructions to ensure that a one-to-one correspondence relationship between execution and feedback can be formed.
[0095] After collecting the feedback data, these data need to be used as new input to update the machine learning model. The update method can use online learning or incremental training, that is, without discarding the original training parameters, the feedback data is continuously added as new samples to correct the parameter weights of the model. In order to avoid overfitting of the model on short-term fluctuation data, the feedback data can be smoothed or a sliding time window is used to combine the latest data with historical data. During the update process, the loss function can be calculated again, the difference between the model prediction result and the feedback data is compared, and the parameters are corrected through the back propagation algorithm. In this way, the model can continuously absorb new data during operation, adapt to changes in device state and environmental conditions, and thus maintain the accuracy of prediction and scheduling.
[0096] Through the closed-loop process of issuing scheduling results, collecting feedback data, and updating the model, a continuous self-adaptive optimization mechanism can be formed. The issuance of scheduling instructions ensures that predictions and decisions can be truly implemented at the device level, the return of feedback data ensures that the execution is monitored and recorded in real time, and the updating of the model ensures that future predictions can be more in line with the actual operating state.
[0097] Further, the issuing of the scheduling results to the device and the returning of the feedback data, updating the machine learning model according to the feedback data, comprises:
[0098] Converting the confirmed scheduling results into an energy consumption hosting instruction set recognizable by the device, the energy consumption hosting instruction set containing power setting values, task execution time windows, load distribution ratios, and safety redundancy parameters, and issuing the energy consumption hosting instruction set to the target device through an encrypted communication protocol with digital signatures and time stamps to obtain an issued instruction record with a unique identifier;
[0099] At the device end, performing energy consumption regulation and control operations according to the issued instruction record, and in the execution process, collecting running parameters, energy consumption curves, and environmental disturbance data in real time to generate an execution feedback stream with instruction identifier, the execution feedback stream being returned to the data aggregation node through the same encrypted communication protocol to obtain a feedback data set bound with the identifier;
[0100] At the data aggregation node, performing time stamp alignment and integrity checking on the feedback data set and the issued instruction record, if the checking result shows that the feedback data set is consistent with the issued instruction record, storing the feedback data set as a trusted execution sample;
[0101] In the model updating phase, fusing the trusted execution sample library with the historical training set of the machine learning model, and selecting the execution data of the recent period using a sliding window method to construct a dynamic training subset;
[0102] In the machine learning model, performing incremental training based on the dynamic training subset, using probability distribution difference minimization and Bayesian regularization methods to correct model parameters, generating an online updated machine learning model, and using the online updated machine learning model for subsequent probability prediction of energy consumption distribution to obtain a closed-loop adaptive prediction model.
[0103] In the embodiment, the confirmed scheduling result needs to be converted into an energy consumption hosting instruction set that can be executed by the device without ambiguity, and it is ensured that the instructions and feedback can be reliably associated and verified in the whole process of network transmission and device landing execution. The specific method is to disassemble each plan in the scheduling result into explicit fields, including device identification, power setting value, task execution time window, load allocation ratio and safety redundancy parameter, and unify the dimension and value range. The device identification uses a string corresponding one-to-one with the device factory number, the power setting value uses the percentage of the rated power, the task execution time window uses the start time and end time of coordinated universal time, the load allocation ratio uses a decimal between zero and one, and the sum of the ratios of each parallel task does not exceed one, and the safety redundancy parameter uses the percentage of the power setting value downward offset, which is used to automatically downshift in abnormality. These fields are written into the payload area of the binary frame in a fixed order, the frame header contains the protocol version and device identification, and the frame tail reserves the signature area. In order to give "the issued instruction record with unique identification", an irreversible digest calculation is performed on the frame header and payload area to obtain a fixed-length digest value, and then the digest, millisecond-level timestamp, scheduling batch number and sequence number are connected together, and a digital signature is generated through the same private key signature, and the timestamp and digital signature are written into the frame tail; At the same time, the literal representation of the digest value and the timestamp are spliced into an instruction number that will not be repeated, and the instruction number, device identification and original field content are registered in the control end database to form the issued instruction record. The encryption communication protocol adopts an implementation with bidirectional authentication and transmission encryption capability, and the device and the control end verify each other's certificates when establishing a connection, and all byte streams are encrypted and integrity protected at the link layer during transmission, and any tampering in the middle will be rejected at the receiving end.
[0104] After receiving the energy consumption hosting instruction set, the device first verifies whether the signature is issued by the trusted control terminal with the built-in public key, and checks whether the difference between the timestamp and the local clock is within the allowed time difference range. If it exceeds the range, it is rejected and an error state is returned. After verification, the device writes the instruction number and field content to the execution queue, inserts or covers the local scheduler's timing table according to the task execution time window, and performs boundary check on the power setting value and load distribution ratio to confirm that it does not exceed the device safety boundary and conflicts with the current running mode. During execution, the device collects running parameters, energy consumption curves and environmental disturbance data in real time at a fixed sampling period; each batch of sampling points is bound to the instruction number and the current sub-period identifier to ensure one-to-one correspondence with the instruction. To avoid packet loss caused by network fluctuations, the device caches the sampling points in a ring buffer in chronological order, and sets a minimum batch threshold or a maximum waiting time. If one of them is met, it is packaged as an execution feedback stream and reported upwards. The data block of the execution feedback stream uses the same encryption communication protocol as the downlink to return, and the data block header carries the device identifier and the instruction number. The payload area includes the sampling timestamp, real-time power, real-time voltage and current, real-time energy consumption cumulative amount, environmental temperature and humidity, and execution status code (such as normal, downshift, rejection), and the tail part is attached with the device side signature and verification field. After receiving the execution feedback stream, the data aggregation node of the control terminal first verifies the device signature and link integrity, and then aligns the feedback data and the downlink instruction record timestamp with a unified time reference in milliseconds. The alignment method is to calculate the clock deviation of both ends and use the deviation to shift the entire feedback timestamp, so that the trigger time coincides with the planned start time; if there are a small number of repeated timestamps, the last one is used; if there is a short missing, the values of the two adjacent sampling points before and after are linearly interpolated to fill in. Then check the integrity of each data block, check whether the instruction number, device identifier and downlink instruction record are consistent, check whether the sub-period is completely within the task execution time window, and check whether the sampling sequence is continuous without breakpoints. If all of the above are passed, the data block is marked as trusted and written into the timing storage bound to the instruction number. When all execution periods corresponding to an instruction number are covered by trusted data, the feedback of this instruction is merged into a trusted execution sample. All trusted execution samples are archived in chronological order and device dimension, and a trusted execution sample library is accumulated.
[0105] To ensure that the samples for model updating represent the latest working conditions and do not rely too much on short-term accidents, a dynamic training subset is constructed by fusing the trusted execution sample library and the historical training set. First, a sliding window length and a sliding step are determined. The window length can be set according to the speed of working condition change of the target scene, for example, one to two weeks for a data center, and several days for heavy industry production. All trusted execution samples covered by the last complete window on the time axis are selected into the candidate set. To avoid the influence of poor quality data on the model, the quality of each sample is scored in two parts: one part reflects the integrity of the data, and the score is calculated according to the proportion of valid sampling points in the planned sampling points of the sample. The higher the proportion, the higher the score. The other part reflects the execution fit degree, and the score is calculated according to the proportion of the time when the deviation between the actual power and the power set value in the sampling segment falls within the allowable band. The higher the proportion, the higher the score. Add the two parts of the score according to the same weight to get the quality score, and then remove the samples with a quality score lower than the threshold from the candidate set. Assign time decay weights to the remaining samples, with the weight getting larger as the sample is closer to the current time and getting smaller as the sample is farther from the current time. The specific calculation of the weight is to queue the samples in the window according to time, set the weight of the sample closest to the current time as the reference one, then multiply the weight by a decay coefficient less than one for every interval forward, until the beginning of the window. Multiply the quality score of the sample by the time weight to get the final sample weight, and then extract several batches of small data of appropriate size from the candidate set according to the sample weight to form the dynamic training subset; maintain the time sequence and diversity of device distribution within each small batch of data to improve the stability of the update.
[0106] When performing incremental training in a machine learning model, it is necessary to combine probability distribution difference minimization and Bayesian regularization to jointly correct the model parameters. The goal of probability distribution difference minimization is to make the energy consumption distribution output by the model closer to the empirical distribution embodied by the credible execution samples. The specific approach is to collect the actual power samples of each time slice and device in the dynamic training subset, arrange these samples from small to large, and read the values at several fixed percentile positions as empirical quantile points; at the same time, the current model outputs the corresponding predicted quantile points for the same time slice. Calculate the difference between each pair of empirical quantile points and predicted quantile points. A positive difference indicates that the model underestimates, and a negative difference indicates that the model overestimates. When updating the parameters, adjust the model weights in the direction that can reduce these differences: if the model underestimates, increase the output related to the time slice, and if it overestimates, decrease it; the magnitude is proportional to the absolute size of the difference, and is multiplied by the final sample weight of the sample, so that high-quality, near-time samples have a greater impact on updates. To avoid instability caused by excessive updates, Bayesian regularization is added as a constraint, taking the parameters of the "machine learning model updated last time" as the reference center, and parameters that deviate too much will be pulled back. The specific method is to calculate the change amplitude of each parameter relative to the reference center after each round of parameter adjustment, and then compare the change amplitude with the stability of the parameter in historical training: parameters that are more stable in history allow smaller change amplitudes, and if the actual change exceeds the allowed amplitude, the adjustment amount of the parameter in this round will be reduced by the proportion of the excess; parameters that have historically fluctuated more are given a slightly higher allowed amplitude, allowing them to better adapt to new working conditions. Each round of update is quickly tested on a validation slice composed of near-time samples, and the test criteria include whether the average difference between empirical quantile points and predicted quantile points decreases, whether the out-of-limit probability approaches the actual occurrence proportion of credible execution samples, and whether the physical consistency after the injection of limiting conditions is still satisfied; if any of these changes, immediately roll back to the previous round of parameters and reduce the adjustment step size and try again.
[0107] To ensure the safety and traceability of online deployment, all incremental training processes are managed by versioning, generating a version number for each parameter update, which is composed of date and time, data window start and end, and dynamic training subset summary, and is written into the model registration table together with the configuration, indicators and verification results used during training. When the online updated machine learning model meets the preset threshold on each indicator of the validation slice, it replaces the model used online; the old version is kept as a backup in case of abnormality in the new version. After deployment, an output calibration is performed using a two-step method of temperature scaling and quantile alignment: temperature scaling globally stretches or compresses the dispersion of model output to make the coverage rate on the near-time validation slice consistent with the target confidence; quantile alignment reduces the difference between predicted and validation quantile points within a set tolerance band at multiple fixed percentiles by adjusting the output of nearby data in a small range to make the prediction fit the empirical data at these key points while maintaining the overall order.
[0108] After the above steps are completed, the online updated machine learning model is reconnected to the prediction-scheduling link and marked as a closed-loop adaptive prediction model. Closed-loop maintenance relies on two types of continuous monitoring: one is data drift and execution quality monitoring, which summarizes the difference between empirical and predicted quantile points by hour, calculates the difference between actual and predicted proportions of out-of-limit probability by day, and calculates the integrity score and execution fit score of feedback data in real time; the other is stability monitoring, which calculates the cumulative amplitude of parameter changes after consecutive updates, and triggers cold start retraining or extends the window to reduce the update frequency if the cumulative amplitude exceeds the preset upper limit. When any monitoring item exceeds the threshold, the system automatically reduces the step size of incremental training, increases the length of the validation slice, and rolls back to the last stable version if necessary. Through this closed-loop chain of "instruction generation, encryption delivery, identity binding, time alignment, integrity verification, sample storage, window extraction, weighted increment, regular constraint, version release, online calibration and continuous monitoring", the scheduling result is reliably delivered to the device, and the execution feedback flow is seamlessly returned to the data aggregation node. The trusted execution sample library and dynamic training subset provide continuous fresh information for the model, and the online updated machine learning model can improve the probability prediction result in a verifiable way after each update, so that the steady-state operation is a closed-loop adaptive prediction model.
[0109] Further, the model update stage fuses the trusted execution sample library and the historical training set of the machine learning model, and uses a sliding window method to select execution data in the recent period to construct a dynamic training subset, including:
[0110] Indexing each sample in the trusted execution sample library according to the timestamp and the device identifier, and calculating the power execution bias, the energy consumption cumulative bias and the environmental response bias in the same time slice, combining the three into a quality score vector to obtain a sample index table with quality scores;
[0111] According to the sample index table, retrieving baseline samples corresponding to the time slice and the device category in the historical training set, and pairing and fusing the trusted execution samples and the baseline samples with the quality score vector as the weight to generate a fused sample sequence with a bias correction factor;
[0112] Constructing a sliding window on the fused sample sequence, the window size being set according to the energy consumption fluctuation period of the target scene, the window step being smaller than the window size to form an overlapping area, calculating the weighted mean trajectory and the weighted variance trajectory in each window to generate a dynamic trajectory set;
[0113] Performing time decay re-weighting processing on each trajectory in the dynamic trajectory set, assigning a higher weight to a sample closer to the current time, calculating the trajectory set after the decay factor to obtain a time-weighted trajectory set;
[0114] Inputting the time-weighted trajectory set into a subset selection engine, screening samples according to the sample diversity index and the distribution coverage index, removing redundant entries when the similarity of the same type of samples in adjacent windows is higher than a set threshold, and only retaining samples capable of representing the global fluctuation pattern and the local abnormal pattern to obtain a dynamic training subset.
[0115] First, each sample in the trusted execution sample library needs to be uniquely indexed by timestamp and device identifier, ensuring accurate positioning later. For each indexed sample, the power execution deviation, energy accumulation deviation, and environmental response deviation are calculated within the corresponding time slice. The power execution deviation is calculated by taking the actual power in the same time slice and subtracting the power set value point by point, taking the absolute difference and averaging it within the time slice, then dividing this average difference by the average level of the set value to get a percentage-based deviation value. To avoid the influence of extreme noise points, the first and last few sampling points in the time slice can be removed before performing the above steps. The energy accumulation deviation is calculated by accumulating the actual power in the same time slice by sampling interval to get the actual energy, and then accumulating the power set value by the same method to get the expected energy. The absolute value of the difference between the two is divided by the expected energy to represent the energy accumulation deviation of the time slice. The environmental response deviation is used to measure the consistency of execution under environmental disturbance. Specifically, the actual trajectory of temperature, humidity, and air flow speed in the time slice is taken and the reference trajectory of the historical stable period is taken point by point to get the difference. The important degree of each on energy consumption is assigned a weight (for example, temperature is usually higher than humidity, and humidity is higher than air flow), and the time average results of the three types of difference are multiplied by their respective weights and added together and normalized by percentage to get the environmental response deviation. The three deviation values are written into the sample index table together with the timestamp and device identifier as the quality score vector, with smaller values indicating higher quality.
[0116] After obtaining the sample index table with quality scores, the baseline samples matching the trusted execution samples need to be retrieved from the historical training set. The matching is conditioned on the device category, time slice position and working condition similarity: the device category must be consistent, the time slice is preferentially selected in the same time period of the same day, and if missing, it is sequentially extended to the same time period of the adjacent days; the working condition similarity is determined by comparing whether the average load level and temperature level in the reference window fall within the preset error band, and both are within the error band to be considered as a successful match. For each trusted execution sample and its matched baseline sample, paired fusion is performed, and the quality score vector is used as the weight source during fusion. The three deviation components are respectively mapped to three weights: when a certain deviation is small, a higher weight is given to that component, and when the deviation is large, a lower weight is given to that component; to avoid the dominance of a single component, the three weights are proportionally compressed before use, so that the highest weight does not exceed a certain proportion of the total weight sum. Then, the paired samples are subjected to weighted synthesis field by field: for example, on the power trajectory, the trajectory of the trusted execution sample and the trajectory of the baseline sample are linearly synthesized according to the weight corresponding to the power execution deviation to obtain a reference trajectory that is closer to the actual execution and retains the baseline form; on the energy consumption and environment related fields, the same synthesis is performed according to the weights corresponding to the energy consumption cumulative deviation and the environmental response deviation respectively. The paired fusion generates a deviation correction factor at the same time, which is obtained by comparing the differences between the trusted execution sample and the baseline sample in the core statistics, including the average level in the time slice, the peak position and the duration: the ratio of the average level of the trusted execution sample to the average level of the baseline is obtained to obtain the amplitude correction factor, the difference between the peak occurrence time of the two trajectories is divided by the time slice length to obtain the phase correction factor, and the difference between the interval length exceeding the reference threshold is divided by the time slice length to obtain the persistence correction factor. The three together constitute the deviation correction factor, which is output together with the fused sample as a fused sample sequence.
[0117] A sliding window is established on the fusion sample sequence to obtain a dynamic trajectory set. The window size is set according to the energy fluctuation period of the target scene, for example, one hour or two hours when the daily period is significant, so that at least multiple windows are included in one period; the step length is half or less of the window length to form an overlapping area, ensuring the continuity of information between adjacent windows. In each window, the weighted mean trajectory and the weighted variance trajectory need to be calculated. The calculation method of the weighted mean trajectory is: for all fusion samples constituting the window, perform the operation on each time scale on the window time axis, multiply and add the values of all samples at the scale with the corresponding quality weight, and then divide by the sum of the quality weights to obtain the mean value at the scale; repeat the above steps along each scale of the window to splice into a complete weighted mean trajectory. The calculation method of the weighted variance trajectory is: at the same scale, subtract the weighted mean value of the scale obtained in the previous step from the value of each sample, take the absolute magnitude of the difference, multiply and add the same quality weight, and finally divide by the sum of the quality weights to obtain the dispersion at the scale, and splice along the time axis to form a weighted variance trajectory. Pack the two trajectories of each window with the corresponding deviation correction factor to form a dynamic trajectory set.
[0118] Perform time decay re-weighting processing on each trajectory in the dynamic trajectory set to reflect the "the closer the more important" update principle. First, determine a decay step, for example, in hours or in windows; take the weight of the window closest to the current time as the starting point, and gradually reduce the weight of the earlier windows by a fixed proportion. The proportion can be set to slightly less than one according to experience, for example, multiply the weight by a constant slightly less than one for each window forward, until the starting point of the window coverage period. For samples spanning different working conditions, check the working condition label (such as weekdays and non-weekdays, peak and valley periods) before decay, and if the labels are different, make an additional reduction to the weight to avoid excessive impact of different working conditions on the current update. Normalize the decayed weight to obtain the trajectory set after the decay factor, i.e., the time-weighted trajectory set.
[0119] The time-weighted trajectory set is input into a subset selection engine to jointly screen a dynamic training subset according to a sample diversity index and a distribution coverage index. The sample diversity index is used to ensure sufficient differences between selected samples, and the specific calculation method is as follows: the numerical difference of two candidate trajectories is compared at the same time axis scale by scale, the absolute difference is taken, and the average is calculated in the whole window range to obtain the distance measurement of the two trajectories; the distance between all candidate trajectories is calculated two by two, the trajectory with the largest minimum distance to all trajectories in the selected set is preferentially selected, and is gradually added according to the principle of “first far and then near”, until the predetermined subset size or the diversity benefit is no longer significant. The distribution coverage index is used to ensure that the key interval is covered, and the specific method is as follows: the trajectory value is divided into several intervals in ascending order at each time scale, the interval position of each candidate trajectory at each scale is recorded as a fingerprint, the coverage number of the selected set at each interval of each time scale is counted, and if some intervals are not covered, the trajectories that can fill these gaps are preferentially selected from the candidate set. To avoid redundancy, when the similarity of the same type of samples in adjacent windows is higher than a set threshold, the redundant items are removed. The similarity is calculated in the opposite way of the distance, that is, the distance is first calculated, and then the distance is mapped to a similarity score between zero and one, the smaller the distance, the greater the similarity; the threshold can be automatically calibrated through historical data: the similarity distribution of all adjacent windows in a representative historical interval is calculated, and the score corresponding to a certain fixed percentile on the upper end of the distribution is taken as the threshold, and the items with a similarity higher than the threshold are considered as redundant items during actual screening. Through the order of diversity first, coverage rate second, and then redundancy, a sample set that represents both global fluctuation patterns and local abnormal patterns is obtained to form a dynamic training subset.
[0120] The second embodiment of the present application provides an electronic device, comprising:
[0121] a processor;
[0122] a memory for storing a program, wherein the program is read and executed by the processor to perform the machine learning-based energy consumption prediction and scheduling control method provided in the first embodiment of the present application.
[0123] The third embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the program is executed by a processor to perform the machine learning-based energy consumption prediction and scheduling control method provided in the first embodiment of the present application.
[0124] Although the above is disclosed in the preferred embodiments of the present application, the present application is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application, therefore the protection scope of the present application should be subject to the scope defined by the claims of the present application.
Claims
1. A method for energy consumption prediction and dispatch control based on machine learning, characterized in that, The application relates to a method for energy consumption prediction and scheduling of a plurality of devices, comprising: collecting running parameters, energy consumption curves and environmental disturbance data of the plurality of devices through distributed sensing terminals; inputting the running parameters, energy consumption curves and environmental disturbance data into a pre-trained machine learning model, wherein the machine learning model combines a time sequence recursion structure and attention weights to generate a probability prediction result of energy consumption distribution; applying an intervention signal within a device safety boundary, generating a device response feature according to an intervention difference, and combining the probability prediction result and the device response feature to form an energy consumption risk map; generating an extreme disturbance scenario based on the energy consumption risk map using digital twinning, performing consistency checking of the probability prediction result and a scheduling scheme in a data domain and a physical domain, and performing multi-level scheduling according to the checked energy consumption risk map and task delay to form a scheduling result; downloading the scheduling result to the devices and returning feedback data, and updating the machine learning model according to the feedback data; the downloading of the scheduling result to the devices and the returning of the feedback data, and the updating of the machine learning model according to the feedback data, comprise: converting the confirmed scheduling result into an energy consumption hosting instruction set recognizable by the devices, wherein the energy consumption hosting instruction set contains power setting values, task execution time windows, load distribution ratios and safety redundancy parameters, and is downloaded to the target devices through an encrypted communication protocol with a digital signature and a timestamp to obtain a downloaded instruction record with a unique identifier; executing energy consumption regulation operations according to the downloaded instruction record at the device end, and collecting running parameters, energy consumption curves and environmental disturbance data in real time during the execution process to generate an execution feedback stream with an instruction identifier, wherein the execution feedback stream is returned to the data aggregation node through the same encrypted communication protocol to obtain a feedback data set bound with the identifier; performing timestamp alignment and integrity checking of the feedback data set and the downloaded instruction record at the data aggregation node, and if the checking result shows that the feedback data set is consistent with the downloaded instruction record, storing the feedback data set as a trusted execution sample; in the model updating stage, fusing the trusted execution sample library and a historical training set of the machine learning model, and selecting execution data of a recent period by using a sliding window method to construct a dynamic training subset; performing incremental training in the machine learning model based on the dynamic training subset, correcting model parameters by using a probability distribution difference minimization method and a Bayesian regularization method, generating an online-updated machine learning model, and using the online-updated machine learning model for subsequent probability prediction of energy consumption distribution to obtain a closed-loop adaptive prediction model. 2.The machine learning based energy consumption prediction and scheduling control method of claim 1, wherein, the collecting of running parameters, energy consumption curves and environmental disturbance data of the plurality of devices through distributed sensing terminals, comprises: high-frequency sampling of voltage signals, current signals and power signals of the devices in the distributed sensing terminals, and generating an initial sequence with a timestamp during the sampling process; performing multi-scale wavelet decomposition on the initial sequence in the distributed sensing terminals, extracting energy consumption fluctuation components at different time scales, and reconstructing the energy consumption fluctuation components into an energy consumption multi-resolution feature sequence; The energy consumption multi-resolution feature sequence is coupled with environmental disturbance parameters in a distributed sensing terminal to construct an environmental labeled energy consumption vector, which contains running parameter features and environmental disturbance weights in the same time slice; A dynamic credibility evaluation is performed on the environmental labeled energy consumption vector in the distributed sensing terminal, a credibility factor is calculated through deviation test with historical distribution, and the credibility factor is attached to the environmental labeled energy consumption vector to form a credible energy consumption sample; The credible energy consumption sample is received at a data aggregation node, and the credible energy consumption samples from different distributed sensing terminals are time-aligned and space-fused to output a high-integrity energy consumption dataset in a unified format for subsequent machine learning model calling. 3.The machine learning based energy consumption prediction and scheduling control method of claim 1, wherein, The machine learning model comprises a time series decomposition unit, a double-flow recursion unit, a mask attention unit, a constraint embedding unit and a probability flow generation unit; The time series decomposition unit is used for receiving running parameters, energy consumption curves and environmental disturbance data, time stamp aligning and multi-scale splitting the received data to obtain an initial interval feature sequence, and realizing wavelet decomposition and a sliding window method so that energy consumption fluctuations and long-term trends at different time scales can be retained in the initial interval feature sequence at the same time. The double-flow recursion unit is used for receiving the initial interval feature sequence, generating steady-state hidden states and disturbance hidden states respectively, and obtaining a joint state sequence through affine coupling, and realizing the double-flow recursion unit through setting a steady-state recursion channel to capture the steady energy consumption evolution law and another disturbance recursion channel to capture the sudden disturbance response, and the two channels are integrated into the joint state sequence through a nonlinear fusion layer at each time. The mask attention unit is used for receiving the joint state sequence and the initial interval feature sequence, and generating a context vector, and the mask attention unit is used for screening attention weights by constructing a physically feasible mask to shield features that do not meet the rated power or safety boundary of the device, so that only time slice information that meets the physical constraints is retained after attention normalization, and a context vector is output. The constraint embedding unit is used for receiving the joint state sequence and the context vector, combining power upper and lower limits, energy conservation constraints and climb rate constraints to generate conditional encoding, and the constraint embedding unit is realized through conditional vector construction and nonlinear projection, so that the conditional encoding can simultaneously embed statistical prediction laws and physical constraint conditions to ensure the consistency of the subsequent generated results. The probability flow generation unit is used for receiving the conditional encoding, performing layer-by-layer reversible transformation on the basic noise distribution and calculating the Jacobian determinant at each layer to obtain a probability prediction result of the energy consumption distribution, and the probability flow generation unit is realized through a reversible probability flow network, and provides quantile prediction, confidence interval prediction and probability density function estimation results at the output end, and the probability prediction result is used for subsequent energy consumption risk map construction and multi-level scheduling execution. 4.The machine learning based energy consumption prediction and scheduling control method of claim 1, wherein, The intervention signal is applied within the device safety boundary, the device response features are generated according to the intervention difference, and the energy consumption risk map is formed by combining the probability prediction result, which comprises: Based on the device rated power, the maximum allowable current, the temperature rise threshold and the climb rate constraint, the device safety boundary is calculated, and the amplitude upper limit, the duration, the rising edge and the spectrum limit of the intervention signal are determined according to the device safety boundary, and an intervention signal configuration table is output; According to the intervention signal configuration table, the current operating parameters, the energy consumption curve and the state of the environmental disturbance data, and the time synchronization reference, an unrelated intervention plan covering different time slices and different devices is generated, the unrelated intervention plan adopts mutually orthogonal pseudo-random binary sequences and sweep signals to avoid mutual crosstalk, and an intervention plan and a trigger timestamp set are obtained; According to the trigger timestamp set, the intervention signal is injected into the device control interface, and the operating parameters, the energy consumption curve and the environmental disturbance data are synchronously collected in a fixed observation window before and after the intervention, time alignment, detrending and band-pass filtering processing are performed, and an intervention window data set is obtained; The intervention window data set is subjected to response estimation, a subspace identification and deconvolution joint method is used to calculate the impulse response, the gain, the time delay, the time constant, the recovery time and the steady-state offset, and the environmental disturbance data is eliminated by tool variable regression to eliminate the mixed influence of the environmental disturbance data on the response estimation, and a device response feature is obtained; The device response feature and the probability prediction result are fused, the distribution parameters of the probability prediction result are corrected based on likelihood weighting and Bayesian updating, and a corrected probability prediction result is obtained; The over-limit probability, the variance and the tail thickness of the corrected probability prediction result are compared with the device safety boundary with the device and the time slice as indexes, a graph entry containing the risk intensity, the source label and the time positioning is generated, and the energy consumption risk graph is aggregated according to the indexes. 5.The machine learning based energy consumption prediction and scheduling control method of claim 1, wherein, The energy consumption risk graph is used to generate an extreme disturbance scenario by digital twinning, and the probability prediction result and the scheduling scheme are consistent in the data domain and the physical domain, the energy consumption risk graph and the task delay are used to perform multi-level scheduling to form a scheduling result, including: Based on the energy consumption risk graph, a marked high-risk area and a potential abnormal area are extracted, and a risk trigger condition set is generated by combining the operating parameters, the energy consumption curve and the environmental disturbance data, and the risk trigger condition set is obtained; According to the risk trigger condition set, a digital twinning simulation environment is constructed, the physical characteristics, the energy consumption curve and the environmental disturbance model of the device are loaded in the simulation environment, and the marked area is initialized, and an initial simulation state is obtained; An extreme disturbance trajectory is injected in the initial simulation state, the extreme disturbance trajectory includes scenes such as power surge, temperature mutation, voltage fluctuation and multi-device concurrent switching, and a corresponding simulation response data set is generated; The simulation response data set and the probability prediction result are compared in the data domain, the mean, the variance and the quantile deviation are calculated, and the probability prediction result is corrected when the deviation exceeds the set threshold, and a data domain corrected probability prediction result is obtained; The data domain corrected probability prediction result and the scheduling scheme are verified in the physical domain, whether the scheduling scheme meets the device rated power, the maximum allowable current, the energy conservation and the climb rate constraint is checked, and a physical domain checked scheduling scheme is obtained; The data domain corrected probability prediction result is combined with the physical domain checked scheduling scheme, a task delay is updated and marked in an energy consumption risk atlas, a multi-level scheduling is performed according to the task delay, and a confirmed scheduling result is obtained. 6.The machine learning based energy consumption prediction and scheduling control method of claim 1, wherein, In the model updating stage, the trusted execution sample library is fused with the historical training set of the machine learning model, and a sliding window method is used to select execution data in the recent period to construct a dynamic training subset, including: Each sample in the trusted execution sample library is indexed according to the timestamp and the device identifier, and the power execution deviation, the energy consumption cumulative deviation and the environment response deviation are calculated in the same time slice, the three are combined into a quality score vector, and a sample index table with quality scores is obtained; According to the sample index table, baseline samples corresponding to the time slice and the device category are retrieved in the historical training set, and the trusted execution samples and the baseline samples are paired and fused with the quality score vector as the weight to generate a fusion sample sequence with a deviation correction factor; A sliding window is constructed on the fusion sample sequence, the window size is set according to the energy consumption fluctuation period of the target scene, the window step is smaller than the window size to form an overlapping area, the weighted mean trajectory and the weighted variance trajectory are calculated in each window to generate a dynamic trajectory set; Time decay re-weighting processing is performed on each trajectory in the dynamic trajectory set, samples closer to the current time are given higher weights, the trajectory set after the decay factor is calculated, and a time weighted trajectory set is obtained; The time weighted trajectory set is input into a subset selection engine, sample diversity index and distribution coverage index are used to filter samples, redundant entries are removed when the similarity of the same type of samples in adjacent windows is higher than a set threshold, only samples representing global fluctuation patterns and local abnormal patterns are retained, and a dynamic training subset is obtained.
Citation Information
Patent Citations
Intelligent management system for energy consumption optimization and fault self-diagnosis of cleaning equipment
CN120258775A
Electric energy consumption real-time monitoring management method and system based on Internet of Things
CN120372174A