A dynamic node load balancing system for multi-path concurrent audio and video stream
Patent Information
- Application Number
- CN202610792553.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]由此产生的结果是,系统虽然在平均意义上看似完成了节点负载均衡,但某些节点仍会出现局部热点、迁移抖动和切换效果不佳的问题
[0007] The beneficial effects of this invention are as follows: This invention can shift the scheduling object of multi-channel concurrent audio and video streams from the traditional session-level object to a shared ingress stream set-level object, and unify the ingress compression relationship, fan-out replication relationship, and feedback repair relationship into structural hotspot characteristic quantities, thereby establishing node equivalent load and allocation scheme evaluation quantities. Therefore, when performing node migration and route switching, the system no longer relies solely on the number of sessions, bandwidth, or average occupancy rate, but can select target nodes based on actual processing pressure, reducing the probability of continuous accumulation of local hotspots. Simultaneously, this invention further transforms the optimization results into target migration arrays, route switching instructions, and capacity level snapshots, making the scheduling results both executable and observable, facilitating the formation of a continuously iterative online load balancing mechanism.
Smart Images

Figure CN122933640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission optimization technology, and more specifically, to a dynamic node load balancing system for multiple parallel audio and video streams. Background Technology
[0002] In multi-party real-time audio and video systems, with the continuous increase in the number of edge access nodes, central forwarding nodes, and mobile terminals, multiple audio streams, video streams, feedback streams, and repair streams are frequently transmitted concurrently. In current engineering practices, to reduce access complexity and transmission overhead, multiple logical media sources often share the same inbound transmission channel or inbound port to enter the forwarding node, which then replicates and distributes the data to multiple downstream subscriptions. Such systems appear to have multiple concurrent connections in terms of business logic, but at the underlying level, they may exhibit shared entry points and path aggregation. Therefore, the actual load on a node is not entirely equivalent to the number of sessions or the total bandwidth.
[0003] Existing load balancing methods typically allocate and migrate resources based on node processor utilization, network bandwidth utilization, number of sessions, or number of users. While these methods can reflect some operational status, they struggle to identify structural hotspots arising from multiple synchronization sources sharing a single entry point, multi-branch replication and forwarding, and feedback repair amplification occurring simultaneously. Especially in shared entry point transmission scenarios, multiple logical media sources can overlap on a small number of physical entry points, significantly increasing the burden of entry point resolution, state maintenance, and context switching. Furthermore, the same shared entry point stream may be replicated to multiple downstream branches, leading to a continuous accumulation of replication and forwarding overhead and transmission preparation overhead within the node. With the addition of feedback and repair processing, the actual bottleneck of a node often does not appear where traditional statistical indicators are most prominent.
[0004] The result is that although the system appears to have achieved node load balancing on average, some nodes still experience local hotspots, migration jitter, and poor handover performance. When the load model cannot accurately describe the degree of ingress compression, fan-out replication, and feedback repair amplification, the scheduler is prone to continuing to allocate high-risk shared ingress stream sets to nodes that are already close to their limits, or to mistakenly migrate low-risk objects, thereby increasing ineffective handovers and state disturbances. Summary of the Invention
[0005] This invention provides a dynamic node load balancing system for multiple parallel audio and video streams, solving the technical problems mentioned in the background.
[0006] This invention provides a dynamic node load balancing system for multiple parallel audio and video streams, comprising: The first module aggregates the data from the same transmission entry point into a shared entry stream set according to the time window, calculates the traffic burden of each shared entry stream set within the time window, calculates the ratio of the synchronization source identifier to the inbound port to obtain the entry compression factor, and extracts structural hot spot feature quantities by combining the number of fan-out branches and the traffic burden. The second module calculates the equivalent load on nodes caused by the shared ingress stream set based on the traffic burden of the shared ingress stream set within the time window, combining the ingress compression factor and the number of fan-out branches. The equivalent load on nodes is then divided by the node capacity limit to obtain the initial node occupancy rate. The third module establishes a collaborative optimization model, injects the node's equivalent load and initial node occupancy rate as reverse constraints into the optimization particles, and outputs a prediction allocation matrix. The fourth module extracts the extreme value risk, distribution equilibrium value and mapping change cost from the predicted allocation matrix, and sums the three to generate the allocation scheme evaluation quantity. The fifth module utilizes the transformation of structural hot spot features to obtain adaptive search weights, multiplies the structural hot spot features by the equivalent load of nodes to extract feature repulsion momentum, and combines the allocation scheme evaluation to update the optimization particles to obtain the globally optimal allocation matrix. The sixth module compares the global optimal allocation matrix with the system's initial allocation matrix to extract node differences and generate the target migration matrix. It then calculates the final node occupancy rate by combining the global optimal allocation matrix with the equivalent load of the nodes. The seventh module issues routing switching instructions based on the target migration array as the shared ingress flow set, converts the final node occupancy rate into a capacity water level snapshot, and outputs it.
[0007] The beneficial effects of this invention are as follows: This invention can shift the scheduling object of multi-channel concurrent audio and video streams from the traditional session-level object to a shared ingress stream set-level object, and unify the ingress compression relationship, fan-out replication relationship, and feedback repair relationship into structural hotspot characteristic quantities, thereby establishing node equivalent load and allocation scheme evaluation quantities. Therefore, when performing node migration and route switching, the system no longer relies solely on the number of sessions, bandwidth, or average occupancy rate, but can select target nodes based on actual processing pressure, reducing the probability of continuous accumulation of local hotspots. Simultaneously, this invention further transforms the optimization results into target migration arrays, route switching instructions, and capacity level snapshots, making the scheduling results both executable and observable, facilitating the formation of a continuously iterative online load balancing mechanism. Attached Figure Description
[0008] Figure 1 This is a calculation flowchart of a dynamic node load balancing system for multiple parallel audio and video streams according to the present invention. Figure 2 This is a schematic diagram of the optimization and convergence process of the present invention; Figure 3 This is a schematic diagram of the capacity water level change of the present invention. Detailed Implementation
[0009] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0010] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the term encompasses the elements or objects listed following the term and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0011] like Figures 1-3 As shown, a dynamic node load balancing system for multiple parallel audio and video streams includes: The first module aggregates the data from the same transmission entry point into a shared entry stream set according to the time window, calculates the traffic burden of each shared entry stream set within the time window, calculates the ratio of the synchronization source identifier to the inbound port to obtain the entry compression factor, and extracts structural hot spot feature quantities by combining the number of fan-out branches and the traffic burden. The second module calculates the equivalent load on nodes caused by the shared ingress stream set based on the traffic burden of the shared ingress stream set within the time window, combining the ingress compression factor and the number of fan-out branches. The equivalent load on nodes is then divided by the node capacity limit to obtain the initial node occupancy rate. The third module establishes a collaborative optimization model, injects the node's equivalent load and initial node occupancy rate as reverse constraints into the optimization particles, and outputs a prediction allocation matrix. The fourth module extracts the extreme value risk, distribution equilibrium value and mapping change cost from the predicted allocation matrix, and sums the three to generate the allocation scheme evaluation quantity. The fifth module utilizes the transformation of structural hot spot features to obtain adaptive search weights, multiplies the structural hot spot features by the equivalent load of nodes to extract feature repulsion momentum, and combines the allocation scheme evaluation to update the optimization particles to obtain the globally optimal allocation matrix. The sixth module compares the global optimal allocation matrix with the system's initial allocation matrix to extract node differences and generate the target migration matrix. It then calculates the final node occupancy rate by combining the global optimal allocation matrix with the equivalent load of the nodes. The seventh module issues routing switching instructions based on the target migration array as the shared ingress flow set, converts the final node occupancy rate into a capacity water level snapshot, and outputs it.
[0012] It should be noted that injecting optimization particles means adding the initial node occupancy rate and single-flow relative load pressure as negative deduction terms to the calculation of the initial position preference of the optimization particles; it is not a penalty term in the fitness function, nor is it used to directly modify the particle velocity, but rather to construct the initial position preference of the optimization particles.
[0013] It should be noted that the subscripts in the following calculation formulas... Indicates the shared ingress stream set number, i.e., the... A scheduling object; index Indicates the network node number, i.e., the... One carrier node; sub-indicator Indicates the downstream branch number; subscript Indicates the particle number being searched; subscript Indicates the iteration number; symbol Indicates the total number of shared entry stream sets; symbol Represents the total number of network nodes; symbol Indicates the duration of the time window; superscript Indicates "media," meaning media groups; superscript. Indicates feedback, i.e., the burden of feedback and repair; superscript Indicates feedback grouping; superscript Indicates a retransmission repair group; superscript Indicates entry point resolution; superscript Indicates additional context processing; superscript Indicates fan-out copying or forwarding; superscript Indicates the initial state; superscript This represents the optimal state or the final state.
[0014] In one embodiment of the present invention, the calculation steps of the first module specifically include: The formula for calculating media packet traffic load, based on the number of arriving media packets and the duration of the time window, is as follows: ; In the formula, This indicates the media group's traffic burden. Indicates the number of media groups arriving. Indicates the duration of the time window; The formula for calculating the feedback repair traffic burden is as follows, based on the number of arriving feedback packets, the number of arriving retransmission repair packets, and the duration of the time window: ; In the formula, This indicates feedback and indicates efforts to address the traffic burden. Indicates the number of feedback groups that arrived. Indicates the number of retransmission repair packets that have arrived; Based on the number of synchronization source identifiers and the number of inbound ports, the formula for calculating the inbound compression factor is as follows: ; In the formula, Indicates the inlet compression factor. Indicates the number of synchronization source identifiers. Indicates the number of inbound ports; Based on the total number of potential downstream branches and the branch activity status indicator, the formula for calculating the number of fan-out branches is as follows: ; In the formula, Indicates the number of fan-out branches. Indicates the total number of potential downstream branches. This indicates the branch activity status value; Based on the inlet compression factor, fan-out branch number, feedback repair traffic burden, and media packet traffic burden, the calculation formula for the structural hotspot characteristic quantity is as follows:
[0015] In the formula, This represents the characteristic quantity of the structural hot spot.
[0016] It should be noted that the same ingress data refers to the set of raw input data that enters the system and participates in unified scheduling within the same time window via the same access path. This includes at least media packets, feedback packets, and retransmission repair packets. It can be obtained by recording the arrival time, port, source address, destination address, synchronization source identifier, and packet type of each arriving packet at the network interface card (NIC) packet receiving layer, protocol parsing layer, and session merging layer of the access node, and then collecting the data according to the window and merging key. The duration of the time window is a fixed statistical period used by the system to perform one traffic statistics, load estimation, and allocation decision, preferably between 200 and 500 milliseconds, as this range can balance instantaneous fluctuation suppression, feedback statistical stability, and route migration response speed. The shared ingress flow set is a scheduling object formed by merging media streams, feedback streams, and repair streams that share the same ingress transmission conditions and need to maintain overall routing consistency during migration. The number of arriving media packets is the total number of valid media packets arriving at the shared ingress stream set within a time window. It characterizes the scale of basic media input and can be obtained by windowing and counting packets identified as media bearers in the media packet classifier, and collecting data according to their affiliation with the shared ingress stream set. The media packet traffic burden is a unit-time media input pressure indicator formed by normalizing the number of arriving media packets by time window. The number of arriving feedback packets is the total number of feedback control packets arriving at the shared ingress stream set within a time window. It characterizes the scale of control plane input and can be obtained by windowing and counting control packets such as packet loss feedback, congestion feedback, and reception quality feedback in the feedback protocol parsing module. The number of arriving retransmission repair packets is the total number of retransmission repair packets arriving at the shared ingress stream set within a time window. It characterizes the repair link pressure and can be obtained by collecting retransmission repair packets in the retransmission repair identification module based on repair flow tags, original packet association information, and packet type.
[0017] It should be noted that the feedback repair traffic burden is a unit-time control and repair pressure indicator formed by normalizing the number of arriving feedback packets and the number of arriving retransmission repair packets according to the time window. Traffic burden is a measure of the overall input pressure of the shared ingress stream set obtained by merging the media packet traffic burden and the feedback repair traffic burden. The number of active synchronization source identifiers is the number of synchronization source identifiers that continuously generate valid media or feedback behavior within the time window without entering an inactive state. This can be obtained by maintaining the most recent arrival time, most recent transmission time, and inactive timeout threshold for each synchronization source identifier in the synchronization source status table, and then collecting data by filtering active state entries by window. The number of inbound ports is the number of inbound ports actually occupied by the shared ingress stream set within the current time window, used to characterize the parallelism of physical ingress ports. This can be obtained by recording the mapping relationship between the local listening port and the remote inbound port associated with each shared ingress stream set at the access layer, and then collecting data using a deduplication method. The ingress compression factor is the ratio between the number of active synchronization source identifiers and the number of ingress ports, used to characterize the degree of aggregation of multiple logical media sources after compression to a small number of physical ingress ports. The total number of potential downstream branches is the theoretically reachable number of downstream output branches of the shared ingress flow set under the current forwarding topology. It can be obtained by counting all potential output paths bound to the shared ingress flow set in the forwarding table, subscription relationship table, and candidate forwarding chain list. The branch activity status indicator value is a status variable used to indicate whether a potential downstream branch is in an effective forwarding state within the current time window. It can be obtained by combining subscription validity, non-empty sending queue status, the most recent successful forwarding time, and downstream reception acknowledgment status to generate an activity status indicator value for each branch and then collecting it.
[0018] It should be noted that the number of fan-out branches is the number of currently valid fan-out branches obtained by summing the activity status indicators of all branches. It is used to characterize the replication and forwarding scale. It represents the number of downstream output branches that actually participate in effective replication and forwarding within the current time window. Its judgment basis includes subscription validity, sending queue status, recent forwarding success status, downstream confirmation status, and session liveness status.
[0019] The feedback flow ratio is the proportion of feedback repair flow burden to media group flow burden, used to characterize the amplification of control and repair pressure on media pressure. The first value is a baseline constant used to construct the feedback amplification factor, representing the base multiple without additional amplification. This value ensures that when the feedback flow ratio is 0, the feedback amplification factor remains at the base multiple without changing the original media burden level. The feedback amplification factor is the control and repair amplification factor obtained by superimposing the feedback flow ratio value on the base multiple. The structural hotspot characteristic quantity is a structural hotspot characterization quantity composed of the inlet compression factor, the number of fan-out branches, and the feedback amplification factor, used to reflect the strength of local hotspots induced by the shared inlet flow set within the node.
[0020] It should be noted that the shared ingress stream set is constructed by first extracting a statistical window based on a unified time base, and then using the ingress port, source address, destination address, synchronization source identifier attribution, and repair stream association flag as a joint merge key to merge media packets, feedback packets, and retransmission repair packets at the same migration granularity into the same shared ingress stream set. For each synchronization source identifier, the most recent media arrival time, the most recent feedback arrival time, and the inactivation timeout threshold are maintained. When any most recent time is within the inactivation timeout threshold of the current window, the synchronization source identifier is determined to be active. For example, the inactivation timeout threshold can be set to two consecutive window lengths to avoid instantaneous jitter from incorrectly removing valid synchronization sources. Furthermore, the branch activity status indicator is generated by simultaneously checking the subscription validity flag, the most recent successful forwarding time, the send queue writable status, and the downstream session liveness status for each potential downstream branch. When all four conditions meet a preset combination, the branch is marked as active. For example, a branch with a downstream subscription but a blocked send queue and a timed-out session heartbeat should not be counted as a fan-out branch.
[0021] It should be noted that the identification method for feedback packets and retransmission repair packets is as follows: at the protocol parsing layer, control packets and repair packets are classified according to the packet header type field, feedback message subtype, repair stream association flag, and original sequence association relationship, and then counted separately in the number of arriving feedback packets and the number of arriving retransmission repair packets; for example, packet loss feedback messages should be counted in the number of arriving feedback packets, and repair packets corresponding to the original media packets should be counted in the number of arriving retransmission repair packets. The time window is set using a sliding statistical mechanism with a unified window length and a unified window start and end time for all nodes. It is preferable to use a fixed window length plus a half-window sliding method to balance statistical continuity and response speed; for example, when the window length is set to 300 milliseconds, an update calculation can be triggered every 150 milliseconds, thereby avoiding complete disconnection between adjacent calculation rounds. The zero-division protection method for the feedback traffic ratio is as follows: when the media group traffic load is greater than 0, it is calculated according to the normal ratio; when the media group traffic load is equal to 0 and the feedback repair traffic load is also equal to 0, the feedback traffic ratio is set to 0; when the media group traffic load is equal to 0 but the feedback repair traffic load is greater than 0, the feedback traffic ratio is set to a preset upper limit value and an abnormal flag is output synchronously. For example, the preset upper limit value can be set to the highest risk ratio level allowed by the current system to prevent zero-division failure.
[0022] In one embodiment of the present invention, the calculation steps of the second module specifically include: Based on the total time spent on ingress parsing and the total number of media packets received by the target node, the formula for calculating the time spent per unit of media parsing is as follows: ; In the formula, Indicates the time taken to resolve a unit of media. This indicates the total time spent parsing the entry point. This indicates the total number of media packets received by the target node; Based on the total additional context time, the total number of shared ingress stream sets, the number of media packets arriving, and the ingress compression factor, the formula for calculating the unit additional context time is as follows:
[0023] In the formula, Indicates the time spent per unit of additional context. This indicates the total time spent on additional context. Indicates the total number of shared entry streams. Indicates the number of media groups arriving. Indicates the inlet compression factor; Based on the total fan-out replication time, the total number of shared ingress stream sets, the number of media packets arriving, and the number of fan-out branches, the formula for calculating the unit of additional fan-out time is as follows:
[0024] In the formula, Indicates the time consumed per unit of additional fan-out. This indicates the total time spent on fan-out copying. Indicates the number of fan-out branches; Based on the total time spent on feedback repair and the total number of feedback repair groups, the formula for calculating the unit feedback repair time is as follows: ; In the formula, This indicates the time taken for the unit to report the repair process. This indicates the total time spent on feedback repair. Indicates the total number of feedback repair groups; The formula for calculating the equivalent load of a node is as follows, based on the duration of the time window, media packet traffic burden, unit media parsing time, ingress compression factor, unit additional context time, number of fan-out branches, unit additional fan-out time, feedback repair traffic burden, and unit feedback repair time:
[0025] In the formula, This represents the equivalent load of a node. Indicates the duration of the time window. This indicates the media group's traffic burden. This indicates feedback and indicates efforts to reduce traffic burden. Based on the allocation status parameters, the equivalent load of the nodes, and the upper limit of the node capacity, the formula for calculating the initial node occupancy rate is as follows: ; In the formula, This indicates the initial node occupancy rate. Indicates the maximum capacity of a node. This represents the allocation state parameter.
[0026] It should be noted that the target node is the specific network node selected in the current computation round to carry the shared ingress stream set and receive load estimation. The total ingress parsing time is the cumulative processing time consumed by the target node within the time window for inbound packet identification, header parsing, session attribution, and basic verification. This can be obtained by embedding design timing points in the node's packet receiving thread and protocol parsing module, statistically analyzing the start and end times of parsing for each inbound packet, and then summing the data by window. The total number of media packets received by the target node is the total number of media packets actually received by the target node within the time window, used to calibrate the basic parsing workload. This can be obtained by accumulating all valid media packets by window in the target node's media receiving counter. The unit media parsing time is the average ratio between the total ingress parsing time and the total number of media packets received by the target node, used to characterize the basic parsing cost of the target node processing a single media packet. The total additional context time is the cumulative processing time added to the target node within the time window due to shared entry points from multiple synchronization sources, state mapping, stream attribution lookup, and context switching. It can be obtained by recording the start and end times in the synchronization source state management module, context lookup module, and stream attribution association module respectively, and then summing the time spent on paths belonging to the additional context path within the window. The additional compression factor is the additional compression level obtained by subtracting the base factor from the entry compression factor, used to measure the additional context burden brought by shared entry points. The total system compression cost is the system-level compression workload base obtained by multiplying the number of media packets arriving in all shared entry point stream sets by the additional compression factor and summing the results.
[0027] It should be noted that the total number of shared ingress stream sets is the total number of shared ingress stream sets formed and participating in scheduling calculations within a time window of the current system. This can be obtained by counting the valid set entries in the shared ingress stream set management table by window. The unit additional context time is the processing cost per unit of compression workload obtained by normalizing the total additional context time to the total system compression cost. The total fan-out replication time is the cumulative processing time of the target node within the time window for completing media packet replication, branch buffer writing, and multi-path transmission preparation. This can be obtained by embedding design timing points in the replication forwarding module, output buffer module, and branch scheduling module, and summing the cumulative time of the replication path by window. The additional fan-out multiple is the additional fan-out degree obtained by subtracting the base branch from the number of fan-out branches, used to measure the additional burden brought by multi-branch replication.
[0028] It should be noted that the total system fan-out cost is the system-level fan-out workload base obtained by multiplying the number of media packets arriving from all shared ingress stream sets by the additional fan-out multiplier and summing the results. The unit additional fan-out time is the unit additional fan-out processing cost obtained by normalizing the total fan-out replication time to the total system fan-out cost. The total feedback repair time is the cumulative processing time of the target node within the time window for processing feedback packets, retransmission repair packets, and related status updates. This can be obtained by recording the start and end times of processing in the feedback parsing module, repair scheduling module, and status write-back module, and then summing the time spent on feedback repair paths by window. The total number of feedback repair packets is the total number of feedback packets and retransmission repair packets actually processed by the target node within the time window. This can be obtained by accumulating the packets identified as feedback and repair types by window in the feedback repair counter. The unit feedback repair time is the average ratio between the total feedback repair time and the total number of feedback repair packets, used to characterize the unit processing cost of the control and repair surfaces.
[0029] It should be noted that the basic resolution load is the basic media resolution pressure formed by the duration of the time window, the media packet traffic burden, and the unit media resolution time. The additional context load is the context expansion pressure formed by the duration of the time window, the media packet traffic burden, the additional compression factor, and the unit additional context time. The additional fan-out load is the replication and forwarding pressure formed by the duration of the time window, the media packet traffic burden, the additional fan-out factor, and the unit additional fan-out time. The feedback processing load is the feedback repair processing pressure formed by the duration of the time window, the feedback repair traffic burden, and the unit feedback repair time. The node equivalent load is the unified load obtained by adding the basic resolution load, the additional context load, the additional fan-out load, and the feedback processing load, used to characterize the comprehensive processing pressure caused when a shared ingress flow set is placed on a target node. The system initial allocation matrix is the actual mapping state matrix between the shared ingress flow set and network nodes in the system before the start of the current scheduling round. It can be obtained by reading the current routing mapping table and node bearer table maintained by the scheduling controller and collecting it in matrix form.
[0030] It should be noted that the allocation state parameter is an element state quantity in the initial allocation matrix of the system used to indicate whether a certain shared ingress flow set is carried by a certain target node. It can be obtained directly from the corresponding matrix element position of the initial allocation matrix of the system. The current total load of the target node is the current total load obtained by summing the equivalent load of all shared ingress flow sets on the target node under the constraints of the initial allocation matrix of the system. The node capacity limit is a threshold value used to represent the ability of the target node to continuously carry the equivalent load within a time window. The preferred value is set to 0.7 to 0.85 times the sustainable processing capacity of the target node obtained by stress testing under stable delay constraints. That is, this setting can reserve a safety margin for instantaneous peaks, control plane fluctuations, and migration disturbances. The initial node occupancy rate is the proportion of the current total load of the target node relative to the node capacity limit, used to characterize the busyness of the node in the current allocation state.
[0031] It should be noted that the total ingress parsing time is collected by setting up parsing start and end points in the inbound packet receiving path of the target node. The time spent on packet classification, header reading, integrity verification, set attribution lookup, and basic context establishment is included in the statistical interval, and then accumulated by window to form the total ingress parsing time. A unified high-precision timer can be set at the boundary between the packet receiving thread and the parsing thread. The total additional context time is collected by only counting the additional management time introduced by shared ingress, synchronization source switching, status table lookup, session association, and repair association, without repeatedly counting the basic parsing time. If the same packet performs synchronization source status table lookup, downstream branch lookup, and repair relationship write-back after completing the basic header reading, this additional part should be included in the total additional context time. The total fan-out replication time is collected by taking the time from the start of replication to the completion of all branch writes to the send buffer as the statistical boundary, including the time spent on buffer replication, reference count update, branch queue writing, and pre-send preparation. When a media packet is sent to 4 branches at the same time, the 4 buffer enqueues and related metadata writes should all be included in the total fan-out replication time.
[0032] It should be noted that the total feedback repair time is collected by using the time from the start of feedback message parsing to the completion of repair task creation or status write-back as the statistical boundary, including the time spent on feedback understanding, missing group location, repair task generation, and retransmission queue preparation. Processing a missing sequence interval requires both identifying the missing location and preparing for repair transmission; therefore, both parts are included in the total feedback repair time. The node capacity limit is determined by performing phased stress tests on the node under the conditions of not exceeding the target latency threshold and not experiencing continuous queue backlog. The equivalent load limit that can be continuously processed per unit time is obtained, and then multiplied by a safety reduction factor to form the node capacity limit. The number of shared ingress stream sets can be gradually increased first, and the critical load at which continuous queue growth begins can be recorded. The node capacity limit is then set to 0.7 to 0.85 times this critical load.
[0033] In one embodiment of the present invention, the calculation steps of the third module specifically include: Based on the allocation state parameters, random disturbance distribution, initial node occupancy rate, equivalent node load, and node capacity limit, the formula for calculating the initial location preference is as follows:
[0034] In the formula, This represents the initial position preference. Indicates the allocation state parameter. This represents the distribution of random perturbations. This indicates the initial node occupancy rate. This represents the equivalent load of a node. Indicates the maximum capacity of a node; The formula for calculating the initial velocity evolution based on a constant configuration is as follows: ; In the formula, This represents the initial velocity evolution. The formula for calculating the prediction assignment matrix by extracting mapping variables based on location preference walks is as follows:
[0035] In the formula, This represents the mapping variables in the prediction assignment matrix. Indicates location preference migration amount, and This represents the numerical index of a network node.
[0036] It should be noted that the random perturbation distribution is a random perturbation used to break down the initial allocation preferences and expand the optimization search space. It preferably takes a uniform sample value between 0 and 1, with an even better sampling range of 0.05 to 0.3. Smaller perturbations are beneficial for maintaining the stability of the current mapping, while larger perturbations are beneficial for escaping local clustering. Therefore, low-amplitude uniform sampling is used to balance stability and exploration. The preference baseline state is the initial preference baseline formed by superimposing the allocation state parameters with the random perturbation distribution, used to represent the basic tendency of particles towards the current mapping relationship. The single-flow relative load pressure is the ratio of the node's equivalent load to its upper limit capacity, used to characterize the relative pressure generated when a single shared inlet flow set falls on the target node. The reverse constraint is a negative constraint obtained by subtracting the initial node occupancy rate and the single-flow relative load pressure from the preference baseline state, used to suppress high-occupancy and high-pressure nodes from acquiring excessively high preferences during the initialization phase. The initial position preference is a continuous state quantity used to represent the initial location selection tendency of the optimization particles after injecting the reverse constraint. The initial velocity evolution is the starting velocity of the optimization particle during initialization, used to control its motion state before the first iteration. It is preferably set to 0, as setting the initial velocity evolution to 0 prevents disordered jumps before the algorithm completes risk perception. The position preference walk is the continuous preference value of the optimization particle for mapping the shared ingress flow set to different network nodes in any iteration round. The mapping variable is a binary mapping state quantity formed by discretizing the position preference walk using the maximum value selection rule, used to indicate whether a certain shared ingress flow set is assigned to a certain network node. The predicted assignment matrix is a candidate assignment result matrix formed by combining all mapping variables according to the dimensions of the shared ingress flow set and the network node. The network node numerical index is a sequence of numbers used to uniquely identify each network node and participate in matrix calculation and output encapsulation. It is preferably a sequence of continuously increasing positive integers starting from 1, as continuous positive integer indices facilitate matrix addressing, result output, and subsequent routing controller parsing.
[0037] It should be noted that the sampling method for the random perturbation distribution is to independently generate random samples between 0 and 1 for each shared ingress stream set and network node combination, prioritizing uniform distribution sampling, and keeping the sampling results unchanged within an initialization round; all random perturbation distributions can be generated at the beginning of initialization to avoid repeated resampling during the same initialization round, which could lead to preference baseline drift. The particle size setting method is to determine the particle size based on the total number of shared ingress stream sets and the total number of network nodes, preferably making the particle size no less than twice the total number of network nodes and no less than the square root of the total number of shared ingress stream sets; when there are many shared ingress stream sets and few network nodes, the particle size can be set by rounding down to the square root of the total number of shared ingress stream sets. The boundary control method for the position preference walk is to set upper and lower bounds for the position preference walk after each update, truncating when it exceeds the upper bound and truncating when it falls below the lower bound to prevent numerical divergence caused by continuous iteration; a symmetrical boundary can be used, and the number of boundary hits when exceeding the boundary can be recorded to observe whether the search is too drastic.
[0038] It should be noted that the selection method for mapping variables in scenarios with tied maximum values is as follows: when the position preference walk volume of the same shared entry flow set on multiple network nodes has tied maximum values, the node with the currently assigned state parameter being in a valid state is selected first; if still tied, the node with the lower initial node occupancy rate is selected; if still tied, the node with the smaller network node numerical index is selected. This three-level rule ensures that the discrete mapping results are stable and reproducible. Furthermore, the network node numerical index is arranged by the scheduling controller assigning consecutive numbers in a fixed order when nodes register, and these numbers remain unchanged during the current scheduling round; newly added nodes can only participate in the new numbering arrangement starting from the next scheduling round, avoiding abrupt changes in the matrix dimension in the current round.
[0039] In one embodiment of the present invention, the calculation steps of the fourth module specifically include: Based on the mapping variables, the equivalent load of the node, and the upper limit of the node's capacity, the formula for calculating the predicted single node occupancy rate is as follows:
[0040] In the formula, This indicates the predicted single-node occupancy rate. Indicates the maximum capacity of a node. Indicates the total number of shared entry streams. Represents a mapping variable. Indicates the equivalent load of a node; Based on the predicted single-node occupancy rate and the total number of network nodes, the formula for calculating the average predicted occupancy rate is as follows:
[0041] In the formula, Indicates the average predicted occupancy rate. Indicates the total number of network nodes; The formula for calculating the cost of mapping changes, based on the mapping variables, allocation state parameters, node equivalent load, node capacity limit, and the total number of shared ingress flow sets, is as follows:
[0042] In the formula, Indicates the cost of mapping changes. Indicates the allocation state parameter; Based on the extreme value risk, distribution equilibrium value, and mapping change cost, the calculation formula for the evaluation quantity of the allocation scheme is as follows:
[0043] In the formula, This represents the evaluation metric for the allocation scheme. The extreme value represents the risk value, and the mathematical term containing the square root calculation represents the equilibrium value of the distribution.
[0044] It should be noted that the predicted single-node occupancy rate is the ratio of the total equivalent load that a network node is expected to bear under the candidate scheme corresponding to the predicted allocation matrix to the node's maximum capacity. The extreme risk value is the highest predicted single-node occupancy rate among all network nodes, used to characterize the extreme risk level of the heaviest node under the candidate scheme. The total number of network nodes is the number of network nodes currently participating in this round of load balancing calculations and possessing carrying capacity; it can be obtained by filtering nodes in a schedulable state from the node registry and available node status table and collecting them in a deduplicated manner. The average predicted occupancy rate is the average of the predicted single-node occupancy rates of all network nodes, used to characterize the overall occupancy level under the candidate scheme. The independent occupancy deviation is the difference between the predicted single-node occupancy rate of a single network node and the average predicted occupancy rate, used to characterize the degree to which that node deviates from the overall level. The distribution balance value is a dispersion measure obtained by squaring, averaging, and square rooting all independent occupancy deviations, used to measure the load balancing degree of the candidate scheme among nodes. The absolute state displacement difference is the absolute value of the difference between the mapping variable and the allocation state parameter, used to characterize whether a certain mapping relationship has changed. The independent displacement cost is a single migration cost obtained by weighting the absolute state displacement difference with the node's equivalent load and the node's capacity limit. The mapping change cost is the overall migration cost metric obtained by summing and normalizing all independent displacement costs across the shared ingress flow set dimension and the network node dimension. The allocation scheme evaluation metric is a comprehensive evaluation value formed by fusing the extreme value risk, the distribution equilibrium value, and the mapping change cost, used to determine the merits of candidate allocation schemes.
[0045] It should be noted that the absolute state displacement difference is generated by comparing the mapping variable with the assigned state parameter for each shared ingress flow set and each network node. If they are the same, the value is 0; if they are different, the value is 1. The difference is then used as the absolute state displacement difference. For example, a change from a valid state to an invalid state in the source node is recorded as 1, and a change from an invalid state to a valid state in the new node is also recorded as 1. The normalization method for the mapping change cost is to first double-accumulate all independent displacement costs, and then divide by twice the total number of shared ingress flow sets to offset the double-counting effect of a migration that generates a state displacement at both the source and target nodes. For example, when a shared ingress flow set migrates from node 1 to node 3, an absolute state displacement difference will occur in both node dimensions, so a 2x normalization is required.
[0046] It should be noted that the extreme value risk and distribution equilibrium value are combined by directly using the occupancy rate after normalization of equivalent loads with the same dimensions in the same round of evaluation. This allows the extreme value risk to limit the hottest nodes, while the distribution equilibrium value limits the overall dispersion. For example, when the extreme value risk of two schemes is similar, the scheme with the smaller distribution equilibrium value should receive a better evaluation. The node dimension aggregation method for predicting the occupancy rate of a single node only counts the set of shared ingress flows mapped to that node in the prediction allocation matrix, and does not include sets that are not mapped or carried by other nodes in the total predicted load of that node. For example, the same set of shared ingress flows will only correspond to the effective mapping variable of one node in a certain candidate scheme, so it cannot be repeatedly accumulated across multiple nodes.
[0047] In one embodiment of the present invention, the calculation steps of the fifth module specifically include: Based on the mapping variables and structural hotspot characteristics, the formula for calculating the hotspot risk intensity is as follows:
[0048] In the formula, Indicates the intensity of hotspot risk. Indicates structural hotspot characteristic quantities; The formula for calculating the adaptive search weight based on the intensity of hotspot risk is as follows:
[0049] In the formula, Indicates adaptive search weight; The formula for calculating the update speed of the optimization particle is as follows, based on the adaptive search weight, the current position evolution velocity component, the first evolution control random quantity, the individual's historical best wander position, the position preference wander quantity, the second evolution control random quantity, the global historical best wander position, the third evolution control random quantity, the structural hotspot feature quantity, the node's equivalent load quantity, and the node's capacity upper limit quantity:
[0050] In the formula, This indicates the update rate of the optimization particles. This represents the velocity component at the current position. This represents the first evolutionary control random variable. This indicates the individual's best historical position. Indicates location preference migration amount, This represents the second evolutionary control random variable. This indicates the best possible move position in the entire historical game. This represents the third evolutionary control random variable. Indicates characteristic repulsive momentum; Based on the position preference walk rate and the optimization particle update rate, the formula for calculating the optimization particle update position is as follows: ; In the formula, This indicates the updated position of the optimization particle; The expression for integrating the mapping variables output when the optimal position is reached is as follows:
[0051] In the formula, This represents the globally optimal allocation matrix. This represents the mapping variable in its optimal position state.
[0052] It should be noted that the cumulative risk of a node hotspot is the total risk obtained by summing the structural hotspot feature values corresponding to all shared ingress flows carried by a network node according to the mapping relationship. The denominator cardinality of the node flow capacity is the normalized denominator obtained by adding the number of shared ingress flows carried by a network node under the candidate scheme to the basic smoothing value. The single-node specific risk degree is the ratio of the cumulative risk of a node hotspot to the denominator cardinality of the node flow capacity, used to characterize the average risk level of the hotspot objects carried by a single node. The hotspot risk intensity is the maximum value among all single-node specific risk degrees, used to characterize the hotspot degree of the most dangerous node under the current candidate scheme. The adaptive search weight is an inertial control quantity formed by transforming the inverse of the hotspot risk intensity, used to actively reduce search inertia when the hotspot risk increases.
[0053] It should be noted that the first evolutionary control random variable is a random adjustment variable acting on the direction of the individual's historical best walking position, used to control the intensity of the individual's cognitive adjustment. Its preferred value is a uniformly sampled value between 0.2 and 0.8, meaning this range ensures that the particle retains its response to individual experience without causing trajectory oscillation due to excessively large individual terms. The second evolutionary control random variable is a random adjustment variable acting on the direction of the global historical best walking position, used to control the global guidance intensity. Its preferred value is a uniformly sampled value between 0.2 and 0.8, meaning this range ensures that the global optimal direction has a guiding effect while avoiding premature convergence due to excessive concentration. The third evolutionary control random variable is a random adjustment variable acting on the repulsion term of the structural hotspot characteristic quantity, used to control the intensity of hotspot avoidance. Its preferred value is a uniformly sampled value between 0.1 and 0.6, meaning this range allows hotspot avoidance to remain effective while preventing excessively large repulsion terms from preventing particles from approaching feasible optimal solutions. The characteristic repulsion momentum is a negative driving force formed by the third evolutionary control random quantity, the structural hot spot characteristic quantity, the node equivalent load quantity, and the node capability upper limit quantity. It is used to push the high hot spot high load flow set away from the high risk node.
[0054] It should be noted that the current position evolution velocity component is the velocity state quantity of the optimizing particle before it is updated at the current position, used to inherit the motion trend of the previous iteration. The inertial retention momentum is the inertial retention term obtained by multiplying the adaptive search weights by the current position evolution velocity component, used to inherit the existing search direction. The individual historical best wandering position is the optimal position state reached by a single optimizing particle during historical iterations. The individual cognitive adjustment momentum is the regression driving force formed by modulating the difference between the individual historical best wandering position and the current position with the first evolutionary control random quantity. The global historical best wandering position is the optimal position state jointly reached by all optimizing particles during historical iterations. The global guidance adjustment momentum is the global guidance driving force formed by modulating the difference between the global historical best wandering position and the current position with the second evolutionary control random quantity. The optimizing particle update velocity is the new velocity state quantity obtained by superimposing the inertial retention momentum, individual cognitive adjustment momentum, and global guidance adjustment momentum, and then subtracting the feature repulsion momentum. The optimizing particle update position is the new position state quantity formed by superimposing the position preference wandering amount with the optimizing particle update velocity. The global optimal allocation matrix is the optimal combination matrix of mapping variables output after all optimization particles have converged iteratively, driven by the evaluation of the allocation scheme.
[0055] It should be noted that the update method for the individual historical best walk position is to save the combination of position preference walk amounts corresponding to the historical minimum allocation scheme evaluation value for each optimizing particle. When the evaluation value in the current round is better than the historical record, the position preference walk amount in the current round is used to overwrite the old record. If a particle obtains a smaller allocation scheme evaluation value in the 5th round than in the 3rd round, then the position in the 5th round should become the new individual historical best walk position. The update method for the global historical best walk position is to select the particle with the smallest allocation scheme evaluation value from all optimizing particles after each iteration, and use its position preference walk amount combination as the new global historical best walk position. If different particles generate better evaluation values in different rounds, the global historical best walk position should be updated as the optimal evaluation value is refreshed. In addition, the sampling method for the first evolutionary control random quantity, the second evolutionary control random quantity, and the third evolutionary control random quantity is to sample independently before the start of each round of velocity update, prioritizing uniform distribution sampling, and allowing the use of independent samples for different shared entry flow sets and different network node combinations. This independent sampling method can improve search diversity and reduce the probability that all particles move along the same trajectory.
[0056] It should be noted that the boundary constraints for the update velocity and position of the optimization particle are as follows: first, an upper and lower bound is set for the update velocity, and then an upper and lower bound is set for the update position. Any out-of-bounds value is truncated according to the boundary value, and the number of out-of-bounds occurrences is recorded. If a particle exhibits an extreme negative velocity due to excessive characteristic repulsive momentum, the velocity should be truncated before position updating. The convergence stopping method based on the evaluation value of the allocation scheme is to terminate the optimization and output the current global optimal allocation scheme when the preset maximum number of iterations is reached, or the global optimal allocation matrix remains unchanged for several consecutive iterations, or the decrease in the evaluation value of the allocation scheme corresponding to the global optimal allocation matrix is lower than a preset threshold. It is possible to require early termination when the global optimal allocation matrix remains unchanged for 5 consecutive iterations to save online scheduling time.
[0057] In one embodiment of the present invention, the calculation steps of the sixth module specifically include: Based on the globally optimal allocation matrix and the system's initial allocation matrix, the formula for calculating the target migration matrix is as follows: ; In the formula, Indicates the target migration matrix. This represents the globally optimal allocation matrix. This represents the initial allocation matrix of the system, which includes allocation state parameters. Based on the network node numerical index and the globally optimal allocation matrix, the formula for calculating the target bearer node numerical number is as follows: ; In the formula, Indicates the target carrying node's numerical number. Represents the numerical index of network nodes. This represents the state of the elements in the globally optimal allocation matrix; Based on the globally optimal allocation matrix and the equivalent load of nodes, the formula for calculating the final absolute load of a single node is as follows: ; In the formula, This represents the final absolute load of a single node; Based on the final absolute load of a single node and the node's maximum capacity, the formula for calculating the final node occupancy rate is as follows: ; In the formula, This indicates the final node occupancy rate.
[0058] It should be noted that the element state is the discrete mapping state value corresponding to a certain matrix unit in the global optimal allocation matrix, used to indicate whether a final bearing relationship has been established between a certain shared ingress flow set and a certain network node. The node difference is the difference between the element state and the allocation state parameter, used to characterize the direction and magnitude of the change in the final allocation relative to the initial allocation. The target migration matrix is a migration state matrix formed by combining all node differences according to the dimensions of the shared ingress flow set and the network node, used to characterize which mapping relationships need to be changed. The target bearing node number is the target node number obtained by multiplying and summing the effective element states in the global optimal allocation matrix and the network node number index, used to uniquely identify the final bearing node of a certain shared ingress flow set. The final absolute load of a single node is the cumulative result of the equivalent load of all nodes corresponding to the shared ingress flow sets mapped to a certain network node under the constraints of the global optimal allocation matrix. The final node occupancy rate is the proportion of the final absolute load of a single node relative to the node's maximum capacity, used to characterize the final load state after the execution of the global optimal allocation matrix.
[0059] It should be noted that the node differences are generated by comparing the same element positions in the globally optimal allocation matrix and the system's initial allocation matrix item by item. If the element state in the globally optimal allocation matrix is greater than the allocation state parameter, it indicates that the node is in the migration direction; if it is less than the allocation state parameter, it indicates that the node is out the migration direction; if they are equal, it indicates that the node's dimension has not changed. For example, this directional difference can provide a basis for source and target nodes for subsequent migration control statements. The target migration matrix is constructed by retaining all node differences along the dimension of the shared ingress stream set, and storing both the outgress and ingress positions in each row to form a complete migration description matrix. For example, for a shared ingress stream set, if a row contains both an outgress marker and an ingress marker, it indicates that a node switch needs to be performed.
[0060] It should be noted that the target bearer node's numerical ID is determined by first locking the unique valid element state corresponding to a certain shared ingress flow set in the globally optimal allocation matrix, and then outputting the network node numerical index corresponding to its column as the target bearer node's numerical ID. For example, if multiple valid states appear in a row, the mapping variable should be regenerated by reverting to the rule of handling the maximum value in a row. The final absolute load aggregation method for a single node is to cumulatively add up the equivalent loads of all shared ingress flow set nodes mapped to the same network node by the globally optimal allocation matrix, and save the detailed results at the node level after aggregation.
[0061] In one embodiment of the present invention, the calculation steps of the seventh module specifically include: Based on the changed state element, the original occurrence node number, and the target bearer node number, the formula for generating the route switching instruction is as follows:
[0062] In the formula, This indicates a route switching command. This indicates a single toggle control statement. Indicates the shared entry flow collection identity number. Indicates the original occurrence node number, Indicates the target carrying node's numerical number. Elements representing changing states. This indicates the numerical constraint condition that triggers the migration judgment; The formula for creating a global route distribution result mapping set based on the shared ingress flow set identity number and the target bearer node number is as follows: ; In the formula, Represents the global routing distribution result mapping set; The formula for calculating the extreme load based on the final absolute load of a single node is as follows:
[0063] In the formula, Indicates extreme load; Based on the network node numerical index and the final node occupancy rate, the mathematical expression formula for integrating the packaging capacity water level snapshot is as follows: ; In the formula, This indicates a snapshot of the capacity water level.
[0064] It should be noted that the changing state element is a matrix element in the target migration matrix that indicates whether a mapping change has occurred at a certain network node dimension for a certain shared ingress flow set. The migration trigger judgment value is the migration trigger judgment value obtained by taking the absolute value of all changing state elements corresponding to a certain shared ingress flow set and summing them at the network node dimension. The value of zero is the baseline threshold used to determine whether a migration action has occurred; that is, when the migration trigger judgment value is equal to 0, it indicates that there is no mapping change. Therefore, 0 is used as the most direct and unambiguous judgment threshold. The original occurrence node number is the source node number that actually carries the shared ingress flow set before the migration is performed. It can be obtained by collecting the current carrying nodes corresponding to the target set from the current global routing mapping table, the system initial allocation matrix, and the node carrying state table. A single handover control statement is an atomic migration control statement generated for a single shared ingress flow set, from the original occurrence node number to the target carrying node number. A route switching instruction is a set of route change instructions formed by integrating multiple single handover control statements in a unified execution batch.
[0065] It should be noted that the shared ingress flow set identity number is a unique identifier for each shared ingress flow set and is output as the primary key in the routing distribution results. It is preferably a consecutive positive integer starting from 1, or a fixed-length, globally unique sequential number. This consecutive or fixed-length unique number facilitates indexing, retrieval, route distribution, and maintenance tracing. The global routing distribution result mapping set is the final routing result set formed by pairing the shared ingress flow set identity numbers with the target bearer node numbers. The single-node final absolute load distribution data is the single-node final absolute load set data output to all network nodes, used to present the node load distribution after scheduling. The extreme load is the maximum value among all network nodes' single-node final absolute loads, used to characterize the upper limit of the absolute pressure on the heaviest node in the entire system. The capacity water level snapshot is the node capacity status snapshot data output after pairing the network node numerical index with the final node occupancy rate. The output is the final result set composed of the routing switching command, the global routing distribution result mapping set, the single-node final absolute load distribution data, the extreme load, and the capacity water level snapshot.
[0066] It should be noted that the original occurrence node number is obtained by first locating the valid element status of the target shared ingress flow set in the system's initial allocation array, then reading its current bearer node number in conjunction with the current routing mapping table, and writing this number into the migration control context. Even if a shared ingress flow set has already undergone migration in the previous round of scheduling, the current bearer node at the start of this round of scheduling should be used as the original occurrence node number. The generation and issuance of routing switching instructions are as follows: a single switching control statement is generated for each shared ingress flow set with a migration trigger value greater than 0, and then integrated into a routing switching instruction according to node, batch, and priority, and issued to the forwarding execution module through the scheduling controller. It is advisable to first group by source node, and then issue the migration tasks under the same source node sequentially to reduce execution conflicts.
[0067] It should be noted that the execution timing and order of the route switching command are controlled by triggering execution at the unified scheduling boundary. Priority is given to completing the target node context warm-up and receiving state synchronization, followed by the switching from the source node to the target node, and finally, the redundant state of the source node is recovered. Adopting a "build first, switch later, delete later" order reduces the probability of media interruption and state loss. The output is encapsulated in units of one scheduling round, encapsulating the route switching command, the global route distribution result mapping set, the final absolute load distribution data of a single node, extreme load values, and capacity level snapshots into a single result object, along with the scheduling round number and generation time. The upper-layer monitoring system can associate migration actions with load results based on the same scheduling round number. Furthermore, the rollback mechanism in migration failure scenarios is as follows: if the target node warm-up fails, the switch confirmation fails, or an abnormal increase in occupancy occurs shortly after the switch, the incomplete switch control statement is immediately revoked, and the system is restored to the original route mapping state corresponding to the initial allocation array. A short-term observation window can be set; if the target node occupancy exceeds the rollback threshold within this window, a rollback is triggered.
[0068] Specifically, in actual deployment, this invention can be deployed in a cluster environment consisting of a central scheduling controller, multiple edge forwarding nodes, and a status acquisition and evaluation module. The edge forwarding nodes are responsible for receiving audio packets, video packets, feedback packets, and retransmission repair packets from terminals, and for constructing a shared ingress stream set, counting packets, collecting latency data, and reporting local status. The status acquisition module is responsible for extracting the number of arriving media packets, the number of arriving feedback packets, the number of arriving retransmission repair packets, the total latency of ingress parsing, the total latency of additional context, the total latency of fan-out replication, and the total latency of feedback repair from the access thread, protocol parsing thread, replication forwarding thread, and feedback repair thread. The scheduling controller receives data reported by each node according to a unified time window, first forming a shared ingress stream set, then calculating structural hotspot characteristics, node equivalent load, and initial node occupancy, and subsequently driving the collaborative optimization model to output the globally optimal allocation array, the target migration array, and routing switching instructions.
[0069] At the data acquisition level, four types of lightweight collectors can be deployed within each network node. The first type of collector is deployed on the inbound packet reception and protocol parsing path to collect the number of arriving media packets, feedback packets, and retransmission repair packets. The second type of collector is deployed on the synchronization source status management path to collect the number of active synchronization source identifiers, the number of inbound ports, and the total number of shared inbound flow sets. The third type of collector is deployed on the replication and forwarding path to collect the total number of potential downstream branches, branch activity status indicators, and the total fan-out replication time. The fourth type of collector is deployed on the feedback repair path to collect the total feedback repair time and the total number of feedback repair packets. To ensure statistical consistency across nodes, all collectors preferably use a unified time base and report standardized results to the scheduling controller once at the end of the window.
[0070] It should be noted that in actual operation, for example, the system contains 4 network nodes, denoted as Node 1, Node 2, Node 3, and Node 4. Currently, there are 12 shared ingress flow sets participating in scheduling. Among them, shared ingress flow set 3 contains 4 active synchronization source identifiers, occupies only 1 inbound port, corresponds to 5 fan-out branches, and exhibits a high proportion of feedback repair traffic burden within the current window. After system calculation, it can be found that the structural hotspot characteristic of shared ingress flow set 3 is significantly higher than that of other sets. If this set continues to remain on the current node 2, the initial node occupancy rate of node 2 will exceed the warning threshold. After optimization, the scheduling controller determines to migrate shared ingress flow set 3 to node 4 and shared ingress flow set 7 from node 4 to node 1 to achieve a more balanced load distribution. At this time, in the output target migration matrix, the position of set 3 corresponding to node 2 is marked as a migration out, and the position corresponding to node 4 is marked as a migration in.
[0071] The final output of this invention comprises five categories. The first category is route switching instructions, used to drive the execution layer to complete node changes for the shared ingress flow set. The second category is a global route distribution result mapping set, used to provide the target bearer node number corresponding to each shared ingress flow set. The third category is single-node final absolute load distribution data, used to describe the absolute equivalent load borne by each node after scheduling. The fourth category is extreme load, used to identify the final load upper bound of the heaviest node in the entire system. The fifth category is a capacity level snapshot, used to directly provide the final node occupancy rate of each node to the operation and maintenance interface, alarm module, and next round scheduling module. For example, in an actual output, the final node occupancy rate of node 1 could be 0.52, node 2 could be 0.67, node 3 could be 0.49, and node 4 could be 0.61. After receiving the capacity level snapshot, the operation and maintenance system can determine that all nodes have fallen back to the safe range.
[0072] Specifically, this invention can be deeply adapted to hospital departments and smart healthcare applications across all scenarios, covering core business scenarios such as surgical teaching, remote multidisciplinary consultation, bedside real-time monitoring audio and video transmission, multi-hospital collaborative diagnosis and treatment, and emergency and first-aid on-site audio and video feedback. For example, in the system deployment phase, the central dispatch controller is deployed in the hospital's core computer room, achieving standardized integration with the hospital's existing medical data transmission network, audio and video consultation platform, and surgical live streaming system, while simultaneously meeting the compliance requirements for medical data transmission. Edge forwarding nodes are distributed and deployed in various clinical departments, branch hospitals, emergency stations, and operating rooms, responsible for the access and forwarding of terminal audio and video data. The status acquisition and evaluation module is embedded in the audio and video processing links of each node, completing calibration with the hospital's time synchronization system to ensure the time consistency of data acquisition across the entire system.
[0073] In the specific operation, the central scheduling controller receives data reported by each node according to a unified time window. It first aggregates data from the same consultation task, the same live surgery broadcast, or the same monitoring link into a shared ingress stream set, and then calculates the structural hotspot feature quantity, the equivalent load of nodes, and the initial node occupancy rate sequentially. For high-priority audio and video streams, the system initiates a collaborative optimization model, injecting the equivalent load of nodes and the initial node occupancy rate as reverse constraints into the optimization particles. It combines the structural hotspot feature quantity to generate adaptive search weights and feature repulsion momentum. After iterative convergence, it outputs the globally optimal allocation matrix and the target migration matrix, proactively avoiding audio and video stuttering and packet loss caused by local hotspots, ensuring the continuity and low latency of audio and video transmission during the diagnosis and treatment process. Further details are omitted here.
[0074] It should be noted that, as Figure 2 As shown, this diagram illustrates the convergence process of the optimization search. The horizontal axis represents iteration rounds 1 to 30, and the vertical axis represents the evaluation value. The four curves in the diagram represent the evaluation value of the scheme, the extreme value risk, the distribution equilibrium, and the change cost, respectively. The smaller the value, the better the candidate allocation scheme. As the iteration progresses, the comprehensive evaluation value gradually decreases, indicating that the optimization process can reduce the overall dispersion while controlling the risk of the hottest node and taking into account the migration cost. This diagram is used to show the convergence trend of the collaborative optimization model and the coordination relationship between the evaluation indicators.
[0075] It should be noted that, as Figure 3 As shown in the figure, the capacity level change diagram shows that the horizontal axis represents 30 consecutive scheduling windows and the vertical axis represents the node occupancy rate. The three curves in the figure represent the peak occupancy rate before optimization, the peak occupancy rate after optimization, and the average occupancy rate after optimization, respectively. The closer the value is to 1, the closer the node is to its capacity limit. This figure is used to illustrate that after the optimization is implemented, the occupancy rate of the hottest node and the average occupancy rate of the system both show a downward trend, thereby verifying that the present invention can suppress the continuous accumulation of local hot spots and output the final node occupancy rate as an observable capacity level snapshot.
[0076] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0077] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.
Claims
1. A dynamic node load balancing system for multiple parallel audio and video streams, characterized in that, include: The first module aggregates the data from the same transmission entry point into a shared entry stream set according to the time window, calculates the traffic burden of each shared entry stream set within the time window, calculates the ratio of the synchronization source identifier to the inbound port to obtain the entry compression factor, and extracts structural hot spot feature quantities by combining the number of fan-out branches and the traffic burden. The second module calculates the equivalent load on nodes caused by the shared ingress stream set based on the traffic burden of the shared ingress stream set within the time window, combining the ingress compression factor and the number of fan-out branches. The equivalent load on nodes is then divided by the node capacity limit to obtain the initial node occupancy rate. The third module establishes a collaborative optimization model, injects the node's equivalent load and initial node occupancy rate as reverse constraints into the optimization particles, and outputs a prediction allocation matrix. The fourth module extracts the extreme value risk, distribution equilibrium value and mapping change cost from the predicted allocation matrix, and sums the three to generate the allocation scheme evaluation quantity. The fifth module utilizes the transformation of structural hot spot features to obtain adaptive search weights, multiplies the structural hot spot features by the equivalent load of nodes to extract feature repulsion momentum, and combines the allocation scheme evaluation to update the optimization particles to obtain the globally optimal allocation matrix. The sixth module compares the global optimal allocation matrix with the system's initial allocation matrix to extract node differences and generate the target migration matrix. It then calculates the final node occupancy rate by combining the global optimal allocation matrix with the equivalent load of the nodes. The seventh module issues routing switching instructions based on the target migration array as the shared ingress flow set, converts the final node occupancy rate into a capacity water level snapshot, and outputs it.
2. The dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, Extract the number of media packets arriving in the shared ingress stream set within the time window, and divide the number of media packets arriving by the duration of the time window to obtain the media packet traffic load; Extract the number of feedback packets arriving and the number of retransmission repair packets arriving from the shared ingress flow set within the time window. Add the number of feedback packets arriving and the number of retransmission repair packets arriving, and then divide by the duration of the time window to obtain the feedback repair traffic burden. The traffic burden of media grouping and the traffic burden of feedback repair are merged and extracted into a single traffic burden. Obtain the number of synchronization source identifiers and the number of inbound ports occupied by the active states contained in the shared inbound stream set; Divide the number of synchronization source identifiers by the number of inbound ports to obtain the inbound compression factor; Extract the total number of potential downstream branches in the shared ingress stream set, iterate through and determine the branch activity status indicator value corresponding to the potential downstream branches, and sum all the branch activity status indicator values to obtain the number of fan-out branches; Divide the feedback repair traffic burden by the media group traffic burden to obtain the feedback traffic ratio. Add the value one to the feedback flow ratio value to obtain the feedback amplification factor; The structural hotspot characteristic quantity is generated by multiplying the inlet compression factor, the number of fan-out branches, and the feedback amplification factor.
3. The dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, Extract the total time spent parsing the entry point of the target node within the time window and the total number of media packets received by the target node; Divide the total ingress parsing time by the total number of media packets received by the target node to obtain the unit media parsing time. Subtract one from the inlet compression factor to obtain the additional compression factor; Multiply the number of media packets arriving by the additional compression factor, and sum the results across all shared ingress stream sets to obtain the total system compression cost; Extract the total additional context time of the target node within the time window, divide the total additional context time by the total system compression cost, and obtain the unit additional context time. Subtract the value one from the number of fan-out branches to obtain the additional fan-out multiplier; Multiply the number of media packets arriving by the additional fan-out factor, and sum the results for all shared ingress stream sets to obtain the total system fan-out cost; Extract the total fan-out replication time of the target node within the time window, divide the total fan-out replication time by the total system fan-out cost, and obtain the unit additional fan-out time.
4. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 3, characterized in that, Extract the total feedback repair time and the total number of feedback repair groups for the target node within the time window, and divide the total feedback repair time by the total number of feedback repair groups to obtain the unit feedback repair time. The basic parsing load is obtained by multiplying the duration of the time window, the media packet traffic load, and the unit media parsing time. The additional context payload is obtained by multiplying the duration of the time window, the media packet traffic load, the additional compression factor, and the unit additional context time. The additional fan-out load is obtained by multiplying the duration of the time window, the media packet traffic load, the additional fan-out multiple, and the time taken per additional fan-out. The feedback processing load is obtained by multiplying the duration of the time window, the feedback repair traffic burden, and the unit feedback repair time. The basic parsing load, additional context load, additional fan-out load, and feedback processing load are added together to obtain the node equivalent load caused by the shared ingress flow set; Extract the allocation state parameters contained in the initial allocation matrix of the system, multiply the allocation state parameters by the equivalent load of the node, and perform cumulative calculation for all shared ingress flow sets to obtain the total load of the current target node; Divide the total load of the current target node by the node's maximum capacity to obtain the initial node occupancy rate.
5. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, To extract the random perturbation distribution with a numerical range between zero and one for the optimization particles in the collaborative optimization model; Add the random perturbation distribution to the assigned state parameters to obtain the preferred baseline state parameters; Divide the node's equivalent load by the node's maximum capacity to obtain the relative load pressure of a single stream. Subtract the initial node occupancy rate from the preferred baseline state quantity, then subtract the single-flow relative load pressure, and use the result of the subtraction operation as the reverse constraint injected into the optimization particle to obtain the initial position preference quantity of the optimization particle, and configure the initial velocity evolution quantity with a value equal to zero for the optimization particle. By comparing the position preference walks of the optimization particle at different network nodes for the shared inlet flow set under any number of iterations, the mapping variable corresponding to the position preference walk with the largest numerical magnitude is marked as value one. Mark the mapping variable corresponding to the position preference walk that is not of the maximum numerical order of magnitude as zero; The prediction assignment matrix is constructed by combining the mapping variables completed using the labels.
6. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, Multiply the mapping variable by the node's equivalent load, sum them up over all shared ingress stream sets, and divide the sum by the node's maximum capacity to generate a predicted single node occupancy rate. The highest value is selected from the predicted single-node occupancy rates of all network nodes to obtain the extreme value risk value. Add up the predicted single-node occupancy rates of all network nodes and divide by the total number of network nodes to obtain the average predicted occupancy rate. Subtract the average predicted occupancy rate from the predicted single-node occupancy rate to obtain the independent occupancy deviation. The independent occupancy deviation is squared, summed across all network node dimensions, divided by the total number of network nodes, and then the square root operation is performed to obtain the distribution equilibrium value. Subtract the assigned state parameter from the mapping variable to obtain the absolute state displacement difference; The independent displacement cost is obtained by multiplying the absolute displacement difference by the equivalent load of the node and dividing by the maximum node capacity. The cost of independent displacement is double-summed across all shared ingress stream sets and all network nodes, and finally divided by twice the total number of shared ingress stream sets to obtain the mapping change cost. The extreme value risk, the distribution equilibrium value, and the cost of mapping change are added together to generate the evaluation quantity of the allocation scheme.
7. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, The mapping variable is multiplied by the structural hotspot feature and then added along the shared inlet flow set dimension to obtain the cumulative hotspot hazard of the node; Add the mapping variables along the shared ingress flow set dimension and add the value one to obtain the denominator base of the node flow capacity; The cumulative amount of hot spot danger at a node is divided by the denominator base of the node flow capacity to obtain the specific risk level of a single node. The maximum value among all the specific risk levels of a single node is extracted to generate the hot spot risk intensity. The risk intensity of a hotspot is increased by one, and the reciprocal is taken to generate an adaptive search weight.
8. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 7, characterized in that, Extract the first evolutionary control random variable, the second evolutionary control random variable, and the third evolutionary control random variable; Multiply the third evolutionary control random quantity by the structural hot spot characteristic quantity, then multiply by the node equivalent load quantity, and finally divide by the node capacity upper limit quantity to generate the characteristic repulsion momentum. Multiply the adaptive search weight by the current position evolution velocity component of the optimization particle to obtain the inertial retention momentum; Subtract the position preference move from the individual's historical best move and multiply by the first evolutionary control randomness to obtain the individual's cognitive adjustment momentum; Subtract the position preference walk from the global historical best walk position and multiply by the second evolutionary control randomness to obtain the global guidance adjustment momentum; Add the inertial retention momentum, individual cognitive adjustment momentum and global guidance adjustment momentum, and subtract the feature repulsion momentum to generate the optimization particle update speed; Add the position preference walk rate to the optimization particle update rate to generate the optimization particle update position; Based on the evaluation of the allocation scheme, the optimization particle converges towards the extreme value direction, and the mapping variables output when the optimization particle reaches the optimal position constitute the global optimal allocation matrix.
9. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, Subtract the allocation state parameter from the element state in the global optimal allocation matrix to obtain the node difference, and merge the node differences in all dimensions to generate the target migration matrix. Multiply the state of each element in the globally optimal allocation matrix by the network node numerical index, and add them together along the network node dimension to obtain the target carrying node numerical number. Multiply the state of each element in the globally optimal allocation matrix by the equivalent load of the node, and add them together along the dimension of the shared ingress stream set to obtain the final absolute load of a single node. The final node occupancy rate is obtained by dividing the final absolute load of a single node by the node's maximum capacity.
10. A dynamic node load balancing system for multiple parallel audio and video streams according to claim 1, characterized in that, Analyze the distribution of the changing state elements contained in the target migration matrix, extract the absolute values of the changing state elements and accumulate them in the network node dimension to obtain the numerical value that triggers the migration judgment. When the value of the migration judgment is greater than zero, a single switching control statement is generated to indicate that the shared entry flow set is changed from the original occurrence node number to the target bearer node number; Integrate all single switching control statements to generate route switching instructions, issue and execute changes; By pairing and coupling the shared ingress flow set identity number with the target bearer node number, a global routing distribution result mapping set is constructed; The maximum value is selected from the final absolute load of each network node to obtain the extreme load. Establish a one-to-one pairing relationship between the network node numerical index and the final node occupancy rate, and output a capacity level snapshot; The final output includes the merged route switching instructions, the global route distribution result mapping set, the final absolute load distribution data of a single node, the extreme load, and the capacity level snapshot.