Regional supply and demand balance analysis device and method supporting energy double control

By employing a modular architecture for protocol adaptation, data awareness, transmission optimization, cleaning and reconstruction, and predictive simulation, the problem of data acquisition delay caused by heterogeneous communication protocols of gas station equipment was solved, enabling high-precision regional fuel supply and demand forecasting and dynamic energy allocation.

CN121967459APending Publication Date: 2026-05-01WENZHOU BLUESKY ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WENZHOU BLUESKY ENERGY TECH CO LTD
Filing Date
2026-01-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The existing IoT-based smart gas station network energy management platform suffers from inconsistent data acquisition interfaces due to heterogeneous communication protocols among gas station equipment. This leads to format conflicts and transmission interruptions in real-time data streams, resulting in insufficient accuracy of regional fuel supply and demand prediction models and lagging optimization of energy dual-control strategies.

Method used

The system employs a protocol adaptive module to dynamically select the communication protocol, a data perception module for real-time noise reduction and state estimation, a transmission optimization module for multi-link transmission path selection, a cleaning and reconstruction module for anomaly detection and credibility weight calculation, a prediction simulation module for digital twin environment simulation, and a strategy generation module for multi-objective optimization algorithms to form a closed-loop control.

Benefits of technology

It improves the real-time performance and completeness of data acquisition, enhances the accuracy of regional fuel supply and demand forecasting and the timeliness of energy dual control strategies, and solves the problems of insufficient accuracy of forecast models and lag in strategy optimization caused by protocol heterogeneity and acquisition delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967459A_ABST
    Figure CN121967459A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things intelligent gas station network energy management and regional supply and demand balance analysis, in particular to a regional supply and demand balance analysis device and method supporting energy double-control, and the method comprises the steps: a protocol self-adaption module solves the problem of gas station equipment protocol heterogeneity through dynamically selecting a communication protocol, and outputs a data stream in a unified format; the data sensing module adaptively adjusts the acquisition frequency according to the supply-demand imbalance risk index; the transmission optimization module adopts a multi-link transmission path selection mechanism to guarantee data transmission integrity; the cleaning reconstruction module improves the data quality through anomaly detection and credibility weight calculation; the prediction simulation module realizes accurate demand prediction based on weighted reconstruction data and a digital twin environment; and the strategy generation module synthesizes the multi-source information to generate an optimization strategy. All the modules form closed-loop control through bidirectional data streams, and the regional fuel supply and demand prediction precision and the energy double-control strategy timeliness are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Device and method for regional supply and demand balance analysis supporting dual energy control Technical Field

[0001] This invention relates to the field of IoT smart gas station network energy management and regional supply and demand balance analysis technology, and particularly to a regional supply and demand balance analysis device and method that supports dual energy control. Background Technology

[0002] The IoT-based smart gas station network energy management platform supports the achievement of dual energy control objectives by monitoring total energy consumption and energy intensity in real time. The regional supply and demand balance analysis is based on the gas station energy usage data and supply information integrated into the platform. It uses dynamic flow and inventory data collected by the IoT sensor network to build a supply and demand matching model. Through predictive algorithms, it assesses regional energy flow trends, optimizes scheduling strategies, thereby improving network energy efficiency and maintaining the stable operation of the energy system.

[0003] Existing IoT-based smart gas station network energy management platforms suffer from the following technical pain points: Firstly, the communication protocols of gas station equipment are heterogeneous, with multiple standards such as Bluesky, Tatsuno, and Japan coexisting. This leads to inconsistent data acquisition interfaces, format conflicts and transmission interruptions in real-time data streams, resulting in acquisition delays. These delays prevent regional fuel supply and demand forecasting models from obtaining timely and consistent data input, significantly reducing model accuracy. For example, during peak refueling periods, data loss or lag during protocol conversion can cause forecasting models to misjudge supply and demand trends, thus hindering the optimization of energy dual-control strategies and preventing dynamic adjustments to fuel allocation and energy-saving measures, ultimately impacting regional energy management efficiency. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a regional supply and demand balance analysis device and method that supports dual energy control. This invention solves the technical problem that the regional fuel supply and demand prediction model is not accurate enough due to the heterogeneity of communication protocols of gas station equipment and the delay in real-time data acquisition, which leads to the lag in the optimization of dual energy control strategies.

[0005] To solve the above-mentioned technical problems, the specific contents of the present invention are as follows: Firstly, the present invention provides a regional supply and demand balance analysis device supporting dual energy control, comprising: a protocol adaptive module, which collects raw data from gas station equipment, incorporates multiple communication protocol libraries, dynamically selects and converts communication protocols, outputs a unified format data stream, and generates protocol performance index logs which are uploaded to a strategy generation module; a data sensing module, which receives the unified format data stream output by the protocol adaptive module, performs real-time denoising and state estimation on fuel flow and inventory data, receives a supply and demand imbalance risk index sent by a prediction simulation module, adjusts the collection frequency according to the supply and demand imbalance risk index, and outputs preprocessed time-series data; and a transmission optimization module, which receives the preprocessed time-series data output by the data sensing module, encapsulates it into a data packet, selects a communication path through a multi-link transmission path, attaches a checksum, and outputs the transmission data. The system comprises: an optimized data packet; a cleaning and reconstruction module, which receives the optimized data packet from the transmission optimization module, parses the data packet, performs anomaly detection and missing value repair, calculates data credibility weights, and outputs weighted reconstructed time series data; a prediction and simulation module, which receives the weighted reconstructed time series data from the cleaning and reconstruction module, outputs regional fuel demand forecasts through a prediction model, simulates supply and demand dynamics using a digital twin environment, generates a supply and demand imbalance risk index and a strategy evaluation report, and sends the supply and demand imbalance risk index to the data perception module; and a strategy generation module, which receives the strategy evaluation report generated by the prediction and simulation module and the protocol performance indicator log uploaded by the protocol adaptation module, generates an energy allocation strategy through an optimization algorithm, collects actual execution data of the energy allocation strategy, and sends actual execution deviation data to the prediction and simulation module.

[0006] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the protocol adaptive module is configured to: periodically send test data frames to the gas station equipment port, monitor response latency and data packet loss rate, and generate protocol performance index logs; based on the protocol performance index logs, calculate the reward function value through a Q-learning reinforcement learning algorithm, and dynamically select a communication protocol; according to the selected communication protocol, drive the underlying communication interface to convert the raw data and output a data stream in a unified format; and upload the protocol performance index logs to the strategy generation module.

