A home office CPE gateway service offloading method
By constructing business sensitivity vectors and link carrying vectors, a comprehensive cost is generated, and the business traffic diversion method of home office CPE gateways is optimized. This solves the problems of decoupling link scoring from business requirements and fragmentation of queue scheduling, and achieves a more stable real-time business experience and balanced resource utilization.
Patent Information
- Application Number
- CN202611293598.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-17
AI Technical Summary
In existing home office CPE gateways, link scoring is decoupled from business requirements, and queue scheduling is separated from outbound routing, resulting in unstable real-time business experience, link congestion imbalance, and frequent migration of long connections.
By collecting link status data and service observation data, a service sensitivity vector and a link carrying vector are constructed to generate a comprehensive cost. Combined with session binding and queue linkage, service-link matching scoring is achieved, outbound routing and queue scheduling are optimized, and session continuity is maintained.
It improved the real-time business experience, reduced the risk of meeting lag and remote interaction delays, enhanced the balance of multi-link resource utilization, and ensured the continuous operation of long-term sessions.
Smart Images

Figure CN123123271A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of communication network technology, and specifically relates to a multi-link CPE service offloading method. Background Technology
[0002] With the increasing prevalence of integrated home office scenarios, home office CPE gateways have evolved from single access devices into access boundary devices that simultaneously support video conferencing, remote desktop, cloud office synchronization, web browsing, file transfer, and entertainment services. In these scenarios, CPEs typically connect to broadband, 5G fixed wireless access links, or backup leased lines, forming dual-WAN or multi-WAN exits. To improve overall bandwidth utilization, existing gateways often employ static routing, equal-cost multipath forwarding, or simple flow-based load balancing based on five-tuples to map different sessions to different exit links.
[0003] However, home office traffic exhibits significant heterogeneity. Some services are characterized by high-frequency, small packets and are highly sensitive to queuing latency and jitter, while others are characterized by bursts of large packets and are more concerned with instantaneous throughput. If traffic allocation is based solely on total bandwidth utilization, link connectivity, or simple polling, the service demand space and link state space will be compressed into a small scalar, ignoring factors such as changes in queue length, short-term jitter spikes, uplink and downlink asymmetry, differences in session duration, and the cycle of service bursts. This results in routing decisions reflecting average conditions rather than timely reflecting the current carrying capacity. Such mismatched traffic allocation directly causes meeting stutters, remote control delays, and unstable office interactions, further increasing the costs of manual troubleshooting and user experience complaints.
[0004] Existing technologies have explored some solutions to the aforementioned problems. The first type of method focuses on multi-link health assessment and flow-by-flow routing. For example, Chinese patent CN202211733566.6 discloses a link load balancing method, device, electronic equipment, and storage medium based on SDWAN, and Chinese patent CN202410971413.8 discloses a multi-link adaptive scheduling and transmission method, device, equipment, and storage medium. This type of method mainly revolves around link-side state modeling, focusing on answering which link is better overall. Because its scoring object is primarily the link itself, rather than the matching relationship between services and links, different services are often processed uniformly before entering the scoring process, making it difficult to form a dedicated adaptation result for each session. As a result, the overall better link is not necessarily the optimal link for the current service, easily causing real-time streams to be assigned to exit points with high instantaneous queues, thus leading to a decline in meeting quality and the risk of remote work interruptions.
[0005] The second type of method focuses on queue and routing coordination based on QoS categories and bandwidth utilization. For example, Chinese patent CN202210322825.X discloses a method and system for implementing dynamic load balancing QoS assurance in UAV networks. This type of method is more inclined towards QoS classification, bandwidth allocation, and path planning in controlled networks, and usually relies on relatively clear service level classification and observable global network information. In the local scenario of home office CPE, the instantaneous queue length of the egress link, the uplink transmission window occupancy, and the NAT session stickiness status will affect the effective reachability latency of the next packet in real time. If queue weight and egress routing are decided separately, the queuing congestion that has occurred on the link side is difficult to be reflected in the traffic diversion cost on the service side in a timely manner. This can easily lead to a local optimum problem where the link bandwidth seems sufficient, but the latency-sensitive service is actually unacceptable. This problem will cause uneven utilization of link resources and increase the cost of subsequent data governance and operation and maintenance optimization.
[0006] Furthermore, existing solutions typically emphasize switching capabilities and scheduling weight changes, lacking session persistence gating mechanisms for long-connection scenarios. In home office environments, many services run continuously via TCP long connections, TLS sessions, or VPN tunnels. Even slight fluctuations in link scores can trigger egress migration, leading to NAT mapping reconstruction, congestion window rollback, and application-layer reconnection. While such frequent migrations appear to be adaptive switching, they actually result in higher retransmission rates and greater latency fluctuations, thus affecting the continuous and stable operation of remote desktops, VPNs, and video conferencing.
[0007] Therefore, how to build a business-sensitive business-link matching and scoring mechanism on a home office CPE local device without relying on an external controller, and incorporate exit routing, queue scheduling and session persistence into a unified decision-making framework, so as to balance real-time business experience, link utilization balance and session continuity under lightweight computing conditions, has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0008] The purpose of this invention is to provide a service offloading method for home office CPE gateways, addressing the problems of unstable real-time service experience, link congestion imbalance, and frequent migration of long connections caused by the decoupling of link scoring and service requirements, the separation of queue scheduling and egress routing, and the lack of session persistence gating in existing technologies. To achieve the above objective, this invention provides a service offloading method for home office CPE gateways, comprising: Step S1, Data Acquisition and Status Construction: Collect link status data, active session service observation data, and previous cycle session binding information from each WAN egress link of the home office CPE gateway. Perform time alignment and truncation normalization under a fixed offline calibration interval on the link status data and service observation data, and construct the service sensitivity vector of the active session and the link bearer vector of each WAN egress link respectively. The link status data is used to characterize the bearer status of each WAN egress link in the current control cycle, the service observation data is used to characterize the transmission behavior characteristics of the active session, the service sensitivity vector is used to carry the unified input for subsequent service demand mapping, and the link bearer vector is used to carry the unified input for subsequent link cost mapping.
[0009] Step S2, Coupling Cost Calculation: Based on the service sensitivity vector, generate a service demand vector that includes at least latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput demand intensity. Based on the link bearer vector, generate a link cost vector corresponding to the dimension of the service demand vector. Calculate the comprehensive cost of mapping each active session to each WAN egress link based on the coupling term, link queue occupancy penalty term, session migration penalty term, link unavailability penalty term, and sampling degradation penalty term of the service demand vector and link cost vector. Based on the comprehensive cost, generate candidate traffic splitting weights for each active session corresponding to each WAN egress link. The service demand vector describes the strength of the current active session's demand in terms of latency, jitter, packet loss, and throughput. The link cost vector describes the bearer cost of each WAN egress link in the corresponding dimension. The comprehensive cost characterizes the matching loss when an active session is mapped to a WAN egress link and serves as a direct basis for subsequent session binding decisions. The candidate traffic splitting weights convert the comprehensive cost difference into comparable link preference strengths.
[0010] Step S3, Session Binding and Queue Linkage: Based on the comprehensive cost corresponding to each active session, determine the current optimal candidate link. For active sessions with existing bound links, compare the difference in comprehensive cost between the original bound link and the current optimal candidate link with a preset migration threshold. Only when the difference exceeds the migration threshold will egress migration be performed, resulting in a session binding result. Based on the session binding result, summarize the service load intensity of each WAN egress link, and combine it with the current queue occupancy and link jitter status of the corresponding WAN egress link to update the real-time service queue weight and best-effort service queue weight of each WAN egress link. The migration threshold provides a handover hysteresis band for established sessions to suppress frequent migrations caused by minor score fluctuations. The service load intensity characterizes the cumulative demand for real-time sensitive services and throughput services currently assigned to each WAN egress link. The real-time service queue weight and best-effort service queue weight drive the local scheduler of each WAN egress link to perform differentiated transmission of different types of services.
[0011] Step S4, Result Distribution and Closed-Loop Feedback: The session binding result is written into the session table, forwarding table, and NAT mapping additional field. The real-time service queue weight and best-effort service queue weight are written into the queue scheduler. The sending result of this cycle is recorded as the feedback input for the next cycle to execute the service diversion closed-loop control of the home office CPE gateway. The session table is used to maintain the binding relationship between active sessions and egress links. The NAT mapping additional field is used to maintain session egress consistency in the NAT environment. The feedback input for the next cycle is used to update the session risk status and link bearer status of subsequent cycles.
[0012] Further, in step S1, the link status data includes at least the round-trip time, latency jitter, packet loss rate, available uplink bandwidth, egress transmission queue occupancy, and link connectivity flags for each WAN egress link. The service observation data includes at least the average packet length, mean arrival interval, variance of arrival interval, uplink byte ratio, session duration, packets per second, and historical retransmission estimation rate for active sessions. The service sensitivity vector is a seven-dimensional vector, and the link bearer vector is a six-dimensional vector. The time alignment involves uniformly aligning the link status data and service observation data to the timestamp corresponding to the same control period. By unifying the link-side status and service-side status to the same control period, state misalignment caused by cross-period sampling can be avoided, thereby improving the consistency of subsequent matching and scoring.
[0013] Further, in step S1, the truncation normalization under the fixed offline calibration interval includes: for any continuous observation, truncation is performed according to a preset offline calibration lower bound and a preset offline calibration upper bound to obtain a truncation value; a normalization result is calculated based on the truncation value, the preset offline calibration lower bound, and the preset offline calibration upper bound; when the preset offline calibration upper bound is equal to the preset offline calibration lower bound, the corresponding normalization result is directly set to zero; for proportional quantities that are themselves located in the zero to one interval and whose offline upper and lower bounds are zero and one respectively, the original value is directly used as the normalization result. The preset offline calibration lower bound and the preset offline calibration upper bound are used to solidify the input scale under different devices and different time periods, so that a stable input can be obtained without relying on dynamic statistical distribution during the online execution phase.
[0014] Further, in step S1, the available uplink bandwidth is estimated based on the periodic transmission byte volume, queue occupancy changes, and the nominal uplink capacity of the physical or driver layer, and updated exponentially. The historical retransmission estimation rate is obtained by statistically analyzing packets with the same 5-tuple, in the same direction, and within the same sequence number range when the active session is a TCP session. When the active session is a UDP session or a session unable to reliably obtain sequence numbers, the historical retransmission estimation rate is obtained by statistically analyzing the number of failed transmission packets and the number of suspected duplicate transmission packets. Through this method, lightweight features reflecting service stability risks can be obtained without deep packet analysis.
[0015] Further, in step S2, generating the business requirement vector based on the business sensitivity vector includes: reading a pre-calibrated and stored offline first mapping matrix and a first bias vector; mapping the business sensitivity vector into a four-dimensional business requirement vector, wherein the four-dimensional business requirement vector sequentially represents latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput requirement intensity; and performing compression processing on the mapping result to ensure that the output of each dimension falls within a predetermined numerical range. The first mapping matrix is used to establish a linear mapping relationship from business observation features to the requirement space, and the first bias vector is used to compensate for the offset of different business types at the basic requirement level.
[0016] Further, in step S2, generating the link cost vector based on the link bearer vector includes: reading a pre-calibrated and stored offline second mapping matrix and a second bias vector; mapping the link bearer vector into a four-dimensional link cost vector, wherein the four-dimensional link cost vector sequentially represents latency cost, jitter cost, packet loss cost, and insufficient throughput cost; and performing non-negative clipping processing on the mapping result to suppress the excessive amplification of the total cost by abnormal link observations. The second mapping matrix is used to establish a linear mapping relationship from the link bearer state to the cost space, and the second bias vector is used to compensate for the level of basic link defects.
[0017] Furthermore, in step S2, the comprehensive cost is composed of the following components: the inner product of the service demand vector and the link cost vector is used to measure the degree of coupling between service demand and link defects in each dimension; the link queue occupancy penalty is used to suppress the continued delivery of new services to links with high instantaneous backlog; the session migration penalty is used to provide maintenance priority for established sessions; the link unavailability penalty is used to exclude links from the candidate set when they are disconnected; and the sampling degradation penalty is used to reduce the candidate priority of a link when link observations are missing but historical values are temporarily used. Through the above coupling structure, a comprehensive score oriented towards the "service-link matching relationship" is formed, rather than simply ranking links independently.
[0018] Further, in step S3, the preset migration threshold is related to the session duration and the historical retransmission estimation rate; the migration threshold increases with the session duration and the historical retransmission estimation rate to improve the retention priority of long-connection sessions and sessions with high retransmission risk; for active sessions without historical binding, the current optimal candidate link is directly used as the target egress link; for connectionless short flows, the WAN egress link with the largest weight is selected as the current period egress link according to the candidate traffic splitting weight generated based on the comprehensive cost to avoid packet-level out-of-order delivery. The candidate traffic splitting weight is used to convert the comprehensive cost difference into a comparable link preference strength.
[0019] Further, in step S3, summarizing the service load intensity of each WAN egress link based on the session binding result includes: for each WAN egress link, counting the set of active sessions ultimately assigned to that WAN egress link; weighting and accumulating the real-time sensitive service intensity of that WAN egress link based on the transmitted byte load coefficient of each active session and the latency sensitivity and jitter sensitivity in the corresponding service demand vector; and weighting and accumulating the throughput service intensity of that WAN egress link based on the transmitted byte load coefficient of each active session and the throughput demand intensity in the corresponding service demand vector. By sharing the intermediate quantity in step S2, the routing result and queue weight update can be linked within the same state space.
[0020] Further, in step S3, the linked update of the real-time service queue weights and best-effort service queue weights for each WAN egress link includes: configuring a real-time service queue and a best-effort service queue for each WAN egress link; calculating the real-time service queue weight based on the real-time sensitive service intensity, current queue occupancy, and link jitter status of the WAN egress link, and performing bandwidth limiting on the calculation results; determining the best-effort service queue weight based on the real-time service queue weight, so that the sum of the two queue weights is one; when a WAN egress link is determined to be unavailable, clearing the two queue weights of the WAN egress link to zero and stopping packet transmission to the WAN egress link; when the number of active sessions exceeds the preset session size limit, performing the comprehensive cost calculation and migration threshold comparison only on established long-connection sessions, and performing fast traffic splitting based on five-tuples on newly emerging short flows. The session size limit is used to limit the number of sessions participating in the complete coupled calculation on resource-constrained devices to ensure real-time completion capability within the control cycle.
[0021] This invention addresses the problem in existing technologies that only independently score links, making it difficult to reflect the differences between different services. This is achieved through service feature extraction, coupled scoring of service demand vectors and link cost vectors, session persistence gating, and linked queue weight updates. This allows real-time services to be preferentially mapped to links with low queuing and low jitter, reducing the risk of office interruptions caused by meeting lag and remote interaction delays. By directly incorporating queue status into the comprehensive cost and applying it inversely to queue weight updates within the same period, this invention solves the local optima problem caused by the hierarchical separation of routing and scheduling in existing technologies. This alleviates single-link backlog, reduces subsequent manual tuning costs, and improves the balance of resource utilization across multiple links. By including session duration and historical retransmission risk in the migration threshold, this invention solves the problem of migration being triggered by slight fluctuations in link scores. This reduces the stability risks caused by long connection reconstruction, NAT mapping oscillations, and application layer reconnections, ensuring the continuous operation of long-duration sessions in home office scenarios. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments are briefly described below. The drawings only show the core processing procedures related to the method flow of the present invention.
[0023] Figure 1 This is a flowchart of the overall method in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the data acquisition and status construction process in an embodiment of the present invention. Figure 3 This is a flowchart of the service-link matching and scoring process in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the linkage between session persistence and queue weight in an embodiment of the present invention; Figure 5 This is a flowchart of the flow distribution and feedback closed loop in an embodiment of the present invention. Detailed Implementation
[0024] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0025] Example 1: Overall Flow of a Service Offloading Method for Home / Office CPE Gateways
[0026] like Figures 1 to 5 As shown in the figure, the service offloading method for a home office CPE gateway provided in this embodiment includes four collaborative stages: status acquisition and construction, service-link coupling scoring, session persistence and queue linkage, and offloading execution and feedback closed loop. This method runs on a home office CPE gateway, which in this embodiment includes a processor, memory, WAN interface, LAN interface, hardware timestamp unit, and queue scheduling executor. The processor reads a preset parameter dictionary and program instructions from the memory and completes each step within a fixed control cycle.
[0027] This embodiment uses a dual-WAN home office scenario as an example, with the number of links... In practical engineering applications, the number of links can typically be configured reasonably between 2 and 8, depending on the device interface capacity; the control cycle is taken as... In practical engineering applications, the control cycle is typically configurable between 10 and 200 milliseconds, depending on the processor's computing power and the real-time requirements of the business. This value can be determined through offline calibration of the device-side periodic execution latency statistics; the business characteristic statistics window is... The timeout period can be configured between 1 and 5 seconds in practical engineering applications to balance short-term behavior capture and statistical stability; the retransmission estimation window is set to... The bandwidth estimation window can be configured between 1 and 5 seconds in practical engineering applications; the bandwidth estimation window is set to... The timeout period is configurable from 0.5 seconds to 2 seconds in practical engineering applications. The queue scheduler uses a weighted round-robin mode with two queues per link.
[0028] In this embodiment, the engineering definition of the preset offline calibration lower bound and the preset offline calibration upper bound is: a fixed reference boundary used to compress different physical quantities into a unified dimensionless input range; the method of obtaining it is offline calibration based on playback samples of the home office digital twin network and historical device statistical data; typical values are as follows: latency calibration range is 0 to 100 milliseconds, jitter calibration range is 0 to 30 milliseconds, packet loss rate calibration range is 0 to 0.05, available bandwidth calibration range is 0 to 120 Mbps, queue occupancy calibration range is 0 to 200,000 bytes, average packet length calibration range is 64 to 1,500 bytes, arrival interval calibration range is 1 to 200 milliseconds, arrival interval variance calibration range is 0 to 4,000 milliseconds squared, session duration calibration range is 0 to 3,600 seconds, packets per second calibration range is 1 to 500, and historical retransmission estimation rate calibration range is 0 to 0.1. The above values are derived from the statistical results of typical home office business playback. In actual applications, they can be recalibrated according to the deployment network type.
[0029] Step S1: Data Acquisition and State Construction
[0030] like Figure 2 As shown, step S1 includes steps S101 to S104.
[0031] Step S101: Collect link observation status
[0032] The processor collects link observations from each WAN interface. For the first... One WAN egress link, in the current control period The system internally collects round-trip time, latency jitter, packet loss rate, available uplink bandwidth, number of bytes occupied in the egress send queue, and link connectivity flags. Round-trip time and latency jitter are obtained from link probe messages and timestamp statistics; packet loss rate is obtained from the difference between sent probe packets and received response packets within the current probe window; egress send queue occupancy is read from the driver layer or kernel queue status; and link connectivity flags are determined jointly by the physical layer link status and the logical interface availability status.
[0033] The available uplink bandwidth characterizes the remaining uplink capacity of the WAN egress link that can be allocated to new services within the current control cycle. Its engineering definition is: the remaining available capacity obtained by deducting the actual transmission throughput and congestion occupancy reflected by continuous queue growth from the nominal uplink capacity. It is obtained by estimating based on the periodic transmission byte volume, queue occupancy changes, and the nominal uplink capacity of the physical layer or driver layer, and stabilizing it through exponential smoothing. A preset smoothing coefficient is used. The engineering definition of bandwidth estimation smoothing strength is typically 0.4, but in practical engineering applications it can usually be configured between 0.2 and 0.6. This value can be determined offline by scanning historical link fluctuation data. Preset queue growth penalty coefficient. The engineering definition of queue growth is the amplification factor of available bandwidth reduction. The typical value is 1.0, and in practical engineering applications, it can usually be configured between 0.5 and 1.5. This value can be obtained offline based on the correlation between link queue growth and latency degradation.
[0034] In this step, the processor first calculates the periodic throughput estimate based on the number of bytes sent per period, then calculates the congestion reduction based on the increase in queue occupancy relative to the previous period. Subsequently, it subtracts these two amounts from the nominal uplink capacity to obtain the original available uplink bandwidth estimate. Exponential smoothing is then performed on the original estimates for multiple consecutive control periods to reduce the impact of instantaneous sampling jitter. When the WAN driver directly provides the carrier interface rate reading, this reading is used as the nominal uplink capacity input; when this reading is missing, the peak transmission throughput within the most recent bandwidth estimation window is used as an approximation.
[0035] Step S102: Extract session service observations
[0036] The processor extracts the service observations of the currently to-be-distributed service from the LAN side's inbound packets, session table, and NAT table. For the first... For each active session, the average packet length, mean arrival interval, variance of arrival interval, uplink byte ratio, session duration, packets per second, and historical retransmission estimate are extracted from the most recent service characteristic statistics window. These quantities are obtained from the five-tuple session table, NAT mapping records, and hardware timestamps, without application layer content decoding.
[0037] The historical retransmission estimation rate is defined as an estimate characterizing the stability of current active session transmission and potential link risks. It originates from observable statistics of duplicate transmissions, failed transmissions, or suspected duplicate packets within a period. The method of obtaining this rate varies depending on the protocol type. For TCP sessions, the processor counts the number of packets that are repeatedly transmitted within the same 5-tuple, in the same direction, and within the same sequence number range within the retransmission estimation window, and compares this number with the total number of transmitted packets. For UDP sessions or sessions that cannot reliably obtain sequence numbers, the processor counts the number of failed transmission packets reported by the driver layer and the number of suspected duplicate transmission packets identified based on 5-tuple, length, and time nearest neighbor rules, and compares this number with the total number of transmitted packets. This state quantity is a risk estimation factor rather than the actual link loss rate; its rationality can be verified through observable feedback such as the actual transmission success rate, average waiting time, and whether duplicate transmissions are triggered in the next period.
[0038] When the session is a new session and there are insufficient historical transmission samples, the historical retransmission estimation rate is initialized to 0. The engineering meaning of this initial value is that no obvious retransmission risk has been observed; its source is the cold start strategy; and its value is determined to avoid prematurely amplifying the session hold-up threshold when there are insufficient samples.
[0039] Step S103: Perform normalization, time alignment, and degradation marking.
[0040] The continuous observations obtained in steps S101 and S102 are subjected to truncation normalization under a fixed offline calibration interval. The processing logic is as follows: first, the observed values are restricted to between a preset lower bound and a preset upper bound of offline calibration; then, they are linearly mapped to the zero-to-one interval according to the lower and upper bounds; if the upper and lower bounds are equal, zero is directly output to avoid division by zero anomalies; for proportional quantities that are already in the zero-to-one interval and whose calibration boundaries are also zero and one, the original values are directly used. Discrete link connectivity flags remain unchanged.
[0041] All types of data are aligned to the control cycle. The corresponding timestamp. When a link's probe value is missing within a certain period, the valid value from the previous period is used, and the link is marked as a sampled degradation state. The engineering definition of the sampled degradation mark is: a status flag indicating that the link probe data for this period has not been updated in real time but instead uses historical valid values; its acquisition method is provided in real time by the sampling validity detection logic. A preset upper limit for continuous degradation periods is set. The engineering definition of the maximum number of cycles that a link can still participate in candidate ranking under continuous missing tests is the longest possible number of cycles. A typical value is 5, but in practical engineering applications, it can usually be configured between 3 and 10 control cycles. This value can be obtained offline statistically based on the link's probe stability. When the same link is continuously... When a control cycle is in a degraded state, the link connectivity flag is forcibly set to unavailable.
[0042] When a session has only one data packet in the statistics window, the mean and variance of the arrival interval cannot be calculated stably. In this embodiment, the corresponding normalization result is set to 1. The engineering meaning of this value is the burst unformed default state, which comes from the boundary protection strategy. When the available bandwidth sample value of a link is less than zero or the detection is abnormal, it is truncated to zero.
[0043] Step S104: Construct the service sensitivity vector and link bearer vector
[0044] After preprocessing, the processor constructs the service sensitivity vector and link bearer vector. For the... For each active session, the service sensitivity vector consists of a normalized average packet length, mean arrival interval, variance of arrival interval, uplink byte ratio, session duration, packets per second, and historical retransmission estimation rate, forming a seven-dimensional vector. For the [missing information]... Each WAN egress link has a link bearer vector consisting of normalized round-trip delay, delay jitter, packet loss rate, available bandwidth, queue occupancy, and link connectivity flags, forming a six-dimensional vector.
[0045] After this step, data from different sources and with different dimensions are mapped to a unified processing scale, and subsequent business requirement mapping and link cost mapping can be completed in the same numerical space.
[0046] Step S2: Calculation of Coupling Cost
[0047] like Figure 3 As shown, step S2 includes steps S201 to S204.
[0048] Step S201: Generate business requirement vector
[0049] The processor reads the pre-calibrated and stored offline first mapping matrix and first bias vector from memory, mapping the service sensitivity vector into a four-dimensional service demand vector. This four-dimensional vector sequentially represents latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput demand intensity. In the online phase, the processor first performs a linear mapping, then compresses the mapping result to ensure the output falls within the zero-to-one interval. The predetermined numerical interval is preferably a normalized output interval near the zero-to-one closed interval, set according to the unified dimensional requirements of subsequent cost coupling calculations.
[0050] The first mapping matrix is defined as an offline calibration parameter from business observation features to the demand space. It is obtained by supervised fitting based on business demand labels from offline samples, including video conferencing streams, remote desktop streams, web page streams, and download streams. A typical deployment method is to store it in memory for direct retrieval during the online phase. The first bias vector is used to compensate for the base offsets of different demand dimensions. Only matrix multiplication and element-wise compression operations are performed during the online phase, making it suitable for resource-constrained CPE processors to run within millisecond cycles.
[0051] To avoid numerical overflow during compression, if the absolute value of an element in the linear mapping result is too large, it is first restricted to a safe calculation range before compression is performed.
[0052] As a set of example parameters that have been calibrated offline and stored in a fixed manner, the first mapping matrix With the first bias vector You can take them separately:
[0053]
[0054] as well as
[0055] ,
[0056] The example values above are used to illustrate the specific implementation of the first mapping matrix and the first bias vector. In actual engineering applications, they can be recalibrated offline according to the deployment network and service distribution.
[0057] Step S202: Generate link cost vector
[0058] The processor reads the pre-calibrated and stored second mapping matrix and second bias vector from memory, mapping the link bearer vector into a four-dimensional link cost vector. This four-dimensional vector sequentially represents the latency cost, jitter cost, packet loss cost, and insufficient throughput cost. In the online phase, the processor first performs a linear mapping, then performs non-negative clipping on the mapping result, suppressing negative values to zero and limiting excessively large values within a predetermined range to suppress the excessive amplification of the total cost by a single abnormal observation.
[0059] The engineering definition of the second mapping matrix is an offline calibration parameter from the link state to the bearer cost space; it is obtained by supervised fitting based on the link experience cost labels under different latency, jitter, packet loss, and bandwidth conditions; its typical deployment method is to store it in memory and read it directly during the online phase. The second bias vector is used to compensate for the basic link cost level.
[0060] When a link is determined to be unavailable in the current cycle, the processor no longer relies on the mapping result to participate in the normal candidate sorting, but excludes it through the unavailability penalty term in the subsequent comprehensive cost calculation.
[0061] The second mapping matrix serves as a set of example parameters that have been calibrated offline and stored in a fixed manner. With the second bias vector You can take them separately:
[0062]
[0063] as well as
[0064] ,
[0065] The example values above are used to illustrate the specific implementation of the second mapping matrix and the second bias vector. In actual engineering applications, they can be recalibrated offline based on different access media and link quality statistics.
[0066] Step S203: Calculate the overall cost
[0067] This step corresponds to the core distinguishing technical feature of this invention. The processor calculates the comprehensive cost for each active session and each WAN egress link. The smaller the comprehensive cost, the more suitable the link is for carrying the corresponding session. The calculation formula is as follows:
[0068] This formula addresses the problem in existing technologies that "scores only the link itself without scoring the service-link matching relationship." The formula input includes the first... The business requirement vector of the first active session, the first The link cost vector of each WAN egress link, the normalized queue occupancy of the link, the migration indicator, the link connectivity flag, and the sampling degradation flag; the execution entity is the CPE gateway processor; the invocation timing is after completing steps S201 and S202 within each control cycle.
[0069] in, Indicates the first The first active session in the The control cycle is mapped to the first... The total cost of a single WAN egress link is a dimensionless scalar. Indicates the first The business requirement vector for each activity session is a four-dimensional column vector, with each component corresponding to latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput requirement intensity, and the values range from zero to one. Indicates the first The link cost vector of each WAN egress link is a four-dimensional column vector, and its components correspond to latency cost, jitter cost, packet loss cost, and insufficient throughput cost, respectively. This represents the inner product of the two, used to measure the consistency penalty between business requirements and link defects across various dimensions. The larger the value of this term, the more sensitive the business is to a certain dimension and the higher the cost of the link in that dimension. This represents the queue occupancy penalty coefficient, which is a non-negative scalar. Its engineering definition is the suppression strength of instantaneous link backlog on the routing of new services. The typical value is 0.25, and in practical engineering applications, it can usually be configured between 0.10 and 0.50. This value can be obtained offline by calibrating the average queuing delay of the video conferencing stream and the link occupancy replay sample. Indicates the first The normalized queue occupancy of each WAN egress link, with a value ranging from zero to one; This represents the session migration penalty coefficient, which is a non-negative scalar. Its engineering definition is the bias strength used to maintain the original outgoing link for an established session. The typical value is 0.45, and in practical engineering applications, it can usually be configured between 0.20 and 0.80. This value can be determined offline based on the trade-off between the number of long connection migrations and the recovery speed. Indicates the migration indicator quantity, when the first The previous cycle's bound link for the active session was not the [number]th [period]. The value is set to 1 if there is a link, otherwise it is set to 0. When the active session is the first session, the session is rebuilt after a timeout, or the link bound in the previous cycle has failed and the current route is reselected, the value is set to 0 for all currently available WAN egress links. This represents the link unavailability penalty coefficient, which is a non-negative large value scalar. Its engineering definition is the forceful penalty strength to quickly exclude failed links from the candidate set. The typical value is 10, and in actual engineering applications, it can usually be configured between 5 and 20. This value can be set offline according to the device's fault tolerance strategy and the link disconnection speed. Indicates the first The WAN outbound link is in the first The link connectivity flag for each control cycle can be either 0 or 1, where 1 indicates availability and 0 indicates unavailability. This represents the sampling degradation penalty coefficient, which is a non-negative scalar. Its engineering definition is the conservative penalty strength for missing measurements but temporarily using historical values. The typical value is 0.10, and in practical engineering applications, it can usually be configured between 0.05 and 0.30. This value can be set offline according to the detection missing frequency and the risk of misjudgment. Indicates a sampling degradation flag, when the first If the current cycle's detection value is missing for a link and the value from the previous cycle is used, then the value is set to 1; otherwise, the value is set to 0.
[0070] When all links are unavailable, the processor maintains the original session binding and only allows local queuing, preventing illegal migrations. When only one link is available, all new sessions are directly assigned to that link, skipping the sorting process. This process ensures that the system can still output consistent and executable results under abnormal conditions.
[0071] Step S204: Generate candidate splitting weights
[0072] For new sessions or short sessions that allow migration, the processor generates candidate traffic splitting weights based on the overall cost. The processing logic is as follows: the smaller the overall cost, the larger the candidate weight of the corresponding link; the processor converts the cost differences of multiple links into a comparable weight distribution through exponential normalization. When strict normalization is required on the device side, a second normalization process can be performed on the approximate normalization result.
[0073] Preset cost sensitivity coefficient The engineering definition of this parameter is an adjustment parameter that maps the overall cost difference to the sharpness of the weight distribution. A typical value is 3, but in practical engineering applications, it can usually be configured between 1 and 5. This value can be determined offline based on the degree of multi-link difference and the desired traffic splitting discreteness. Smoothing term. The engineering definition of is a very small positive number that prevents the denominator from overflowing during exponential normalization; a typical value is . This value can be set according to the precision boundary of floating-point operations.
[0074] When there is only one candidate link, the weight of that link is set to 1. When a link is unavailable, its overall cost is increased and its corresponding weight approaches zero.
[0075] Step S3: Session binding and queue linkage
[0076] like Figure 4 As shown, step S3 includes steps S301 to S303.
[0077] Step S301: Perform session persistence determination
[0078] For an established session, the processor first determines the current best candidate link based on the overall cost, and then compares the difference in overall cost between the original bound link and the current best candidate link with the migration threshold. Only when the difference exceeds the migration threshold will the exit migration be performed; otherwise, the original binding will continue to be maintained.
[0079] The migration threshold controls the condition that "the advantage of the new link must outweigh the cost of maintaining it," and its calculation corresponds to another core mechanism of this invention. The migration threshold calculation formula is as follows:
[0080] This formula corresponds to the hold-gating judgment in step S301, and is used to solve the problem of frequent migration of long-connection sessions due to slight fluctuations in link scores. The formula input includes the first... The normalized session duration and normalized historical retransmission estimation rate of each active session; the execution entity is the CPE gateway processor; the invocation timing is after obtaining the current optimal candidate link and before executing the migration judgment.
[0081] in, Indicates the first The first active session in the The migration threshold for each control cycle is a dimensionless scalar. This represents the basic migration threshold, which is defined in engineering as the minimum handover hysteresis that should be retained even in short sessions and low retransmission risk scenarios. The typical value is 0.18, and in practical engineering applications, it can usually be configured between 0.10 and 0.30. This value can be determined offline by a trade-off between the number of allowed migrations and the recovery speed. This represents the session duration gain factor, which is defined in engineering as the amplification strength of session duration on hold priority. The typical value is 0.22, and in practical engineering applications, it can usually be configured between 0.10 and 0.40. This value can be calibrated offline according to the proportion of long connections. Indicates the first The normalized session duration of each active session, with a value between zero and one; This represents the retransmission risk gain coefficient, which is defined in engineering as the amplification strength of historical retransmission risk on maintaining priority. The typical value is 0.30, and in practical engineering applications, it can usually be configured between 0.10 and 0.50. This value can be calibrated offline according to the degree of risk deterioration after retransmission trigger migration. Indicates the first The normalized history retransmission estimate for each active session, with values ranging from zero to one.
[0082] This formula indicates that the longer the session duration and the higher the risk of historical retransmission, the larger the migration threshold, and the less likely an exit migration will occur. When the migration threshold exceeds the preset upper limit, it is truncated to the upper limit to prevent long sessions from never migrating. The engineering definition of the preset upper limit of the migration threshold is the maximum allowable value for maintaining hysteresis, typically a configuration value in the range of 0.8 to 1.2; its calibration is based on the offline trade-off scan results among fault recovery latency tolerance, the target number of allowed migrations, and the recovery speed of long connection fault handover, and can be determined by jointly evaluating the average recovery time and the number of migrations per hour on historical replay samples.
[0083] For active sessions without historical bindings, the current best candidate link is directly used as the target egress link; for multiple candidate links with the same cost, the link that is currently not congested and has consistent historical bindings is selected first.
[0084] Step S302: Summarize the link service load strength
[0085] After completing the session binding determination, the processor statistically analyzes the active session set of each WAN egress link and summarizes them to form the link-level service load strength. Specifically, based on the transmit byte load coefficient of each active session and the latency sensitivity and jitter sensitivity in its service demand vector, the real-time sensitive service strength is obtained by weighted accumulation; based on the transmit byte load coefficient of each active session and the throughput demand strength in its service demand vector, the throughput service strength is obtained by weighted accumulation.
[0086] For ease of implementation, the transmit byte load factor can be obtained by comparing the transmit byte amount of the active session within the current control period with a preset reference byte amount; the real-time sensitive service intensity can be obtained by weighting the latency sensitivity and jitter sensitivity according to a preset real-time sensitive aggregation coefficient, multiplying it by the transmit byte load factor, and summing it over all home sessions on the same link; the throughput service intensity can be obtained by multiplying the throughput demand intensity by the transmit byte load factor and summing it over all home sessions on the same link. Therefore, the service demand vector generated in step S2 is directly used as one of the inputs to step S302, forming a continuous data chain of "comprehensive cost—session binding result—service load intensity".
[0087] Preset reference byte size The engineering definition of this is a reference scale that maps the number of bytes sent in a single cycle to a normalized load factor. A typical value is the reference amount calculated based on 1500-byte messages and 100 packets within the control cycle, which corresponds to approximately 150,000 bytes in this embodiment. In practical engineering applications, this reference amount can be configured within the same order of magnitude based on the interface rate and cycle duration, and its source can be determined offline through full-load transmission samples from the device. A preset real-time sensitive aggregation coefficient is also included. and The engineering definitions are the weighting of latency sensitivity and jitter sensitivity in real-time service intensity, with a typical value of 0.5 for both. This value can be set offline according to the balance of latency and jitter sensitivity for conference streams and remote desktop streams.
[0088] When a session sends very few samples, the sent byte load coefficient can be set to 1, degenerating into aggregation based on session demand intensity, to ensure that the session can still participate in queue linkage decision-making.
[0089] Step S303: Update queue weights
[0090] For each WAN egress link, the processor configures two types of transmission queues: a real-time service queue and a best-effort service queue. The weight of the real-time service queue is updated based on the link's real-time sensitive service intensity, current queue occupancy, and link jitter status. The weight of the best-effort service queue is then determined by the weight complementarity relationship. The calculation formula is as follows:
[0091] This formula corresponds to the queue weight linkage update in step S303, and is used to solve the queue local optimum problem caused by the failure to promptly feed back the routing results to the local scheduler. Its inputs include the... The system measures the real-time sensitive service intensity, normalized queue occupancy, and normalized link jitter of each WAN egress link; the execution entity is the CPE gateway processor; and the call is made after session binding is completed and link service intensity statistics are completed.
[0092] in, Indicates the first The WAN outbound link is in the first The real-time business queue weight for each control cycle is between the lower and upper weight limits. This indicates a thresholding process, meaning that when the calculation result exceeds the upper limit, it is truncated to the upper limit; when it is below the lower limit, it is truncated to the lower limit. This represents the basic weight, which is defined in engineering as the basic scheduling share reserved for the real-time queue when there is no significant business bias. The typical value is 0.30, and this value can be determined through offline calibration of scheduling stability in low-load scenarios. This represents the real-time service intensity gain coefficient, which is defined in engineering terms as the amplification intensity of the real-time queue weighted when real-time sensitive services increase. A typical value is 0.25. This represents the queue backlog suppression coefficient, which is defined in engineering terms as the strength of the suppression of the current link backlog from further increasing the real-time queue weight. A typical value is 0.20. This represents the low jitter reward coefficient, which is defined in engineering terms as the strength of positive incentive for real-time queue weights when link jitter is low, with a typical value of 0.15. Indicates the first The real-time sensitive service intensity of each WAN egress link is a dimensionless cumulative quantity; Indicates the first Normalized queue occupancy of each WAN egress link; Indicates the first Normalized latency jitter of each WAN outbound link; This represents the lower limit of the weight of the real-time service queue. Its engineering definition is the minimum scheduling share reserved for the real-time queue even in low real-time service scenarios, with a typical value of 0.20. This represents the upper limit of the real-time service queue weight. Its engineering definition is the maximum scheduling share set to prevent best-effort services from being completely starved; a typical value is 0.85. The above parameters can be obtained through a dual-target scan of the conference stream's one-way latency and download throughput in offline simulation.
[0093] The weight of the best-effort business queue is determined by Therefore, the sum of the weights of the two queue types remains at 1. When a WAN outbound link is determined to be unavailable, the weights of the two queue types for that link are directly cleared to zero and packet transmission is stopped.
[0094] When the number of active sessions exceeds the preset session size limit, the full coupled scoring process is only performed on established long-connection sessions, while new short-lived connections are subject to fast traffic splitting based on 5-tuples. The engineering definition of the session size limit is the maximum number of active sessions allowed to participate in full matrix mapping and maintain gating under a given processor computing power. A typical value is 512, and in practical engineering applications, it can usually be configured between 256 and 2048. This value can be determined offline through full-load stress testing of the device.
[0095] Step S4: Result Distribution and Closed-Loop Feedback
[0096] like Figure 5 As shown, step S4 includes steps S401 and S402.
[0097] Step S401: Write the splitting result
[0098] The processor writes the session binding result obtained in step S3 into the session table, forwarding table, and NAT mapping appendix fields. New sessions are forwarded according to the bound link's outgoing interface; established sessions continue to send along the original NAT mapping unless the migration threshold condition is met. For connectionless short flows, the processor selects the link with the highest weight as the current cycle's outgoing link based on the candidate traffic splitting weights to avoid packet-level out-of-order delivery.
[0099] In this embodiment, the session table fields include at least the session identifier, a 5-tuple, the currently bound WAN egress number, the previously bound WAN egress number, session duration statistics, historical retransmission estimation rate, recent migration flag, and timeout recovery timestamp. The NAT mapping additional fields include at least the address-port pair before and after mapping, the bound WAN egress number, and the most recent update timestamp. All of these fields are maintained synchronously by the processor during forwarding decisions to ensure session egress consistency and consistency in subsequent state readbacks.
[0100] Step S402: Write the queue weight and record the feedback.
[0101] The processor writes the weights of the real-time service queue and the best-effort service queue into the queue scheduler, and updates the weight polling parameters of the hardware or kernel scheduler. At the same time, it records the transmission success rate, average waiting time and whether migration is triggered for each session in this cycle, which are used as feedback input for the next cycle to form a complete closed loop.
[0102] The engineering definition of transmission success rate is the ratio of the number of successfully transmitted messages to the number of enqueued messages within the current control cycle; it is derived from the driver layer's transmission completion indication and enqueue count; and it is obtained by the processor performing a unified statistical analysis at the end of the cycle. The engineering definition of average waiting time is the average duration from when a message enters the transmission queue to when it receives a transmission opportunity; it is derived from the queue enqueue timestamp and the transmission time timestamp; and it is obtained by averaging the accumulated waiting times within the cycle. Transmission success rate threshold. The engineering definition of this threshold is used to determine whether there is a significant risk of transmission failure in the current session. A typical value is 0.98, but in practical engineering applications, it can usually be configured between 0.95 and 0.99. This value can be obtained through offline scanning and calibration based on link error statistics, driver report characteristics, and the acceptable loss level for services sensitive to transmission failure. Average latency threshold. The engineering definition of is a threshold for determining whether the current session has experienced significant queuing deterioration. The typical value is 10 milliseconds, but in actual engineering applications, it can usually be configured between 5 and 30 milliseconds. This value can be set offline based on the acceptable latency threshold of real-time business, the smoothness requirements of business interaction, and historical samples of queue backlog.
[0103] At the feedback interface, the transmission success rate, average waiting time, and whether migration was triggered in this period are written back to the session risk state update logic, link bearer state correction logic, and migration behavior statistics logic, respectively. Specifically, the transmission success rate is used to correct the reliability of historical retransmission estimates, the average waiting time is used to assist in correcting the queue congestion risk assessment for the next period, and whether migration was triggered is used to update the session persistence state and migration frequency statistics. This forms a closed-loop data chain of "session binding result—queue execution result—feedback input—next period state construction".
[0104] When the queue scheduler fails to write back, the processor maintains the queue weight from the previous cycle and records the alarm. When the session table capacity reaches its limit, real-time sensitive sessions and long-lived connections are prioritized for retention, while short-term idle sessions are reclaimed according to the least recently used principle. This degradation strategy enables the system to still output usable traffic distribution results under resource constraints and local anomalies.
[0105] End-to-end numerical examples
[0106] The following describes the execution process of the method of the present invention with reference to a specific set of input data in this embodiment. The example scenario is a dual-WAN home / office CPE, where WAN1 is wired broadband and WAN2 is a 5G fixed wireless access link. A video conferencing session is in the... The raw service observation data for each control cycle are as follows: average packet length 220 bytes, average arrival interval 20 milliseconds, arrival interval variance 35 milliseconds squared, uplink byte ratio 0.52, session duration 600 seconds, packets per second 48, historical retransmission estimation rate 0.012, and the previous cycle's bound link is WAN2. The raw link status of WAN1 is as follows: latency 18 milliseconds, jitter 4 milliseconds, packet loss rate 0.004, available uplink bandwidth 42 Mbps, queue usage 90,000 bytes, and connectivity flag is available; the raw link status of WAN2 is as follows: latency 26 milliseconds, jitter 10 milliseconds, packet loss rate 0.009, available uplink bandwidth 38 Mbps, queue usage 40,000 bytes, and connectivity flag is available.
[0107] After normalization in step S103, the active session forms a seven-dimensional service sensitivity input, and WAN1 and WAN2 each form a six-dimensional link bearer input. The processor then calls the pre-defined first mapping matrix. and the first bias vector This activity session is mapped to a four-dimensional business requirement vector; as an example, the resulting four-dimensional business requirement vector could be: This indicates that the session is more sensitive to latency and jitter. Then, the pre-defined second mapping matrix is invoked. Second bias vector WAN1 and WAN2 are mapped to four-dimensional link cost vectors respectively; as an example, the link cost vectors corresponding to WAN1 and WAN2 can be respectively ,
[0108] The above results show that WAN1 has lower latency, jitter, and packet loss costs, but higher costs for insufficient throughput and queue occupancy; WAN2 has lower queue occupancy, but relatively higher costs for latency and jitter.
[0109] After substituting the comprehensive cost calculation from step S203, WAN1 and WAN2 obtain their respective comprehensive costs. For example, the comprehensive cost for WAN1 could be 1.07, and for WAN2, it could be 0.95. Since this session was already bound to WAN2 in the previous cycle, a migration penalty is applied to WAN1. After comprehensive comparison, WAN2 remains the optimal candidate link for the current cycle, so the processor maintains its original binding. If this session is a new session, based on the candidate traffic splitting weights generated in step S204, the candidate weight for WAN2 is greater than that for WAN1, and the processor will directly select WAN2 as the egress link for the current cycle. For example, in a new scenario, the candidate traffic splitting weights for WAN1 and WAN2 could be 0.41 and 0.59, respectively.
[0110] Subsequently, the processor calculates the service load intensity of the two links based on the final binding results of each session in this cycle. If WAN2 carries a large number of conference streams and remote desktop streams, then the real-time sensitive service intensity of WAN2 is high. In step S303, the processor correspondingly increases the real-time service queue weight of WAN2 and decreases its best-effort service queue weight. As an example, within a certain control cycle, the real-time service queue weight of WAN2 can be updated to 0.68, and the best-effort service queue weight can be updated to 0.32. After this processing, conference streams will receive a higher sending priority, while throughput-oriented services such as download streams will be more reserved for the best-effort queue, thereby reducing conference stream queuing fluctuations.
[0111] Simulation verification
[0112] A home office digital twin network was constructed for simulation verification. The simulation lasted for 8 hours and included two outgoing links and 20 concurrent terminals. A download burst was injected every 10 minutes, and a 5G link jitter increase event was injected every 30 minutes. Evaluation metrics included the 95th percentile one-way queuing latency for video conferencing, conference jitter, average queue occupancy rate of the busiest link, load deviation coefficient between two links, number of long connection migrations, and TCP retransmission rate. Each scheme was simulated five times, and the result was the average of the five simulations. Among them, the 95th percentile one-way queuing delay of video conferencing was obtained by statistically analyzing the 95th percentile of the one-way queuing waiting time of all conference messages; the conference jitter was calculated by the average absolute deviation of the change in the sending interval of adjacent conference messages; the average queue occupancy rate of the busiest link was obtained by the average time of the number of bytes occupied in the queue during the simulation period relative to the upper bound of the queue calibration of that link; the load deviation coefficient between two links was calculated by the normalized deviation of the relative mean of the number of bytes sent in the period of the two outgoing links; the number of long connection migrations was calculated by the number of times the same long connection bound to the outgoing link changed per hour; and the TCP retransmission rate was calculated by the proportion of retransmitted messages to the total number of sent messages.
[0113] Comparison Scheme A is a fixed polling traffic distribution scheme, which does not distinguish between service types and maps outbound links to newly created sessions in a polling manner, keeping queue weights fixed. Comparison Scheme B is a static bandwidth allocation scheme, which maps traffic per flow according to a fixed link bandwidth share set offline, and configures queue weights only based on the bandwidth share, without introducing service-link coupling scoring. Comparison Scheme C is an instant switching scheme, which retains the overall cost ranking but removes session migration penalties and migration thresholds, and migrates immediately when link scores overlap. Comparison Scheme D is a link-only independent scoring scheme, which calculates the total link score based on link latency, jitter, packet loss, and bandwidth status, without constructing a service demand vector or linking queue weights.
[0114] Compared with control scheme A, with other test conditions remaining consistent with the main scenario of this embodiment, the video conferencing 95th percentile one-way queuing latency of the present invention was reduced from 31 milliseconds to 19 milliseconds, and the conference jitter was reduced from 12.6 milliseconds to 7.8 milliseconds. This result demonstrates that by coupling the business demand vector and the link cost vector in a scoring system, and by linking queue occupancy penalties with real-time queue weights in the same closed loop, latency-sensitive services can be more stably guided to low-queue, low-jitter links, thereby reducing conference stream queuing fluctuations and mitigating the risk of business interruption caused by office interaction glitches.
[0115] Compared with control scheme B, with other test conditions remaining consistent with the main scenario of this embodiment, the average queue occupancy rate of the busiest links in this invention's scheme decreased from 0.71 to 0.49, and the load deviation coefficient between the two links decreased from 0.34 to 0.18. This result demonstrates that by directly incorporating the instantaneous queue status of the links into the overall cost and continuing to drive queue weight adjustments after the binding results are generated, it is possible to alleviate single-link backlog and improve the load balance of multiple links, thereby reducing the cost of subsequent manual optimization and link congestion troubleshooting.
[0116] Compared with control scheme C, with other test conditions remaining consistent with the main scenario of this embodiment, the average number of migrations per long connection in the proposed solution decreased from 2.9 times / hour to 0.8 times / hour, and the TCP retransmission rate decreased from 2.1% to 1.2%. This result demonstrates that by incorporating session duration and historical retransmission estimation rate into the migration threshold, frequent egress migrations triggered by slight score fluctuations can be suppressed, thereby reducing the transmission risks associated with NAT mapping oscillations, congestion window rollback, and application layer reconnections.
[0117] When compared with control scheme D, other test conditions remain consistent with the main scenario of this embodiment. The present invention's scheme is superior to control scheme D in three indicators: 95th percentile one-way queuing latency in video conferencing, average queue occupancy rate of busy links, and number of long connection migrations. This shows that the present invention does not only achieve improvement through independent link sorting, but also achieves multi-objective collaborative optimization through the synchronous linkage of shared business demand vector, link cost vector, and queue status.
[0118] Example 2: Session Persistence Enhancement under Abnormal Link Fluctuation Scenarios
[0119] This embodiment illustrates the degraded execution mode of the method of the present invention when abnormal fluctuations occur in the 5G backup link. This embodiment follows the overall process and parameter configuration of Embodiment 1, without changing the main structure of steps S1 to S4.
[0120] In this embodiment, the link quality fluctuation detection window is set to 1 second. In actual engineering applications, it can be configured between 0.5 seconds and 3 seconds depending on the duration of abnormal fluctuations. This value can be obtained through offline calibration of link fluctuation statistics. If the same link has a jitter sample standard deviation greater than 8 milliseconds or a mean delay change exceeding 15 milliseconds within 10 consecutive control cycles, the link is marked as a high-fluctuation link. The engineering definition of the high-fluctuation jitter standard deviation threshold is the threshold for determining whether jitter fluctuations have reached a significant disturbance level in a short period of time. The typical value is 8 milliseconds, and it can be configured between 5 milliseconds and 12 milliseconds in actual engineering applications. The engineering definition of the high-fluctuation mean delay change threshold is the threshold for determining whether the link delay baseline has drifted significantly in a short period of time. The typical value is 15 milliseconds, and it can be configured between 8 milliseconds and 25 milliseconds in actual engineering applications. All of the above parameters can be determined offline based on historical samples of base station handover impacts.
[0121] For established long-lived connections, if the session duration exceeds 300 seconds, the migration threshold will be increased by an additional 0.12 during the high-fluctuation period. This additional threshold is defined in engineering as an extra hold hysteresis for long-lived connections during periods of abnormal fluctuation, derived from a trade-off calibration of migration counts and recovery speed in abnormal operating condition simulations. In practical engineering applications, this additional value can be configured between 0.05 and 0.20, and can be calibrated offline based on the duration of abnormal fluctuations, recovery speed requirements, and long-lived connection continuity requirements. If a link is unavailable for three consecutive control cycles, all new sessions will be prohibited from being mapped to that link; bound sessions will trigger a one-time migration when the current retransmission rate exceeds 3%. The number of consecutive unavailable cycles can be configured between 2 and 6 control cycles in practical engineering applications, and the retransmission rate trigger threshold can be configured between 1% and 5%, both of which can be set offline based on fault recovery tolerance, link transient frequency, and service continuity requirements.
[0122] For example, if the normalized session duration of a VPN long connection during an abnormal fluctuation phase is 0.50 and the normalized historical retransmission estimation rate is 0.20, then the basic migration threshold is obtained according to the threshold formula in Example 1. If the high fluctuation additional threshold takes effect, the actual migration threshold is further increased. At this time, when the difference in the comprehensive cost between the old and new links is small, and it is only reflected in the score crossover caused by short-term fluctuations, migration is not triggered; a one-time migration is only performed when the original link is truly unavailable or the advantage of the new link is significantly expanded. Subsequently, based on the above processing results, the processor continues to execute the subsequent steps as described in Example 1, completing the session binding write, queue weight update, and feedback closed-loop operation. Its specific execution logic is consistent with Example 1 and will not be repeated here.
[0123] In a simulation scenario involving base station handover impact, compared to a strategy without additional thresholds, the average number of migrations for long-lived remote desktop connections in this embodiment is reduced from 1.1 times / hour to 0.6 times / hour, while the fault recovery time increases from 1.2 seconds to 1.4 seconds. These results indicate that this embodiment is more suitable for long-connection-dominated scenarios such as VPNs and remote desktops, and can further reduce jitter-induced invalid handovers while maintaining acceptable recovery speed.
[0124] Example 3: Offline Calibration and Online Version Replacement
[0125] This embodiment is used to illustrate the offline calibration and online replacement methods of the first and second mapping matrices, without changing the main online process in Embodiment 1.
[0126] CPE continuously collects anonymized statistical feature data, without collecting application content, retaining only session features and actual experience results, such as sending latency, jitter, and retransmission rate. During low-traffic periods each day, the anonymized statistical data is uploaded to the home network management server or offline training is performed by the local management process. The training and validation sets are divided in an 8:2 ratio, and mini-batch gradient descent is used to update the first and second mapping matrices and their corresponding bias vectors. The learning rate is set to 0.01, which can be adjusted to a similar order of magnitude in practical engineering applications based on sample size and convergence stability; the batch size is set to 256, which can be configured based on memory capacity and sample size in practical engineering applications; the number of training epochs is set to 80, and the validation set loss is set to less than 1 for 5 consecutive epochs. Stop early. All of the above parameters can be determined through an offline training and verification process.
[0127] The new version will only perform a replacement when the overall metrics are more than 5% better than the current version. The engineering definition of the version replacement threshold is the minimum benefit required to avoid frequent model version switching due to slight statistical fluctuations, typically set to 5%, and can be set offline according to long-term operational stability requirements. Online replacement is performed during low-business hours in the early morning and retains the parameters of the previous version as a rollback mirror.
[0128] In a simulation of the day-night workload ratio, compared to a fixed initial matrix scheme, the scheme that recalibrates offline every 7 days reduces the download completion time from 12.0 minutes to 11.0 minutes, while the 95th percentile one-way queuing latency of the meeting stream remains essentially unchanged. This result demonstrates that this embodiment can ensure that the offline mapping parameters closely approximate the actual home office workload distribution without increasing the online computing burden during the day.
[0129] Example 4: Electronic Equipment
[0130] This embodiment provides an electronic device, including a memory, a processor, and a communication interface. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the service offloading method for a home office CPE gateway described in any one of embodiments one to three.
[0131] The processor can be a general-purpose central processing unit, a network processor, or a control processing core in a system-on-a-chip; the memory can be a read-only memory, a random access memory, flash memory, or a combination thereof; the communication interface is used for data interaction with a WAN interface, a LAN interface, a queue scheduling executor, and a hardware timestamp unit. When the processor executes the computer program, it completes processes such as link status acquisition, session service feature extraction, service demand vector generation, link cost vector generation, comprehensive cost calculation, candidate traffic splitting weight generation, migration threshold comparison, queue weight update, and traffic splitting result writing. The above embodiments detail the implementation of this invention in a multi-link service splitting scenario for a home / office CPE gateway. Those skilled in the art should understand that adjustments can be made to the implementation form and details for different numbers of WAN links, service type combinations, and device computing capabilities without departing from the core logic of this invention. The scope of protection of this invention is determined by the claims and their equivalent technical solutions.
Claims
1. A home office CPE gateway traffic offloading method, characterized in that, include: Collect link status data, active session service observation data, and previous cycle session binding information of each WAN egress link of the home office CPE gateway. Perform time alignment and truncation normalization under a fixed offline calibration interval on the link status data and service observation data, and construct the service sensitivity vector of the active session and the link bearer vector of each WAN egress link respectively. Based on the service sensitivity vector, a service demand vector is generated that includes at least latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput demand intensity. Based on the link bearer vector, a link cost vector corresponding to the dimension of the service demand vector is generated. Based on the inner product of the service demand vector and the link cost vector, the link queue occupancy penalty, the session migration penalty, the link unavailability penalty, and the sampling degradation penalty, the comprehensive cost of mapping each active session to each WAN egress link is calculated. Based on the comprehensive cost, candidate traffic splitting weights for each active session corresponding to each WAN egress link are generated. The optimal candidate link is determined based on the comprehensive cost corresponding to each active session. For active sessions with existing bound links, the difference between the comprehensive cost of the original bound link and the current optimal candidate link is compared with a preset migration threshold. Exit migration is performed only when the difference exceeds the migration threshold to obtain the session binding result. Based on the session binding results, the service load intensity of each WAN egress link is summarized, and combined with the current queue occupancy and link jitter status of the corresponding WAN egress link, the real-time service queue weight and best-effort service queue weight of each WAN egress link are updated in a coordinated manner. The session binding result is written to the session table, forwarding table, and NAT mapping append fields. The real-time service queue weight and the best-effort service queue weight are written to the queue scheduler. The sending result of this cycle is recorded as the feedback input for the next cycle to perform closed-loop control of service diversion for the home office CPE gateway.
2. The method of claim 1, wherein the method further comprises: The link status data includes at least the round-trip time, latency jitter, packet loss rate, available uplink bandwidth, outbound transmission queue occupancy, and link connectivity flag for each WAN egress link. The service observation data includes at least the average packet length, mean arrival interval, variance of arrival interval, uplink byte ratio, session duration, number of packets per second, and historical retransmission estimation rate for active sessions. The service sensitivity vector is a 7-dimensional vector, and the link carrying vector is a 6-dimensional vector; The time alignment refers to aligning the link status data and service observation data to the timestamp corresponding to the same control period.
3. The method of claim 2, wherein the method further comprises: The truncation normalization under the fixed offline calibration interval includes: For any continuous observation, truncation is performed based on the preset offline calibration lower bound and the preset offline calibration upper bound to obtain the truncation value; The normalization result is calculated based on the truncation value, the preset offline calibration lower bound, and the preset offline calibration upper bound; When the preset offline calibration upper bound is equal to the preset offline calibration lower bound, the corresponding normalization result is directly set to 0; For proportional quantities that are located in the range of 0 to 1 and whose offline upper and lower bounds are 0 and 1 respectively, the original value is directly used as the normalization result.
4. The method of claim 2, wherein the method further comprises: The available uplink bandwidth is estimated based on the number of bytes sent periodically, the change in queue occupancy, and the nominal uplink capacity of the physical or driver layer, and is updated exponentially. The historical retransmission estimation rate is obtained by statistically analyzing packets that are repeatedly sent with the same 5-tuple, in the same direction, and within the sequence number range when the active session is a TCP session. The historical retransmission estimation rate is obtained based on the number of failed packets and the number of suspected duplicate packets when the active session is a UDP session or a session that cannot reliably obtain sequence numbers.
5. The method of claim 1, wherein the method further comprises: The process of generating a business requirement vector based on the business sensitivity vector includes: Read the first mapping matrix and the first bias vector that have been calibrated and stored offline; The business sensitivity vector is mapped to a four-dimensional business demand vector, which sequentially represents latency sensitivity, jitter sensitivity, packet loss sensitivity, and throughput demand intensity. The mapping results are compressed so that the output of each dimension falls within a predetermined numerical range; The process of generating a link cost vector based on the link bearer vector includes: Read the offline calibrated and stored second mapping matrix and second bias vector; The link bearer vector is mapped to a four-dimensional link cost vector, which sequentially represents the latency cost, jitter cost, packet loss cost, and insufficient throughput cost. Non-negative clipping is applied to the mapping results to suppress the excessive amplification of the total cost by anomalous link observations.
6. The method of claim 5, wherein the method further comprises: The overall cost is composed of the inner product of the service demand vector and the link cost vector, the penalty term corresponding to the normalized queue occupancy, the penalty term corresponding to the migration indicator, the penalty term corresponding to the link unavailability of the link connectivity flag, and the penalty term corresponding to the sampling degradation flag. When the active session is the first session or a session that has timed out and is being rebuilt, the migration indication value corresponding to each candidate WAN egress link is set to 0; When the previously bound link fails, the session migration penalty is not applied to the currently available WAN egress link.
7. The method of claim 1, wherein the method further comprises: The preset migration threshold is related to the session duration and the historical retransmission estimation rate; The migration threshold increases with session duration and with historical retransmission estimation rate to improve the retention priority of long-lived connection sessions and sessions with high retransmission risk. For active sessions without historical bindings, the current best candidate link is directly used as the target egress link; For connectionless short flows, the WAN egress link with the largest weight is selected as the egress link for the current period according to the candidate traffic splitting weight generated based on the comprehensive cost, in order to avoid packet-level out-of-order delivery.
8. The method of claim 1, wherein the method further comprises: The step of summarizing the service load intensity of each WAN egress link based on the session binding result includes: For each WAN egress link, count the set of active sessions ultimately attributed to that WAN egress link; The real-time sensitive service intensity of the WAN egress link is obtained by weighting and accumulating the transmitted byte load coefficient of each active session and the latency sensitivity and jitter sensitivity in the corresponding service demand vector. The throughput service intensity of the WAN egress link is obtained by weighting and accumulating the transmitted byte load coefficient of each active session and the throughput demand intensity in the corresponding service demand vector.
9. The method of claim 8, wherein the method further comprises: The linked update of the real-time service queue weights and best-effort service queue weights for each WAN egress link includes: Configure a real-time service queue and a best-effort service queue for each WAN egress link; The real-time service queue weight is calculated based on the real-time sensitive service intensity, current queue occupancy, and link jitter status of the WAN egress link, and the calculation results are subjected to amplitude limiting. The weight of the best-effort service queue is determined based on the real-time service queue weight, so that the sum of the weights of the two types of queues is 1. When a WAN egress link is determined to be unavailable, the weights of both types of queues for that WAN egress link are cleared to zero and packet transmission to that WAN egress link is stopped. When the number of active sessions exceeds the preset session size limit, the comprehensive cost calculation and migration threshold comparison are only performed on established long-connection sessions, and fast traffic splitting based on five-tuples is performed on newly emerging short-connection sessions.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a home office CPE gateway service offloading method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Unmanned aerial vehicle network dynamic load balancing QoS guarantee implementation method and system
CN114845343A
Link load balancing method and device based on SDWAN, electronic equipment and storage medium
CN116233006A
Multi-link adaptive scheduling and transmission method and device, equipment and storage medium
CN118764915A
