Live visitor traffic prediction and routing scheduling method and system based on spatiotemporal sequence
By building a live traffic prediction network and using deep learning models to calculate traffic correlation, combining graph neural network and blockchain technology to realize adaptive routing scheduling, the problems of low prediction accuracy of live traffic and insufficient network state perception in the existing technology are solved, and efficient and real-time live traffic management and data transmission are achieved.
Patent Information
- Application Number
- CN202411895945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The prior art is difficult to accurately capture the complex spatiotemporal characteristics of live broadcast traffic, resulting in low prediction accuracy and difficulty in adapting to dynamic traffic changes in large-scale live broadcast scenarios. It also lacks real-time perception and dynamic adjustment capabilities of network status, which makes it difficult to guarantee the real-time and fluency of data transmission.
The live visitor traffic prediction and routing scheduling method based on spatiotemporal sequence is adopted, and the live traffic prediction network is built by collecting traffic data from the live broadcast cluster, and the traffic correlation is calculated using deep learning model. The traffic ripple propagation range and surge probability are calculated in combination with the graph neural network. Adaptive routing scheduling is realized based on blockchain and lightning network technology, and the packet transmission rate is dynamically adjusted through edge acceleration nodes and online reinforcement learning algorithms.
It improves the accuracy of live traffic prediction, adapts to dynamic traffic changes in large-scale live streaming scenarios, enhances the real-time perception and dynamic adjustment capabilities of network status, and ensures the real-time and smoothness of data transmission, especially in the case of network congestion, effectively reduces latency and improves throughput.
Smart Images