[0007] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the data sensing module is configured to: receive a unified format data stream output by the protocol adaptive module as a real-time sampled value; establish a state-space model of fuel flow and inventory, process the real-time sampled value through a Kalman filter, and output a smoothed state estimate; receive a supply and demand imbalance risk index generated by the prediction simulation module, normalize the index, and map it to a sampling frequency parameter; and write the sampling frequency parameter into a hardware timer to control the trigger interval of the sensor sampling circuit.

[0008] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the transmission optimization module is configured to: receive the smoothed state estimate output by the data sensing module; add a timestamp and source identifier to the smoothed state estimate and encapsulate it into a data packet; measure the latency, jitter, and bandwidth of the communication link through UDP probe packets and output a link quality score using a fuzzy logic system; calculate the transmission path using a weighted shortest path algorithm with the reciprocal of the link quality score as the edge weight; generate an HMAC-SHA256 checksum based on the TLS 1.3 protocol and append it to the data packet; and synchronously send the link quality score to the cleaning and reconstruction module for calculating data credibility weights.

[0009] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the cleaning and reconstruction module is configured to: receive data packets output by the transmission optimization module; parse the data packets and extract time series data; calculate the anomaly score of each data point in the time series data using the isolated forest algorithm and mark the anomalies; use an autoregressive model to interpolate and repair the anomalies; and calculate the data credibility weight of the time series data based on the link quality score output by the transmission optimization module, and output the weighted reconstructed time series data.

[0010] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the prediction simulation module is configured to: receive weighted reconstructed time series data output by the cleaning and reconstruction module; standardize the weighted reconstructed time series data to obtain standardized sequence data; process the standardized sequence data through a bidirectional LSTM network to output a regional fuel demand forecast; based on the regional fuel demand forecast, simulate the supply and demand situation under different scheduling strategies in a digital twin environment to generate a strategy evaluation report including the simulated supply and demand situation; compare the simulated supply and demand situation in the strategy evaluation report with the regional fuel demand forecast to calculate a supply and demand imbalance risk index; and send the supply and demand imbalance risk index to the data sensing module.

[0011] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the strategy generation module is configured to: receive the strategy evaluation report generated by the prediction simulation module; receive the protocol performance index log uploaded by the protocol adaptation module; solve for energy allocation parameters using a multi-objective particle swarm optimization algorithm based on the strategy evaluation report and the protocol performance index log; encode the energy allocation parameters into instruction messages; collect actual execution data of the energy allocation strategy, and calculate execution deviation data based on the actual execution data and the energy allocation parameters.

[0012] Furthermore, in the regional supply and demand balance analysis device supporting dual energy control described in this invention, the strategy generation module is further configured to: send the execution deviation data to the prediction simulation module; receive the preprocessed time series data output by the data sensing module; and correct the weight coefficients in the multi-objective particle swarm optimization algorithm based on the preprocessed time series data.

[0013] Furthermore, the regional supply and demand balance analysis device supporting dual energy control according to the present invention further includes: the data sensing module, configured to receive the supply and demand imbalance risk index sent by the prediction simulation module, and adjust the collection frequency according to the supply and demand imbalance risk index; the transmission optimization module, configured to send the link quality score to the cleaning and reconstruction module; and the cleaning and reconstruction module, configured to calculate the data credibility weight based on the link quality score sent by the transmission optimization module.

[0014] Secondly, the regional supply and demand balance analysis method supporting dual energy control provided by this invention is applied to the aforementioned regional supply and demand balance analysis device supporting dual energy control, comprising: Step 1, collecting raw data from gas station equipment, dynamically selecting and converting communication protocols based on a built-in library of multiple communication protocols, outputting a data stream in a unified format, and generating a protocol performance index log; Step 2, receiving the unified format data stream, performing real-time denoising and state estimation on fuel flow and inventory data, receiving a supply and demand imbalance risk index, adjusting the collection frequency according to the supply and demand imbalance risk index, and outputting preprocessed time-series data; Step 3, receiving the preprocessed time-series data, encapsulating it into a data packet, selecting a communication path through a multi-link transmission path, and attaching a checksum. Step 4: Receive the optimized data packets, parse the data packets to perform anomaly detection and missing value repair, calculate data credibility weights, and output weighted reconstructed time series data; Step 5: Receive the weighted reconstructed time series data, output regional fuel demand forecasts through a prediction model, simulate supply and demand dynamics using a digital twin environment, generate a supply and demand imbalance risk index and a strategy evaluation report, and send the supply and demand imbalance risk index to adjust the collection frequency; Step 6: Receive the strategy evaluation report and the protocol performance indicator logs, generate an energy allocation strategy through an optimization algorithm, collect the actual execution data of the energy allocation strategy, and send the actual execution deviation data for model feedback.

[0015] The beneficial effects of this invention are as follows: This invention effectively solves the data acquisition delay problem caused by heterogeneous communication protocols in gas station equipment by dynamically selecting the optimal communication protocol through a protocol adaptive module; the data perception module adaptively adjusts the acquisition frequency based on the supply-demand imbalance risk index, and combined with the multi-link transmission path selection mechanism of the transmission optimization module, significantly improves the real-time performance and completeness of data acquisition; the cleaning and reconstruction module provides high-quality input data for the prediction model through anomaly detection and credibility weight calculation; the prediction simulation module achieves accurate prediction of regional fuel demand based on weighted reconstruction data and digital twin environment simulation; the strategy generation module generates energy allocation strategies through multi-objective optimization algorithms and continuously optimizes model parameters based on actual execution data; and the modules form a closed-loop control through bidirectional data flow, comprehensively improving the accuracy of regional fuel supply and demand prediction and the timeliness of the dual energy control strategy, overcoming the problems of insufficient prediction model accuracy and lag in strategy optimization caused by protocol heterogeneity and acquisition delays in existing technologies. Attached Figure Description

[0016] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on the accompanying drawings without creative effort.

[0017] Figure 1 is a flowchart of the regional supply and demand balance analysis method for supporting dual energy control provided by the present invention. Detailed Implementation

[0018] To make the technical solution of the present invention clearer, the present invention will be clearly and completely described below with reference to specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The present invention provided by various embodiments will be described in detail below with reference to the accompanying drawings. To better understand the purpose of the present invention, the present invention will be described in further detail below.

