Live scene dynamic optimization method and system
By collecting and transforming urban governance events, network traffic, and power grid data, and combining event impact quantification models and LSTM networks to predict resource demand and power grid security margins, a reinforcement learning adjustment strategy is adopted to solve the instability problems of networks and power systems in existing technologies. This achieves efficient resource scheduling and power grid management, ensuring the quality of live streaming services and the safety of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ZHONGYUAN XINGCHEN TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-09
AI Technical Summary
Existing live streaming solutions have failed to effectively cope with sudden surges in traffic caused by city-level real-time events, resulting in network performance degradation and power system instability, and lack of comprehensive management of cloud resources, network congestion and power grid security.
By collecting real-time data on urban governance events, network traffic, and power grid operation, and transforming it into unified spatiotemporal features, the system uses a fusion event impact quantification model and LSTM network to predict resource demand, network congestion probability, and power grid safety margin. Furthermore, it employs reinforcement learning methods to dynamically adjust resource scheduling, power grid power, and network congestion thresholds, thereby forming an optimization strategy.
It effectively ensured the quality of live streaming services and the security of the power system, guaranteed network stability and efficient use of resources, and improved the ability to respond to emergencies.
Smart Images

Figure CN122179596A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computers, and more specifically to a method and system for dynamic optimization of live streaming scenarios. Background Technology
[0002] Current live streaming solutions typically treat "cloud resource scheduling," "network congestion control," and "grid power security" as independent issues, lacking a comprehensive consideration of the interrelationships between these areas. This siloed approach leads to several major problems:
[0003] In existing cloud computing environments, resource allocation is primarily based on server GPU / CPU utilization, ignoring the potential for sudden surges in traffic caused by real-time events in cities (such as rainstorms, concerts, or traffic accidents). This makes it difficult for cloud services to flexibly respond to sudden high demands, thus impacting service quality. Traditional network congestion control strategies rely on single-point round-trip time and packet loss rate to mark explicit congestion notifications. This approach cannot predict situations where base stations or edge data centers are simultaneously overloaded due to city-wide user aggregation. Therefore, network performance may significantly degrade under large-scale concurrent access, causing issues such as live streaming stuttering. Power system design only considers traditional cross-sectional power flow security, failing to fully recognize the importance of live streaming services as a callable, flexible load. Especially in urban hotspots, the three-tiered resonance effect of "electricity-computing-network" can lead to severe avalanche phenomena, meaning that if one link fails, the other two links will also malfunction.
[0004] Therefore, it is necessary to design a new method that comprehensively considers urban governance events, live streaming business KPI data, power grid section operation status, and multi-cloud pool resource indicators to more effectively predict and respond to various changes, ensure the quality of live streaming services, and at the same time guarantee network stability and power system security. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for dynamic optimization of live streaming scenarios.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a dynamic optimization method for live streaming scenarios, comprising:
[0007] Real-time collection of urban governance events, network traffic, and power grid operation data, which are then transformed into unified spatiotemporal characteristics;
[0008] Based on the unified spatiotemporal characteristics, the event impact quantification model and the LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve are integrated to obtain the prediction results.
[0009] The prediction results are integrated using reinforcement learning methods to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy.
[0010] The optimized strategy is synchronously distributed to cloud resources, power grid and network controllers, and the results of the execution are collected and fed back to the fusion event impact quantification model and LSTM network, as well as the dynamic adjustment process.
[0011] Its further technical solution is as follows: the real-time collection of urban governance events, network traffic, and power grid operation data is transformed into unified spatiotemporal characteristics, including:
[0012] By deploying a lightweight data acquisition agent, messages corresponding to urban governance events, network traffic, and power grid operation data are obtained from multiple data sources and pushed to a Kafka queue using MQTT / HTTPS or UDP+PTP timestamp methods.
[0013] Add a production timestamp, geographic location, grid coordinates, and data source ID to each message, and use NLP technology to supplement missing geographic or temporal information;
[0014] Filter outliers of continuous variables, replace transient spikes with Hampel filtering, remove duplicate event records using Poisson burst test, and fill null values with spatiotemporal interpolation.
[0015] Data at different frequencies is resampled onto a time axis with a set period, and the confidence weights are recorded simultaneously.
[0016] After converting all data points to the WGS-84 coordinate system, they are mapped to the GeoHash-7 grid. Data within the same grid are aggregated or averaged, while edge regions are smoothed using bilinear interpolation. The continuous variables after grid aggregation are normalized using a standard Scaler to obtain normalized continuous variables.
[0017] Heterogeneous graphs are constructed based on grid IDs and event-resource growth correlation coefficients, and the GraphSAGE algorithm is run periodically to generate 64-dimensional city event-resource graph node embedding vectors.
[0018] The embedded vector, normalized continuous variables, and confidence weights are integrated into a unified spatiotemporal feature, with an absolute second stamp and grid hash.
[0019] Its further technical solution is as follows: Based on the unified spatiotemporal characteristics, the event impact quantification model and LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve are fused to obtain the prediction results, including:
[0020] The unified spatiotemporal features are cut into matrices using a sliding window and missing values are filled in with data from the previous period to obtain a time series.
[0021] The time series is processed by a 1×1 convolutional and three-layer dilated convolutional network to capture typical event periodic components and generate the first time series feature.
[0022] The first temporal feature is concatenated with the embedding vector of the city event-resource graph node, and the neighbor features are aggregated using a graph attention mechanism to generate a vector containing spatial-event coupling information.
[0023] The vector of space-event coupled information is processed using a one-way GRU, and the predicted resource demand curve and grid section safety margin sequence are output through a fully connected layer.
[0024] Two-layer LSTM analysis is applied to the same time series to analyze base station-level RTT, PRB utilization and uplink ECN marking, generating a congestion probability sequence;
[0025] The resource demand curve, the power grid section safety margin sequence, and the congestion probability sequence are weighted and smoothed exponentially based on confidence levels to obtain the prediction results.
[0026] The further technical solution is as follows: the unified spatiotemporal features are cut into a matrix using a sliding window and the missing values are filled in with data from the previous period to obtain a time series, including:
[0027] The unified spatiotemporal features are cut into matrices of length 60 by a 60-second sliding window; if a missing frame appears in the window, zeros are padded and interpolated using data from the same grid in the previous period to obtain the time series.
[0028] The further technical solution is as follows: the structure of the event influence quantification model includes an input layer, a TCN layer, a GAT layer, a GRU layer, an LSTM layer, and an output layer;
[0029] The TCN layer outputs the first temporal feature;
[0030] The GAT layer uses the 64-dimensional node embedding vector of claim 2 as a static base map and the first temporal feature as a dynamic query to generate a vector of 64-dimensional space-event coupled information.
[0031] The GRU layer processes the coupling vector to obtain the resource demand curve and the power grid margin sequence.
[0032] The LSTM layer processes the time series in parallel to obtain the congestion probability sequence.
[0033] The further technical solution is as follows: The method of integrating the prediction results using reinforcement learning to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy includes:
[0034] The prediction results, the city event-resource graph node embedding vector, and the current operational margins in each domain are integrated into a state vector, which is then normalized and input into the Actor-Critic network for processing.
[0035] The Actor-Critic network generates continuous action parameters, which are then pruned and quantized into discrete actions, corresponding to specific operation instructions in the cloud, network, and power domains. These instructions are then rapidly distributed to each execution point through the gRPC concurrency mechanism to obtain an optimized strategy.
[0036] The structure of the Actor-Critic network includes a shared encoder, an Actor head, a Critic head, and a discrete mapping layer.
[0037] The further technical solution is as follows: the process of synchronously distributing the optimized strategy to cloud resources, power grid, and network controllers, collecting and executing the results, feeding them back to the fusion event impact quantification model and LSTM network, and dynamically adjusting the system includes:
[0038] Within each 30-second cycle, actual operating data is collected, and the difference between the actual data and the predicted value is calculated to obtain the performance deviation. At the same time, the time difference advantage is also calculated.
[0039] When a performance deviation is detected to exceed a set threshold, online backpropagation is triggered to update the model; the SHAP method is used to identify key event nodes and improve their learning rate, thereby enhancing the model's sensitivity and adaptability to such events;
[0040] When the power system approaches its safety limits, measures are taken to alleviate grid stress, including migrating GPU tasks, adjusting ECN thresholds, and implementing FACTS phase angle strategies.
[0041] For specific high-load scenarios, additional resources are automatically activated to meet the demand, enabling a rapid switch from single-card virtualization to multi-card sharing mode;
[0042] A rolling optimization loop is set up every 60 seconds; an experience replay pool is used to store long-term samples to maintain a balance between the latest and historical data.
[0043] Regularly collect statistics on service quality and economic efficiency indicators, such as reduced live streaming buffering, increased GPU utilization, and reduced carbon emissions.
[0044] This invention also provides a dynamic optimization system for live streaming scenarios, including:
[0045] The data acquisition unit is used to collect urban governance events, network traffic, and power grid operation data in real time and convert them into unified spatiotemporal characteristics.
[0046] The prediction unit is used to obtain prediction results by fusing the event impact quantification model and the LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve based on the unified spatiotemporal characteristics.
[0047] An optimization unit is used to integrate the prediction results using reinforcement learning methods to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy.
[0048] The distribution unit is used to synchronously distribute the optimized strategy to cloud resources, power grid and network controllers, collect the execution results and feed them back to the fusion event impact quantification model and LSTM network and the dynamic adjustment process.
[0049] The present invention also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0050] The present invention also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0051] The advantages of this invention compared to existing technologies are as follows: This invention collects and transforms urban governance events, network traffic, and power grid operation data into unified spatiotemporal features in real time. It utilizes a fusion event impact quantification model and LSTM network to predict resource demand, network congestion probability, and power grid safety margin. Reinforcement learning methods are then used to integrate these prediction results to dynamically adjust resource scheduling, power grid power, and network congestion thresholds, forming an optimization strategy. This strategy is then synchronized to cloud resources, the power grid, and network controllers for execution, while execution feedback is collected for model iteration and strategy optimization. This comprehensive approach, considering urban governance events, live streaming service KPI data, power grid section operation status, and multi-cloud pool resource indicators, achieves more effective prediction and response to various changes, ensuring the quality of live streaming services, network stability, and power system security.
[0052] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A flowchart illustrating the live streaming scenario dynamic optimization method provided in this embodiment of the invention;
[0055] Figure 2 A schematic block diagram of a live streaming scene dynamic optimization system provided in an embodiment of the present invention;
[0056] Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0058] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0059] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0060] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0061] Please see Figure 1 , Figure 1This is a schematic flowchart illustrating the dynamic optimization method for live streaming scenarios provided in this embodiment of the invention. This method is applied to a server. The server interacts with the terminal, comprehensively considering urban governance events, network traffic, and power grid operation data. Through unified spatiotemporal feature processing, it combines an event influence quantification model and an LSTM network to predict resource demand, network congestion probability, and power grid safety margin. Reinforcement learning is used to integrate the prediction results, dynamically adjusting resource scheduling, power grid power, and network congestion thresholds to obtain optimization strategies. These strategies are then synchronously distributed to cloud resources, the power grid, and the network controller. Furthermore, the execution results are fed back to the system for further optimization. This method utilizes lightweight acquisition agents, Kafka queues, NLP techniques, Hampel filtering, and Poisson tests to process raw data and generate unified spatiotemporal features. It then uses various deep learning techniques such as 1×1 convolution, dilated convolutional networks, graph attention mechanisms, GRU, and LSTM to extract features. Finally, an Actor-Critic network is used to generate and transform continuous action parameters. The entire process emphasizes real-time performance, accuracy, and rapid response to anomalies, aiming to ensure the quality of live streaming services, network stability, and power system security, while improving economic efficiency and service quality.
[0062] Figure 1 This is a flowchart illustrating the dynamic optimization method for live streaming scenarios provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S140.
[0063] S110 collects real-time data on urban governance events, network traffic, and power grid operation, transforming it into unified spatiotemporal characteristics.
[0064] In this embodiment, unified spatiotemporal features refer to a series of processes performed on data collected in real time from multiple data sources (such as urban governance events, network traffic, and power grid operation data) to ultimately transform it into a standardized representation that comprehensively reflects the characteristics of these data in both time and space dimensions. This feature representation is crucial for subsequent predictive models and decision-making.
[0065] Urban governance events, network traffic, and power grid operation data refer to data sets monitored by the urban management system, including data on emergencies (such as traffic accidents), internet service usage, and the operational status of the power system. These collectively constitute the fundamental data sources for assessing the operational status of a smart city. In conjunction with this application, these processed data can more accurately reflect the real-time state of the city, supporting more effective resource allocation and emergency management decisions.
[0066] Urban governance incident flows include rainstorms, concerts, traffic accidents, fires, construction projects, and large-scale events. These incidents originate from multiple sources and form the basis for emergency management and response in urban governance.
[0067] Network traffic includes live streaming service KPIs and wireless network side metrics. Among them, live streaming service KPIs (such as concurrent channels, bitrate, buffering rate, frame rate, and bullet screen density) are derived from CDN logs and player SDK, reflecting the usage of internet services and the quality of user experience.
[0068] Wireless network-side metrics (such as base station level RTT, packet loss rate, PRB utilization, and uplink ECN tag count) are derived from the OMC network management system and are used to evaluate the service quality and performance status of the wireless network.
[0069] Power grid operation data refers to the operational data of power grid sections, including key parameters such as line active / reactive power, node voltage, frequency, FACTS equipment power, and UPS status of charge. This data primarily originates from SCADA and PMU systems and is crucial for monitoring the stability and security of the power system.
[0070] In one embodiment, step S110 described above may include steps S111 to S117.
[0071] S111. By deploying a lightweight data acquisition agent, messages corresponding to urban governance events, network traffic, and power grid operation data are obtained from multiple data sources and pushed to the Kafka queue using MQTT / HTTPS or UDP+PTP timestamp methods.
[0072] First, a lightweight data collection agent is deployed to collect relevant data on urban governance events, network traffic, and power grid operation from different data sources using MQTT / HTTPS or UDP+PTP timestamps. This data is then pushed to a Kafka queue in the form of messages. This approach ensures the real-time nature and efficiency of the data while also supporting high-concurrency data processing capabilities.
[0073] S112. Add a production timestamp, geographic location, grid coordinates and data source ID to each message, and use NLP technology to supplement the missing geographic or time information.
[0074] Each message is appended with information such as production timestamp, geographic location, grid coordinates, and data source ID to provide richer context. Furthermore, Natural Language Processing (NLP) techniques are used to supplement potentially missing geographic or temporal information, enhancing the completeness and accuracy of the data.
[0075] S113. Filter outliers of continuous variables, replace transient spikes with Hampel filtering, remove duplicate event records with Poisson burst test, and fill null values with spatiotemporal interpolation method.
[0076] This step involves filtering outliers in continuous variables, replacing transient spikes with a Hampel filter, and removing duplicate event records using a Poisson burst test. Null values are filled using spatiotemporal interpolation methods to ensure the continuity and reliability of the data sequence.
[0077] S114. Resample data of different frequencies onto the time axis of a set period, and record the confidence weights at the same time.
[0078] S115. After converting all data points to the WGS-84 coordinate system, they are mapped to the GeoHash-7 grid. Data within the same grid are aggregated or averaged, while edge regions are smoothed using bilinear interpolation. The continuous variables after grid aggregation are normalized using the standard Scaler to obtain normalized continuous variables.
[0079] In this embodiment, normalized continuous variables refer to continuous measurements from different sources, such as network traffic and power grid operation data, that are standardized to ensure that these values can be compared and analyzed on a uniform scale.
[0080] After all data points are converted to the WGS-84 coordinate system, they are further mapped to a GeoHash-7 grid. Data within the same grid can be aggregated or averaged, while edge regions are smoothed using bilinear interpolation. Then, the continuous variables after grid aggregation are normalized using a standard scaler to obtain normalized continuous variables. This step aims to eliminate differences between data at different scales, allowing them to be compared on the same scale.
[0081] S116. Construct a heterogeneous graph based on grid ID and event-resource increase correlation coefficient, and periodically run the GraphSAGE algorithm to generate 64-dimensional city event-resource graph node embedding vectors.
[0082] In this embodiment, the 64-dimensional city event-resource graph node embedding vector refers to the feature representation generated by the GraphSAGE algorithm based on the relationship between city governance events and other resource indicators, in order to capture the essential characteristics of dynamic changes in the city.
[0083] A heterogeneous graph is constructed based on grid IDs and event-resource growth correlation coefficients, and the GraphSAGE algorithm is periodically run to generate 64-dimensional city event-resource graph node embedding vectors. This process helps capture the complex relationships between data, providing strong support for subsequent deep learning models.
[0084] S117. Integrate the embedded vector, normalized continuous variables, and confidence weights into a unified spatiotemporal feature, with an absolute second stamp and grid hash.
[0085] Finally, the generated 64-dimensional node embedding vectors, normalized continuous variables, and confidence weights are integrated into a unified spatiotemporal feature, along with an absolute timestamp and grid hash. This feature representation not only contains all the important information from the original data but also adds timestamp and location information, facilitating subsequent model training and practical applications.
[0086] In summary, unified spatiotemporal features transform data from different sources into a highly consistent and comparable format through a series of carefully designed data processing steps, providing a solid foundation for dynamic optimization in live streaming scenarios.
[0087] To ensure coverage of five key data categories (including but not limited to weather, traffic conditions, social media activity, CDN logs, and power grid monitoring data), multiple technical solutions were employed. CDN logs were collected directly from Kafka Connect; Prometheus metrics in the OpenStack / Kubernetes environment were pulled via Sidecar mode; the OMC network management system used an FTP+Notify mechanism for rapid data transfer; and the SCADA / PMU system adopted the IEC-61850 MMS protocol for direct connection. All this data was appended with a timestamp accurate to the second before entering the unified Kafka Topic to meet the time consistency requirements of subsequent processing.
[0088] This stage focuses on converting textual information in the event stream into geographic coordinates and further encoding them. For example, place names included in descriptions of "heavy rain," "concert," or "traffic accident" are identified and converted into latitude and longitude coordinates in the WGS-84 coordinate system using NLP technology, and then GeoHash-7 grid encoding is generated. For data with accurate geographic location information (such as power grid cross-section data), its WGS-84 coordinates are directly reused. Live CDN logs query the base station location based on the client IP address and then classify it into the corresponding GeoHash grid, completing the automated annotation process.
[0089] Continuous variables (such as GPU / FPGA memory utilization, base station round-trip time (RTT), node voltage, etc.) are first filtered using the 3σ principle combined with the Isolation Forest algorithm, while transient spikes are replaced using the Hampel filter. Discrete events (such as traffic accidents, fires, etc.) are deduplicated using the Poisson burst test. If some messages are found to be missing necessary coordinates or timestamp information, spatiotemporal Kriging interpolation is applied to estimate reasonable values within a 500-meter neighborhood to fill the gaps.
[0090] Considering that data from different sources may have different sampling frequencies, they need to be resampled to achieve time synchronization. For example, 50Hz measurement data from the power grid needs to be downsampled to one point per second, while CDN logs that were originally recorded every 10 seconds need to be upsampled to one point per second. This process usually involves linear interpolation or other suitable mathematical models, and also calculates the confidence weight of each point for subsequent analysis.
[0091] All geographic location data is mapped into GeoHash-7 grid cells of approximately 153m × 153m. If multiple data points exist within the same grid, different aggregation strategies are employed for different data types: event-type data undergoes a logical OR operation (i.e., it is marked as existing if it has occurred), while continuous variables are calculated by averaging. Bilinear interpolation is used in edge regions to ensure a smooth transition and avoid abrupt data changes caused by grid division.
[0092] Based on the spatial grid IDs obtained in the previous steps, a dynamic graph structure is constructed, where nodes represent grids and edge weights reflect the correlation of historical change trends between different nodes. The GraphSAGE algorithm is used to update the graph embedding vector every 60 seconds, outputting a 64-dimensional feature vector as the focus of subsequent models, aiming to quantify the interaction between urban governance events and other resource indicators.
[0093] The final step is to integrate all the above information to form a comprehensive feature representation. Specifically, embedding vectors within the same grid and the same second, normalized utilization rates (such as GPU utilization and PRB utilization), node voltages, and confidence weights are concatenated to form a 128-dimensional "unified spatiotemporal feature frame." Each frame carries an absolute timestamp and a corresponding GeoHash string identifier, facilitating efficient reading and analysis by downstream models.
[0094] S120. Based on the unified spatiotemporal characteristics, the event impact quantification model and the LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve are integrated to obtain the prediction results.
[0095] In this embodiment, the prediction results refer to the estimated data on future resource demand, power grid security margin, and network congestion probability obtained after model processing.
[0096] The structure of the event influence quantification model includes an input layer, a TCN layer, a GAT layer, a GRU layer, an LSTM layer, and an output layer.
[0097] The TCN layer outputs the first temporal feature;
[0098] The GAT layer uses the 64-dimensional node embedding vector of claim 2 as a static base map and the first temporal feature as a dynamic query to generate a vector of 64-dimensional space-event coupled information.
[0099] The GRU layer processes the coupling vector to obtain the resource demand curve and the power grid margin sequence.
[0100] The LSTM layer processes the time series in parallel to obtain the congestion probability sequence.
[0101] In one embodiment, step S120 described above may include steps S121 to S126.
[0102] S121. The unified spatiotemporal features are cut into a matrix using a sliding window and the missing values are filled in with data from the previous period to obtain a time series.
[0103] In this embodiment, a time series refers to a sequence of observation points arranged in chronological order, used to analyze and predict future trends.
[0104] The unified spatiotemporal features are cut into matrices of length 60 by a 60-second sliding window; if a missing frame appears in the window, zeros are padded and interpolated using data from the same grid in the previous period to obtain the time series.
[0105] First, all collected data (including urban governance event streams, live streaming business KPIs, multi-cloud pool resource indicators, wireless network side indicators, and power grid section operation data) are divided into 60-second time windows to form a time series matrix of length 60. If a missing value appears in any given window, it is filled in using data from the same grid position in the previous period.
[0106] S122. The time series is processed by a 1×1 convolution and a three-layer dilated convolutional network to capture typical event periodic components and generate the first time series feature.
[0107] In this embodiment, the first temporal feature refers to a 64-dimensional vector processed by TCN (Temporal Convolutional Network), which implies the impact pattern of a specific event type on resource utilization.
[0108] The aforementioned time series are processed using 1×1 convolutional and three-layer dilated convolutional networks to capture components within typical event cycles, thereby generating the first temporal features. This step aims to extract important patterns and trends from the time series.
[0109] S123. The first temporal feature is concatenated with the embedding vector of the city event-resource graph node, and the neighbor features are aggregated using a graph attention mechanism to generate a vector containing spatial-event coupling information.
[0110] In this embodiment, the vector of spatial-event coupling information refers to a 64-dimensional vector generated by combining geographic space with the impact of a specific event, which encodes the potential impact intensity such as "rainstorm node → base station → edge data center".
[0111] The first temporal feature obtained in step S122 is concatenated with the city event-resource graph node embedding vector, and the features of neighboring nodes are aggregated using the graph attention mechanism (GAT) to generate a 64-dimensional vector containing spatial-event coupling information. This process allows the model to take into account the mutual influence between different geographical locations and their impact on resource demand and grid security.
[0112] S124. Utilize a unidirectional GRU to process vectors of space-event coupled information, and output the predicted resource demand curve and grid section safety margin sequence through a fully connected layer.
[0113] In this embodiment, the resource demand curve refers to the curve of demand change for computing resources (such as GPUs) in a future period of time predicted based on historical data and current event factors.
[0114] The power grid section safety margin sequence, also known as the power grid safety margin curve, refers to the change over time of an indicator reflecting the power system's ability to maintain stable operation under load changes or faults.
[0115] The space-event coupled information vector generated in step S123 is processed using a one-way GRU, and the resource demand curve and grid section safety margin sequence are output through a fully connected layer. Here, the resource demand curve refers to the prediction of the demand for various resources (such as computing resources, bandwidth, etc.) in the future; while the grid safety margin refers to the safety margin of the power system's maximum possible load capacity under all operating constraints.
[0116] S125. Apply two-layer LSTM to the same time series to analyze base station level RTT, PRB utilization and uplink ECN marking, and generate a congestion probability sequence.
[0117] In this embodiment, the congestion probability sequence, also known as the network congestion probability curve, refers to the curve showing the change in the probability of network congestion over a future period of time, dynamically predicted based on network traffic.
[0118] Two-layer LSTM analysis is applied to the same time series to analyze parameters such as base station-level RTT, PRB utilization, and uplink ECN marking, generating a network congestion probability sequence. This sequence reflects the likelihood of network congestion occurring within a specific future time period.
[0119] S126. Perform weighted exponential smoothing on the resource demand curve, power grid section safety margin sequence, and congestion probability sequence according to the confidence weight to obtain the prediction results.
[0120] Finally, the resource demand curve, power grid safety margin sequence, and network congestion probability sequence obtained in steps S124 and S125 are weighted exponentially smoothed according to the confidence weights to obtain the final prediction result. This approach helps improve the stability and accuracy of the prediction results.
[0121] This method integrates event impact quantification models and deep learning techniques (such as TCN, GAT, GRU, and LSTM) to effectively capture complex patterns in time series data and consider spatial correlations, thereby providing more accurate predictions of resource demand, network congestion probability, and power grid safety margin. These predictions are of great significance for optimizing urban management and resource allocation.
[0122] In this embodiment, the 128-dimensional "unified spatiotemporal feature frame," after spatiotemporal alignment, GeoHash gridding, and clean interpolation, is cut into a 60-dimensional time series matrix X(t) using a 60-second sliding window. If missing data appears within the window, zero-padding interpolation is performed using data from the same grid in the previous period to ensure that the input dimension of the downstream network remains constant (60×128). This step provides synchronous temporal raw materials for subsequent parallel inference.
[0123] First, the time series matrix X(t) is processed through a three-layer dilated convolutional network (TCN) with a receptive field covering 240 seconds to capture typical resource ramp-up cycles such as "concert ending" and "sudden rainstorm". The TCN output yields 64-dimensional temporal features F_tc(t), which implicitly represent the impact patterns of specific event types on GPU / FPGA utilization and are directly used as input to the graph attention mechanism in the next sub-step.
[0124] Next, F_tc(t) is concatenated with the node vectors of the urban event-resource heterogeneous graph and input into the single-headed graph attention layer. During this process, the message passing weights are calculated based on the correlation coefficient between F_tc(t) and the historical increase of the node, and neighbor features are aggregated using the LeakyReLU activation function, ultimately generating a 64-dimensional vector F_gat(t) containing spatial-event coupling information. This step completes the encoding of the potential impact intensity from "rainstorm node → base station → edge data center".
[0125] F_gat(t) is fed into a unidirectional GRU with a hidden state dimension of 128. The output of the final step is dimensionality-reduced through a fully connected layer to obtain the GPU demand curve P_gpu(t) for the next 15 minutes and the power grid section safety margin sequence P_margin(t). The GRU's gating mechanism automatically adjusts the ratio of the influence of periodic components and sudden event components on the final prediction result, completing the closure of the event influence quantification channel.
[0126] Specific dimensions (such as base station-level RTT, PRB utilization, and uplink ECN markers) from the same time series matrix X(t) are fed into a two-layer LSTM network (64 units per layer, Dropout=0.1) specifically for detecting traffic bursts. The output of the second-layer LSTM is processed by the Sigmoid function to give a 15-second congestion probability sequence P_cong(t), which is aligned with the time axis of P_gpu(t), providing a network metric of the same scale for subsequent joint reward calculation.
[0127] Using the previously generated confidence weights w(t), a weighted exponential smoothing operation is performed on P_gpu(t), P_margin(t), and P_cong(t): Pfinal = w ⋅ Pmodel + (1 − w) ⋅ Phistory. This prevents extreme prediction jumps in low-confidence regions. The smoothed three curves are the final prediction results, which can be directly used as input to the downstream reinforcement learning state space, achieving a seamless transformation from "unified spatiotemporal features" to "electronic-computing-network three curves".
[0128] The weighted tri-curve is concatenated with the 64-dimensional event embedding obtained in the previous steps and the current action margin to form a 128-dimensional state vector s(t). After normalization using a standard scaler, the output is provided so that subsequent reinforcement learning agents can directly call upon it, completing the seamless connection of the entire patent chain, starting from "unified spatiotemporal features" until the generation of a state space that can be used for decision-making.
[0129] S130. The prediction results are integrated using reinforcement learning methods to dynamically adjust resource scheduling, power grid power, and network congestion thresholds to obtain an optimized strategy.
[0130] In this embodiment, the optimization strategy refers to integrating information such as resource demand prediction results, power grid section safety margin sequences, congestion probability sequences, and urban event-resource graph node embedding vectors through reinforcement learning methods to dynamically adjust computational resource scheduling, power grid allocation, and network congestion thresholds, thereby improving the overall system efficiency and stability. Specifically, the optimization strategy aims to maximize resource utilization, reduce the risk of power grid overload, and avoid network congestion, thereby improving service quality.
[0131] In one embodiment, step S130 described above may include steps S131 to S132.
[0132] S131. The prediction results, the city event-resource graph node embedding vector, and the current operation margins of each domain are integrated into a state vector, and after normalization, it is input into the Actor-Critic network for processing.
[0133] In this step, the various prediction results obtained in the previous steps (such as resource demand curves, power grid safety margin sequences, and network congestion probability curves), the vector of spatial-event coupling information on the impact of urban events on resources, and the available operational space (i.e., operational margin) in the current operation of cloud services, power systems, and networks need to be integrated into a comprehensive state vector. This state vector represents the current state of the system. To make this data suitable for processing by machine learning models, the state vector is usually normalized and then input into a pre-trained Actor-Critic network.
[0134] S132. Continuous action parameters are generated by the Actor-Critic network and converted into discrete actions through pruning and quantization, corresponding to specific operation instructions in the cloud, network, and power fields. These instructions are then rapidly distributed to each execution point through the gRPC concurrency mechanism to obtain an optimized strategy.
[0135] The structure of the Actor-Critic network includes a shared encoder, an Actor head, a Critic head, and a discrete mapping layer.
[0136] In this step, the Actor-Critic network generates continuous action parameters based on the input state vector. Since practical operations require specific, executable discrete instructions (such as increasing or decreasing power supply in a specific area), the generated continuous action parameters need to be trimmed and quantized into discrete actions. These discrete actions are then transformed into specific operational instructions for cloud computing, network management, and power dispatch. To ensure these instructions can be executed quickly and efficiently, a gRPC concurrency mechanism is used to simultaneously distribute these instructions to the corresponding execution points.
[0137] Throughout the process, the Actor-Critic network structure includes a shared encoder for extracting feature representations, an Actor head for decision-making, a Critic head for evaluating the quality of decisions, and a discrete mapping layer that maps continuous action parameters to discrete operation instructions. This approach not only improves the system's response speed and accuracy but also enhances the ability to collaborate across different domains, ultimately achieving effective resource scheduling and management.
[0138] In this embodiment, firstly, the smoothed data P_gpu(t), P_cong(t), and P_margin(t) processed in the previous stage, along with the 64-dimensional event embedding vector and the current operational margins in each domain (e.g., remaining GPU slices, ECN adjustable range, FACTS phase margin), are concatenated into a 128-dimensional state vector s(t). This state vector is then normalized using a standard scaler and input into the policy network, completing a seamless transition from the prediction curve to the reinforcement learning state.
[0139] Next, the 24-dimensional actions (including 8-dimensional cloud, 10-dimensional network, and 6-dimensional electricity) are output as continuous values through an Actor network. Then, pruning and quantization methods are used to convert these continuous values into their respective physical scales: cloud actions are accurate to 1 / 10 of a GPU instance, the ECN threshold step size is 0.5dB, and the FACTS phase angle step size is 0.1°. During this process, an "action confidence mask" is also generated to identify unexecutable instructions during subsequent transaction rollbacks.
[0140] The system collects live streaming QoE revenue, GPU waste costs, ECN tagging penalties, grid over-limit penalties, and control costs in real time, with a 30-second cycle, and standardizes the units of measurement using a specific exchange rate. The weight λ* is dynamically updated by the SHAP value to prevent excessive dominance of any particular domain metric and ensure that the reward function meets the cross-domain penalty requirements described in the patent.
[0141] The Actor network receives the state vector s(t) as input and outputs the mean μ(t) and variance σ(t) of continuous actions, and obtains a_raw(t) through reparameterized sampling. Simultaneously, the Critic network estimates the state value V(t) to calculate the multi-step TD(λ) advantage A(t). a_raw(t) is then pruned and quantized to form the final a*(t), which is rapidly distributed to each execution point via the gRPC concurrency mechanism, achieving zero-second-level coordination.
[0142] Real-world data (such as GPU utilization, ECN labeling rate, and grid margin) is collected after 30 seconds. The actual reward R(t) and advantage A(t) are calculated and stored in the rolling replay pool (data is retained for 7 days). The Adam optimizer is used to update the model weights every 60 seconds to ensure a balanced ratio of the latest and historical samples and prevent catastrophic forgetting.
[0143] The above steps are repeated every 60 seconds. The new policy network must pass gray-scale verification without any anomalies before replacing the old network. If the deviation exceeds 15%, reverse training and event weight self-adjustment are triggered to achieve self-repair capability and ensure continuous optimization and adaptability of the system.
[0144] The predicted results are transformed into specific resource scheduling, grid power, and network congestion threshold adjustment strategies, achieving the goals of cross-domain dynamic game theory and real-time optimization. Furthermore, this process emphasizes comprehensive coverage of key elements mentioned in the original patent, such as action space, reward function, 3PC transactions, difference measurement, reverse training, and mutual compensation engine, thereby constructing a closed-loop control link from decision-making to execution and feedback.
[0145] Furthermore, the Actor-Critic network employs a "shared encoder-independent head" architecture, designed to simultaneously ensure continuous output capability and reduce deployment delays. The following are the specific configuration details of this network:
[0146] Shared encoder (Feature Extractor)
[0147] Input: A 128-dimensional state vector s(t) containing three prediction curves, event embeddings, and action margins.
[0148] Processing: A two-layer MLP (Multilayer Perceptron) was used, with each layer having a size of 256. The activation function was ReLU, and Dropout=0.1 was applied to prevent overfitting.
[0149] Output: Generates a 256-dimensional shared feature φ(t) for reuse by the Actor and Critic sub-networks, reducing the number of parameters while ensuring the consistency of gradients between the two networks.
[0150] Actor Head (Policy Network):
[0151] Input: Shared feature φ(t).
[0152] Processing: The process is performed through a separate MLP layer, specifically 256→128→64, to extract information suitable for decision-making.
[0153] Dual-line output:
[0154] Continuous mean μ(t): a 64-dimensional vector, corresponding to the expanded form of a 24-dimensional action space (cloud 8 + network 10 + electricity 6), used to represent possible action directions.
[0155] Log-standard deviation logσ(t): Also 64-dimensional, consistent with the dimension of μ(t), and after transformation by exp(·), the trainable variance σ(t) is obtained.
[0156] Reparameterization technique: By sampling noise ε ~ N(0, I), we can calculate a_raw(t) = μ(t) + σ(t) ⊙ ε. This method allows gradient backpropagation, which is convenient for parameter updates during training.
[0157] Critic Head (Value Network):
[0158] Input: Shared feature φ(t).
[0159] Processing: Through a separate MLP layer, specifically structured as 256→128→1, the focus is on estimating the value V(t) of the current state.
[0160] Output: A single numerical value, namely the state value V(t), used for the subsequent calculation of TD(λ) advantage A(t) = R(t) + γV(t+1) - V(t).
[0161] Discrete Mapping Layer (Clip & Quantize):
[0162] The a_raw(t) obtained from the Actor is clipped and quantized, and converted into an actual executable action according to a specific physical scale (such as 0.1 GPU step for cloud, 0.5 dB step for network, and 0.1° step for electricity).
[0163] Output a 24-dimensional discrete action a*(t) and its "action confidence mask", the latter being used to identify unexecutable instructions during 3PC transaction rollback.
[0164] The Adam optimizer is used with a learning rate of 3e-4, and gradient clipping is set to 1.0 to control gradient explosion. Every 60 seconds, 256 samples are drawn from a 7-day rolling experience pool and mixed with historical data in a 1:1 ratio to avoid catastrophic forgetting. The weights of the newly trained network are verified by a 10% grayscale pass before atomically replacing the old network, achieving zero-interruption updates, which meets the rolling outer loop requirement described in step 11 of the patent.
[0165] This structural design not only improves the efficiency and performance of the model, but also ensures its reliability and flexibility in actual deployment.
[0166] S140. The optimized strategy is synchronously distributed to cloud resources, power grid and network controller, and the results after execution are collected and fed back to the fusion event impact quantification model and LSTM network and the dynamic adjustment process.
[0167] In one embodiment, step S140 described above may include steps S141 to S146.
[0168] S141. In each 30-second cycle, collect actual operating data, calculate the difference between the actual data and the predicted value to obtain the performance deviation, and at the same time calculate the time difference advantage.
[0169] S142. When a performance deviation is detected to exceed a set threshold, online backpropagation is triggered to update the model; the SHAP method is used to identify key event nodes and improve their learning rate, thereby enhancing the model's sensitivity and adaptability to such events.
[0170] S143. When the power system approaches its safety limits, take measures to alleviate grid stress, including migrating GPU tasks, adjusting ECN thresholds and FACTS phase angle strategies.
[0171] S144. For specific high-load scenarios, automatically activate additional resources to meet the demand, and realize a fast switch from single-card virtualization to multi-card sharing mode;
[0172] S145. Set a rolling optimization loop every 60 seconds; use an experience replay pool to store long-term samples and maintain a balance between the latest and historical data.
[0173] S146. Regularly compile statistics on service quality and economic efficiency indicators, such as reduced live streaming buffering, increased GPU utilization, and reduced carbon emissions.
[0174] Within each 30-second cycle, the system automatically collects actual operational data and compares it with previous predictions to calculate performance deviations. This step also involves calculating the Time Difference Advantage (TD Advantage), an metric used to evaluate the effectiveness of the current strategy and guide subsequent optimization directions.
[0175] When a performance deviation exceeds a preset threshold, the system triggers an online backpropagation process to update model parameters, thereby rapidly responding to environmental changes. During this process, the SHAP (SHapley Additive exPlanations) method is used to identify key event nodes that significantly impact the model output, and the learning rate of these nodes is increased accordingly, enhancing the model's sensitivity and adaptability to specific types of events.
[0176] When the power system approaches its safe operating limits, the system will take a series of measures to alleviate the pressure on the grid. These include migrating GPU tasks to reduce energy consumption, adjusting the ECN (Explicit Congestion Notification) threshold to optimize network traffic, and applying the FACTS (Flexible AC Transmission Systems) phase angle strategy to improve power transmission efficiency.
[0177] Under specific high-load conditions, the system can automatically activate additional computing resources to meet the demand. For example, when handling tasks requiring high-performance computing, such as live streaming, it can seamlessly switch from single-card virtualization mode to multi-card shared mode, ensuring that service quality and user experience are not affected.
[0178] To continuously improve the model's performance, a rolling optimization loop is performed every 60 seconds. During this process, an experience replay pool is used to store long-term samples, and a balanced ratio between the latest and historical data is maintained. This helps the model learn and adapt to environmental changes better, while avoiding catastrophic forgetting problems.
[0179] Regularly conduct statistical analysis on service quality and economic efficiency indicators, such as checking whether stuttering in live streaming services has decreased, whether GPU utilization has improved, and whether carbon emissions have decreased. These indicators not only evaluate the overall system performance but also provide a basis for subsequent optimization.
[0180] In summary, step S140 and its sub-steps demonstrate how to ensure the efficient and stable operation of the system through real-time monitoring, dynamic adjustment, and resource management. They also emphasize the importance of flexible response when facing complex and ever-changing real-world application scenarios.
[0181] The aforementioned dynamic optimization method for live streaming scenarios collects and transforms urban governance events, network traffic, and power grid operation data into unified spatiotemporal features in real time. It then utilizes a fusion event impact quantification model and an LSTM network to predict resource demand, network congestion probability, and power grid safety margin. Reinforcement learning is employed to integrate these predictions, dynamically adjusting resource scheduling, power grid power, and network congestion thresholds to form an optimization strategy. This strategy is then synchronized to cloud resources, the power grid, and network controllers for execution, while simultaneously collecting execution feedback for model iteration and strategy optimization. This comprehensive approach, considering urban governance events, live streaming service KPI data, power grid section operation status, and multi-cloud pool resource indicators, achieves more effective prediction and response to various changes, ensuring the quality of live streaming services, network stability, and power system security.
[0182] Figure 2 This is a schematic block diagram of a live streaming scene dynamic optimization system 300 provided in an embodiment of the present invention. Figure 2 As shown, corresponding to the above-described dynamic optimization method for live streaming scenarios, the present invention also provides a dynamic optimization system 300 for live streaming scenarios. This dynamic optimization system 300 includes a unit for executing the above-described dynamic optimization method for live streaming scenarios, and the system can be configured in a server. For details, please refer to... Figure 2 The live streaming scene dynamic optimization system 300 includes a data acquisition unit 301, a prediction unit 302, an optimization unit 303, and a distribution unit 304.
[0183] The data acquisition unit 301 is used to collect urban governance events, network traffic, and power grid operation data in real time and convert them into unified spatiotemporal features. The prediction unit 302 is used to predict resource demand curves, network congestion probability curves, and power grid safety margin curves based on the unified spatiotemporal features by fusing the event impact quantification model and LSTM network. The optimization unit 303 is used to integrate the prediction results using reinforcement learning methods and dynamically adjust resource scheduling, power grid power, and network congestion thresholds to obtain an optimized strategy. The distribution unit 304 is used to synchronously distribute the optimized strategy to cloud resources, the power grid, and the network controller, and to collect and execute the results and feed them back to the event impact quantification model and LSTM network, as well as the dynamic adjustment process.
[0184] In one embodiment, the acquisition unit 301 is used for:
[0185] By deploying a lightweight data acquisition agent, messages corresponding to urban governance events, network traffic, and power grid operation data are obtained from multiple data sources and pushed to a Kafka queue using MQTT / HTTPS or UDP+PTP timestamp methods. Each message is appended with a production timestamp, geographic location, grid coordinates, and data source ID, and NLP techniques are used to supplement missing geographic or temporal information. Outliers in continuous variables are filtered, Hampel filtering is used to replace transient spikes, and Poisson burst tests are used to remove duplicate event records. Null values are filled using spatiotemporal interpolation. Data at different frequencies is resampled onto a timeline with a set period, and simultaneously recorded... Record confidence weights; after converting all data points to the WGS-84 coordinate system, map them to a GeoHash-7 grid. Data within the same grid is aggregated or averaged, while edge regions are smoothed using bilinear interpolation. The continuous variables after grid aggregation are normalized using a standard Scaler to obtain normalized continuous variables. A heterogeneous graph is constructed based on grid IDs and event-resource increase correlation coefficients, and the GraphSAGE algorithm is run periodically to generate 64-dimensional city event-resource graph node embedding vectors. The embedding vectors, normalized continuous variables, and confidence weights are integrated into a unified spatiotemporal feature, accompanied by an absolute secondt stamp and grid hash.
[0186] In one embodiment, the prediction unit 302 is configured to:
[0187] The unified spatiotemporal features are segmented into matrices using a sliding window and missing values are filled in using data from the previous period to obtain a time series. The time series is processed through a 1×1 convolution and a three-layer dilated convolutional network to capture typical event periodic components and generate a first time series feature. The first time series feature is concatenated with the embedding vector of the city event-resource graph node, and a graph attention mechanism is used to aggregate neighbor features to generate a vector containing spatial-event coupling information. The vector containing spatial-event coupling information is processed using a unidirectional GRU, and the predicted resource demand curve and power grid section safety margin sequence are output through a fully connected layer. Two layers of LSTM are applied to the same time series to analyze base station-level RTT, PRB utilization, and uplink ECN marking to generate a congestion probability sequence. The resource demand curve, power grid section safety margin sequence, and congestion probability sequence are weighted and exponentially smoothed according to confidence weights to obtain the prediction result.
[0188] In one embodiment, the prediction unit 302 is further configured to: cut the unified spatiotemporal features into a matrix of length 60 by a 60-second sliding window; if a missing frame appears in the window, zero-filling interpolation is performed using data from the same grid in the previous period to obtain a time series.
[0189] In one embodiment, the optimization unit 303 is used to integrate the prediction results, the city event-resource graph node embedding vector, and the current operational margins of each domain into a state vector, and input it into the Actor-Critic network for processing after normalization; the Actor-Critic network generates continuous action parameters and converts them into discrete actions after pruning and quantization, corresponding to specific operation instructions in the cloud, network, and power domains, and rapidly distributes them to each execution point through the gRPC concurrency mechanism to obtain the optimized strategy; wherein, the structure of the Actor-Critic network includes a shared encoder, an Actor head, a Critic head, and a discrete mapping layer.
[0190] In one embodiment, the sending unit 304 is configured to:
[0191] Within each 30-second cycle, actual operational data is collected, and the difference between the actual data and the predicted values is calculated to obtain performance deviation. Simultaneously, the temporal difference advantage is calculated. When the performance deviation exceeds a set threshold, online backpropagation is triggered to update the model. The SHAP method is used to identify key event nodes and improve their learning rate, enhancing the model's sensitivity and adaptability to such events. When the power system approaches its safety limits, measures are taken to alleviate grid pressure, including migrating GPU tasks, adjusting ECN thresholds, and implementing the FACTS phase angle strategy. For specific high-load scenarios, additional resources are automatically activated to meet demand, enabling rapid switching from single-card virtualization to multi-card sharing mode. A rolling optimization loop is set every 60 seconds. An experience replay pool is used to store long-term samples, maintaining a balance between the latest and historical data. Service quality and economic efficiency indicators are regularly analyzed, such as reduced live streaming stuttering, increased GPU utilization, and reduced carbon emissions.
[0192] It should be noted that those skilled in the art can clearly understand the specific implementation process of the above-mentioned live streaming scenario dynamic optimization system 300 and its various units. They can refer to the corresponding descriptions in the aforementioned method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0193] The aforementioned live streaming scene dynamic optimization system 300 can be implemented as a computer program, which can perform tasks such as... Figure 3 It runs on the computer device shown.
[0194] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0195] See Figure 3The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0196] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a live streaming scene dynamic optimization method.
[0197] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0198] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a live scene dynamic optimization method.
[0199] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0200] The processor 502 is used to run the computer program 5032 stored in the memory to implement all the steps of the live streaming scene dynamic optimization method.
[0201] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0202] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0203] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform all steps of the live streaming scene dynamic optimization method.
[0204] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0205] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0206] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0207] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the system of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0208] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0209] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for dynamic optimization of live streaming scenarios, characterized in that, include: Real-time collection of urban governance events, network traffic, and power grid operation data, which are then transformed into unified spatiotemporal characteristics; Based on the unified spatiotemporal characteristics, the event impact quantification model and the LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve are integrated to obtain the prediction results. The prediction results are integrated using reinforcement learning methods to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy. The optimized strategy is synchronously distributed to cloud resources, power grid and network controllers, and the results of the execution are collected and fed back to the fusion event impact quantification model and LSTM network, as well as the dynamic adjustment process.
2. The method for dynamic optimization of live streaming scenarios according to claim 1, characterized in that, The real-time collection of urban governance events, network traffic, and power grid operation data is transformed into unified spatiotemporal characteristics, including: By deploying a lightweight data acquisition agent, messages corresponding to urban governance events, network traffic, and power grid operation data are obtained from multiple data sources and pushed to a Kafka queue using MQTT / HTTPS or UDP+PTP timestamp methods. Add a production timestamp, geographic location, grid coordinates, and data source ID to each message, and use NLP technology to supplement missing geographic or temporal information; Filter outliers of continuous variables, replace transient spikes with Hampel filtering, remove duplicate event records using Poisson burst test, and fill null values with spatiotemporal interpolation. Data at different frequencies is resampled onto a time axis with a set period, and the confidence weights are recorded simultaneously. After converting all data points to the WGS-84 coordinate system, they are mapped to the GeoHash-7 grid. Data within the same grid are aggregated or averaged, while edge regions are smoothed using bilinear interpolation. The continuous variables after grid aggregation are normalized using a standard Scaler to obtain normalized continuous variables. Heterogeneous graphs are constructed based on grid IDs and event-resource growth correlation coefficients, and the GraphSAGE algorithm is run periodically to generate 64-dimensional city event-resource graph node embedding vectors. The embedded vector, normalized continuous variables, and confidence weights are integrated into a unified spatiotemporal feature, with an absolute second stamp and grid hash.
3. The live streaming scene dynamic optimization method according to claim 2, characterized in that, Based on the unified spatiotemporal characteristics, the event impact quantification model and LSTM network prediction resource demand curve, network congestion probability curve, and power grid safety margin curve are integrated to obtain the prediction results, including: The unified spatiotemporal features are cut into matrices using a sliding window and missing values are filled in with data from the previous period to obtain a time series. The time series is processed by a 1×1 convolutional and three-layer dilated convolutional network to capture typical event periodic components and generate the first time series feature. The first temporal feature is concatenated with the embedding vector of the city event-resource graph node, and the neighbor features are aggregated using a graph attention mechanism to generate a vector containing spatial-event coupling information. The vector of space-event coupled information is processed using a one-way GRU, and the predicted resource demand curve and grid section safety margin sequence are output through a fully connected layer. Two-layer LSTM analysis is applied to the same time series to analyze base station-level RTT, PRB utilization and uplink ECN marking, generating a congestion probability sequence; The resource demand curve, the power grid section safety margin sequence, and the congestion probability sequence are weighted and smoothed exponentially based on confidence levels to obtain the prediction results.
4. The method for dynamic optimization of live streaming scenarios according to claim 3, characterized in that, The step of cutting the unified spatiotemporal features into a matrix using a sliding window and filling in missing values with data from the previous period to obtain a time series includes: The unified spatiotemporal features are cut into matrices of length 60 by a 60-second sliding window; if a missing frame appears in the window, zeros are padded and interpolated using data from the same grid in the previous period to obtain the time series.
5. The live streaming scene dynamic optimization method according to claim 3, characterized in that, The structure of the event influence quantification model includes an input layer, a TCN layer, a GAT layer, a GRU layer, an LSTM layer, and an output layer. The TCN layer outputs the first temporal feature; The GAT layer uses the 64-dimensional node embedding vector of claim 2 as a static base map and the first temporal feature as a dynamic query to generate a vector of 64-dimensional space-event coupled information. The GRU layer processes the coupling vector to obtain the resource demand curve and the power grid margin sequence. The LSTM layer processes the time series in parallel to obtain the congestion probability sequence.
6. The method for dynamic optimization of live streaming scenarios according to claim 1, characterized in that, The method of integrating the prediction results using reinforcement learning to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy includes: The prediction results, the city event-resource graph node embedding vector, and the current operational margins in each domain are integrated into a state vector, which is then normalized and input into the Actor-Critic network for processing. The Actor-Critic network generates continuous action parameters, which are then pruned and quantized into discrete actions, corresponding to specific operation instructions in the cloud, network, and power domains. These instructions are then rapidly distributed to each execution point through the gRPC concurrency mechanism to obtain an optimized strategy. The structure of the Actor-Critic network includes a shared encoder, an Actor head, a Critic head, and a discrete mapping layer.
7. The method for dynamic optimization of live streaming scenarios according to claim 1, characterized in that, The process of synchronously distributing the optimized strategy to cloud resources, power grid, and network controllers, collecting the execution results, feeding them back to the fusion event impact quantification model and LSTM network, and dynamically adjusting the strategy includes: Within each 30-second cycle, actual operating data is collected, and the difference between the actual data and the predicted value is calculated to obtain the performance deviation. At the same time, the time difference advantage is also calculated. When a performance deviation is detected to exceed a set threshold, online backpropagation is triggered to update the model; the SHAP method is used to identify key event nodes and improve their learning rate, thereby enhancing the model's sensitivity and adaptability to such events; When the power system approaches its safety limits, measures are taken to alleviate grid stress, including migrating GPU tasks, adjusting ECN thresholds, and implementing FACTS phase angle strategies. For specific high-load scenarios, additional resources are automatically activated to meet the demand, enabling a rapid switch from single-card virtualization to multi-card sharing mode; A rolling optimization loop is set up every 60 seconds; an experience replay pool is used to store long-term samples to maintain a balance between the latest and historical data. Regularly collect statistics on service quality and economic efficiency indicators, such as reduced live streaming buffering, increased GPU utilization, and reduced carbon emissions.
8. A live streaming scene dynamic optimization system, characterized in that, include: The data acquisition unit is used to collect urban governance events, network traffic, and power grid operation data in real time and convert them into unified spatiotemporal characteristics. The prediction unit is used to obtain prediction results by fusing the event impact quantification model and the LSTM network prediction resource demand curve, network congestion probability curve and power grid safety margin curve based on the unified spatiotemporal characteristics. An optimization unit is used to integrate the prediction results using reinforcement learning methods to dynamically adjust resource scheduling, grid power, and network congestion thresholds to obtain an optimized strategy. The distribution unit is used to synchronously distribute the optimized strategy to cloud resources, power grid and network controllers, collect the execution results and feed them back to the fusion event impact quantification model and LSTM network and the dynamic adjustment process.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.