Figure CN119364041B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic management and scheduling, and in particular to a method and system for predicting and routing live visitor traffic based on spatiotemporal sequences. Background Art
[0002] The rapid development of live broadcast platforms has brought huge traffic pressure and put forward higher requirements for the quality of live broadcast services. In order to ensure the user's viewing experience, it is necessary to accurately predict and efficiently schedule live broadcast traffic.
[0003] Existing live broadcast traffic prediction methods are difficult to accurately capture the complex spatiotemporal characteristics of live broadcast traffic, resulting in low prediction accuracy and difficulty in effectively guiding traffic scheduling; they are prone to single point failures and performance bottlenecks, and are difficult to adapt to dynamic traffic changes in large-scale live broadcast scenarios, resulting in low scheduling efficiency; they lack real-time perception and dynamic adjustment capabilities of network status, and are difficult to ensure the real-time and smoothness of data transmission under network congestion.
[0004] To sum up, there is an urgent need for a method to capture the complex spatiotemporal characteristics of live broadcast traffic, improve prediction accuracy, adapt to dynamic traffic changes in large-scale live broadcast scenarios, increase real-time perception and dynamic adjustment capabilities of network status, and ensure the real-time and smoothness of data transmission under network congestion. The present invention can solve the problems in the prior art. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for predicting live visitor traffic and routing scheduling based on spatiotemporal sequences, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] A method for predicting and routing live visitor traffic based on spatiotemporal sequences is provided, comprising:
[0008] Collect traffic data from each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, build a live broadcast traffic prediction network based on the comprehensive feature vector and take each live broadcast room as a prediction node, use a deep learning model to calculate the traffic correlation between each prediction node, and determine the traffic correlation matrix; monitor the traffic of the prediction node, and when it is detected that the traffic change of the prediction node exceeds the preset dynamic threshold, trigger the traffic ripple effect calculation, build a network topology structure based on the traffic correlation matrix based on the graph neural network, calculate the propagation characteristics of the traffic change, and generate a traffic ripple propagation range matrix and a traffic surge probability distribution matrix;
[0009] The network area indicated by the traffic ripple propagation range matrix is set as the target area, a blockchain network is constructed within the target area, and the load balancing nodes in the target area are mapped to the consensus nodes of the blockchain network; a smart contract is deployed on the blockchain network, the smart contract is embedded with an adaptive routing algorithm, and receives the traffic surge probability distribution matrix. When the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, the smart contract is triggered to execute shard parallel processing, and a data packet routing strategy is generated based on the lightning network technology;
[0010] An edge acceleration node is deployed in the target area, and the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, and the data transmission channel bypasses the TCP / IP protocol stack to forward data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially adjusts the data packet transmission rate with the optimization goal of minimizing the transmission delay of the highest priority data packet.
[0011] In an optional embodiment,
[0012] Based on the comprehensive feature vector, each live broadcast room is used as a prediction node to build a live broadcast traffic prediction network, and a deep learning model is used to calculate the traffic correlation between each prediction node. The traffic correlation matrix is determined to include:
[0013] Receive a comprehensive feature vector of a live broadcast room, the comprehensive feature vector including traffic data features, user behavior features, and content features; perform dimensionality reduction processing on the comprehensive feature vector to obtain a feature dimension vector; construct a live broadcast traffic prediction network based on the feature dimension vector, set each live broadcast room as a prediction node in the live broadcast traffic prediction network, and construct a node feature matrix of the prediction node based on the feature dimension vector;
[0014] Decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording the quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining the traffic propagation path between the prediction nodes according to the probability transfer matrix;
[0015] Input the traffic propagation path into a causal graph network, calculate the mutual information value between the prediction nodes in the causal graph network, and construct an information flow matrix based on the mutual information value; establish a conditional independence determination rule between the prediction nodes according to the information flow matrix, identify prediction node pairs with direct causal relationships based on the conditional independence determination rule, and construct a causal relationship matrix between the prediction nodes;
[0016] Constructing a deep learning model, taking the causal relationship matrix as input, and constructing a diffusion kernel function based on the causal relationship matrix; embedding a graph neural network ordinary differential equation in the deep learning model, constructing a continuous-time state equation, substituting the diffusion kernel function into the continuous-time state equation, and obtaining the temporal correlation characteristics between the prediction nodes by solving the continuous-time state equation;
[0017] Based on the time series correlation features, the Pearson correlation coefficients between the prediction nodes are calculated to determine the flow correlations, and the flow correlations are combined to generate a flow correlation matrix.
[0018] In an optional embodiment,
[0019] Decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording a quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining a traffic propagation path between the prediction nodes according to the probability transfer matrix includes:
[0020] Perform singular value decomposition on the node feature matrix to obtain a left singular matrix, a singular value matrix and a right singular matrix; based on a preset number of front parts, construct a position component by a corresponding number of front parts of the left singular matrix; based on a preset number of rear parts, construct a momentum component by a corresponding number of rear parts of the left singular matrix; multiply the position component by a transposed matrix of the position component to construct a node position operator; multiply the momentum component by a transposed matrix of the momentum component to construct a momentum operator;
[0021] Multiplying the first weight coefficient by the node position operator to obtain a first weighted term; multiplying the second weight coefficient by the momentum operator to obtain a second weighted term; adding the first weighted term to the second weighted term to obtain a Hamiltonian operator;
[0022] Mapping the Hamiltonian operator into an exponential form to obtain a quantum walk operator;
[0023] The initial quantum state of the prediction node is set as a normalized vector; the quantum walk operator is applied to the initial quantum state; according to a preset time step, the quantum state of the prediction node is iteratively updated by the quantum walk operator to obtain a quantum state change sequence of the prediction node within a preset time period;
[0024] Traversing and pairing every two prediction nodes to obtain a prediction node pair, wherein one node is set as a starting node and the other node is set as a terminating node; calculating the inner product of the quantum state of the starting node at the current moment and the quantum state of the terminating node at the next moment; square the modulus of the inner product to obtain the instantaneous transition probability between the starting node and the terminating node; averaging the instantaneous transition probability within a preset time period to obtain the final transition probability between the starting node and the terminating node;
[0025] The final transfer probabilities between all prediction node pairs are combined to generate a probability transfer matrix; the prediction node pairs corresponding to the final transfer probabilities greater than a preset threshold in the probability transfer matrix are determined as traffic propagation paths between the prediction nodes.
[0026] In an optional embodiment,
[0027] The traffic flow of the prediction node is monitored. When the traffic flow change of the prediction node is detected to exceed a preset dynamic threshold, the traffic ripple effect calculation is triggered. Based on the graph neural network, the network topology structure is constructed according to the traffic association matrix, the propagation characteristics of the traffic change are calculated, and the traffic ripple propagation range matrix and the traffic surge probability distribution matrix are generated, including:
[0028] Performing traffic monitoring on the prediction node, collecting historical traffic data of the prediction node, calculating statistics of the historical traffic data, updating the dynamic baseline through exponentially weighted moving average based on the statistics, and using the dynamic baseline as the dynamic threshold of the prediction node;
[0029] Detecting the flow data of the prediction node, when the flow data of the prediction node exceeds the dynamic threshold, marking the corresponding prediction node as a flow source node, and recording the flow mutation moment of the flow source node;
[0030] Using a sliding time window, calculate the flow change rate of all prediction nodes directly connected to the flow source node; when the flow change rate of a prediction node exceeds its corresponding dynamic threshold, mark the corresponding prediction node as a first-layer affected node, and record the flow change time of the first-layer affected node;
[0031] Calculate the time difference between the traffic change moment of the affected node in the first layer and the traffic mutation moment to determine the traffic change delay time;
[0032] Calculate the traffic change rate of the prediction nodes directly connected to the first-layer affected nodes; when the traffic change rate of the prediction node exceeds the corresponding dynamic threshold, mark the prediction node as the second-layer affected node; recursively traverse until no new affected nodes are generated;
[0033] The traffic source node and all the affected nodes at all levels are constructed into a ripple propagation graph, in which the physical connection relationship between the nodes is used as an edge; the difference in the delay time of traffic change between two adjacent nodes is calculated as the propagation delay weight of the edge;
[0034] Extract feature vectors from each node in the ripple propagation graph. The feature vectors include the node's traffic change rate, traffic change delay time, and historical traffic sequence. The feature vectors and edge propagation delay weights are used to calculate the attention coefficient between adjacent nodes and construct a graph attention network.
[0035] Perform a weighted combination of the attention coefficient and feature vector of each prediction node and the corresponding adjacent node to obtain the propagation characteristics of the prediction node; calculate the degree score of each prediction node affected by the traffic ripple based on the propagation characteristics, and form the influence degree scores into a ripple propagation range matrix;
[0036] The flow change trend characteristics are extracted based on the propagation characteristics; the flow change trend characteristics are input into a prediction model pre-built based on a long short-term memory neural network to calculate the probability of a flow surge occurring at each prediction node within a preset time window; and the probability values of all prediction nodes are combined into a flow surge probability distribution matrix.
[0037] In an optional embodiment,
[0038] Deploying a smart contract on the blockchain network, wherein the smart contract embeds an adaptive routing algorithm, and receiving the traffic surge probability distribution matrix includes:
[0039] Receiving a traffic surge probability distribution matrix, extracting a consensus node whose probability value exceeds a preset probability threshold from the traffic surge probability distribution matrix, and taking the consensus node as a high probability node;
[0040] A clustering algorithm is used to divide the network area where the high-probability node is located into multiple sub-areas; for each sub-area, the number of data packets per unit time is counted to obtain the traffic density, and the ratio of the bandwidth occupancy of all links in the sub-area to the total bandwidth is calculated to obtain the link bandwidth utilization; the number of the high-probability nodes contained in the sub-area is calculated;
[0041] Acquire the geographic coordinate information of the high-probability node, calculate the spatial density distribution of the high-probability node based on the geographic coordinate information, and generate a spatial distribution heat map; convert the spatial distribution heat map into a spatial distribution feature vector;
[0042] Constructing a multi-layer perceptron neural network; in the input layer of the multi-layer perceptron neural network, concatenating the flow density of the sub-region, the link bandwidth utilization and the spatial distribution feature vector into an input feature vector;
[0043] Read historical routing records within a preset time period from the blockchain network, and select a routing path with the best performance as a historical optimal routing path based on the transmission performance evaluation results of the historical routing records; perform feature encoding on the historical optimal routing path to obtain a historical routing feature vector;
[0044] In each hidden layer of the multi-layer perceptron neural network, the historical routing feature vector is converted into a hidden layer mapping feature vector through a fully connected layer, which has the same dimension as the hidden layer output feature vector; the hidden layer mapping feature vector is residually connected with the hidden layer output feature vector to obtain an optimized routing feature vector;
[0045] At the output layer of the multi-layer perceptron neural network, a routing scoring matrix is generated based on the optimized routing feature vector, wherein the dimension of the routing scoring matrix corresponds to the total number of network links, and based on each element in the routing scoring matrix, a probability value of the corresponding link being selected as a data packet forwarding path is determined;
[0046] Generate multiple candidate forwarding paths for data packets according to the routing scoring matrix; obtain real-time link load data on the candidate forwarding paths; perform weighted calculation on the probability value of the routing scoring matrix and the real-time link load data to obtain a comprehensive score for each candidate forwarding path, and select the candidate forwarding path with the highest comprehensive score as the data packet forwarding path.
[0047] In an optional embodiment,
[0048] Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, wherein the data transmission channel bypasses the TCP / IP protocol stack and forwards data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially takes minimizing the transmission delay of the highest priority data packet as an optimization goal, and adjusts the data packet transmission rate, including:
[0049] Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface supporting remote direct memory access; the edge acceleration node divides a data buffer in the local memory through the network interface, and registers the data buffer as a memory area for remote direct memory access; the edge acceleration node exchanges queue pair information with the target node to establish a connection, wherein the queue pair information includes a queue pair number, a memory area identifier, and an access key; the edge acceleration node establishes a hardware-level data transmission channel based on the queue pair information;
[0050] The edge acceleration node periodically reads the hardware performance counter of the network interface to obtain network status parameters including transmission queue depth, link bandwidth utilization and data packet retransmission rate; the edge acceleration node calculates the network congestion index according to the network status parameters; when the network congestion index exceeds a preset threshold, a congestion control mechanism is triggered;
[0051] The edge acceleration node combines the current traffic surge probability distribution matrix, the real-time queue length of each priority data packet, the network state parameter and the historical transmission rate into a state vector; inputs the state vector into the policy network to generate a transmission rate adjustment coefficient for each priority data packet;
[0052] The edge acceleration node adjusts the transmission rate of each priority data packet according to the transmission rate adjustment coefficient; collects the end-to-end transmission delay, average queue length and packet loss rate of the highest priority data packet after adjustment, and calculates a reward value, wherein the reward value is inversely proportional to the end-to-end transmission delay, the average queue length and the packet loss rate;
[0053] The edge acceleration node combines the state vector, the transmission rate adjustment coefficient and the reward value into experience data; stores the experience data in an experience replay buffer; randomly samples historically stored experience data from the experience replay buffer; trains the policy network based on the historically stored experience data, and updates network parameters through a soft update mechanism.
[0054] According to a second aspect of the embodiments of the present invention,
[0055] A live visitor traffic prediction and routing scheduling system based on spatiotemporal sequences is provided, comprising:
[0056] The first unit is used to collect traffic data of each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, and build a live broadcast traffic prediction network based on the comprehensive feature vector and each live broadcast room as a prediction node, and use a deep learning model to calculate the traffic correlation between each prediction node to determine the traffic correlation matrix; the prediction node is monitored for traffic, and when it is detected that the traffic change of the prediction node exceeds a preset dynamic threshold, the traffic ripple effect calculation is triggered, and a network topology structure is built according to the traffic correlation matrix based on a graph neural network, the propagation characteristics of the traffic change are calculated, and a traffic ripple propagation range matrix and a traffic surge probability distribution matrix are generated;
[0057] The second unit is used to set the network area indicated by the traffic ripple propagation range matrix as the target area, build a blockchain network in the target area, and map the load balancing nodes in the target area to the consensus nodes of the blockchain network; deploy a smart contract in the blockchain network, the smart contract embeds an adaptive routing algorithm, receives the traffic surge probability distribution matrix, and when the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, triggers the smart contract to execute shard parallel processing, and generates a data packet routing strategy based on the lightning network technology;
[0058] The third unit is used to deploy an edge acceleration node in the target area, and the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, and the data transmission channel bypasses the TCP / IP protocol stack to forward data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially adjusts the data packet transmission rate with the optimization goal of minimizing the transmission delay of the highest priority data packet.
[0059] According to a third aspect of the embodiments of the present invention,
[0060] An electronic device is provided, comprising:
[0061] processor;
[0062] a memory for storing processor-executable instructions;
[0063] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0064] According to a fourth aspect of the embodiments of the present invention,
[0065] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0066] In an embodiment of the present invention, by constructing a live broadcast traffic prediction network and calculating a traffic correlation matrix, and combining the traffic ripple effect calculation, it is possible to more accurately predict the changing trend and propagation range of live broadcast traffic, thereby making preparations for resource scheduling in advance; based on blockchain-based smart contracts and lightning network technology, sharded parallel processing and rapid generation of routing strategies are achieved, which improves the efficiency of resource scheduling and can effectively cope with traffic surges; by bypassing the TCP / IP protocol stack through edge acceleration nodes for data packet forwarding, and combining the online reinforcement learning algorithm to dynamically adjust the data packet transmission rate, it can effectively reduce network congestion, minimize the transmission delay of high-priority data packets, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A schematic diagram of a flow chart of a live visitor traffic prediction and routing scheduling method based on spatiotemporal sequence according to an embodiment of the present invention;
[0068] Figure 2 It is a structural diagram of a live visitor traffic prediction and routing scheduling system based on spatiotemporal sequences according to an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0071] Figure 1 FIG. 1 is a flow chart of a method for predicting and routing live visitor traffic based on spatiotemporal sequences according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0072] Collect traffic data from each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, build a live broadcast traffic prediction network based on the comprehensive feature vector and take each live broadcast room as a prediction node, use a deep learning model to calculate the traffic correlation between each prediction node, and determine the traffic correlation matrix; monitor the traffic of the prediction node, and when it is detected that the traffic change of the prediction node exceeds the preset dynamic threshold, trigger the traffic ripple effect calculation, build a network topology structure based on the traffic correlation matrix based on the graph neural network, calculate the propagation characteristics of the traffic change, and generate a traffic ripple propagation range matrix and a traffic surge probability distribution matrix;
[0073] In the traffic prediction system of the live broadcast cluster, it is first necessary to collect all-round data for each live broadcast room. The system records the changing trend of the number of viewers in the live broadcast room in real time, including the number of users entering and leaving the live broadcast room per second. At the same time, it counts the interactive data in the live broadcast room, such as the frequency of barrage sending, gift rewards, and the frequency of interaction between the anchor and the audience. For the use of bandwidth resources, the system records the real-time changes in upstream and downstream traffic, as well as the distribution ratio of viewers with different clarity bit rates. These raw data are stored in a distributed database in a time-series manner, providing a basis for subsequent feature extraction.
[0074] Based on the original data, the system constructs a comprehensive feature vector for each live broadcast room. First, the original data is sliced into five-minute units, and the characteristics of the change curve of the number of viewers are calculated in each time window, including growth rate, fluctuation range and other indicators. At the same time, the behavioral characteristics of users in the live broadcast room are analyzed, such as average viewing time, interaction frequency, etc. The system also combines factors such as live broadcast content type, anchor level, historical data, etc. to generate a multi-dimensional feature description. These features are finally integrated to form a comprehensive feature vector of the live broadcast room for subsequent correlation analysis.
[0075] Based on the comprehensive feature vectors of the live broadcast rooms, the system begins to build a live broadcast traffic prediction network. Each live broadcast room is used as a prediction node in the network. The system uses a deep learning model to analyze the degree of traffic correlation between different nodes. The calculation of the correlation takes into account multiple dimensions, including the similarity of live broadcast content, the degree of overlap of user groups, the overlap of live broadcast time periods, the correlation of historical traffic changes, etc. Through the comprehensive calculation of these dimensions, the correlation matrix reflecting the traffic correlation relationship between all live broadcast rooms is finally obtained.
[0076] The system continuously monitors the traffic of each prediction node. The monitoring mechanism dynamically adjusts the warning threshold of traffic changes based on factors such as the type of live broadcast room, time characteristics, and historical performance. When the traffic change of a node exceeds the set dynamic threshold, the system immediately triggers the calculation process of the traffic ripple effect. In this process, the system uses the previously constructed traffic association matrix based on graph neural network technology to establish the network topology structure and analyze the propagation characteristics of traffic changes.
[0077] In the process of calculating the ripple effect, the system focuses on the diffusion speed and impact range of traffic changes. Through multi-layer calculations of graph neural networks, the system can predict how traffic changes will propagate between related live broadcast rooms, including the temporal and spatial characteristics of the propagation. These calculation results are ultimately output as two key matrices: the ripple propagation range matrix shows the impact range and intensity distribution of traffic changes; the traffic surge probability distribution matrix predicts the possibility of traffic surges in each related live broadcast room at different time periods.
[0078] For example, when a top anchor on a game live broadcast platform starts broadcasting, the system detects that the number of viewers in the live broadcast room has increased by 200% in 3 minutes. Through ripple effect calculation, the system predicts that in the next 15 minutes, there is an 80% probability that the traffic of the same type of game live broadcast room as the anchor will increase by more than 30%. At the same time, other related live broadcast rooms in the partition where the live broadcast room is located are expected to see a 10%-20% increase in traffic within 30 minutes. Based on these prediction results, the system adjusts the resource allocation strategy in advance to ensure that the service quality is not affected. During the entire prediction and scheduling process, the system continuously updates various data, continuously optimizes the prediction accuracy, and realizes the intelligent traffic management of the live broadcast platform.
[0079] In this embodiment, a live broadcast traffic prediction network is constructed by integrating feature vectors and deep learning models, and the traffic correlation between each live broadcast room is accurately calculated to improve the accuracy of traffic prediction; dynamic traffic monitoring is performed on each live broadcast room to promptly detect abnormal traffic changes, quickly respond to potential problems, and improve the flexibility and real-time performance of the system; based on the graph neural network (GNN) combined with the traffic correlation matrix, the network topology structure is dynamically constructed to achieve intelligent analysis of the propagation path and impact range of traffic changes; by generating a traffic ripple propagation range matrix and a traffic surge probability distribution matrix, the risk of traffic surge is predicted in advance, providing a reference for resource scheduling and load balancing; accurately identify traffic propagation characteristics, effectively respond to traffic fluctuations, and reduce the risk of freezes or crashes in the live broadcast system due to traffic surges.
[0080] The network area indicated by the traffic ripple propagation range matrix is set as the target area, a blockchain network is constructed within the target area, and the load balancing nodes in the target area are mapped to the consensus nodes of the blockchain network; a smart contract is deployed on the blockchain network, the smart contract is embedded with an adaptive routing algorithm, and receives the traffic surge probability distribution matrix. When the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, the smart contract is triggered to execute shard parallel processing, and a data packet routing strategy is generated based on the lightning network technology;
[0081] According to the network area defined by the ripple propagation range matrix, the system first starts to build the blockchain network environment. This target area usually includes multiple live broadcast room nodes and their associated load balancing nodes that may be impacted by traffic. The system will map the load balancing nodes in these physical networks to the blockchain network one by one, making them the consensus nodes of the blockchain network. Each load balancing node is assigned a unique blockchain network identifier and is configured with corresponding consensus permissions and network communication interfaces.
[0082] In the constructed blockchain network, the system deploys a specially designed smart contract. The core function of this smart contract is to embed an adaptive routing algorithm that can dynamically adjust the transmission path of data packets according to the network status. The smart contract continuously receives and analyzes the data of the traffic surge probability distribution matrix, which reflects the possibility of traffic surges at each node in the future. When the probability of traffic surges at certain nodes in the matrix exceeds the threshold preset by the system, the smart contract automatically triggers the sharding processing mechanism.
[0083] The sharded parallel processing mechanism of smart contracts first partitions the network traffic according to the geographical location and network topology of the target area. Each shard area will be assigned independent processing resources and routing strategies. The system will create independent state channels for each shard area. These channels are implemented based on lightning network technology and can support fast packet forwarding and processing.
[0084] Based on the sharding process, the system begins to generate data packet routing strategies. The generation process of routing strategies relies on lightning network technology. The system will establish multiple high-speed channels between each shard. The establishment of these channels takes into account multiple factors such as network latency, bandwidth capacity, and node processing capabilities. The routing path of each data packet will be calculated and optimized in real time through smart contracts to ensure that the data packet can choose the optimal transmission path.
[0085] The generation process of routing strategies is dynamic, and the system will continuously monitor the network status of each shard area. When it is detected that the load of a shard area reaches the warning level, the routing strategy will automatically adjust to direct part of the data traffic to the shard area with lower load. At the same time, the smart contract will dynamically adjust the capacity allocation of the state channel according to the actual traffic situation to ensure that high-priority data packets can be transmitted first.
[0086] For example, when the system detects that the probability of a traffic surge in a certain live broadcast room area reaches 90%, which is higher than the preset 80% threshold, the smart contract immediately starts sharding processing. The system divides the network area where the live broadcast room is located into multiple processing shards and establishes multiple lightning network channels. When the actual traffic in the live broadcast room begins to grow, the data packets will be quickly distributed to different processing nodes through these pre-established channels according to the optimized routing strategy, effectively avoiding the problem of excessive single-point load.
[0087] Throughout the process, the blockchain network ensures the consistency and reliability of the routing strategy through a consensus mechanism. Each participating node can obtain the latest routing information in real time and perform corresponding data packet forwarding operations according to the instructions of the smart contract. In this way, the system realizes intelligent and decentralized management of live broadcast traffic, greatly improving the reliability and processing efficiency of the network.
[0088] In this embodiment, the traffic ripple propagation range matrix is used to accurately identify high-traffic load areas and set them as target areas to improve the accuracy of traffic regulation; by building a blockchain network in the target area, the load balancing nodes are mapped to consensus nodes to achieve distributed management and enhance the reliability and fault tolerance of the network; a smart contract embedded with an adaptive routing algorithm is deployed to dynamically receive the traffic surge probability distribution matrix and optimize the data packet routing strategy according to the real-time traffic status; when the traffic surge probability exceeds the threshold, the smart contract automatically triggers shard parallel processing to improve the processing efficiency of high-traffic scenarios and reduce the risk of congestion; the lightning network technology is used to generate a data packet routing strategy to optimize the data forwarding path and reduce latency and network bandwidth consumption; based on the sharding technology of the blockchain network, the processing capacity of the target area is expanded on demand to improve the resource allocation efficiency of the system in high-load scenarios.
[0089] An edge acceleration node is deployed in the target area, and the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, and the data transmission channel bypasses the TCP / IP protocol stack to forward data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially adjusts the data packet transmission rate with the optimization goal of minimizing the transmission delay of the highest priority data packet.
[0090] In this embodiment, protocol overhead is reduced and data transmission delay is significantly reduced by means of remote direct memory access (RDMA) and bypassing the TCP / IP protocol stack; direct packet forwarding technology is used to improve data transmission efficiency and meet high performance requirements; the edge acceleration node monitors the network status of the data transmission channel, can quickly detect and respond to network congestion, and improve system adaptability; through an online reinforcement learning algorithm, the transmission rate is dynamically adjusted based on the traffic surge probability distribution matrix to achieve adaptive optimization of congestion; with the goal of minimizing the transmission delay of the highest priority data packet, the transmission quality of key data is prioritized to improve service reliability and user experience; the transmission rate is dynamically adjusted to maximize network resource utilization while alleviating congestion and avoid resource waste.
[0091] In an optional implementation, based on the comprehensive feature vector, each live broadcast room is used as a prediction node to construct a live broadcast traffic prediction network, and a deep learning model is used to calculate the traffic correlation between each prediction node. Determining the traffic correlation matrix includes:
[0092] Receive a comprehensive feature vector of a live broadcast room, the comprehensive feature vector including traffic data features, user behavior features, and content features; perform dimensionality reduction processing on the comprehensive feature vector to obtain a feature dimension vector; construct a live broadcast traffic prediction network based on the feature dimension vector, set each live broadcast room as a prediction node in the live broadcast traffic prediction network, and construct a node feature matrix of the prediction node based on the feature dimension vector;
[0093] Decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording the quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining the traffic propagation path between the prediction nodes according to the probability transfer matrix;
[0094] Input the traffic propagation path into a causal graph network, calculate the mutual information value between the prediction nodes in the causal graph network, and construct an information flow matrix based on the mutual information value; establish a conditional independence determination rule between the prediction nodes according to the information flow matrix, identify prediction node pairs with direct causal relationships based on the conditional independence determination rule, and construct a causal relationship matrix between the prediction nodes;
[0095] Constructing a deep learning model, taking the causal relationship matrix as input, and constructing a diffusion kernel function based on the causal relationship matrix; embedding a graph neural network ordinary differential equation in the deep learning model, constructing a continuous-time state equation, substituting the diffusion kernel function into the continuous-time state equation, and obtaining the temporal correlation characteristics between the prediction nodes by solving the continuous-time state equation;
[0096] Based on the time series correlation features, the Pearson correlation coefficients between the prediction nodes are calculated to determine the flow correlations, and the flow correlations are combined to generate a flow correlation matrix.
[0097] In order to predict the traffic correlation between the live broadcast rooms in the live broadcast platform, a live broadcast traffic prediction network is constructed with the live broadcast room as the prediction node. By analyzing the traffic propagation path, causal relationship and timing correlation characteristics between nodes, the traffic correlation matrix is finally determined.
[0098] First, collect the traffic data features, user behavior features, and content features of each live broadcast room. Traffic data features include the number of viewers, number of likes, number of comments, number of gifts, etc.; user behavior features include user stay time, user interaction frequency, user portrait, etc.; content features include live broadcast theme, live broadcast content tag, anchor features, etc. For example, the features of a live broadcast room A can be expressed as: [number of viewers: 10,000, number of likes: 5,000, number of comments: 2,000, number of gifts: 1,000, average stay time: 30 minutes, interaction frequency: 5 times / minute, live broadcast theme: game, anchor: professional player]. Combine these features into a comprehensive feature vector.
[0099] Next, the collected comprehensive feature vectors are subjected to dimensionality reduction. Dimensionality reduction methods such as principal component analysis (PCA) can be used to map high-dimensional feature vectors to low-dimensional space to obtain feature dimension vectors to reduce computational complexity and retain key information. Assume that after PCA dimensionality reduction, the feature dimension vector of live broadcast room A is: [0.5, 0.3, 0.2].
[0100] Then, a live broadcast traffic prediction network is constructed based on the feature dimension vector. Each live broadcast room is set as a prediction node in the network, and the node feature matrix is constructed using the feature dimension vector. For example, if there are three live broadcast rooms A, B, and C, and their feature dimension vectors are [0.5, 0.3, 0.2], [0.2, 0.5, 0.3], and [0.3, 0.2, 0.5] respectively, then the node feature matrix is a 3×3 matrix.
[0101] Decompose the node feature matrix and construct a quantum walk operator. By simulating the quantum random walk process, record the quantum state change sequence of each prediction node. Based on these sequences, construct a probability transfer matrix to obtain the traffic propagation path between the prediction nodes. For example, it can be found that the traffic of live broadcast room A has a 50% probability of flowing to live broadcast room B, a 30% probability of flowing to live broadcast room C, and a 20% probability of staying in live broadcast room A.
[0102] The traffic propagation path is input into the causal graph network. The mutual information value between the prediction nodes is calculated in the causal graph network, and the information flow matrix is constructed based on the mutual information value. According to the information flow matrix, the conditional independence judgment rule between the prediction nodes is established, the prediction node pairs with direct causal relationship are identified, and the causal relationship matrix is constructed. For example, if the mutual information value between live broadcast room A and live broadcast room B is very high and meets the conditional independence judgment rule, it is considered that there is a direct causal relationship between A and B.
[0103] Build a deep learning model and take the causal relationship matrix as input. Build the diffusion kernel function based on the causal relationship matrix. Embed the graph neural ordinary differential equation in the deep learning model, build the continuous time state equation, and substitute the diffusion kernel function into the continuous time state equation. By solving the continuous time state equation, the temporal correlation characteristics between the prediction nodes are obtained.
[0104] Finally, based on the time series correlation features, the Pearson correlation coefficient between the prediction nodes is calculated to determine the traffic correlation. The traffic correlations are combined to generate a traffic correlation matrix. For example, the Pearson correlation coefficient between live broadcast room A and live broadcast room B is 0.8, indicating that there is a strong positive correlation between them and the traffic correlation is high.
[0105] In this embodiment, by considering multiple factors such as traffic propagation paths, causal relationships, and timing correlation characteristics, the traffic relationship between live broadcast rooms is more comprehensively characterized, thereby improving the accuracy of traffic prediction; being able to identify the causal relationship and traffic propagation paths between live broadcast rooms helps to deeply understand the traffic propagation mechanism of the live broadcast platform and provide guidance for platform operations; through the analysis of traffic correlation, it can help the platform optimize resource allocation. For example, the recommendation system can recommend related live broadcast rooms to users based on the traffic correlation matrix, thereby improving user experience and platform revenue.
[0106] In an optional implementation, decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording a quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining a traffic propagation path between the prediction nodes according to the probability transfer matrix includes:
[0107] Perform singular value decomposition on the node feature matrix to obtain a left singular matrix, a singular value matrix and a right singular matrix; based on a preset number of front parts, construct a position component by a corresponding number of front parts of the left singular matrix; based on a preset number of rear parts, construct a momentum component by a corresponding number of rear parts of the left singular matrix; multiply the position component by a transposed matrix of the position component to construct a node position operator; multiply the momentum component by a transposed matrix of the momentum component to construct a momentum operator;
[0108] Multiplying the first weight coefficient by the node position operator to obtain a first weighted term; multiplying the second weight coefficient by the momentum operator to obtain a second weighted term; adding the first weighted term to the second weighted term to obtain a Hamiltonian operator;
[0109] Mapping the Hamiltonian operator into an exponential form to obtain a quantum walk operator;
[0110] The initial quantum state of the prediction node is set as a normalized vector; the quantum walk operator is applied to the initial quantum state; according to a preset time step, the quantum state of the prediction node is iteratively updated by the quantum walk operator to obtain a quantum state change sequence of the prediction node within a preset time period;
[0111] Traversing and pairing every two prediction nodes to obtain a prediction node pair, wherein one node is set as a starting node and the other node is set as a terminating node; calculating the inner product of the quantum state of the starting node at the current moment and the quantum state of the terminating node at the next moment; square the modulus of the inner product to obtain the instantaneous transition probability between the starting node and the terminating node; averaging the instantaneous transition probability within a preset time period to obtain the final transition probability between the starting node and the terminating node;
[0112] The final transfer probabilities between all prediction node pairs are combined to generate a probability transfer matrix; the prediction node pairs corresponding to the final transfer probabilities greater than a preset threshold in the probability transfer matrix are determined as traffic propagation paths between the prediction nodes.
[0113] First, perform singular value decomposition on the node feature matrix to decompose it into a left singular matrix, a singular value matrix, and a right singular matrix. For example, a 5×5 node feature matrix, after singular value decomposition, obtains three matrices, namely a 5×5 left singular matrix, a 5×5 singular value matrix, and a 5×5 right singular matrix.
[0114] Then, according to the preset number of front parts and the number of rear parts, the corresponding number of columns are extracted from the left singular matrix to construct the position component and momentum component. Assuming that the preset number of front parts is 2 and the number of rear parts is also 2, the first 2 columns are extracted from the left singular matrix as the position component and the last 2 columns as the momentum component, and each component is a 5×2 matrix.
[0115] Next, multiply the position component by its transposed matrix to get the node position operator, and multiply the momentum component by its transposed matrix to get the momentum operator. For example, multiplying the 5×2 position component by its 2×5 transposed matrix gives a 5×5 node position operator. Similarly, multiplying the 5×2 momentum component by its 2×5 transposed matrix gives a 5×5 momentum operator.
[0116] After that, the first weight coefficient is multiplied by the node position operator to obtain the first weighted term; the second weight coefficient is multiplied by the momentum operator to obtain the second weighted term. Assuming that the first weight coefficient is 0.8 and the second weight coefficient is 0.2, 0.8 is multiplied by the 5×5 node position operator to obtain the first weighted term; 0.2 is multiplied by the 5×5 momentum operator to obtain the second weighted term. Both weighted terms are 5×5 matrices.
[0117] The first weighted term is added to the second weighted term to obtain a Hamiltonian operator. For example, two 5×5 weighted terms are added to obtain a 5×5 Hamiltonian operator.
[0118] The Hamiltonian operator is then mapped to an exponential form to obtain the quantum walk operator. This process can be understood as taking the Hamiltonian operator as the input of the exponential function to obtain a new 5×5 matrix, namely the quantum walk operator.
[0119] Set the initial quantum state of the prediction node to a normalized vector. For example, if you want to predict the traffic propagation path of 5 nodes, the initial quantum state can be set to a 5×1 vector, with each element having a value of , to ensure that the vector length is 1.
[0120] The quantum walk operator is applied to the initial quantum state, and according to the preset time step, the quantum state of the prediction node is iteratively updated through the quantum walk operator to obtain the quantum state change sequence of the prediction node within the preset time period. For example, assuming the time step is 10, the quantum walk operator is applied to the initial quantum state 10 times to obtain 10 5×1 vectors, which constitute the quantum state change sequence.
[0121] Traverse and pair every two prediction nodes to obtain prediction node pairs. For example, for 5 nodes, 10 prediction node pairs can be obtained.
[0122] For each prediction node pair, the inner product of the quantum state of the starting node at the current time and the quantum state of the ending node at the next time is calculated. For example, the inner product of the quantum state of the first node at the first time and the quantum state of the second node at the second time is calculated.
[0123] The square of the modulus of the inner product is used to obtain the instantaneous transition probability between the starting node and the ending node.
[0124] The instantaneous transition probabilities are averaged within a preset time period to obtain the final transition probability between the start node and the end node. For example, the instantaneous transition probabilities within 10 time steps are averaged to obtain the final transition probability.
[0125] The final transition probabilities between all prediction node pairs are combined to generate a probability transition matrix. For example, the final transition probabilities of 10 prediction node pairs are combined into a 5×5 probability transition matrix.
[0126] The predicted node pairs corresponding to the final transition probabilities greater than the preset threshold in the probability transfer matrix are determined as the traffic propagation paths between the predicted nodes. For example, assuming the preset threshold is 0.1, the node pairs corresponding to the elements greater than 0.1 in the probability transfer matrix are determined as the traffic propagation paths.
[0127] In this embodiment, the superposition and interference characteristics of quantum mechanics are utilized to more accurately capture the dynamic relationship between nodes, thereby improving the accuracy of traffic propagation path prediction; it has strong robustness to noise and data missing, and can maintain stable prediction performance in complex network environments; it can provide a probabilistic explanation of the traffic propagation path, which helps to understand the traffic propagation mechanism in the network.
[0128] In an optional implementation, the traffic of the prediction node is monitored. When it is detected that the traffic change of the prediction node exceeds a preset dynamic threshold, the traffic ripple effect calculation is triggered. Based on the graph neural network, a network topology structure is constructed according to the traffic association matrix, and the propagation characteristics of the traffic change are calculated. The traffic ripple propagation range matrix and the traffic surge probability distribution matrix are generated, including:
[0129] Performing traffic monitoring on the prediction node, collecting historical traffic data of the prediction node, calculating statistics of the historical traffic data, updating the dynamic baseline through exponentially weighted moving average based on the statistics, and using the dynamic baseline as the dynamic threshold of the prediction node;
[0130] Detecting the flow data of the prediction node, when the flow data of the prediction node exceeds the dynamic threshold, marking the corresponding prediction node as a flow source node, and recording the flow mutation moment of the flow source node;
[0131] Using a sliding time window, calculate the flow change rate of all prediction nodes directly connected to the flow source node; when the flow change rate of a prediction node exceeds its corresponding dynamic threshold, mark the corresponding prediction node as a first-layer affected node, and record the flow change time of the first-layer affected node;
[0132] Calculate the time difference between the traffic change moment of the affected node in the first layer and the traffic mutation moment to determine the traffic change delay time;
[0133] Calculate the traffic change rate of the prediction nodes directly connected to the first-layer affected nodes; when the traffic change rate of the prediction node exceeds the corresponding dynamic threshold, mark the prediction node as the second-layer affected node; recursively traverse until no new affected nodes are generated;
[0134] The traffic source node and all the affected nodes at all levels are constructed into a ripple propagation graph, in which the physical connection relationship between the nodes is used as an edge; the difference in the delay time of traffic change between two adjacent nodes is calculated as the propagation delay weight of the edge;
[0135] Extract feature vectors from each node in the ripple propagation graph. The feature vectors include the node's traffic change rate, traffic change delay time, and historical traffic sequence. The feature vectors and edge propagation delay weights are used to calculate the attention coefficient between adjacent nodes and construct a graph attention network.
[0136] Perform a weighted combination of the attention coefficient and feature vector of each prediction node and the corresponding adjacent node to obtain the propagation characteristics of the prediction node; calculate the degree score of each prediction node affected by the traffic ripple based on the propagation characteristics, and form the influence degree scores into a ripple propagation range matrix;
[0137] The flow change trend characteristics are extracted based on the propagation characteristics; the flow change trend characteristics are input into a prediction model pre-built based on a long short-term memory neural network to calculate the probability of a flow surge occurring at each prediction node within a preset time window; and the probability values of all prediction nodes are combined into a flow surge probability distribution matrix.
[0138] The traffic ripple effect prediction method is used to predict the propagation range and surge probability of traffic changes in the network. This method is based on graph neural networks and can provide early warning of network traffic risks by analyzing traffic correlation and propagation characteristics between nodes.
[0139] First, monitor the traffic flow of each prediction node and collect its historical traffic data. For example, collect traffic data for the past week and record it once a minute. Calculate the statistics of these historical traffic data, such as the average value, standard deviation, etc. Using these statistics, update the dynamic baseline through the exponentially weighted moving average method. The dynamic baseline represents the normal fluctuation range of the node traffic and is used as the dynamic threshold of the prediction node. For example, the dynamic baseline can be set to the average value of the traffic flow in the past week plus twice the standard deviation.
[0140] Next, the traffic data of the predicted nodes is detected in real time. If the traffic data of a predicted node exceeds its dynamic threshold, the node is marked as a traffic source node and the traffic mutation time is recorded. For example, if the traffic of node A suddenly rises from 100Mbps to 200Mbps at a certain moment, exceeding its dynamic threshold of 150Mbps, node A is marked as a traffic source node and the traffic mutation time is recorded.
[0141] Then, a sliding time window, such as a 5-minute time window, is used to calculate the flow change rate of all prediction nodes directly connected to the flow source node. The flow change rate can be obtained by calculating the difference between the flow average value in the current time window and the flow average value in the previous time window, and then dividing it by the flow average value in the previous time window. If the flow change rate of a prediction node exceeds its corresponding dynamic threshold, the node is marked as a first-level affected node and its flow change time is recorded. For example, if node B is directly connected to flow source node A, and the flow change rate of node B exceeds its dynamic threshold, node B is marked as a first-level affected node.
[0142] Calculate the time difference between the traffic change time of the first-layer affected node and the traffic mutation time of the traffic source node to determine the traffic change delay time. For example, if the traffic mutation time of node A is 10:00 and the traffic change time of node B is 10:02, the traffic change delay time is 2 minutes.
[0143] Continue to calculate the traffic change rate of the prediction nodes directly connected to the first-layer affected nodes. If the traffic change rate of a prediction node exceeds its corresponding dynamic threshold, the node is marked as the second-layer affected node. And so on, recursively traverse until no new affected nodes are generated.
[0144] The traffic source nodes and all the affected nodes at all levels are constructed as a ripple propagation graph. The physical connection relationship between the nodes is used as the edge of the graph. The difference in the delay time of the traffic change between two adjacent nodes is calculated as the propagation delay weight of the edge. For example, if the difference in the delay time of the traffic change from node B to node C is 1 minute, the propagation delay weight of edge BC is set to 1.
[0145] Extract feature vectors for each node in the ripple propagation graph. The feature vector includes the node's traffic change rate, traffic change delay time, and historical traffic sequence. For example, the feature vector of node B can be [traffic change rate: 0.5, traffic change delay time: 2 minutes, historical traffic sequence: traffic data for the past hour]. Use the feature vector and the propagation delay weight of the edge to calculate the attention coefficient between adjacent nodes and construct a graph attention network.
[0146] The attention coefficient and feature vector of each prediction node are weightedly combined with the corresponding adjacent nodes to obtain the propagation characteristics of the prediction node. Based on the propagation characteristics, the degree score of each prediction node affected by traffic ripples is calculated, and the influence degree scores are combined into a ripple propagation range matrix.
[0147] Extract traffic change trend features based on propagation features. Input traffic change trend features into a pre-built prediction model based on a long short-term memory neural network to calculate the probability of a traffic surge for each prediction node within a preset time window, such as the next hour. The probability values of all prediction nodes form a traffic surge probability distribution matrix.
[0148] In this embodiment, by considering the propagation characteristics of traffic and the correlation between nodes, the propagation range and surge probability of traffic changes can be predicted more accurately, avoiding the limitations of traffic prediction based only on a single node; potential traffic risks can be identified in advance, providing network administrators with sufficient time to take countermeasures to avoid network congestion and service interruptions; by providing a traffic ripple propagation range and surge probability distribution matrix, it can help network administrators better understand the dynamic changes of network traffic, optimize network resource allocation, and improve network management efficiency.
[0149] In an optional implementation, a smart contract is deployed on the blockchain network, the smart contract is embedded with an adaptive routing algorithm, and receiving the traffic surge probability distribution matrix includes:
[0150] Receiving a traffic surge probability distribution matrix, extracting a consensus node whose probability value exceeds a preset probability threshold from the traffic surge probability distribution matrix, and taking the consensus node as a high probability node;
[0151] A clustering algorithm is used to divide the network area where the high-probability node is located into multiple sub-areas; for each sub-area, the number of data packets per unit time is counted to obtain the traffic density, and the ratio of the bandwidth occupancy of all links in the sub-area to the total bandwidth is calculated to obtain the link bandwidth utilization; the number of the high-probability nodes contained in the sub-area is calculated;
[0152] Acquire the geographic coordinate information of the high-probability node, calculate the spatial density distribution of the high-probability node based on the geographic coordinate information, and generate a spatial distribution heat map; convert the spatial distribution heat map into a spatial distribution feature vector;
[0153] Constructing a multi-layer perceptron neural network; in the input layer of the multi-layer perceptron neural network, concatenating the flow density of the sub-region, the link bandwidth utilization and the spatial distribution feature vector into an input feature vector;
[0154] Read historical routing records within a preset time period from the blockchain network, and select a routing path with the best performance as a historical optimal routing path based on the transmission performance evaluation results of the historical routing records; perform feature encoding on the historical optimal routing path to obtain a historical routing feature vector;
[0155] In each hidden layer of the multi-layer perceptron neural network, the historical routing feature vector is converted into a hidden layer mapping feature vector through a fully connected layer, which has the same dimension as the hidden layer output feature vector; the hidden layer mapping feature vector is residually connected with the hidden layer output feature vector to obtain an optimized routing feature vector;
[0156] At the output layer of the multi-layer perceptron neural network, a routing scoring matrix is generated based on the optimized routing feature vector, wherein the dimension of the routing scoring matrix corresponds to the total number of network links, and based on each element in the routing scoring matrix, a probability value of the corresponding link being selected as a data packet forwarding path is determined;
[0157] Generate multiple candidate forwarding paths for data packets according to the routing scoring matrix; obtain real-time link load data on the candidate forwarding paths; perform weighted calculation on the probability value of the routing scoring matrix and the real-time link load data to obtain a comprehensive score for each candidate forwarding path, and select the candidate forwarding path with the highest comprehensive score as the data packet forwarding path.
[0158] Deploying an adaptive routing smart contract in the blockchain network can effectively deal with the congestion problem caused by the surge in network traffic and improve the stability and efficiency of the network. The specific implementation of the smart contract is as follows:
[0159] First, the smart contract receives a traffic surge probability distribution matrix. The matrix describes the probability of a traffic surge for each consensus node in the network in the future. For example, the matrix can be expressed as a mapping relationship between node IDs and corresponding probability values, such as the probability of node A is 0.8, the probability of node B is 0.2, the probability of node C is 0.5, and so on. The smart contract sets a preset probability threshold, such as 0.6. Then, the consensus nodes whose probability values exceed the preset probability threshold are extracted from the traffic surge probability distribution matrix, and these nodes are marked as high-probability nodes. In the above example, the probability value of node A, 0.8, exceeds the threshold of 0.6, so node A is marked as a high-probability node.
[0160] Next, a clustering algorithm, such as the K-means algorithm, is used to divide the network area where the high-probability nodes are located into multiple sub-areas. For example, clustering can be performed based on the geographical location information of the nodes. For each sub-area, the number of data packets per unit time (e.g., 1 second) is counted to obtain the traffic density of the sub-area. For example, if a sub-area receives 1,000 data packets in 1 second, the traffic density of the sub-area is 1,000 data packets / second. At the same time, the ratio of the bandwidth occupancy of all links in the sub-area to the total bandwidth is calculated to obtain the link bandwidth utilization. For example, if the total bandwidth of a sub-area is 10Gbps and the bandwidth occupancy of all current links is 6Gbps, the link bandwidth utilization of the sub-area is 60%. In addition, the number of high-probability nodes contained in each sub-area needs to be counted. For example, a sub-area contains 3 high-probability nodes.
[0161] Then, obtain the geographic coordinate information of the high-probability nodes, such as longitude and latitude. Based on these geographic coordinate information, calculate the spatial density distribution of the high-probability nodes and generate a spatial distribution heat map. The darker the area in the heat map, the denser the high-probability nodes. Convert the spatial distribution heat map into a spatial distribution feature vector. For example, the heat map can be divided into several grids, and the average color depth value of each grid is used as a feature value to form a feature vector.
[0162] Next, a multi-layer perceptron neural network is constructed. In the input layer, the traffic density, link bandwidth utilization, and spatial distribution feature vector of each sub-region are concatenated into an input feature vector. For example, if the traffic density of a sub-region is 1000, the link bandwidth utilization is 0.6, and the spatial distribution feature vector is [0.1, 0.2, 0.3], then the input feature vector of the sub-region is [1000, 0.6, 0.1, 0.2, 0.3].
[0163] Read historical routing records within a preset time period (e.g., the past hour) from the blockchain network. Based on the transmission performance evaluation results (e.g., delay, packet loss rate) of these historical routing records, select the routing path with the best performance as the historical optimal routing path. Perform feature encoding on the historical optimal routing path to obtain a historical routing feature vector. For example, one-hot encoding can be used to represent each node on the path as a feature dimension.
[0164] In each hidden layer of the multi-layer perceptron neural network, the historical routing feature vector is converted into a hidden layer mapping feature vector through a fully connected layer, so that its dimension is the same as the dimension of the hidden layer output feature vector. The hidden layer mapping feature vector is residually connected with the hidden layer output feature vector to obtain the optimized routing feature vector.
[0165] At the output layer, a routing score matrix is generated based on the optimized routing feature vector. The dimension of the routing score matrix corresponds to the total number of network links. Each element in the matrix represents the probability value of the corresponding link being selected as the packet forwarding path. For example, if there are 5 links in the network, the routing score matrix is a 5-dimensional vector with each element value between 0 and 1.
[0166] Generate multiple candidate forwarding paths for data packets based on the routing score matrix. For example, you can select several links with the highest scores to form candidate paths. Obtain real-time link load data on the candidate forwarding paths, such as current bandwidth occupancy, latency, etc. Perform weighted calculations on the probability value of the routing score matrix and the real-time link load data to obtain a comprehensive score for each candidate forwarding path. Finally, select the candidate forwarding path with the highest comprehensive score as the data packet forwarding path.
[0167] In this embodiment, through the adaptive routing algorithm, the smart contract can dynamically adjust the routing strategy according to the real-time status of the network and select the optimal path for data packet forwarding, thereby reducing network latency and improving throughput; by considering the probability distribution of traffic surges, the smart contract can predict network congestion in advance and adopt corresponding routing strategies to avoid network congestion and improve network stability; by dividing the areas where high-probability nodes are located and considering factors such as the traffic density, link bandwidth utilization, and node spatial distribution of each area, the smart contract can more finely control the allocation of network resources and improve resource utilization.
[0168] In an optional implementation, an edge acceleration node is deployed in the target area, and the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing policy and establishes a data transmission channel, and the data transmission channel bypasses the TCP / IP protocol stack to forward data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, the traffic surge probability distribution matrix is used as a state input, and the transmission rate of the data packet is adjusted in turn with minimizing the transmission delay of the highest priority data packet as the optimization goal, including:
[0169] Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface supporting remote direct memory access; the edge acceleration node divides a data buffer in the local memory through the network interface, and registers the data buffer as a memory area for remote direct memory access; the edge acceleration node exchanges queue pair information with the target node to establish a connection, wherein the queue pair information includes a queue pair number, a memory area identifier, and an access key; the edge acceleration node establishes a hardware-level data transmission channel based on the queue pair information;
[0170] The edge acceleration node periodically reads the hardware performance counter of the network interface to obtain network status parameters including transmission queue depth, link bandwidth utilization and data packet retransmission rate; the edge acceleration node calculates the network congestion index according to the network status parameters; when the network congestion index exceeds a preset threshold, a congestion control mechanism is triggered;
[0171] The edge acceleration node combines the current traffic surge probability distribution matrix, the real-time queue length of each priority data packet, the network state parameter and the historical transmission rate into a state vector; inputs the state vector into the policy network to generate a transmission rate adjustment coefficient for each priority data packet;
[0172] The edge acceleration node adjusts the transmission rate of each priority data packet according to the transmission rate adjustment coefficient; collects the end-to-end transmission delay, average queue length and packet loss rate of the highest priority data packet after adjustment, and calculates a reward value, wherein the reward value is inversely proportional to the end-to-end transmission delay, the average queue length and the packet loss rate;
[0173] The edge acceleration node combines the state vector, the transmission rate adjustment coefficient and the reward value into experience data; stores the experience data in an experience replay buffer; randomly samples historically stored experience data from the experience replay buffer; trains the policy network based on the historically stored experience data, and updates network parameters through a soft update mechanism.
[0174] First, deploy edge acceleration nodes in the target area and select network interface cards that support remote direct memory access technology. After the edge acceleration node is started, the local memory space is initialized through the network interface card driver and a dedicated data buffer is divided in the memory. The data buffer size is set according to actual business needs, and the typical configuration is 4GB. The data buffer is then registered to the network interface card through the remote direct memory access interface, making it a shared memory area that can be accessed remotely.
[0175] When the edge acceleration node establishes a connection with the target node, it first exchanges queue pair information. The queue pair information contains three key fields: the queue pair number uses an increasing integer value, starting from 1; the memory area identifier uses a 128-bit unique identification string; the access key uses a 256-bit random string. After the target node receives the queue pair information, it returns a confirmation message, and the two parties begin to establish a hardware-based direct data transmission channel.
[0176] The edge acceleration node reads the hardware performance counter of the network interface card every 100 milliseconds to obtain three types of network status parameters: the transmission queue depth indicates the number of packets currently to be processed; the link bandwidth utilization indicates the percentage of used bandwidth to the total bandwidth; and the packet retransmission rate indicates the ratio of the number of retransmitted packets to the total number of transmitted packets. The network congestion index is calculated based on these three parameters: when the transmission queue depth exceeds 1,000 packets, the bandwidth utilization exceeds 80%, and the retransmission rate exceeds 1%, the congestion index will exceed the preset threshold of 0.8, triggering the congestion control mechanism.
[0177] After triggering congestion control, the edge acceleration node constructs a state vector. The state vector contains four parts: the traffic surge probability distribution matrix records the probability distribution of traffic bursts in the last 10 time windows; the real-time queue length of each priority packet records the current queue backlog of high, medium and low priorities; the network state parameter contains the readings of the above three types of hardware counters; the historical transmission rate records the rate values of the previous 10 adjustment cycles. The complete state vector is input into the pre-trained policy network, and the policy network outputs the transmission rate adjustment coefficients corresponding to the three priority packets.
[0178] The edge acceleration node modifies the transmission rate of each priority data packet according to the output adjustment coefficient. Taking high-priority data packets as an example, if the adjustment coefficient is 1.5, its transmission rate will be increased from the original 100Mbps to 150Mbps. After the adjustment is completed, the transmission quality indicators of high-priority data packets are monitored: the end-to-end transmission delay should not exceed 50 milliseconds, the average queue length should be kept below 100 packets, and the packet loss rate should be less than 0.1%. The reward value is calculated based on these indicators. The closer the indicator is to the target value, the greater the reward value.
[0179] In order to continuously optimize the control strategy, the edge acceleration node packages the state vector, adjustment coefficient and reward value into experience data and stores them in the experience playback buffer with a capacity of 10,000 records. The system randomly extracts 1,000 historical experience data each time to train the policy network. The soft update mechanism is used to ensure the stability of training: the new and old parameters are weighted averaged at a ratio of 0.001 and 0.999, and the network parameters are gradually updated.
[0180] For example, a live video platform deploys this congestion control solution on edge nodes. When network congestion is detected, the system prioritizes the live quality of paying users and appropriately reduces the bit rate for free users. After continuous optimization, the average transmission delay of high-priority live streams has been reduced from 80 milliseconds to 45 milliseconds, bandwidth utilization has increased by 15%, and the user viewing experience has been significantly improved.
[0181] In this embodiment, remote direct memory access technology is used to reduce operating system interference and context switching during data transmission, significantly reduce latency and improve data transmission efficiency; real-time network status parameters (such as queue depth, link bandwidth utilization, and packet retransmission rate) are obtained with the help of hardware performance counters to achieve dynamic monitoring of network status; by calculating the network congestion index and triggering the congestion control mechanism, the risk of network congestion is effectively reduced under high load conditions to ensure data transmission stability; a transmission rate adjustment coefficient is generated using a policy network to adjust the transmission rate of packets of different priorities according to the real-time status to optimize bandwidth utilization and packet transmission efficiency; a state vector is constructed based on the traffic surge probability distribution matrix and historical network behavior, and the strategy is dynamically adjusted in combination with a reinforcement learning mechanism to improve network adaptability and flexibility; end-to-end transmission delay, queue length, and packet loss rate are optimized through a reward function to achieve lower network transmission costs; historical experience is stored and sampled through an experience replay buffer to repeatedly train the policy network, and a soft update mechanism is used to improve the stability of the network model and decision accuracy.
[0182] Figure 2 FIG. 1 is a schematic diagram of the structure of a live visitor traffic prediction and routing scheduling system based on spatiotemporal sequence according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0183] The first unit is used to collect traffic data of each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, and build a live broadcast traffic prediction network based on the comprehensive feature vector and each live broadcast room as a prediction node, and use a deep learning model to calculate the traffic correlation between each prediction node to determine the traffic correlation matrix; the prediction node is monitored for traffic, and when it is detected that the traffic change of the prediction node exceeds a preset dynamic threshold, the traffic ripple effect calculation is triggered, and a network topology structure is built according to the traffic correlation matrix based on a graph neural network, the propagation characteristics of the traffic change are calculated, and a traffic ripple propagation range matrix and a traffic surge probability distribution matrix are generated;
[0184] The second unit is used to set the network area indicated by the traffic ripple propagation range matrix as the target area, build a blockchain network in the target area, and map the load balancing nodes in the target area to the consensus nodes of the blockchain network; deploy a smart contract in the blockchain network, the smart contract embeds an adaptive routing algorithm, receives the traffic surge probability distribution matrix, and when the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, triggers the smart contract to execute shard parallel processing, and generates a data packet routing strategy based on the lightning network technology;
[0185] The third unit is used to deploy an edge acceleration node in the target area, and the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, and the data transmission channel bypasses the TCP / IP protocol stack to forward data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially adjusts the data packet transmission rate with the optimization goal of minimizing the transmission delay of the highest priority data packet.
[0186] According to a third aspect of the embodiments of the present invention,
[0187] An electronic device is provided, comprising:
[0188] processor;
[0189] a memory for storing processor-executable instructions;
[0190] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0191] According to a fourth aspect of the embodiments of the present invention,
[0192] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0193] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A live visitor traffic prediction and routing scheduling method based on spatiotemporal sequence, characterized in that: include: Collect traffic data from each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, build a live broadcast traffic prediction network based on the comprehensive feature vector and take each live broadcast room as a prediction node, use a deep learning model to calculate the traffic correlation between each prediction node, and determine the traffic correlation matrix; monitor the traffic of the prediction node, and when it is detected that the traffic change of the prediction node exceeds the preset dynamic threshold, trigger the traffic ripple effect calculation, build a network topology structure based on the traffic correlation matrix based on the graph neural network, calculate the propagation characteristics of the traffic change, and generate a traffic ripple propagation range matrix and a traffic surge probability distribution matrix; The network area indicated by the traffic ripple propagation range matrix is set as the target area, a blockchain network is constructed in the target area, and the load balancing nodes in the target area are mapped as consensus nodes of the blockchain network; Deploy a smart contract on the blockchain network, embed an adaptive routing algorithm in the smart contract, receive the traffic surge probability distribution matrix, and when the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, trigger the smart contract to execute shard parallel processing and generate a data packet routing strategy based on the lightning network technology; Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface that supports remote direct memory access; The edge acceleration node receives the data packet routing strategy and establishes a data transmission channel. The data transmission channel bypasses the TCP / IP protocol stack and forwards data packets. The edge acceleration node monitors the network status of the data transmission channel. When network congestion is detected, based on an online reinforcement learning algorithm, the traffic surge probability distribution matrix is used as a state input, and the transmission rate of the data packet is adjusted in turn with minimizing the transmission delay of the highest priority data packet as the optimization goal.
2. The method according to claim 1, characterized in that Based on the comprehensive feature vector, each live broadcast room is used as a prediction node to build a live broadcast traffic prediction network, and a deep learning model is used to calculate the traffic correlation between each prediction node. The traffic correlation matrix is determined to include: Receive a comprehensive feature vector of a live broadcast room, the comprehensive feature vector including traffic data features, user behavior features, and content features; perform dimensionality reduction processing on the comprehensive feature vector to obtain a feature dimension vector; construct a live broadcast traffic prediction network based on the feature dimension vector, set each live broadcast room as a prediction node in the live broadcast traffic prediction network, and construct a node feature matrix of the prediction node based on the feature dimension vector; Decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording the quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining the traffic propagation path between the prediction nodes according to the probability transfer matrix; Input the traffic propagation path into a causal graph network, calculate the mutual information value between the prediction nodes in the causal graph network, and construct an information flow matrix based on the mutual information value; establish a conditional independence determination rule between the prediction nodes according to the information flow matrix, identify prediction node pairs with direct causal relationships based on the conditional independence determination rule, and construct a causal relationship matrix between the prediction nodes; Constructing a deep learning model, taking the causal relationship matrix as input, and constructing a diffusion kernel function based on the causal relationship matrix; embedding a graph neural network ordinary differential equation in the deep learning model, constructing a continuous-time state equation, substituting the diffusion kernel function into the continuous-time state equation, and obtaining the temporal correlation characteristics between the prediction nodes by solving the continuous-time state equation; Based on the time series correlation features, the Pearson correlation coefficients between the prediction nodes are calculated to determine the flow correlations, and the flow correlations are combined to generate a flow correlation matrix.
3. The method according to claim 2, characterized in that Decomposing the node feature matrix, constructing a quantum walk operator, executing a quantum random walk process based on the quantum walk operator, recording a quantum state change sequence of each prediction node, constructing a probability transfer matrix based on the quantum state change sequence, and obtaining a traffic propagation path between the prediction nodes according to the probability transfer matrix includes: Perform singular value decomposition on the node feature matrix to obtain a left singular matrix, a singular value matrix and a right singular matrix; based on a preset number of front parts, construct a position component by a corresponding number of front parts of the left singular matrix; based on a preset number of rear parts, construct a momentum component by a corresponding number of rear parts of the left singular matrix; multiply the position component by a transposed matrix of the position component to construct a node position operator; multiply the momentum component by a transposed matrix of the momentum component to construct a momentum operator; Multiplying the first weight coefficient by the node position operator to obtain a first weighted term; multiplying the second weight coefficient by the momentum operator to obtain a second weighted term; adding the first weighted term to the second weighted term to obtain a Hamiltonian operator; Mapping the Hamiltonian operator into an exponential form to obtain a quantum walk operator; The initial quantum state of the prediction node is set as a normalized vector; the quantum walk operator is applied to the initial quantum state; according to a preset time step, the quantum state of the prediction node is iteratively updated by the quantum walk operator to obtain a quantum state change sequence of the prediction node within a preset time period; Traversing and pairing every two prediction nodes to obtain a prediction node pair, wherein one node is set as a starting node and the other node is set as a terminating node; calculating the inner product of the quantum state of the starting node at the current moment and the quantum state of the terminating node at the next moment; square the modulus of the inner product to obtain the instantaneous transition probability between the starting node and the terminating node; averaging the instantaneous transition probability within a preset time period to obtain the final transition probability between the starting node and the terminating node; The final transfer probabilities between all prediction node pairs are combined to generate a probability transfer matrix; the prediction node pairs corresponding to the final transfer probabilities greater than a preset threshold in the probability transfer matrix are determined as traffic propagation paths between the prediction nodes.
4. The method according to claim 1, characterized in that: The traffic flow of the prediction node is monitored. When the traffic flow change of the prediction node is detected to exceed a preset dynamic threshold, the traffic ripple effect calculation is triggered. Based on the graph neural network, the network topology structure is constructed according to the traffic association matrix, the propagation characteristics of the traffic change are calculated, and the traffic ripple propagation range matrix and the traffic surge probability distribution matrix are generated, including: Performing traffic monitoring on the prediction node, collecting historical traffic data of the prediction node, calculating statistics of the historical traffic data, updating the dynamic baseline through exponentially weighted moving average based on the statistics, and using the dynamic baseline as the dynamic threshold of the prediction node; Detecting the flow data of the prediction node, when the flow data of the prediction node exceeds the dynamic threshold, marking the corresponding prediction node as a flow source node, and recording the flow mutation moment of the flow source node; Using a sliding time window, calculate the flow change rate of all prediction nodes directly connected to the flow source node; when the flow change rate of a prediction node exceeds its corresponding dynamic threshold, mark the corresponding prediction node as a first-layer affected node, and record the flow change time of the first-layer affected node; Calculate the time difference between the traffic change moment of the affected node in the first layer and the traffic mutation moment to determine the traffic change delay time; Calculate the traffic change rate of the prediction nodes directly connected to the first-layer affected nodes; when the traffic change rate of the prediction node exceeds the corresponding dynamic threshold, mark the prediction node as the second-layer affected node; recursively traverse until no new affected nodes are generated; The traffic source node and all the affected nodes at all levels are constructed into a ripple propagation graph, in which the physical connection relationship between the nodes is used as an edge; the difference in the delay time of traffic change between two adjacent nodes is calculated as the propagation delay weight of the edge; Extract feature vectors from each node in the ripple propagation graph. The feature vectors include the node's traffic change rate, traffic change delay time, and historical traffic sequence. The feature vectors and edge propagation delay weights are used to calculate the attention coefficient between adjacent nodes and construct a graph attention network. Perform a weighted combination of the attention coefficient and feature vector of each prediction node and the corresponding adjacent node to obtain the propagation characteristics of the prediction node; calculate the degree score of each prediction node affected by the traffic ripple based on the propagation characteristics, and form the influence degree scores into a ripple propagation range matrix; The flow change trend characteristics are extracted based on the propagation characteristics; the flow change trend characteristics are input into a prediction model pre-built based on a long short-term memory neural network to calculate the probability of a flow surge occurring at each prediction node within a preset time window; and the probability values of all prediction nodes are combined into a flow surge probability distribution matrix.
5. The method according to claim 1, characterized in that Deploying a smart contract on the blockchain network, wherein the smart contract embeds an adaptive routing algorithm, and receiving the traffic surge probability distribution matrix includes: Receiving a traffic surge probability distribution matrix, extracting a consensus node whose probability value exceeds a preset probability threshold from the traffic surge probability distribution matrix, and taking the consensus node as a high probability node; A clustering algorithm is used to divide the network area where the high-probability node is located into multiple sub-areas; for each sub-area, the number of data packets per unit time is counted to obtain the traffic density, and the ratio of the bandwidth occupancy of all links in the sub-area to the total bandwidth is calculated to obtain the link bandwidth utilization; the number of the high-probability nodes contained in the sub-area is calculated; Acquire the geographic coordinate information of the high-probability node, calculate the spatial density distribution of the high-probability node based on the geographic coordinate information, and generate a spatial distribution heat map; convert the spatial distribution heat map into a spatial distribution feature vector; Constructing a multi-layer perceptron neural network; in the input layer of the multi-layer perceptron neural network, concatenating the flow density of the sub-region, the link bandwidth utilization and the spatial distribution feature vector into an input feature vector; Read historical routing records within a preset time period from the blockchain network, and select a routing path with the best performance as a historical optimal routing path based on the transmission performance evaluation results of the historical routing records; perform feature encoding on the historical optimal routing path to obtain a historical routing feature vector; In each hidden layer of the multi-layer perceptron neural network, the historical routing feature vector is converted into a hidden layer mapping feature vector through a fully connected layer, which has the same dimension as the hidden layer output feature vector; the hidden layer mapping feature vector is residually connected with the hidden layer output feature vector to obtain an optimized routing feature vector; At the output layer of the multi-layer perceptron neural network, a routing scoring matrix is generated based on the optimized routing feature vector, wherein the dimension of the routing scoring matrix corresponds to the total number of network links, and based on each element in the routing scoring matrix, a probability value of the corresponding link being selected as a data packet forwarding path is determined; Generate multiple candidate forwarding paths for data packets according to the routing scoring matrix; obtain real-time link load data on the candidate forwarding paths; perform weighted calculation on the probability value of the routing scoring matrix and the real-time link load data to obtain a comprehensive score for each candidate forwarding path, and select the candidate forwarding path with the highest comprehensive score as the data packet forwarding path.
6. The method according to claim 1, characterized in that Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface that supports remote direct memory access; the edge acceleration node receives the data packet routing strategy and establishes a data transmission channel, wherein the data transmission channel bypasses the TCP / IP protocol stack and forwards data packets; the edge acceleration node monitors the network status of the data transmission channel, and when network congestion is detected, based on an online reinforcement learning algorithm, uses the traffic surge probability distribution matrix as a state input, and sequentially takes minimizing the transmission delay of the highest priority data packet as an optimization goal, and adjusts the data packet transmission rate, including: Deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface supporting remote direct memory access; the edge acceleration node divides a data buffer in the local memory through the network interface, and registers the data buffer as a memory area for remote direct memory access; the edge acceleration node exchanges queue pair information with the target node to establish a connection, wherein the queue pair information includes a queue pair number, a memory area identifier, and an access key; the edge acceleration node establishes a hardware-level data transmission channel based on the queue pair information; The edge acceleration node periodically reads the hardware performance counter of the network interface to obtain network status parameters including transmission queue depth, link bandwidth utilization and data packet retransmission rate; the edge acceleration node calculates the network congestion index according to the network status parameters; when the network congestion index exceeds a preset threshold, a congestion control mechanism is triggered; The edge acceleration node combines the current traffic surge probability distribution matrix, the real-time queue length of each priority data packet, the network state parameter and the historical transmission rate into a state vector; inputs the state vector into the policy network to generate a transmission rate adjustment coefficient for each priority data packet; The edge acceleration node adjusts the transmission rate of each priority data packet according to the transmission rate adjustment coefficient; collects the end-to-end transmission delay, average queue length and packet loss rate of the highest priority data packet after adjustment, and calculates a reward value, wherein the reward value is inversely proportional to the end-to-end transmission delay, the average queue length and the packet loss rate; The edge acceleration node combines the state vector, the transmission rate adjustment coefficient and the reward value into experience data; stores the experience data in an experience replay buffer; randomly samples historically stored experience data from the experience replay buffer; trains the policy network based on the historically stored experience data, and updates network parameters through a soft update mechanism.
7. A live visitor traffic prediction and routing scheduling system based on spatiotemporal sequences, used to implement the method described in any one of claims 1 to 6, characterized in that: include: The first unit is used to collect traffic data of each live broadcast room in the live broadcast cluster, calculate the comprehensive feature vector of each live broadcast room, and build a live broadcast traffic prediction network based on the comprehensive feature vector and each live broadcast room as a prediction node, and use a deep learning model to calculate the traffic correlation between each prediction node to determine the traffic correlation matrix; the prediction node is monitored for traffic, and when it is detected that the traffic change of the prediction node exceeds a preset dynamic threshold, the traffic ripple effect calculation is triggered, and a network topology structure is built according to the traffic correlation matrix based on a graph neural network, the propagation characteristics of the traffic change are calculated, and a traffic ripple propagation range matrix and a traffic surge probability distribution matrix are generated; The second unit is used to set the network area indicated by the traffic ripple propagation range matrix as a target area, build a blockchain network in the target area, and map the load balancing nodes in the target area as consensus nodes of the blockchain network; Deploy a smart contract on the blockchain network, embed an adaptive routing algorithm in the smart contract, receive the traffic surge probability distribution matrix, and when the probability value in the traffic surge probability distribution matrix exceeds a preset probability threshold, trigger the smart contract to execute shard parallel processing and generate a data packet routing strategy based on the lightning network technology; A third unit is used to deploy an edge acceleration node in the target area, wherein the edge acceleration node is configured with a network interface supporting remote direct memory access; The edge acceleration node receives the data packet routing strategy and establishes a data transmission channel. The data transmission channel bypasses the TCP / IP protocol stack and forwards data packets. The edge acceleration node monitors the network status of the data transmission channel. When network congestion is detected, based on an online reinforcement learning algorithm, the traffic surge probability distribution matrix is used as a state input, and the transmission rate of the data packet is adjusted in turn with minimizing the transmission delay of the highest priority data packet as the optimization goal.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for transmitting live broadcast data, server, and system for transmitting live broadcast data
CN109218764A
Information push method and card display method in network live broadcast scene
CN114257873A