[0019] In a first aspect, the regional supply and demand balance analysis device supporting dual energy control provided by the present invention includes: a protocol adaptive module, which collects raw data from gas station equipment, has a built-in library of multiple communication protocols, dynamically selects and converts communication protocols, outputs a unified format data stream, and generates protocol performance index logs which are uploaded to a strategy generation module; a data sensing module, which receives the unified format data stream output by the protocol adaptive module, performs real-time denoising and state estimation on fuel flow and inventory data, receives a supply and demand imbalance risk index sent by a prediction and simulation module, adjusts the collection frequency according to the supply and demand imbalance risk index, and outputs preprocessed time-series data; a transmission optimization module, which receives the preprocessed time-series data output by the data sensing module, encapsulates it into a data packet, selects a communication path through a multi-link transmission path, attaches a checksum, and outputs a transmission-optimized data packet; and a cleaning and reprocessing module. The system comprises the following modules: a data structure module, which receives the optimized data packets from the data transmission optimization module, parses the data packets, performs anomaly detection and missing value repair, calculates data credibility weights, and outputs weighted reconstructed time series data; a prediction simulation module, which receives the weighted reconstructed time series data from the data cleaning and reconstruction module, outputs regional fuel demand forecasts through a prediction model, simulates the supply and demand situation using a digital twin environment, generates a supply and demand imbalance risk index and a strategy evaluation report, and sends the supply and demand imbalance risk index to the data perception module; and a strategy generation module, which receives the strategy evaluation report generated by the prediction simulation module and the protocol performance indicator logs uploaded by the protocol adaptation module, generates an energy allocation strategy through an optimization algorithm, collects actual execution data of the energy allocation strategy, and sends actual execution deviation data to the prediction simulation module.

[0020] The regional supply and demand balance analysis device supporting dual energy control achieves intelligent energy management of the gas station network through a modular architecture. The protocol adaptive module directly connects to the gas station equipment and dynamically selects the optimal communication protocol through a built-in library of multiple communication protocols. This module periodically sends test data frames to the device ports, monitors the response latency and data packet loss rate of each protocol, and generates protocol performance indicator logs. Based on the log data, a Q-learning reinforcement learning algorithm is used to calculate the reward function value, dynamically switching to the best-performing communication protocol. After the protocol conversion is complete, the underlying communication interface is driven to convert the raw data into a unified format data stream, and the protocol performance indicator logs are uploaded to the strategy generation module, providing communication quality data for subsequent strategy optimization.

[0021] The data sensing module receives a unified format data stream from the protocol adaptation module and processes fuel flow and inventory data in real time. Internally, the module establishes a state-space model of fuel flow and inventory, and uses a Kalman filter algorithm to denoise and estimate the state of the real-time sampled values. The filtering process includes two steps: prediction and update. The prediction step estimates values ​​based on the equipment's physical model, while the update step uses real-time sampled values ​​to correct the state estimates, outputting a smoothed state estimate. This module also receives a supply-demand imbalance risk index from the prediction simulation module, normalizes the index, and maps it to a sampling frequency parameter. The frequency parameter controls the trigger interval of the sensor sampling circuit through a hardware timer, enabling dynamic adjustment of the sampling frequency.

[0022] The transmission optimization module encapsulates and transmits the smoothed state estimate output by the data perception module. The module adds timestamps and source identifiers to the data and encapsulates it into standard data packets. It measures latency, jitter, and bandwidth parameters of 4G, 5G, and Wi-Fi links in real time using UDP probe packets and outputs a link quality score using a fuzzy logic system. The optimal transmission path is calculated using a weighted shortest path algorithm with the reciprocal of the link quality score as the edge weight. Data packets use the TLS 1.3 protocol to generate HMAC-SHA256 checksums to ensure transmission security; the checksum is transmitted synchronously with the data packets. The link quality score is simultaneously sent to the cleaning and reconstruction module, providing a basis for subsequent data credibility calculations.

[0023] The cleaning and reconstruction module parses and processes the data packets sent by the transmission optimization module on the cloud platform. First, the module parses the time-series data in the data packets, extracting timestamps, site IDs, and numerical fields. It then calculates anomaly scores for each data point using the Isolation Forest algorithm, marking outliers exceeding a threshold. For these outlier data points, an autoregressive model is used for imputation and repair. Finally, the module combines the link quality score provided by the transmission optimization module with the data point's own fluctuation characteristics to calculate the credibility weight of each data point, outputting time-series data with an accompanying weight matrix. This weighted processing method provides differentiated training samples for subsequent prediction models.

[0024] The prediction simulation module, as the core computing unit, receives weighted reconstructed time-series data output from the cleaning and reconstruction module. After standardizing and preprocessing the data, the module inputs it into a bidirectional LSTM prediction model based on an attention mechanism. The model processes the sequence data through an encoder-decoder structure, with the attention layer dynamically focusing on key time-point features, outputting a predicted value for regional fuel demand. A digital twin simulation environment loads a gas station network topology and inventory dynamics model, using the predicted values ​​as input to simulate changes in supply and demand under different scheduling strategies. The simulation results are compared with real-time predicted values ​​to generate a supply-demand imbalance risk index, and a strategy evaluation report including the simulated supply and demand situation is output. The risk index is fed back to the data sensing module in real time, forming a dynamic adjustment closed loop for the data collection frequency.

[0025] The strategy generation module comprehensively processes multi-source information for strategy optimization. This module receives strategy evaluation reports generated by the prediction simulation module and protocol performance indicator logs uploaded by the protocol adaptation module. Using a multi-objective particle swarm optimization algorithm, with the objective functions of maximizing energy utilization efficiency and supply stability, it solves for the optimal energy allocation parameters. These parameters are encoded into executable command messages for the gas station control system and sent for execution. Simultaneously, the module collects actual strategy execution data, calculates execution deviation data, and feeds it back to the prediction simulation module. The digital twin environment updates model parameters online based on the deviation data, achieving continuous strategy optimization. This invention constructs a complete closed-loop system from data acquisition to strategy optimization through deep interaction and bidirectional data flow between modules.

[0026] The protocol adaptation module dynamically optimizes communication protocols through an active detection mechanism. This module directly connects to the gas station equipment and incorporates multiple communication protocol libraries, establishing independent monitoring channels for different protocols such as Bluesky and Tatsuno. The module periodically sends test data frames to the device ports, recording the response latency and packet loss rate of each protocol, generating protocol performance indicator logs including timestamps and protocol types. The Q-learning reinforcement learning algorithm uses network load levels and device communication characteristics as the state space and protocol switching actions as the action space, iteratively updating the Q-value table to find the optimal strategy. The reward function comprehensively considers latency and packet loss rate metrics. When a performance degradation of the current protocol is detected, the algorithm drives the underlying communication interface to perform a protocol switch, converting heterogeneous data streams into a unified format. The protocol performance indicator logs are uploaded to the policy generation module via an asynchronous transmission mechanism, providing real-time communication quality parameters for global decision-making.

[0027] The data sensing module employs an adaptive acquisition strategy to process real-time data streams. After receiving the unified format data stream output by the protocol adaptive module, the module establishes a state-space model of fuel flow and inventory. The Kalman filter algorithm estimates values ​​based on the physical model in the prediction step, and then corrects the state estimates using real-time sampled values ​​in the update step, outputting a smoothed state estimate. The acquisition frequency control unit receives the supply-demand imbalance risk index sent by the prediction simulation module and uses a linear mapping algorithm to convert the risk index into acquisition frequency parameters. The parameter configuration register is directly connected to a hardware timer; when the risk index exceeds a threshold, a high-speed sampling mode is triggered, enabling intensive data acquisition during peak refueling periods.

[0028] The transmission optimization module constructs a multi-link collaborative transmission system. This module receives smoothed state estimates from the data sensing module, adds millisecond-level timestamps and site geocoding, and encapsulates them into transmission data packets. The link quality assessment unit obtains real-time performance data of 4G / 5G cellular networks and Wi-Fi links by sending UDP probe packets. The fuzzy logic system converts measurements of latency, jitter, and bandwidth into quality scores within the 0-1 range. The path decision-maker abstracts the network topology into a weighted connected graph, using the reciprocal of the quality score as edge weights and employing Dijkstra's algorithm to calculate the optimal transmission path. Data packets are end-to-end encrypted using the TLS 1.3 protocol. The HMAC-SHA256 checksum and data packets are transmitted separately to the cleaning and reconstruction module; a retransmission mechanism is triggered when the checksum fails.

[0029] The data cleaning and reconstruction module enhances data quality in the cloud. After parsing the data packets sent by the transmission optimization module, the module extracts time-series data to construct a sample matrix. The Isolation Forest algorithm calculates anomaly scores for data points by randomly partitioning the feature space, marking anomalous points as those detected by sudden increases in flow data or abnormal jumps in liquid level data. The autoregressive imputation model uses local correlations of time series data to correct outliers, comprehensively considering the spatiotemporal characteristics of data points during the imputation process. The credibility weight calculator integrates link quality scores and data variation coefficients to generate a weight matrix positively correlated with data reliability, giving higher-credibility data greater weight in subsequent prediction models.

[0030] The prediction simulation module employs deep learning and digital twin technology to achieve accurate predictions. The module standardizes the weighted reconstructed time-series data, eliminating the influence of dimensions before inputting the data into a bidirectional LSTM network. The encoder layer extracts long-term dependency features of the time series, and an attention mechanism dynamically weights the contribution at different time steps. The decoder layer outputs the predicted regional fuel demand. The digital twin environment loads a gas station network topology and inventory dynamics model, using the predicted values ​​as input to simulate supply and demand changes under different scheduling strategies. By simulating the oil flow process under different scheduling strategies, a strategy evaluation report is generated, including inventory consumption curves and supply pressure indicators. A risk calculator compares the deviation between the simulation results and real-time predictions; when the daily average deviation exceeds a threshold, the risk level is increased.

[0031] The strategy generation module implements multi-objective optimization decision-making. The module parses key performance indicators from the strategy evaluation report, including parameters such as inventory warning duration and regional coverage. Protocol performance indicator logs provide historical communication quality data for evaluating data transmission reliability. A multi-objective particle swarm optimization algorithm searches for the optimal delivery plan within the solution space, with the objective functions of minimizing transportation costs and maximizing supply stability. The optimal solution is encoded into instruction messages conforming to the gas station PLC control system protocol and sent to the execution terminal via an industrial IoT gateway. The execution monitoring unit collects the tanker truck's GPS trajectory and the gas station's actual inventory data, calculates the strategy execution deviation, and feeds it back to the predictive simulation module.

[0032] The optimization iteration mechanism of the strategy generation module achieves continuous improvement through bidirectional feedback. Execution deviation data is sent to the digital twin environment of the prediction simulation module, triggering adaptive adjustments to model parameters. Preprocessed time-series data provided by the data awareness module reflects actual supply and demand trends and is used to correct the inertia weights of the particle swarm optimization algorithm online. This dynamic adjustment mechanism enables the algorithm to maintain its optimization performance under different operating conditions, such as morning and evening rush hours at gas stations, and automatically increases the convergence speed when a regional supply and demand imbalance is detected.

[0033] The collaborative working mechanism of the data sensing module, transmission optimization module, and cleaning and reconstruction module constitutes a quality assurance chain. The data sensing module dynamically adjusts the sampling frequency based on the supply-demand imbalance risk index, reducing network transmission load while ensuring data timeliness. The transmission optimization module optimizes data transmission paths through link quality scoring, improving the data reception integrity rate of the cleaning and reconstruction module. The cleaning and reconstruction module uses link quality scoring to correct data reliability weights, making the prediction model more focused on high-reliability data sources. This cross-module collaboration mode demonstrates its advantages when expanding gas station networks or upgrading equipment; when new gas stations are added to the system, each module automatically adjusts its parameters to maintain overall performance stability.

[0034] The data flow between modules forms a multi-level closed-loop optimization system. The performance indicators of the protocol adaptive module provide basic communication parameters for policy generation, the real-time data from the data perception module supports the updating of the prediction model, and the link quality indicators of the transmission optimization module assist in the assessment of data reliability. The risk index of the prediction simulation module is fed back to the acquisition end to form a primary closed loop, and the execution deviation of the policy generation module is fed back to the model end to form a secondary closed loop. This dual-loop control structure enables the system to maintain a dynamic balance between regional energy supply and demand even when dealing with abnormal conditions such as gas station equipment failures and road transport disruptions.

[0035] Secondly, the regional supply and demand balance analysis method supporting dual energy control provided by this invention is applied to the aforementioned regional supply and demand balance analysis device supporting dual energy control, comprising: Step 1, collecting raw data from gas station equipment, dynamically selecting and converting communication protocols based on a built-in library of multiple communication protocols, outputting a data stream in a unified format, and generating a protocol performance index log; Step 2, receiving the unified format data stream, performing real-time denoising and state estimation on fuel flow and inventory data, receiving a supply and demand imbalance risk index, adjusting the collection frequency according to the supply and demand imbalance risk index, and outputting preprocessed time-series data; Step 3, receiving the preprocessed time-series data, encapsulating it into a data packet, selecting a communication path through a multi-link transmission path, and attaching a checksum. Step 4: Receive the optimized data packets, parse the data packets to perform anomaly detection and missing value repair, calculate data credibility weights, and output weighted reconstructed time series data; Step 5: Receive the weighted reconstructed time series data, output regional fuel demand forecasts through a prediction model, simulate supply and demand dynamics using a digital twin environment, generate a supply and demand imbalance risk index and a strategy evaluation report, and send the supply and demand imbalance risk index to adjust the collection frequency; Step 6: Receive the strategy evaluation report and the protocol performance indicator logs, generate an energy allocation strategy through an optimization algorithm, collect the actual execution data of the energy allocation strategy, and send the actual execution deviation data for model feedback.

[0036] The implementation of the regional supply and demand balance analysis device supporting dual energy control achieves intelligent management of the gas station network through a modular architecture. The protocol adaptation module directly connects to the data acquisition interface of the fuel dispenser, establishing parallel listening ports for multiple protocols such as Bluesky and Tatsuno used by different manufacturers. During implementation, the module periodically sends test data frames to each protocol port, generating timestamped protocol performance indicator logs by calculating response time differences and data packet integrity metrics. The Q-learning reinforcement learning algorithm uses network traffic fluctuations and device response characteristics as state inputs to dynamically adjust the protocol selection strategy. When a sudden increase in latency is detected in a protocol channel, the algorithm immediately drives the communication interface to switch to a backup protocol and converts the original data stream into standard JSON format. This dynamic protocol adaptation mechanism effectively solves the compatibility problem of multi-brand equipment, ensuring data acquisition stability even during gas station equipment upgrades and expansions.

[0037] The implementation of the data sensing module focuses on real-time data processing and adaptive acquisition frequency. After receiving the JSON data stream output by the protocol adaptation module, the module first parses the pulse signal from the fuel flow meter and the analog data from the level gauge to establish a bivariate state-space model. The Kalman filter's prediction stage estimates the flow trend based on the fluid continuity equation, while the update stage uses real-time sampled values ​​to correct estimation errors. During peak refueling hours in the morning and evening, when the supply-demand imbalance risk index fed back by the prediction simulation module exceeds a threshold, the acquisition frequency control unit compresses the sampling interval from the usual 5 minutes to 30 seconds. The frequency parameter is written to the comparison register of the hardware timer, directly controlling the trigger frequency of the sensor signal acquisition circuit. This hardware-level control method avoids the delay caused by software-level scheduling.

[0038] The transmission optimization module introduces a multi-path decision-making mechanism in the data encapsulation stage. The module adds a millisecond-level timestamp and gas station geocode to each data point to form a transmission data packet. The link quality assessment unit obtains network latency, jitter, and bandwidth parameters by sending UDP probe packets to 4G, 5G, and Wi-Fi gateways. The fuzzy logic system maps the measured values ​​of these three dimensions to a quality score within the range of 0-1. When a link quality score is detected to be consistently below 0.3, the path decision-maker immediately activates a backup transmission channel. Data packets are end-to-end encrypted using the TLS 1.3 protocol, and the HMAC-SHA256 checksum is transmitted separately from the data packets. This design ensures data integrity and security even when the gas station network signal fluctuates.

[0039] The cleaning and reconstruction module implements a data quality enhancement process on the cloud platform side. After parsing the data packets sent by the transmission optimization module, the module first reconstructs the sampled data matrix according to the time series. The Isolation Forest algorithm identifies anomalies such as abnormal surges in flow data or abnormal jumps in liquid level data by constructing a randomly partitioned set of binary trees. For the marked abnormal data, the autoregressive imputation model uses the correlation of data before and after the time window to repair it. When calculating the data reliability weights, the module comprehensively considers the link quality score provided by the transmission optimization module and the coefficient of variation of the data points themselves to generate a weight matrix with discriminative power. This weighting mechanism allows the prediction model to pay more attention to high-reliability data; for example, low-quality data generated during gas station equipment maintenance will automatically have its weight reduced.

[0040] The predictive simulation module employs deep learning to forecast demand. The module standardizes the weighted, reconstructed time-series data to eliminate differences in data dimensions among different gas stations. The encoder layer of a bidirectional LSTM network extracts long-term dependency features from historical data, while an attention mechanism dynamically weights the contributions at different time steps. The decoder layer outputs a regional fuel demand forecast curve for the next 24 hours. A digital twin environment is loaded with gas station geographic distribution, tank capacity, and road network parameters to construct a supply-demand simulation model. When the simulation indicates an impending supply shortage in a certain area's gas station cluster, the system generates a strategy evaluation report including a warning level and recommended scheduling schemes. The risk calculator dynamically adjusts the supply-demand imbalance risk index by comparing the deviation between predicted and actual values; this index value is directly fed back to the data acquisition frequency controller of the data sensing module.

[0041] The strategy generation module implements multi-objective optimization decision-making. The module analyzes key indicators such as inventory warning duration and regional coverage from the strategy evaluation report, while integrating historical communication quality data uploaded by the protocol adaptation module. A multi-objective particle swarm optimization algorithm searches for the optimal combination of delivery parameters in the solution space, with the objective functions of minimizing transportation costs and maximizing supply stability. The obtained optimal solution is encoded into instruction messages conforming to the communication protocol of the gas station PLC control system and sent to each gas station via the industrial IoT gateway. The execution monitoring unit collects GPS trajectory data of tanker trucks and actual inventory changes at gas stations to calculate the strategy execution deviation. This deviation data serves as an important basis for model correction and is fed back to the prediction and simulation module.

[0042] The strategy generation module also includes an online optimization mechanism. When execution deviation data continuously indicates systematic errors in the prediction model, the digital twin environment automatically initiates a parameter calibration procedure. The preprocessed time-series data provided by the data perception module reflects the dynamic changes in actual supply and demand; this data is used to adjust the inertia weight coefficients of the particle swarm optimization algorithm online. This adaptive mechanism enables the system to quickly adjust the convergence direction of the optimization strategy when dealing with special conditions such as peak traffic during holidays. The collaborative operation between modules forms a dual-closed-loop control structure. The primary closed loop adjusts the data acquisition frequency through a risk index, while the secondary closed loop corrects the prediction model parameters through execution deviation. This design allows the system to maintain a dynamic balance between regional energy supply and demand even in abnormal situations such as gas station equipment failures or road transport disruptions.

[0043] In the configuration of the protocol adaptation module, to further clarify the implementation details of the Q-learning reinforcement learning algorithm, the specific definition of the reward function is supplemented: The reward function R is calculated as R = -α×delay - β×loss_rate, where delay is the response latency, loss_rate is the data packet loss rate, and α and β are preset weight coefficients, usually set to α=0.6 and β=0.4, and dynamically adjusted according to network load; the state space includes the current protocol type, network traffic level, and device response history, the action space is the protocol switching operation, and the Q-value table is updated iteratively to find the optimal strategy to ensure the adaptability of protocol selection.

[0044] For the application of Kalman filters in the data sensing module, the specific parameters of the state-space model are supplemented: the state variables are defined as fuel flow rate x1 and inventory x2, the observation variables are the real-time sampled values ​​y1 and y2 of the sensor, and the state equation is based on the continuity equation of fuel flow, such as x1(k)=A×x1(k-1)+B×u(k)+w(k), where A and B are state transition matrices, u(k) is the control input, and w(k) is the process noise; the observation equation is y(k)=C×x(k)+v(k), where C is the observation matrix and v(k) is the observation noise. The state estimate is corrected in real time by Kalman gain to improve the denoising effect.

[0045] In the fuzzy logic system design of the transmission optimization module, the calculation rules for the link quality score are supplemented: the input variables include link delay d, jitter j, and bandwidth b, which are defined as fuzzy sets (low, medium, and high), respectively, and the output variable is the quality score q, ranging from 0 to 1; the fuzzy rule base contains rules such as "if d is low, j is low, and b is high, then q is high", and the centroid method is used for defuzzification. The final score is used for the weighted shortest path algorithm to optimize the selection of data transmission paths.

[0046] For anomaly detection in the cleaning and reconstruction module, the parameter settings of the isolated forest algorithm are supplemented: the isolated forest is composed of multiple random trees, each tree is generated by randomly selecting features and partition values, the anomaly score is calculated as the average path length of isolated data points, the threshold is set to 0.6, and points exceeding the threshold are marked as anomalies; the autoregressive imputation model adopts the AR(2) model, which uses the data from the first two time steps for imputation, the formula is x_t=φ1×x{t-1}+φ2×x{t-2}+εt, where φ1 and φ2 are model parameters, and εt is white noise to ensure the accuracy of missing value repair.

[0047] In the bidirectional LSTM network of the predictive simulation module, the network structure details are supplemented: the input layer receives standardized sequence data, the hidden layer contains 64 LSTM units, the bidirectional structure handles forward and backward time dependencies respectively, the attention mechanism calculates the weights of each time step, and the output layer generates demand prediction values ​​through a fully connected network; during the digital twin environment simulation, the geographical coordinates of the gas station, the tank capacity and the road network topology are loaded, the supply and demand situation simulation is based on the fluid dynamics model, and the inventory consumption curve and pressure index are generated.

[0048] In the multi-objective particle swarm optimization algorithm of the strategy generation module, the objective function and parameter settings are supplemented: the objective function is to minimize the transportation cost f1 and maximize the supply stability f2, where f1 is calculated based on the delivery distance and f2 is based on the inventory coverage; the particle swarm size is set to 50, the inertia weight decreases linearly from 0.9 to 0.4, the learning factors c1 and c2 are both 2.0, the number of iterations is 100, the optimal energy allocation parameters are solved, and the results are encoded into MODBUS command messages for execution.

[0049] To enhance the description of inter-module collaboration, a specific example of bidirectional data flow is provided: When the supply-demand imbalance risk index generated by the prediction simulation module exceeds 0.7, the data perception module automatically adjusts the collection frequency to once per second, the transmission optimization module prioritizes the 5G link, and the cleaning and reconstruction module correspondingly increases the proportion of high-weight data to form a closed-loop control; after the actual execution data is fed back to the prediction simulation module, the digital twin environment updates the model parameters online, such as adjusting the learning rate of the LSTM network to reduce execution bias.

[0050] In the protocol adaptation module, the Q-learning reinforcement learning algorithm periodically sends test data frames to the gas station equipment port to monitor the response latency and packet loss rate of each communication protocol, generating protocol performance indicator logs containing timestamps and protocol types. The algorithm constructs a state space based on the log data, with state variables including the current protocol type, network traffic level, and device response history. The action space consists of protocol switching operations. The algorithm searches for the optimal strategy by iteratively updating the Q-value table. The reward function comprehensively considers latency and packet loss rate indicators. When a performance degradation is detected, the optimal communication protocol is dynamically selected. The selected protocol drives the underlying communication interface to transform the raw data, converting heterogeneous data streams into a unified JSON format data stream, while simultaneously uploading the protocol performance indicator logs to the policy generation module. The data sensing module receives a data stream in a unified format as real-time sampled values, establishes a state-space model of fuel flow and inventory, with state variables including fuel flow and inventory quantity, and observed variables being the real-time sampled values ​​from the sensors. The Kalman filter estimates values ​​based on the equipment's physical model through a prediction step, and corrects the state estimates using real-time sampled values ​​in an update step, outputting a smoothed state estimate. The module receives a supply-demand imbalance risk index sent by the prediction simulation module, uses a linear mapping algorithm to normalize the index into a sampling frequency parameter, and writes the parameter into a hardware timer to control the trigger interval of the sensor sampling circuit, thereby achieving adaptive adjustment of the sampling frequency.

[0051] The transmission optimization module receives the smoothed state estimate output by the data perception module, adds millisecond-level timestamps and site geocoding to the data, and encapsulates it into a standard data packet. The fuzzy logic system measures the latency, jitter, and bandwidth of the communication link by sending UDP probe packets. The input variables are defined as fuzzy sets such as low, medium, and high, and a rule base such as "if the latency is low, the jitter is low, and the bandwidth is high, then the quality score is high" is used to output a link quality score. The weighted shortest path algorithm uses the reciprocal of the link quality score as the edge weight, abstracts the network topology into a weighted connected graph, and uses Dijkstra's algorithm to calculate the optimal transmission path. The data packet generates an HMAC-SHA256 checksum based on the TLS1.3 protocol and attaches it. The checksum is transmitted synchronously with the data packet, and the link quality score is sent to the cleaning and reconstruction module for subsequent calculations. The cleaning and reconstruction module parses the data packets sent by the transmission optimization module, extracts time series data to construct a sample matrix; the isolated forest algorithm constructs a set of binary trees by randomly dividing the feature space, calculates the anomaly score of each data point as the average path length of the isolated points, and marks the anomalies that exceed the threshold; the autoregressive model uses the local correlation of the time series and uses the AR(2) model to interpolate and repair the anomalies, and the interpolation process comprehensively considers the spatiotemporal characteristics of the data points; the module calculates the credibility weight of each data point based on the link quality score and data point variation coefficient provided by the transmission optimization module, and outputs time series data with attached weight matrix.

[0052] The prediction simulation module standardizes the weighted reconstructed time series data output by the cleaning and reconstruction module to eliminate the influence of dimensions and obtain standardized sequence data. The bidirectional LSTM network extracts the long-term dependency features of the time series through the encoder layer, dynamically weights the contribution of different time steps through the attention mechanism, and outputs the regional fuel demand prediction value through the decoder layer. The digital twin environment loads the gas station network topology, tank capacity and road network parameters to build a supply and demand simulation model. The predicted value is used as input to simulate the oil flow process under different scheduling strategies and generate a strategy evaluation report including inventory consumption curves and supply pressure indicators. The risk calculator compares the deviation between the simulation results and the real-time prediction values, generates a supply and demand imbalance risk index, and feeds it back to the data perception module. The strategy generation module receives the strategy evaluation report generated by the prediction simulation module and the protocol performance index log uploaded by the protocol adaptation module. The multi-objective particle swarm optimization algorithm searches for the optimal energy allocation parameters in the solution space with the objective functions of minimizing transportation costs and maximizing supply stability. The algorithm uses a particle swarm size of 50, the inertia weight decreases linearly from 0.9 to 0.4, the learning factor is set to 2.0, and the algorithm is solved in 100 iterations. The optimal parameters are encoded into instruction messages that conform to the PLC control system protocol of the gas station and are sent out for execution through the industrial IoT gateway. The module collects actual execution data such as the GPS trajectory of the tanker truck and changes in gas station inventory, calculates the execution deviation data, and feeds it back to the prediction simulation module for online correction and optimization iteration of model parameters.

[0053] Embodiment 1 of this invention: The regional supply and demand balance analysis device of this invention is deployed in a provincial gas station network management system. A protocol adaptive module simultaneously monitors the communication status of equipment at 12 gas stations, which use Bluesky, Tatsuno, and Japan communication protocols respectively. The module sends test data frames to each device port every 5 minutes. When the response latency of a Tatsuno protocol port suddenly increases from an average of 50 milliseconds to 200 milliseconds, the Q-learning algorithm immediately switches the communication link to the backup Bluesky protocol channel. During the switching process, the protocol converter converts the heterogeneous data streams into a unified JSON format in real time to avoid data acquisition interruptions. After receiving the data stream, the data perception module performs noise reduction processing on the fuel flow data using a Kalman filter. When the supply and demand imbalance risk index fed back by the prediction simulation module reaches 0.8 (threshold set at 0.7), the acquisition frequency automatically increases from once every 5 minutes to once per second, intensively collecting dynamic data during peak refueling periods.

[0054] The transmission optimization module adds timestamps and site codes to data packets and selects the optimal channel through multi-link transmission paths. During a transmission, the latency of the 4G link suddenly increased, and the fuzzy logic system lowered its quality score from 0.9 to 0.2. The path decision-maker immediately switched the data stream to the 5G link. After receiving the data packets, the cleaning and reconstruction module detected an abnormal surge in traffic data at a gas station (more than three times the historical average) using the isolated forest algorithm. This was marked as an anomaly and then imputed using an autoregressive model. The repaired data, combined with the transmission link quality score, generates a confidence weight matrix, where the proportion of high-weight data increases to 85%.

[0055] The prediction simulation module inputs the weighted reconstructed data into a bidirectional LSTM network and outputs a regional demand forecast curve for the next 6 hours. A digital twin environment simulation shows that a cluster of gas stations in a certain area will experience an inventory shortage during the evening rush hour. The system immediately generates a strategy evaluation report with an orange alert level. Based on the report data, the strategy generation module calculates the optimal delivery plan using a multi-objective particle swarm optimization algorithm: dispatching three tanker trucks from adjacent areas to the shortage area and increasing the delivery frequency to once per hour. Post-implementation monitoring data shows that the regional supply-demand imbalance has decreased, validating the effectiveness of the strategy.

[0056] Embodiment 2 of this invention addresses the challenges of heterogeneous protocols across provincial and municipal gas station networks in collaborative management scenarios. These challenges include multi-regional protocol heterogeneity and network instability. The protocol adaptation module detects frequent communication protocol switching at inter-provincial border stations and uses reinforcement learning algorithms to establish protocol performance profiles, employing the Tatsuno protocol for high-stability transmission and the Bluesky protocol as a backup channel. When communication is interrupted at a station due to network upgrades, the module completes protocol switching within 2 seconds, ensuring continuous data acquisition. The data perception module dynamically adjusts the acquisition strategy based on the regional supply-demand imbalance risk index: using a high-frequency acquisition mode at transportation hub stations and a base frequency at suburban stations, balancing data accuracy and transmission load.

[0057] The transmission optimization module constructs a multi-level path selection system to address cross-regional data transmission needs. When the backbone network becomes congested, the system automatically activates edge computing nodes for data storage and forwarding, controlling end-to-end latency to the millisecond level. The cleaning and reconstruction module, when processing multi-source data, identifies systemic anomalies (such as data loss due to regional power outages) through spatiotemporal feature correlation analysis and uses multi-dimensional interpolation techniques to repair data gaps. The prediction and simulation module introduces a transfer learning mechanism to migrate model parameters from existing regions to newly accessed sites, rapidly improving prediction accuracy.

[0058] The strategy generation module activates an emergency optimization mode in response to sudden weather events. When typhoons cause coastal stations to close, the digital twin environment simulates multiple evacuation plans, ultimately generating an optimized strategy that diverts traffic through inland stations and adjusts delivery routes. During execution, the system monitors tanker truck trajectories and inventory changes in real time. When a delivery node delay exceeds a threshold, a dynamic replanning mechanism is immediately triggered. This event response enhances the stability of regional energy supply, demonstrating the system's strong robustness.

Claims

1. A regional supply and demand balance analysis device supporting dual energy control, characterized in that, Includes: a protocol adaptive module that collects raw data from gas station equipment, has multiple built-in communication protocol libraries, dynamically selects and converts communication protocols, outputs a data stream in a unified format, and generates protocol performance indicator logs that are uploaded to the strategy generation module; The data sensing module receives the unified format data stream output by the protocol adaptation module, performs real-time noise reduction and state estimation on fuel flow and inventory data, receives the supply and demand imbalance risk index sent by the prediction and simulation module, adjusts the acquisition frequency according to the supply and demand imbalance risk index, and outputs preprocessed time series data. The transmission optimization module receives the preprocessed time-series data output by the data perception module, encapsulates it into a data packet, selects a communication path through a multi-link transmission path, attaches a checksum, and outputs the transmission-optimized data packet. The cleaning and reconstruction module receives the transmission-optimized data packet output by the transmission optimization module, parses the data packet, performs anomaly detection and missing value repair, calculates data credibility weights, and outputs weighted reconstructed time-series data. The prediction and simulation module receives the weighted reconstructed time-series data output by the cleaning and reconstruction module, outputs a regional fuel demand forecast value through a prediction model, simulates the supply and demand situation using a digital twin environment, generates a supply and demand imbalance risk index and a strategy evaluation report, and sends the supply and demand imbalance risk index to the data perception module. The strategy generation module receives the strategy evaluation report generated by the prediction simulation module and the protocol performance index log uploaded by the protocol adaptation module, generates an energy allocation strategy through an optimization algorithm, collects the actual execution data of the energy allocation strategy, and sends the actual execution deviation data to the prediction simulation module.

2. The regional supply and demand balance analysis device supporting dual energy control according to claim 1, characterized in that, The protocol adaptive module is configured to: periodically send test data frames to the gas station equipment port, monitor response latency and data packet loss rate, and generate protocol performance indicator logs; based on the protocol performance indicator logs, calculate the reward function value through the Q-learning reinforcement learning algorithm, and dynamically select the communication protocol; according to the selected communication protocol, drive the underlying communication interface to convert the raw data and output a data stream in a unified format. The protocol performance metric logs are uploaded to the policy generation module.

3. The regional supply and demand balance analysis device supporting dual energy control according to claim 2, characterized in that, The data sensing module is configured to: receive a unified format data stream output by the protocol adaptive module as a real-time sampled value; establish a state-space model of fuel flow and inventory, process the real-time sampled value through a Kalman filter, and output a smoothed state estimate; receive a supply-demand imbalance risk index generated by the prediction simulation module, normalize the index and map it to a sampling frequency parameter; and write the sampling frequency parameter into a hardware timer to control the trigger interval of the sensor sampling circuit.

4. The regional supply and demand balance analysis device supporting dual energy control according to claim 3, characterized in that, The transmission optimization module is configured to: receive the smoothed state estimate output by the data perception module; add a timestamp and source identifier to the smoothed state estimate and encapsulate it into a data packet; measure the latency, jitter, and bandwidth of the communication link using UDP probe packets and output a link quality score using a fuzzy logic system; calculate the transmission path using a weighted shortest path algorithm with the reciprocal of the link quality score as the edge weight; generate an HMAC-SHA256 checksum based on the TLS 1.3 protocol and append it to the data packet; and synchronously send the link quality score to the cleaning and reconstruction module for calculating data credibility weights.

5. The regional supply and demand balance analysis device supporting dual energy control according to claim 4, characterized in that, The cleaning and reconstruction module is configured to: receive data packets output by the transmission optimization module; parse the data packets and extract time series data; calculate the anomaly score of each data point in the time series data using the isolated forest algorithm and mark the anomalies; use an autoregressive model to interpolate and repair the anomalies; and calculate the data credibility weight of the time series data based on the link quality score output by the transmission optimization module, and output the weighted reconstructed time series data.

6. The regional supply and demand balance analysis device supporting dual energy control according to claim 5, characterized in that, The prediction simulation module is configured to: receive weighted reconstructed time series data output by the cleaning and reconstruction module; standardize the weighted reconstructed time series data to obtain standardized sequence data; process the standardized sequence data through a bidirectional LSTM network to output a regional fuel demand forecast; based on the regional fuel demand forecast, simulate the supply and demand situation under different scheduling strategies in a digital twin environment to generate a strategy evaluation report including the simulated supply and demand situation; compare the simulated supply and demand situation in the strategy evaluation report with the regional fuel demand forecast to calculate a supply and demand imbalance risk index; and send the supply and demand imbalance risk index to the data sensing module.

7. The regional supply and demand balance analysis device supporting dual energy control according to claim 6, characterized in that, The strategy generation module is configured to: receive the strategy evaluation report generated by the prediction simulation module; receive the protocol performance index log uploaded by the protocol adaptation module; and solve the energy allocation parameters using a multi-objective particle swarm optimization algorithm based on the strategy evaluation report and the protocol performance index log. The energy allocation parameters are encoded into a command message; Collect actual execution data of the energy allocation strategy, and calculate execution deviation data based on the actual execution data and the energy allocation parameters.

8. The regional supply and demand balance analysis device supporting dual energy control according to claim 7, characterized in that, The strategy generation module is further configured to: send the execution deviation data to the prediction simulation module; receive the preprocessed time series data output by the data perception module; and correct the weight coefficients in the multi-objective particle swarm optimization algorithm based on the preprocessed time series data.

9. The regional supply and demand balance analysis device supporting dual energy control according to claim 1, characterized in that, Also includes: The data sensing module is configured to receive the supply-demand imbalance risk index sent by the prediction simulation module, and adjust the collection frequency according to the supply-demand imbalance risk index. The transmission optimization module is configured to send the link quality score to the cleaning and reconstruction module; The cleaning and reconstruction module is configured to calculate the data credibility weight based on the link quality score sent by the transmission optimization module.

10. A regional supply and demand balance analysis method supporting dual energy control, applied to the regional supply and demand balance analysis device supporting dual energy control as described in any one of claims 1 to 9, characterized in that, include: Step 1: Collect raw data from gas station equipment, dynamically select and convert communication protocols based on a built-in library of multiple communication protocols, output a unified format data stream, and generate protocol performance indicator logs; Step 2: Receive the unified format data stream, perform real-time denoising and state estimation on fuel flow and inventory data, receive the supply-demand imbalance risk index, adjust the collection frequency based on the supply-demand imbalance risk index, and output preprocessed time-series data; Step 3: Receive the preprocessed time-series data, encapsulate it into data packets, select a communication path through a multi-link transmission path, attach a checksum, and output transmission-optimized data packets; Step 4: Receive the transmission-optimized data packets, parse the data packets to perform anomaly detection and missing value repair, calculate data credibility weights, and output weighted reconstructed time-series data; Step 5: Receive the weighted reconstructed time-series data, output regional fuel demand forecasts through a prediction model, simulate the supply-demand situation using a digital twin environment, generate a supply-demand imbalance risk index and a strategy evaluation report, and send the supply-demand imbalance risk index to adjust the collection frequency; Step 6: Receive the strategy evaluation report and the protocol performance indicator log, generate an energy allocation strategy through an optimization algorithm, collect the actual execution data of the energy allocation strategy, and send the actual execution deviation data for model feedback.