Intelligent call distribution system and method for voice gateways

By calculating load fingerprints and generating capacity tokens, and combining utilization prediction models and scheduling scoring models, the problem of unbalanced load on upper-layer switches in voice communication is solved, achieving dynamic load balancing and resource scheduling, thereby improving call success rate and user experience.

CN121284164BActive Publication Date: 2026-04-07BEIJING ZHONGLIAN NORTH INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In the voice communication architecture of multi-branch offices, existing technologies cannot effectively solve the problem of unbalanced load on upper-layer switches, resulting in call failures and resource waste in some areas, affecting the stability of cross-regional communication and user experience.

Method used

By collecting performance data from upper-layer switch nodes to calculate load fingerprints, generating capacity tokens, and using utilization prediction and scheduling scoring models for intelligent call allocation, combined with backpressure mechanisms and token pool management, dynamic load balancing and resource scheduling are achieved.

Benefits of technology

It achieves accurate load status awareness and improved resource utilization, reduces call setup latency, improves call success rate and user satisfaction, and ensures the stability and reliability of service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121284164B_ABST
    Figure CN121284164B_ABST
Patent Text Reader

Abstract

This invention relates to the field of voice communication technology and discloses an intelligent call allocation system and method for voice gateways. The intelligent call allocation method for voice gateways includes: encapsulating performance data and node health into load fingerprints; generating capacity tokens and establishing a token pool in the voice gateway; using a utilization prediction model to predict utilization and a scheduling scoring model to calculate a comprehensive scheduling score; constructing a ready set based on candidate nodes; selecting the first node from the ready set for call allocation and monitoring call status; and activating a backpressure mechanism when the inbound call rate exceeds a preset multiple of the capacity token acquisition rate. This invention achieves precise capacity control and load allocation through load fingerprint generation and capacity token pooling management; improves prediction accuracy by predicting future node utilization through a utilization prediction model; and calculates a comprehensive scheduling score using an ensemble learning algorithm based on decision trees, providing an efficient, intelligent, and reliable call allocation method for enterprise voice networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of voice communication technology, and more specifically, to an intelligent call distribution system and method for voice gateways. Background Technology

[0002] In voice communication, the voice gateway, as a key device connecting end users and upper-level voice switches (such as IP-PBX), directly impacts communication quality and user experience through its ability to monitor and report call status. With the scaling up of enterprises, especially in scenarios such as group companies and nationwide chain institutions, voice communication architectures with multiple branches are becoming increasingly common. These enterprises typically deploy independent upper-level voice switches in different regions, and the voice gateways of each regional branch establish a default connection with the upper-level voice switch of their respective region, forming a "region-specific" call transmission link.

[0003] Chinese Patent No. CN111404894B discloses a method and system for reporting incomplete calls by a voice gateway. The system monitors incomplete user calls; initiates an INVITE call request to the upper-layer voice exchange; receives a call rejection message from the upper-layer voice exchange; and replies to the upper-layer voice exchange indicating the end of the reporting process.

[0004] However, in practical applications, the aforementioned multi-branch communication architecture faces the problem of uneven load on upper-level switches. Affected by factors such as business cycle and regional differences in business density, upper-level switches in some areas may experience short-term surges in call volume. At this time, the voice gateway of the branch office in that area will generate a large number of incomplete calls due to "reaching maximum call volume and unable to make outgoing calls". In the existing technology, the voice gateway can only report such incomplete calls through an INVITE request with a "sysdown" error reason value header field, and the upper-level switch will count the number of errors, but it cannot adjust the transmission path of the calls. At the same time, upper-level switches in other areas may be in a low-load state, but their idle resources cannot be utilized by calls in congested areas, resulting in wasted call resources. The existing technology cannot solve the call failure caused by uneven load at its root, affecting the stability of cross-regional communication and user experience. Summary of the Invention

[0005] The purpose of this invention is to provide an intelligent call distribution system and method for a voice gateway in order to solve the above-mentioned problems.

[0006] This invention provides an intelligent call distribution method for a voice gateway, comprising the following steps:

[0007] The performance data is collected by the upper-layer switch node, the node health is calculated based on the performance data, and the performance data and node health are encapsulated into a load fingerprint and distributed to the voice gateway.

[0008] The number of capacity tokens is calculated based on the node health and performance data. The upper-layer switch node generates the number of capacity tokens. The voice gateway receives and verifies the capacity tokens and then establishes a token pool.

[0009] Based on the load fingerprint and token pool, the utilization prediction model predicts the future utilization of the upper-layer switch nodes, and based on the future utilization, the comprehensive scheduling score is calculated through the scheduling scoring model.

[0010] Candidate nodes are selected based on the comprehensive scheduling score, and a ready set is constructed based on the candidate nodes;

[0011] When a call request is received, a first node is selected from the ready set for call allocation, and the call status is monitored.

[0012] Real-time monitoring of inbound call rate and capacity token acquisition rate; activation of backpressure mechanism when inbound call rate exceeds a preset multiple of capacity token acquisition rate.

[0013] Furthermore, the step of encapsulating into a load fingerprint includes:

[0014] Each upper-layer switch node collects performance data within a preset sliding time window. The performance data includes utilization, call failure rate, and call setup delay. The utilization rate is the number of concurrent calls currently being made by the upper-layer switch node divided by the maximum allowed capacity. The call failure rate is the number of failed calls divided by the total number of call attempts. The call setup delay is the complete time delay from the initiation of each call to the establishment of a connection.

[0015] The node health score is the sum of the preset utilization rate weight multiplied by the normalized utilization rate score, the preset call failure rate weight multiplied by the normalized call failure rate score, and the preset call setup delay weight multiplied by the normalized call setup delay score. The normalized utilization rate score is 1 minus the utilization rate, the normalized call failure rate score is 1 minus the call failure rate, and the normalized call setup delay score is the negative delay term of the natural constant raised to the power of the delay term, where the delay term is the call setup delay divided by the preset baseline call setup delay.

[0016] Furthermore, establishing a token pool includes:

[0017] The number of capacity tokens is the product of the preset security reduction factor, the remaining capacity ratio, the total capacity limit, and the node health. The remaining capacity ratio is 1 minus the utilization rate.

[0018] Capacity tokens include a unique identifier, issuance time, validity period, applicable service type, issuing upper-layer switch node identifier, and anti-counterfeiting signature;

[0019] The voice gateway verifies the anti-counterfeiting signature of the capacity token and filters out expired or soon-to-expire capacity tokens. It then puts the valid capacity tokens that have passed the verification into the token pool. Capacity tokens that are about to expire are those that have not exceeded their expiration date, but whose remaining validity period is less than the preset security threshold.

[0020] Furthermore, a utilization prediction model is constructed based on a long short-term memory network. The input to the utilization prediction model is time-series data, which includes historical utilization sequences, time feature codes, load feature sequences, and context feature sequences. Among them, the historical utilization sequence includes a sequence of utilization values ​​calculated backward from the current moment for a preset historical time step; the time feature codes include time period identifiers and periodic features; the time period identifier is the current time period; the periodic features include hourly, daily, and weekly features; the load feature sequence includes historical call failure rate sequences and call setup delay sequences; and the context feature sequences include average status and network-wide traffic trends. The average status includes the average utilization and average call failure rate of multiple other upper-layer switch nodes in the same area; and the network-wide traffic trend is the rate of change of total call volume.

[0021] Furthermore, calculating the comprehensive scheduling score using the scheduling scoring model includes the following steps:

[0022] Construct a comprehensive feature vector, which includes a basic feature layer, a derived feature layer, an interaction feature layer, and a strategy feature layer;

[0023] A scheduling scoring model is constructed based on the random forest algorithm. The scheduling scoring model includes a preset number of decision trees. Each decision tree is trained independently based on a feature subset and a sample subset, with the historical call success rate as the supervision label.

[0024] The comprehensive feature vector is input into the scheduling scoring model, and the predicted score is output through each decision tree. The arithmetic mean of all predicted scores is calculated as the original score.

[0025] The original score is standardized and mapped to the [0, 1] interval. Then, the sigmoid function is applied to smooth the score to obtain the comprehensive scheduling score.

[0026] Furthermore, the steps for constructing the ready set include:

[0027] Upper-layer switch nodes whose comprehensive scheduling scores are greater than the scoring threshold are set as candidate nodes. The scoring threshold is the median of the comprehensive scheduling scores of multiple upper-layer switch nodes multiplied by a preset adjustment coefficient.

[0028] The candidate nodes are filtered for health to obtain the remaining candidate nodes. The health filtering includes the candidate node’s node health being greater than a preset health threshold and the candidate node’s call setup latency being less than a preset call setup latency threshold.

[0029] The remaining candidate nodes are sorted in descending order according to the comprehensive scheduling score, and the top-ranked number of remaining candidate nodes are selected to form a candidate set.

[0030] Send a SIP OPTIONS message and a pre-occupied capacity token request to each upper-layer switch node in the candidate set; filter out the upper-layer switch nodes in the candidate set whose SIP OPTIONS response is 200 OK, whose pre-occupied capacity token confirmation is valid, and whose overall response time is less than the preset response threshold, and form a ready set; the overall response time is the sum of the SIP response time multiplied by the preset response weight and the pre-occupied capacity token response time multiplied by the preset token weight.

[0031] Furthermore, if the current overall utilization rate is greater than or equal to the preset high utilization rate, the number of candidates is the preset high node number; if the current overall utilization rate is less than or equal to the preset low utilization rate, the number of candidates is the preset low node number; if the current overall utilization rate is between the preset low utilization rate and the preset high utilization rate, the number of candidates is the preset basic node number.

[0032] Furthermore, monitoring call status includes:

[0033] The first node is the upper-layer switch node with the highest comprehensive scheduling score and available capacity tokens. Available capacity tokens are valid capacity tokens that have been verified by the voice gateway, are not expired, are not occupied, and are stored in the token pool.

[0034] Send a SIP INVITE message to the first node;

[0035] Monitor the call status within the preset fast rollback trigger threshold. If a 180 Ringing or 200 OK response is received, continue the normal call process. If a timeout occurs or a congestion failure response code is received, immediately execute the rollback. Specifically, this includes sending a capacity token release notification to the original upper-layer switch node to return the occupied capacity token to the available token pool; selecting a second node from the ready set, which is the upper-layer switch node with the second highest comprehensive scheduling score in the ready set and still having available capacity tokens; and resending the SIP INVITE message to the second node.

[0036] Furthermore, activating the counter-pressure mechanism includes:

[0037] Lower the priority of accepting new calls, send a flow control signal upstream, and activate the micro-queue mechanism;

[0038] The micro-queue mechanism buffers calls that exceed the immediate processing capacity. The micro-queue uses a first-in-first-out (FIFO) scheduling strategy, and calls in the micro-queue are processed after the capacity is restored.

[0039] This invention provides an intelligent call distribution system for a voice gateway, the system comprising: a voice gateway, and an upper-layer switch node connected to the voice gateway via a network; the voice gateway includes:

[0040] The fingerprint generation module collects performance data through the upper-layer switch node, calculates the node health based on the performance data, encapsulates the performance data and node health into a load fingerprint, and distributes it to the voice gateway.

[0041] The token generation module calculates the number of capacity tokens based on the node health and performance data. The upper-layer switch node generates the number of capacity tokens required for the specified capacity tokens. The voice gateway receives and verifies the capacity tokens and then establishes a token pool.

[0042] The scheduling scoring module, based on the load fingerprint and token pool, uses a utilization prediction model to predict the future utilization of upper-layer switch nodes, and calculates a comprehensive scheduling score based on the future utilization through the scheduling scoring model.

[0043] The ready set module filters candidate nodes based on the comprehensive scheduling score and constructs a ready set based on the candidate nodes;

[0044] The call monitoring module, upon receiving a call request, selects a first node from the ready set for call allocation and monitors the call status.

[0045] The operation management module monitors the inbound call rate and capacity token acquisition rate in real time. When the inbound call rate exceeds a preset multiple of the capacity token acquisition rate, the backpressure mechanism is activated.

[0046] The beneficial effects of this invention are as follows: This invention uses a load fingerprint generation mechanism to collect key indicators such as the utilization rate, call failure rate, and call setup latency of upper-layer switch nodes in real time, forming a comprehensive health assessment and achieving accurate load status awareness; by introducing a capacity token pooling management mechanism, tokens are dynamically issued based on node health and remaining capacity, achieving precise capacity control and load allocation; when the inbound call rate exceeds the capacity token acquisition rate, the backpressure mechanism and prefetching strategy are automatically activated, effectively preventing system overload and ensuring stable service quality.

[0047] By employing a multi-layer LSTM architecture to predict node utilization within the next 5 minutes, and combining multi-dimensional features such as historical utilization sequences, time feature encoding, and load feature sequences, the prediction accuracy is improved. Through the ensemble learning algorithm of decision trees, predicted data and real-time data are integrated to calculate a comprehensive scheduling score, providing a scientific basis for candidate set construction. The UpperConfidence Bound algorithm is used to optimize the balance between exploration and utilization, dynamically adjust node selection preferences, and avoid premature convergence to local optima.

[0048] The segmented, progressive architecture ensures that candidate nodes possess both excellent predictive performance and reliable service guarantees. By initiating SIP OPTIONS message detection on candidate nodes in parallel, the real-time SIP service reachability and response performance of nodes are verified within 2 seconds. The call status is monitored within a 2-3 second fast fallback trigger threshold, supporting sub-second-level node switching to ensure seamless service continuity for users.

[0049] By using real call feedback data, the LSTM and random forest models are updated incrementally to avoid the computational overhead of retraining. Key parameters such as the time window length, the number of decision trees, and the candidate set size are dynamically adjusted according to model performance indicators to continuously improve system performance. By using the Bayesian smoothing method to update the node experience success rate, small sample bias is effectively avoided, providing a reasonable initial evaluation for new nodes.

[0050] By using the standard SIP signaling protocol to report CDRs, and the auxiliary channel reporting intelligent scheduling extension information through the lightweight control channel, compliance requirements are fully met. By recording the complete process of each intelligent scheduling decision in detail, a traceable decision chain is formed, supporting fault diagnosis and system optimization. Multi-dimensional statistical analysis is provided, such as call allocation ratio, load balancing effect, and resource utilization improvement, to provide data support for capacity planning and operation and maintenance decisions.

[0051] By quantifying the uniformity of load distribution through variance coefficients, the load differences between nodes are significantly reduced. The intelligent scheduling strategy effectively improves the overall resource utilization and reduces resource waste. By controlling call setup latency to the sub-second level, the call success rate is significantly improved, and user satisfaction is significantly enhanced. By achieving intelligent allocation without changing the main SIP service process, full compatibility with the existing network system is ensured.

[0052] This invention provides an efficient, intelligent, and reliable call distribution solution for enterprise voice networks by organically combining advanced technologies such as machine learning, intelligent prediction, and dynamic scheduling. It has significant technical value and application prospects. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating the intelligent call allocation method for the voice gateway of the present invention.

[0054] Figure 2 This is a flowchart illustrating the token pool establishment process of the intelligent call allocation method for the voice gateway of the present invention.

[0055] Figure 3 This is an example diagram of the calculation, comprehensive scheduling, and scoring process of the intelligent call allocation method for the voice gateway of the present invention.

[0056] Figure 4This is a module example diagram of the intelligent call distribution system of the voice gateway of the present invention. Detailed Implementation

[0057] 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.

[0058] The intelligent call distribution system and method for a voice gateway includes the following embodiments:

[0059] Example 1:

[0060] Intelligent call distribution methods for voice gateways, such as Figure 1 As shown, it includes the following steps:

[0061] Step 100: Collect performance data through the upper-layer switch node, calculate the node health based on the performance data, encapsulate the performance data and node health into a load fingerprint and distribute it to the voice gateway.

[0062] This step is performed in an enterprise voice network environment with multiple regions and multiple upper-layer voice switches. This environment includes a voice gateway that supports the Session Initiation Protocol (SIP), has OPTIONS detection capabilities and custom header field processing capabilities, and is configured with parallel SIP Trunk connections to multiple upper-layer switches; a lightweight control channel implemented using a sideband channel decoupled from SIP signaling, based on QUIC (Quick UDP Internet Connections), MQTT (Message Queuing Telemetry Transport), or HTTPS protocols, used to exchange load information and capacity tokens; an upper-layer switch cluster including multiple Internet Protocol Private Branch Exchange (IP-PBX) or Session Border Controller (SBC) nodes, each node Si having state export and capacity token issuance capabilities; and a time synchronization mechanism that uses Network Time Protocol (NTP) to provide a weakly consistent time source to ensure the time-to-live (TTL) and statistical window time consistency.

[0063] Upper-layer switch nodes refer to IP-PBX or SBC devices deployed on the upper layer of an enterprise voice network, responsible for handling voice call routing, transfer, and media processing. Each upper-layer switch node has independent call processing capabilities, capacity management functions, and status monitoring mechanisms. It can establish a SIP Trunk connection with the lower-layer voice gateway and exchange load information through a lightweight control channel.

[0064] Each upper-layer switch node Si collects performance data within a preset sliding time window. The default value of the sliding time window is 30 seconds. The performance data includes utilization, call failure rate, call setup delay, etc.

[0065] As a core metric for load assessment, the utilization rate of the current upper-layer switch node is first calculated, which is the current concurrent call count of the upper-layer switch node divided by the maximum permitted capacity. Specifically, this is achieved by monitoring the number of currently active concurrent call connections on the upper-layer switch node in real time, and then calculating the ratio between this number and the maximum capacity configured for that upper-layer switch node to obtain the utilization rate. The utilization rate ranges from 0 to 1, where 0 indicates the upper-layer switch node is completely idle, and 1 indicates the upper-layer switch node is operating at full capacity. A timer collects the current concurrent call connection count at fixed time intervals, with a default value of 5 seconds. This interval is determined based on real-time requirements and system overhead balance, ensuring data timeliness while avoiding excessively frequent data collection that could burden the system. The utilization rate is then immediately calculated, providing foundational data for subsequent health assessments and capacity token calculations.

[0066] Based on utilization data, the call failure rate is further calculated within a sliding time window, i.e., the number of failed calls divided by the total number of call attempts, to assess the service quality stability of the upper-layer switch nodes. Specifically, a fixed-size circular buffer is maintained to record the success or failure status and timestamp of each call. When a new call result arrives, it is added to the end of the buffer, while historical records exceeding the time window are removed. All records in the buffer are periodically traversed to count the number of failed calls and the total number of call attempts, thus calculating the call failure rate. Call failures include various anomalies such as connection timeouts, peer rejection, and network unreachability. The call failure rate directly affects the calculation of the health of the upper-layer switch nodes.

[0067] By combining utilization and call failure rate metrics, call setup latency is measured, and a weighted average method is used to calculate the average call setup latency to comprehensively reflect the response performance of upper-layer switch nodes. Call setup latency refers to the complete time delay from call initiation to connection establishment. Specifically, the complete call setup latency for each call is recorded, including signaling processing time, network transmission time, and peer response time. For each call setup latency sample, different weights are assigned based on its timeliness, with newer samples receiving higher weights. A queue of call setup latency samples is maintained, with new samples assigned the highest weight, and historical samples having weights decreasing exponentially. The calculation involves multiplying the call setup latency values ​​of all samples by their corresponding weights, summing the results, and then dividing by the sum of all weights to obtain the weighted average call setup latency. This call setup latency data serves as an important dimension for assessing the health of upper-layer switch nodes.

[0068] Based on the aforementioned utilization rate, call failure rate, and call setup delay data, the health of the upper-layer switch nodes is calculated. This is a comprehensive node health status indicator, with a value range of [0, 1], where 1 represents complete health. The specific calculation method for node health is as follows: node health equals the sum of the preset utilization rate weight multiplied by the normalized utilization rate score, the preset call failure rate weight multiplied by the normalized call failure rate score, and the preset call setup delay weight multiplied by the normalized call setup delay score. Specifically, the normalized utilization rate score equals 1 minus the current utilization rate, ensuring that the lower the utilization rate, the higher the score; the normalized call failure rate score equals 1 minus the current call failure rate, ensuring that the lower the call failure rate, the higher the score; the normalized call setup delay score is calculated using a negative exponential function, i.e., the negative delay term of the natural constant e. The delay term is the call setup delay divided by the preset baseline call setup delay. The default value of the preset baseline call setup delay is 500 milliseconds. This baseline value is determined based on the user experience requirements of voice communication. Call setup delays below this value are considered excellent response performance, ensuring that the lower the call setup delay, the higher the score. The three weighting coefficients are: a default value of 0.4 for utilization, a default value of 0.4 for call failure rate, and a default value of 0.2 for call setup latency, with a total weight of 1. These weighting coefficients were determined based on extensive experimental data and business experience. Utilization and call failure rate are the primary indicators, each accounting for 40% of the weight, while call setup latency is the secondary indicator, accounting for 20%. This weighting allocation achieves an optimal balance between load balancing and service quality. When an upper-layer switch node experiences hardware failure, network interruption, or service anomalies, the node's health will rapidly drop to near zero.

[0069] The calculated metrics, such as utilization, call failure rate, average call setup latency, and node health, are encapsulated into a load fingerprint, forming a complete description of the upper-layer switch node status. The load fingerprint includes current utilization, call failure rate, average call setup latency, node health, policy preference information, timestamp, and digital signature. Specifically, the data sequences of each metric are converted into structured data packets, encapsulated in JSON or Protocol Buffers format. The data packets include the upper-layer switch node identifier, the values ​​of each performance metric, the collection timestamp, the data validity period, and the RSA digital signature. This load fingerprint packet is broadcast to all voice gateway nodes at fixed intervals via a sideband channel. The default fixed interval is 10 seconds, ensuring that each voice gateway receives the latest upper-layer switch node status information, providing a data foundation for intelligent scheduling decisions. A voice gateway node refers to a voice gateway device deployed on the branch side of an enterprise voice network, responsible for handling voice call routing, transfer, and media processing functions.

[0070] The technical advantage of employing a load fingerprint generation and distribution mechanism lies in achieving standardized description and real-time synchronization of upper-layer switch node states. By encapsulating multi-dimensional performance metrics into a unified load fingerprint format, node state information can be efficiently transmitted, avoiding the complexity and latency issues of querying each metric separately in traditional methods. The selection of the three core input metrics—utilization, call failure rate, and call setup latency—is crucial. Utilization directly reflects the node's load level and is the basis for scheduling decisions; the call failure rate reflects the stability of the node's service quality, ensuring that scheduled nodes can provide reliable service; and call setup latency reflects the node's response performance, guaranteeing user experience quality. The advantage of using a weighted average method to calculate call setup latency is that it highlights the importance of the latest data. Through an exponential decay weighting mechanism, the system can quickly respond to changes in node performance trends, avoiding interference from historical abnormal data in current decisions. The introduction of a digital signature mechanism ensures the integrity and tamper-proof nature of the load fingerprint data, preventing malicious nodes from forging performance data to influence scheduling decisions, thus improving the security and reliability of the entire system.

[0071] Step 200: Calculate the number of capacity tokens based on the node health and performance data. The upper-layer switch node generates the specified number of capacity tokens. The voice gateway receives and verifies the capacity tokens before establishing a token pool. Specifically... Figure 2 As shown, it includes:

[0072] Based on the load fingerprint of the upper-layer switch nodes obtained in step 100, the voice gateway edge scheduler executes a systematic capacity token management process to ensure that the voice gateway has sufficient capacity tokens to support subsequent intelligent call allocation. The voice gateway edge scheduler is the core scheduling component of the voice gateway, responsible for performing intelligent capacity token management and call allocation decisions based on the load fingerprint of the upper-layer switch nodes. This scheduler integrates functional modules such as token pool management, load-aware scheduling, dynamic capacity control, and backpressure mechanisms. It exchanges information with the upper-layer switch nodes in real time through a lightweight control channel, ensuring that the voice gateway can achieve optimal call routing allocation based on the real-time load status and capacity availability of each upper-layer switch node.

[0073] Based on the node health and utilization data calculated in step 100, the upper-layer switch node calculates the number of capacity tokens that can be issued, thus achieving dynamic capacity management. The formula for calculating the number of capacity tokens is: the number of capacity tokens equals the product of a preset security reduction factor, the remaining capacity ratio, the total capacity limit, and the node health, rounded down and not less than zero. Specifically, the upper-layer switch node first calculates its own remaining capacity ratio, which is 1 minus the current utilization rate. Then, it multiplies the remaining capacity ratio by the preset security reduction factor. The default value of the preset security reduction factor is 0.8, and this factor ranges from 0 to 1, used to reserve a safety margin to prevent overload. The default value is set based on a balance between system stability and resource utilization. Next, the result is multiplied by the total capacity limit of the upper-layer switch node, and then multiplied by the node health to obtain the theoretical available capacity. Finally, this value is rounded down to ensure that the number of capacity tokens that can be issued is a non-negative integer. The preset security reduction factor is dynamically adjusted based on the historical stability and service importance of the upper-layer switch node. Core upper-layer switch nodes with high stability can be set with a higher reduction factor. The adjustment range is usually between 0.7 and 0.9, with an adjustment step of 0.05.

[0074] The upper-layer switch node generates a corresponding number of capacity tokens based on the calculated number of capacity tokens. Each capacity token serves as an independent capacity authorization credential, accompanied by a lifespan and a service tag. The lifespan includes the token's validity period, which defaults to 300 seconds. This validity period is determined based on the average duration of voice calls and system response time, and is used to identify the applicable service line or area. Capacity tokens are uniquely identified using UUID format, including issuance time, validity period, applicable service type, issuing upper-layer switch node identifier, and anti-counterfeiting signature, ensuring the token's uniqueness and security. Each capacity token represents a unit of call processing capacity. The voice gateway consumes a corresponding capacity token when initiating a call, enabling precise capacity control and load balancing.

[0075] The voice gateway edge scheduler periodically and asynchronously sends capacity token request requests to multiple upper-layer switch nodes based on the current token pool status and expected call traffic demand. The default periodicity is every 10 seconds, determined based on a balance between token consumption rate and network overhead. Specifically, the voice gateway edge scheduler maintains a timed task scheduler that sends capacity token request messages to all available upper-layer switch nodes at preset time intervals. The request messages are sent asynchronously and non-blockingly to avoid impacting overall performance due to response delays from individual upper-layer switch nodes. The message content includes the voice gateway's unique identifier, the current service type label, the expected number of capacity tokens requested, the priority level, and the request timestamp. The voice gateway edge scheduler dynamically adjusts the number of capacity tokens requested based on the remaining capacity tokens in the token pool and expected call traffic, ensuring that the supply of capacity tokens matches actual demand.

[0076] When the voice gateway edge scheduler receives a capacity token response from the upper-layer switch node, it immediately executes a rigorous verification process to ensure the legitimacy and validity of the capacity token. Specifically, the voice gateway edge scheduler first verifies the anti-counterfeiting signature of the capacity token, confirming that the token was indeed issued by the corresponding upper-layer switch node and has not been tampered with. Then, it checks the validity of the capacity token's lifespan, filtering out expired or soon-to-expire tokens. Valid capacity tokens that pass verification are added to the voice gateway's local token pool for unified management, providing capacity assurance for subsequent intelligent call allocation. Soon-to-expire capacity tokens are those that, although not past their expiration date, have remaining validity less than a preset security threshold. The default value of the preset security threshold is 20% of the validity period.

[0077] Based on the capacity token verification results, the voice gateway edge scheduler categorizes, marks, and pools valid capacity tokens according to service priority and regional policies. Specifically, the token pool employs a multi-dimensional classification structure, grouping capacity tokens based on attributes such as service type label, regional scope, priority level, and issuing upper-layer switch node. Each capacity token is non-transferable and includes complete information such as issuance time, validity period, applicable service type, issuing upper-layer switch node identifier, and anti-counterfeiting signature. The voice gateway edge scheduler periodically cleans up expired capacity tokens to ensure that the token pool always maintains valid capacity resources, while also maintaining capacity token usage statistics to support subsequent dynamic adjustment decisions.

[0078] The voice gateway edge scheduler continuously monitors the token pool status and call traffic changes. When it detects an increase in the inbound call rate and insufficient available capacity tokens, it automatically triggers a backpressure mechanism and a prefetching strategy. The inbound call rate is the number of call requests per unit time, measured in times per second. Available capacity tokens are valid capacity tokens that have been verified by the voice gateway, are not expired, are not occupied, and are stored in the token pool. The specific implementation method is as follows:

[0079] Increase the frequency of capacity token requests to upper-layer switch nodes. The voice gateway edge scheduler monitors the capacity token consumption rate. When the consumption rate exceeds the replenishment rate, it dynamically shortens the time interval for capacity token requests, from the default value of 10 seconds to 5 seconds or even shorter. The minimum interval for frequency adjustment is 5 seconds, which is determined based on network transmission latency and system response time. At the same time, it increases the number of capacity tokens requested each time.

[0080] Appropriately reduce the incoming call acceptance rate, limit the access speed of new calls through flow control algorithms, and implement smooth rate limiting using token bucket or leaky bucket algorithms to avoid overwhelming a single upper-layer switch node with sudden traffic surges. The voice gateway edge scheduler sets a dynamic threshold. When the number of available capacity tokens falls below a preset lower limit (the default value of which is 20% of the total token pool capacity, determined based on system response time and token replenishment speed), new call access is restricted.

[0081] A capacity token pre-fetching mechanism is activated to predict traffic peaks and request more capacity tokens in advance based on historical traffic patterns and time regularity. The voice gateway edge scheduler analyzes historical data to identify peak traffic periods and increases the amount of capacity tokens requested before the peak, building a capacity token reserve to cope with sudden demand and ensuring that the voice gateway maintains stable service quality under high load.

[0082] The technical advantages of the token acquisition and pooling management mechanism lie in its precise capacity control and dynamic load balancing. The capacity token mechanism allows for precise control of the call load on each upper-layer switch node, avoiding overload issues that may occur in traditional methods. The safety reduction factor provides a safety margin for the system, preventing node overload during sudden traffic spikes or network fluctuations, thus improving stability and reliability. The asynchronous, non-blocking token request method has significant advantages over synchronous methods, avoiding the impact of single-node response delays on overall performance and improving concurrent processing capabilities and response speed. The combined use of the backpressure mechanism and prefetching strategy enables dynamic adjustment of supply and demand balance. The backpressure mechanism prevents system overload, while the prefetching strategy ensures timely capacity supply; their collaborative operation guarantees stable operation under various load conditions. The multi-dimensional classification management of the token pool supports fine-grained resource allocation and business priority control. Through business type tags and regional classifications, differentiated service quality assurance and optimized resource allocation can be achieved.

[0083] Step 300: Based on the load fingerprint and token pool, the utilization prediction model predicts the future utilization of the upper-layer switch nodes. Based on the future utilization, a comprehensive scheduling score is calculated using a scheduling scoring model. Specifically, as follows... Figure 3 As shown, it includes:

[0084] Based on the upper-layer switch node load fingerprint data obtained in step 100 and the token pool management mechanism established in step 200, a machine learning-driven intelligent scoring and prediction system is constructed. This system predicts the future performance status of nodes through a deep learning model and combines multi-dimensional feature engineering to calculate a comprehensive scheduling score, providing a scientific basis for the subsequent construction of candidate sets.

[0085] First, historical performance data for each upper-layer switch node is extracted from the load fingerprint data stream in step 100, including core indicators such as utilization time series, call failure rate series, and call setup delay series. Data is collected every 5 seconds, consistent with the collection period for load fingerprint generation to ensure data synchronization and form a continuous time-series data stream. To ensure data quality, data cleaning is performed to remove outliers and missing values. Outlier detection uses the 3σ criterion, marking data points exceeding the mean plus or minus three standard deviations as outliers. Missing values ​​are handled using linear interpolation, imputing values ​​based on values ​​from preceding and following time points. The cleaned data constitutes the foundation dataset for training the LSTM neural network.

[0086] Based on the cleaned time-series data, the data is segmented according to a fixed time window length. The time window length is set to 30 time steps, corresponding to 150 seconds of historical data. This length is determined based on the periodic characteristics of voice services and the memory capacity of Long Short-Term Memory (LSTM) networks, which can capture both short-term fluctuations and identify medium-term trends. Each time window contains 30 consecutive data points, and the windows overlap using a sliding method with a sliding step size of 1 time step to ensure the continuity and integrity of the data. To eliminate the dimensional differences between different indicators, Z-score standardization is performed on all feature data. That is, each value is subtracted from the mean and divided by the standard deviation, so that the mean of all features is 0 and the standard deviation is 1, providing standardized input data for subsequent neural network training.

[0087] The utilization prediction model uses the utilization rate of each upper-layer switch node within the next 5 minutes as the prediction target. The default prediction duration is 5 minutes, which is determined based on the average duration of voice calls and the real-time requirements of scheduling decisions. The LSTM neural network model adopts a multi-layer architecture. The input layer receives 30-dimensional time-series data. The default number of neurons in the first LSTM hidden layer is 128, which is determined based on the balance between the complexity of time-series features and computational efficiency, and is used to capture long-term dependencies in the time series. The default number of neurons in the second LSTM hidden layer is 64, which further extracts high-level time-series features. The default number of neurons in the fully connected layer is 32, which is responsible for feature integration and nonlinear transformation. The output layer is a single neuron that outputs the predicted utilization rate value. The activation function combination in the network is as follows: the LSTM layer uses tanh and sigmoid activation functions, the fully connected layer uses the ReLU activation function, and the output layer uses the sigmoid activation function to ensure that the output value is within the range [0,1].

[0088] The input feature vector of the LSTM model contains time-series data in four dimensions. The features in each dimension are closely related and together describe the historical state evolution of the upper-layer switch nodes. The time-series data includes historical utilization sequence, time feature encoding, load feature sequence and context feature sequence.

[0089] The historical utilization rate sequence includes a sequence of utilization rate values ​​calculated backward from the current time for a preset historical time step. The default value for the preset historical time step is 30 time steps. Each value represents the ratio of the number of concurrent calls to the upper-layer switch node at the corresponding time to the upper limit of the permitted capacity. This sequence serves as the main basis for prediction and directly reflects the load change trend of the upper-layer switch node.

[0090] Time-based feature encoding includes time period identifiers and periodic features, used to capture the temporal regularity of business traffic. Time period identifiers use one-hot encoding to represent the current time period, dividing the day into several time periods. The default number of time periods is 8, and the default time period length is 3 hours. This division is determined based on the periodic characteristics of voice services, with each time period corresponding to an 8-dimensional binary vector. Periodic features include hourly features (circular encoding from 0-23), daily features (circular encoding from Monday to Sunday), and weekly features (encoding the week number within the month). These features are periodically encoded using sine and cosine functions to ensure the continuity of feature values ​​at adjacent time points. The introduction of time features enables the model to identify business patterns such as higher call volume on Monday mornings and lower load on Friday afternoons.

[0091] The load characteristic sequences include historical call failure rate sequences, call setup delay sequences, and capacity token request frequency sequences. These features reflect the service quality status and resource demand changes of upper-layer switch nodes. The call failure rate sequence records the proportion of call failures within each time step, the call setup delay sequence records the weighted average connection establishment time, and the capacity token request frequency sequence records the number of token requests per unit time. These three sequences complement the utilization sequence, providing a more comprehensive description of the upper-layer switch node status.

[0092] The contextual feature sequence includes the average status of other upper-layer switch nodes in the same area and the overall network traffic trend, providing system-level environmental information. The average status of upper-layer switch nodes in the same area includes the average utilization and average call failure rate of all other upper-layer switch nodes in the same area, reflecting the overall load level of the area. The overall network traffic trend is obtained by calculating the rate of change of total network call volume, reflecting the changing direction of overall service demand. Contextual features enable the model to consider the mutual influence between upper-layer switch nodes and systemic factors.

[0093] The LSTM network is trained using the Adam optimizer with a default learning rate of 0.001, determined based on a balance between neural network convergence speed and stability. The default batch size is 64 samples, determined based on memory efficiency and training stability. Mean squared error (MSE) is used as the loss function during training, and network parameters are updated via backpropagation. The default time span for the training dataset is 30 days, for the validation set it's 7 days, and for the test set it's 3 days, determined based on data sufficiency and model generalization requirements. Early stopping is employed during model training; training stops when the validation set loss does not decrease for 10 consecutive epochs. The 10 epochs are determined based on model convergence characteristics and overfitting prevention requirements. The trained LSTM model can receive 30 steps of historical feature sequence at the current time and output the prediction utilization value within the next 5 minutes. The prediction accuracy is evaluated by the mean absolute error (MAE). The target accuracy is MAE less than 0.05, that is, prediction error less than 5%. This accuracy threshold is determined based on the balance between business needs and model performance.

[0094] Based on the utilization prediction results output by the utilization prediction model, the scheduling scoring model further integrates the real-time load fingerprint data from step 100 and the token pool state information from step 200 to construct a comprehensive feature vector for the random forest algorithm. The comprehensive feature vector refers to a multi-dimensional feature set that integrates predicted data, real-time data, and token pool state information, used by the random forest model to calculate the comprehensive scheduling score of upper-layer switch nodes. The feature fusion process adopts a multi-dimensional feature parallel construction strategy, simultaneously inputting predicted data and real-time data as independent feature dimensions into the random forest model. The predicted utilization rate serves as the future trend feature dimension, and the current real-time utilization rate serves as the current state feature dimension. The two feature dimensions automatically learn their importance weights through the split nodes of the decision tree in the random forest model, capturing both future trend changes and maintaining sensitivity to the current state. Simultaneously, capacity token-related features are extracted from the token pool management mechanism in step 200, including the proportion of available capacity tokens, token application success rate, and token pool replenishment speed. These features directly reflect the capacity supply capability of the upper-layer switch nodes.

[0095] The construction of the comprehensive feature vector adopts a four-level feature engineering method, with each level of features complementing each other to form a complete evaluation dimension for upper-layer switch nodes. The comprehensive feature vector includes a basic feature layer, a derived feature layer, an interaction feature layer, and a policy feature layer.

[0096] The basic feature layer includes five dimensions: predicted utilization feature dimension, current real-time utilization feature dimension, current call failure rate, normalized call setup latency, and available capacity token ratio. These five features constitute the basic dimensions for evaluating upper-layer switch nodes, directly reflecting the load status and service capabilities of the upper-layer switch nodes. The predicted utilization feature dimension refers to the utilization value of the upper-layer switch node predicted by an LSTM neural network model for the next 5 minutes. This value is calculated based on multi-dimensional input features such as historical utilization sequences, time feature encoding, load feature sequences, and context feature sequences, reflecting the future load trend of the upper-layer switch node. The current real-time utilization feature dimension refers to the actual utilization value of the upper-layer switch node at the current moment. It is calculated by dividing the current concurrent calls of the upper-layer switch node by the permitted capacity limit. This value reflects the immediate load status of the upper-layer switch node in real time. The current call failure rate refers to the proportion of call failures of the upper-layer switch node within the current sliding time window. It is calculated by dividing the number of failed calls by the total number of call attempts, where call failures include various abnormal situations such as connection timeouts, peer rejection, and network unreachability. Normalized call setup latency refers to a standardized call setup latency value. Normalization eliminates the influence of dimensions, making latency data from different upper-layer switch nodes comparable. Available capacity token ratio refers to the relative proportion of currently available capacity tokens on an upper-layer switch node. It is calculated by dividing the number of currently available tokens by the total capacity of the token pool. This ratio directly reflects the capacity supply capability and resource availability of the upper-layer switch node.

[0097] The derived feature layer calculates second-order features based on the basic features, including utilization trend, load variance, and historical average success rate. These derived features provide a quantitative description of the state changes and stability of upper-layer switch nodes. The utilization trend refers to the degree of change in the current utilization of an upper-layer switch node relative to its historical level. It is calculated as the difference between the current utilization and the historical average; a positive value indicates an upward trend, and a negative value indicates a downward trend. This indicator reflects the dynamic direction of load changes in the upper-layer switch node. Load variance is an indicator of the stability of upper-layer switch node utilization fluctuations. It is calculated as the variance of utilization values ​​over the past 10 time steps. A smaller variance indicates more stable load, while a larger variance indicates more drastic load fluctuations. This indicator reflects the load stability characteristics of the upper-layer switch node. The historical average success rate refers to the average level of recent call processing quality of the upper-layer switch node. It is calculated as the moving average of the call success rate over the past hour. This value is continuously updated through a sliding window mechanism, reflecting the service quality stability and reliability level of the upper-layer switch node.

[0098] The interactive feature layer generates combined features through mathematical operations between features, including the product of utilization and call setup latency, and the product of success rate and capacity token ratio. Interactive features can capture the non-linear relationships between different indicators. The product of utilization and call setup latency is a comprehensive indicator of the load level and response performance of the upper-layer switch node. It is calculated as the product of the current real-time utilization feature dimension and the normalized call setup latency. This product reflects the response capability of the upper-layer switch node under high load; a smaller value indicates that it can maintain good response performance under high load. The product of success rate and capacity token ratio is a comprehensive evaluation indicator of the service quality and resource supply capacity of the upper-layer switch node. It is calculated as the product of the historical average success rate and the available capacity token ratio. This product reflects the comprehensive level of service quality and resource availability of the upper-layer switch node; a larger value indicates both good service quality and sufficient resource supply capacity.

[0099] The strategy feature layer generates features based on business strategies and configuration parameters, including regional preference weights, cost optimization factors, and business priority identifiers. These strategy features enable scoring calculations to incorporate business decisions and operational considerations. Regional preference weights refer to the regional priority weight coefficients set based on network topology and operational costs. This weight is determined comprehensively based on factors such as network latency, bandwidth costs, and maintenance convenience in the region where the upper-layer switch node is located. The value ranges from 0.1 to 1.0, with a default value of 0.7. This default value is determined based on a balance between network latency and cost-effectiveness; a higher value indicates a higher priority for the region and a higher probability of selection during call allocation. The cost optimization factor is a weight coefficient calculated based on the operational costs of the upper-layer switch node. This factor comprehensively considers the hardware depreciation, power consumption, maintenance costs, network leasing, and other operational costs of the upper-layer switch node, calculated through cost-benefit analysis. The value ranges from 0.5 to 1.5, with a default value of 1.0. This default value is determined based on the principle of cost neutrality; a higher value indicates better cost-effectiveness for the upper-layer switch node, making it a preferred choice under the same conditions. The service priority identifier refers to the priority weight identifier set according to the service type and importance carried by the upper-layer switch node. This identifier is determined based on factors such as the criticality of the service, revenue contribution, and service level agreement requirements. It is divided into three levels: high priority, medium priority, and low priority, corresponding to weight values ​​of 1.0, 0.8, and 0.6, respectively. These weights are determined based on the hierarchy of service importance and resource allocation priority. High-priority services receive the highest scheduling priority when allocating calls.

[0100] The scheduling and scoring model uses the Random Forest ensemble learning algorithm to construct an ensemble model containing a preset number of decision trees. The number of trees is determined based on a balance between model performance and computational complexity, with a default value of 150 decision trees. This number is determined based on a balance between ensemble learning effectiveness and computational resource consumption. Each decision tree is trained independently on a feature subset and a sample subset. The feature subset refers to a subset of feature dimensions randomly selected from all feature dimensions of the comprehensive feature vector, used for training and prediction of a single decision tree. The size of the feature subset is the square root of the total number of features, approximately 4-5 features. This setting is determined based on the theoretical optimal value of the random forest algorithm. The random selection mechanism ensures that different decision trees use different feature combinations, improving the model's generalization ability and robustness. The sample subset refers to a subset of training samples obtained from the complete training dataset through random sampling with replacement, used for independent training of a single decision tree. The sample subset is obtained through sampling with replacement, with a default sampling ratio of 80%. This ratio is determined based on the statistical principles of Bootstrap sampling and the model's generalization performance requirements. That is, each sample subset contains 80% of the samples in the original training set, and the randomization of samples is achieved through the Bootstrap sampling method. The default maximum depth of the decision tree is 10 layers, the default minimum number of split samples is 5, and the default minimum number of leaf nodes is 2. These default values ​​are determined through grid search and cross-validation optimization, based on a balance between preventing overfitting and ensuring the model's generalization ability. Historical call success rate is used as the supervision label during model training. The success rate is defined as the proportion of calls in which a node successfully establishes a connection within a specific time window out of the total number of call attempts.

[0101] The scoring process of the random forest model involves inputting the comprehensive feature vector of the upper-level switch nodes into 150 decision trees. Each tree outputs a predicted score based on its trained feature subset and decision rules. The comprehensive feature vector is used by the random forest model to calculate the final comprehensive scheduling score. The original score is calculated by the arithmetic mean of the prediction results of all decision trees, i.e., the original score equals the sum of the predicted scores of all decision trees divided by the number of trees. To ensure the interpretability and consistency of the scores, the original scores are standardized. First, the scores are mapped to the interval [0,1], and then the sigmoid function is applied for smoothing. The final output comprehensive scheduling score ranges from [0,1], where 0 indicates that the upper-level switch node is not suitable for scheduling at all, and 1 indicates that the upper-level switch node is most suitable for scheduling. Upper-level switch nodes with scores greater than 0.7 are considered to have high scheduling priority, upper-level switch nodes with scores between [0.4,0.7] have medium scheduling priority, and upper-level switch nodes with scores less than 0.4 have low scheduling priority.

[0102] The performance of the random forest model is evaluated using multiple metrics, including prediction accuracy, recall, and F1 score. After model training, a continuous learning mechanism is established. The default data collection cycle is 24 hours, determined based on data timeliness and system load balancing, updating the training sample set. The default model retraining cycle is 7 days, determined based on the frequency of business model changes and model stability requirements, adapting to changes in business models. The default model performance evaluation cycle is 30 days, determined based on model performance monitoring needs and operational costs, adjusting feature engineering strategies and model architecture as necessary. Through continuous optimization, the random forest model can adapt to changes in the network environment and business requirements, generating accurate comprehensive scheduling scores for each upper-layer switch node. These scores serve as the core input for the candidate set construction process in step 400.

[0103] The technological advantage of machine learning-based intelligent scoring prediction mechanisms lies in the transformation from static rules to dynamic intelligent decision-making. Compared to traditional time series prediction methods, LSTM neural networks can effectively handle long-term dependencies, selectively memorizing and forgetting historical information through gating mechanisms, accurately capturing the periodic changes and trends in node utilization. The necessity of using historical utilization sequences as core input lies in providing rich temporal pattern information for the prediction model, enabling it to learn the regular changes during peak and off-peak periods. The introduction of time-encoded features solves the problem of time periodicity that traditional methods struggle with. Sine and cosine encoding converts time information into continuous numerical features, allowing the model to understand hourly, daily, and weekly periodic patterns. The combined use of load features and context features achieves multi-dimensional improvements in prediction accuracy. Load features reflect the current system state, while context features provide environmental information; their combination makes the prediction results more accurate and reliable.

[0104] Step 400: Filter candidate nodes based on the comprehensive scheduling score, and construct a ready set based on the candidate nodes.

[0105] Based on the comprehensive scheduling score of the upper-layer switch nodes obtained in step 300, a systematic candidate set construction and parallel pre-detection process is executed. This process ensures that the final selected node set has both excellent predictive performance and reliable service guarantee during actual calls through a multi-stage screening and verification mechanism.

[0106] First, based on the comprehensive scheduling score calculated by the random forest algorithm in step 300, a scoring threshold is set for candidate nodes. Upper-layer switch nodes with comprehensive scheduling scores greater than the threshold are then designated as candidate nodes. The scoring threshold is set as a dynamically calculated value, which is the median of the comprehensive scheduling scores of all upper-layer switch nodes multiplied by a preset adjustment coefficient. The default value of the adjustment coefficient is 0.8, ensuring the basic quality of the candidate nodes.

[0107] Based on the candidate nodes, a node health filtering mechanism is further applied to eliminate nodes that do not meet the basic service capability requirements. The health filtering criteria include: the node health score of the candidate node must be greater than a preset health score threshold, with a default value of 0.6. This threshold is determined based on historical statistical data; nodes below this value typically have service quality issues. The call setup latency of the candidate node must be less than a preset call setup latency threshold, with a default value of 1000 milliseconds. This call setup latency threshold is set according to the user experience requirements of the enterprise's voice service. The call failure rate of the candidate node within the most recent time window must be less than 5%, with the default value for the most recent time window being the past 5 minutes. This call failure rate threshold is determined based on industry standards and service level agreements. After health filtering, the remaining candidate nodes are sorted in descending order according to their comprehensive scheduling score. The top-ranked number of remaining candidate nodes are selected to form a candidate set, ensuring that each node in the candidate set has basic service assurance capabilities.

[0108] The number of candidates is a configurable parameter. When the current overall utilization is greater than or equal to the preset high utilization of 70%, the number of candidates is the preset high node number, with a default value of 7, to improve fault tolerance and diversify risks. When the current overall utilization is less than or equal to the preset low utilization of 30%, the number of candidates is the preset low node number, with a default value of 3, to improve selection efficiency and reduce resource consumption. When the current overall utilization is between the preset low and preset high utilization, the number of candidates is the preset basic node number, with a default value of 5. This range is determined based on a balance between fault tolerance and efficiency. The overall utilization rate is the current total concurrent call count divided by the total permitted capacity limit.

[0109] For each upper-layer switch node in the candidate set, parallel SIP OPTIONS message checks are initiated to verify the node's real-time SIP service reachability and current response performance. The SIP OPTIONS message is a standard probe message in the SIP protocol used to check the availability and supported functionalities of the SIP server. Specifically, an OPTIONS request message is sent to the SIP service port of each candidate node. The message includes standard SIP header fields and gateway identification information. The SIP service port is typically 5060 or 5061, and the SIP header fields include Via, From, To, Call-ID, and CSeq. The timeout for the OPTIONS message is set to 2 seconds, determined based on the response requirements of real-time communication. The response time and response status code of each node are recorded. A normal response should be 200 OK, indicating that the node's SIP service is normal and can accept call requests. Nodes with a response time exceeding 2 seconds or receiving an error status code will be marked as unavailable; error status codes include 404, 503, and 408.

[0110] Executed in parallel with SIP reachability detection, a pre-allocation capacity token request is sent to each candidate node via the lightweight control channel established in step 100 to verify the node's current capacity availability and capacity token issuance capability. The pre-allocation capacity token request is a special capacity query mechanism that requests a node to reserve a capacity token without immediately occupying actual media processing resources, similar to a soft subscription mechanism. Specifically, a pre-allocation request message is sent to the node's control channel endpoint via QUIC, MQTT, or HTTPS protocols. The request message includes information such as the gateway identifier, service type tag, number of pre-allocation capacity tokens, priority level, and request timestamp. The number of pre-allocation capacity tokens is typically one. Upon receiving the pre-allocation request, the node returns a pre-allocation confirmation response or a pre-allocation rejection response based on the current capacity status and token pool situation. The pre-allocation confirmation response includes the reserved capacity token identifier, validity period, and digital signature; the pre-allocation rejection response includes a rejection reason code, such as insufficient capacity or node overload. The timeout for the pre-allocation request is set to 1.5 seconds to ensure the real-time nature of the verification process.

[0111] The system collects the response results of all parallel pre-detection operations and comprehensively evaluates the real-time status of each candidate node. Response collection employs an asynchronous, non-blocking mechanism to avoid the impact of single-node latency on overall processing efficiency. For each candidate node, the following three key metrics are evaluated: SIP OPTIONS response status (a successful response displays a 200 OK status code); pre-allocation capacity token confirmation status (successful pre-allocation returns a valid capacity token identifier); and overall response time, which is the weighted sum of the SIPOPTIONS response time and the pre-allocation capacity token response time. The overall response time is calculated as follows: overall response time equals the sum of the SIP response time multiplied by a preset response weight and the pre-allocation capacity token response time multiplied by a preset token weight. The default response weight is 0.6, and the default token weight is 0.4. This weighting is determined based on the importance of the two operations in the actual call.

[0112] Based on the comprehensive evaluation results of the pre-detection response, strict admission criteria are applied to select the final ready set. A node must simultaneously meet the following four conditions to enter the ready set: a 200 OK response is received in the SIP OPTIONS check, confirming the node's SIP service is available; the pre-allocation capacity token request is positively acknowledged, obtaining a valid pre-allocation capacity token identifier; the overall response time is less than a preset response threshold, with a default value of 500 milliseconds, set based on the user experience requirements of real-time voice communication; and the node's overall scheduling score remains above a certain threshold to prevent nodes with significantly decreased scores during the pre-detection process from entering the ready set. Nodes meeting all admission criteria constitute the final ready set, which will serve as the pool of potential target nodes for call initiation in step 500. The size of the ready set is typically 1 to 3 nodes, ensuring sufficient selection while avoiding excessive decision-making complexity. Nodes in the ready set are reordered according to their overall scheduling scores to provide priority reference for subsequent first-node selection.

[0113] The technical advantages of the candidate set construction and parallel pre-detection mechanism lie in the organic combination of predictive scoring and real-time verification. The three-stage progressive architecture design advantage lies in its layered screening, ensuring that the final selected nodes possess both theoretically excellent performance expectations and actual service provision capabilities. The necessity of dynamically calculating the scoring threshold lies in adapting to changes in the network environment. By multiplying the median by an adjustment coefficient, it can automatically adapt to fluctuations in overall performance levels, avoiding overly strict or lenient issues that might arise from fixed thresholds. The input indicators for the health filtering mechanism include node health reflecting comprehensive service capabilities, call setup latency directly affecting user experience, and call failure rate reflecting service stability. The combination of these three indicators ensures the basic service quality of candidate nodes. Compared to serial detection, the parallel pre-detection mechanism has a significant time advantage. By simultaneously executing SIP OPTIONS detection and capacity token pre-emption verification, node availability confirmation can be completed in the shortest possible time, significantly reducing the pre-call setup latency. The asynchronous non-blocking response collection mechanism avoids the impact of single-point failures on overall performance. Even if a node responds slowly or fails, it will not block the verification process of other nodes, improving concurrency processing capabilities and fault tolerance. The dynamic adjustment strategy for the number of candidates reflects intelligent features. It increases the number of candidates to improve fault tolerance under high load and decreases the number of candidates to improve efficiency under low load, thus achieving the optimal balance between performance and resource consumption.

[0114] Step 500: When a call request is received, select a first node from the ready set to allocate the call and monitor the call status.

[0115] The node with the highest overall scheduling score and available capacity token is selected as the first node from the ready set constructed in step 400. The selection process employs a dual verification mechanism: first, it verifies that the node's pre-allocated capacity token is still valid, checking the timestamp and signature integrity of the capacity token; then, it confirms that the node currently has sufficient processing capacity. If the first node's pre-allocated capacity token has expired or its capacity status has changed, a second node is automatically selected from the ready set. The selection criteria for the second node are the second highest overall scheduling score and the availability of a remaining capacity token. This selection strategy ensures that calls are always routed to the most suitable available node, maximizing call success rate and user experience quality.

[0116] Send a SIP INVITE message to the selected first node, carrying the corresponding capacity token in the custom header field X-Cap-Token. Specifically, construct a standard SIP INVITE message and add the custom field X-Cap-Token to the message header. This field includes the capacity token's unique identifier, digital signature, and remaining time-to-live (TTL). The capacity token is formatted as a structured string, consisting of multiple key-value pairs separated by semicolons. Verify the validity of the capacity token before sending the message, ensuring it is not expired and the signature is correct. Message transmission uses a reliable delivery mechanism, with appropriate timeout and retransmission parameters set.

[0117] A preset fast backoff trigger threshold is set, with a default value of 2.5 seconds. This threshold is determined based on user experience requirements and network response time statistical analysis. Call status is monitored within this fast backoff trigger threshold. The specific implementation method is as follows:

[0118] If a 180 Ringing or 200 OK response is received, continue the normal call process. Upon receiving a positive response, maintain the current call path and continue the subsequent media negotiation and connection establishment process.

[0119] If a timeout occurs or a congestion failure response code is received, such as 486 Busy or 503 Service Unavailable, a rollback is immediately executed. This includes releasing the currently occupied capacity token, sending a capacity token release notification to the original upper-layer switch node, and returning the occupied capacity token to the available token pool to avoid resource waste. A second node is selected from the ready set. The ready set is reordered in descending order according to the comprehensive scheduling score, and the node ranked second and still having available capacity tokens is selected as the backup target. A SIP INVITE message is resent to the second node, initiating a call request using the same call parameters and a new capacity token. The total number of retries and the time window are limited to prevent rollback loops. The default value for the total number of retries is 3, determined based on the balance between fault recovery effectiveness and resource consumption. The default value for the time window is 10 seconds, determined based on user waiting tolerance and response efficiency requirements. A retry counter and a total timeout timer are maintained. If the limits are exceeded, the rollback is terminated and a call failure is returned.

[0120] Node switching is performed during the signaling phase before media stream establishment to ensure that the handover call establishment latency is controlled at the subsecond level. The default value for the subsecond level is less than 500 milliseconds. This latency threshold is determined based on the user experience standard for real-time voice communication to avoid users perceiving significant time delays.

[0121] The technical advantages of call initiation and the two-stage fast fallback mechanism lie in achieving efficient fault recovery and ensuring user experience. The dual-authentication mechanism ensures that the selected node still has service capabilities at the time of call initiation. By verifying the validity of the pre-allocated capacity token and its capacity status, it avoids invalid call attempts due to time differences. The capacity token is carried in the SIP INVITE message through a custom header field X-Cap-Token, allowing upper-layer switch nodes to immediately verify scheduling legitimacy upon receiving a call request, preventing service quality degradation caused by over-capacity reception. The fast fallback trigger threshold reflects the special requirements of real-time communication. The 2-3 second threshold, determined based on user experience research, provides sufficient response time for nodes while enabling rapid switching in abnormal situations, avoiding long user wait times. The two-stage fallback strategy has significant advantages over traditional single-retry strategies. Through a pre-built ready set, it can immediately switch to the second node if the first node fails, without re-executing the entire candidate set construction process, significantly shortening fault recovery time. The timely release mechanism of capacity tokens ensures efficient resource utilization. When a call fails, the capacity token is immediately returned, avoiding resource waste and providing capacity support for other calls. The subsecond-level handover latency demonstrates the system's technological advancement. By completing node handover during the signaling phase, the complexity and latency issues of handover after media stream establishment are avoided, providing users with a near-perceptible fault recovery experience.

[0122] Step 600: Monitor the inbound call rate and capacity token acquisition rate in real time. When the inbound call rate is greater than a preset multiple of the capacity token acquisition rate, activate the backpressure mechanism.

[0123] The system monitors the ratio of inbound call rate to capacity token throughput in real time. When the inbound call rate exceeds a preset multiple of the capacity token acquisition rate, the inbound call rate threshold (default value of which is 1.2 times the capacity token acquisition rate, determined based on system load balancing and quality of service requirements) is triggered, and a backpressure mechanism is activated. This backpressure mechanism balances system load by dynamically adjusting call acceptance strategies, reducing the priority of new calls, prioritizing calls with established connections, sending flow control signals to upstream systems to request a temporary reduction in call forwarding, and activating a micro-queue mechanism to temporarily buffer calls exceeding processing capacity. The goal of the backpressure mechanism is to prevent system overload and ensure stable quality of service for accepted calls. Specifically, the system maintains a sliding time window statistician to calculate the call request frequency in recent time periods. Simultaneously, it monitors the capacity token issuance rate of all upper-layer switch nodes and the capacity token consumption rate of the voice gateway to calculate the overall capacity token throughput capacity of the system. When the inbound call rate consistently exceeds a preset multiple of the capacity token supply capacity, the backpressure protection mechanism is triggered to prevent system overload.

[0124] When a capacity token shortage is detected, a micro-queue mechanism is activated to temporarily buffer calls exceeding immediate processing capacity. Micro-queue design parameters include a default queue length of 15 call requests, determined based on a balance between memory usage efficiency and buffering capacity to prevent excessive memory consumption; a default maximum wait time of 7 seconds, determined based on user wait tolerance and response efficiency requirements, with timed-out calls being rejected and returning the corresponding error code; and a first-in, first-out (FIFO) queue scheduling strategy to ensure fairness in call processing. The core objective of the micro-queue mechanism is to provide buffering during short-term traffic peaks, avoiding direct call rejection while preventing long queues from impacting user experience. The queue status is continuously monitored, and pending calls in the queue are processed immediately when the capacity token supply returns to normal.

[0125] Optimize user experience, including playing recyclable ringback tones or alerts to inform users that their call is being processed; when the queue is full or the waiting time is too long, return to a later outbound call strategy to the local agent or application; avoid cascading congestion caused by aggressive retries.

[0126] The technical advantages of the system's runtime management and user experience optimization mechanisms are reflected in the dynamic balancing of system load and proactive protection of user experience. The backpressure mechanism's design advantage lies in providing system overload protection. By monitoring the ratio of inbound call rate to capacity token throughput in real time, it can proactively adjust before the load exceeds limits, preventing system crashes or a sharp decline in service quality. The 1.2x threshold setting is based on system capacity planning and user experience balance, ensuring high system utilization while reserving necessary safety margins. The sliding time window statistician's advantage lies in smoothing the impact of short-term fluctuations. By statistically analyzing call frequency within the recent time period, the system can accurately identify the true load trend, avoiding unnecessary protection mechanisms triggered by instantaneous peaks. The introduction of the micro-queue mechanism solves the user experience problem of direct call rejection in traditional systems. By short-term caching of calls exceeding immediate processing capacity, it provides buffer space for traffic peaks. The parameter settings of queue length (10-20 calls) and maximum waiting time (5-10 seconds) are determined based on user experience research, effectively alleviating short-term congestion while avoiding the negative impact of long waiting times on user experience. The first-in, first-out (FIFO) scheduling strategy ensures fairness in call processing, preventing certain calls from being backlogged for extended periods. The necessity of user experience optimization measures lies in establishing a balance between system protection and user perception. By playing prompts and implementing a "call later" strategy, a good user interaction experience can still be maintained when services are restricted, avoiding confusion or dissatisfaction among users due to system protection measures.

[0127] Step 700, based on the machine learning prediction system established in Step 300 and the intelligent call allocation practices in Steps 400 to 600, constructs a complete online learning and adaptive optimization mechanism to continuously improve prediction accuracy and scheduling performance through continuous feedback learning. This mechanism employs a multi-layered learning strategy, from basic success rate statistics to parameter optimization of deep learning models, forming a closed-loop intelligent optimization system.

[0128] As the data foundation for online learning, a complete call feedback data collection mechanism is first established. Each time a call is completed, call result data is immediately collected, including key information such as call success status, actual call setup latency, target upper-layer switch node identifier, and call duration. This feedback data constitutes the training samples for subsequent model updates, providing realistic performance feedback for intelligent optimization.

[0129] Based on collected call feedback data, the empirical success rate of each upper-layer switch node is updated using a Bayesian smoothing method. This involves incrementing the number of successful calls by 1 and dividing by the sum of the total number of call attempts and 2. The default value for the Bayesian smoothing parameter is incrementing the numerator by 1 and the denominator by 2. This parameter setting is based on Bayesian statistical theory and the need to eliminate small sample bias, effectively avoiding such bias. Specifically, a successful call counter and a total attempt counter are maintained for each upper-layer switch node. Each time a call is completed, the corresponding node's counter is updated based on the call result. When calculating the success rate, a smoothing parameter is added to both the numerator and denominator. This Bayesian smoothing method avoids extreme success rate estimates when the sample size is small, ensuring that new nodes or nodes with limited historical data can obtain reasonable initial success rate assessments. The updated empirical success rate directly influences the decision-making of the UCB exploration strategy, forming a data-driven optimization loop.

[0130] The Upper Confidence Bound (UCB) algorithm is employed to optimize the balance between exploration and exploitation, dynamically adjusting node selection preferences. By comprehensively considering the historical success rate of nodes (exploitation) and selection uncertainty (exploration), the UCB algorithm guides the system to make intelligent choices between known high-performance nodes and potentially high-quality nodes.

[0131] The formula for calculating the UCB value is: the success rate of the upper-level switch node plus the exploration intensity coefficient multiplied by the upper bound of the confidence interval. Specifically, the UCB value for each upper-level switch node is calculated, consisting of two parts: the exploitation item (the historical success rate of the upper-level switch node) and the exploration item (rewards based on uncertainty). The exploration item is calculated by multiplying the exploration intensity coefficient by the natural logarithm of the cumulative decision rounds and dividing by the square root of the number of historical attempts for that upper-level switch node. The default value for the exploration intensity coefficient is 1.5, determined based on the theoretical optimal value for balancing exploration and exploitation. The cumulative decision rounds are the total number of time steps since the system began operating, and the number of historical attempts is the total number of times the upper-level switch node has been selected.

[0132] The optimization effect of the UCB strategy is directly reflected in the candidate set construction process. Upper-level switch nodes with high UCB values ​​will receive higher selection priority, while ensuring that upper-level switch nodes with less historical data still have a chance to be explored. This balancing mechanism prevents the system from converging to a local optimum too early, providing the possibility of discovering better scheduling strategies. The calculated UCB value will serve as an input feature, further influencing the score calculation of the random forest model.

[0133] The LSTM utilization prediction model established in step 300 is updated online, and the model's predictive ability is continuously corrected using real utilization observations. The online update mechanism adopts an incremental learning approach to avoid the computational overhead of retraining the entire model, while maintaining the model's sensitivity to environmental changes.

[0134] The LSTM neural network parameters are updated using online gradient descent, which involves subtracting the learning rate multiplied by the gradient of the loss function from the current parameters. Specifically, the loss function is calculated between the predicted and actual utilization rates, using mean squared error. Then, the gradient of the loss function is calculated with respect to all neural network parameters. The default learning rate is 0.005, determined based on a balance between online learning convergence speed and stability, and is used to control the step size for parameter updates. The gradient is calculated using backpropagation, and the network weights and bias parameters are updated according to the gradient descent direction.

[0135] To improve update efficiency and reduce noise impact, a sliding window mechanism is adopted. A model update is triggered after a certain number of new samples are collected. The default sample buffer size is 75 samples, determined based on a balance between update efficiency and noise suppression, avoiding computational overhead caused by frequent updates. Specifically, a sample buffer is maintained, and new training samples, including input features and true utilization labels, are continuously added to it. When the buffer reaches the preset size, a batch gradient update is performed using these samples, and then the buffer is cleared to prepare for the next round of collection. This batch update method ensures timely model updates while avoiding the noise and computational waste that may result from single-sample updates. The updated LSTM model will provide more accurate utilization predictions, directly improving the accuracy of the comprehensive scheduling score calculation in step 300.

[0136] In parallel with the LSTM model update, incremental learning updates are performed on the random forest scheduling scoring model from step 300. The random forest model update is based on call success rate feedback and updated LSTM predictions, adapting to changes in the network environment by retraining the decision tree ensemble. The incremental learning strategy ensures the model can quickly adapt to new data distributions while preserving the value of historical experience.

[0137] The random forest model is updated using an incremental learning strategy, and specific implementation methods include:

[0138] Maintain a fixed-size sample cache pool, with a recommended capacity of 1000 to 2000 samples and a default value of 1500 samples. This value is determined based on a balance between memory usage efficiency and data coverage. Continuously collect new training samples, including upper-layer switch node feature vectors and corresponding call success rate labels, and store them in a circular buffer. When the buffer is full, new samples overwrite the oldest samples, ensuring that the cache always contains the latest data. The sample feature vector includes the updated LSTM prediction results, the calculated UCB value, and the real-time load fingerprint data from step 100.

[0139] When the cache pool is full, the random forest model is retrained using the latest samples. A new random forest is built using all samples from the cache, including reselecting feature subsets for each decision tree, rebuilding the decision trees, and re-optimizing the model parameters. The retraining process fully utilizes the latest generated data, ensuring the model reflects the current network state.

[0140] A weighted average method is used to fuse the prediction results of the old and new models. The new score equals the fusion weight multiplied by the old model score plus 1, minus the fusion weight multiplied by the retrained model score. The default fusion weight is 0.8, determined based on the balance between model stability and adaptability. A higher weight ensures model stability while allowing the new model to gradually take effect. This gradual fusion avoids performance fluctuations that may result from sudden model changes, ensuring a smooth transition in scheduling decisions.

[0141] The updated random forest model will play a key role in the candidate set construction in step 400, providing a more accurate comprehensive scheduling score for upper-layer switch nodes, which directly affects the effect of intelligent scheduling.

[0142] Adaptive tuning of hyperparameters enables dynamic optimization of parameter configuration. Hyperparameter tuning covers parameters in key stages such as the LSTM model, random forest model, and candidate set construction. Through performance feedback-driven parameter optimization, continuous performance improvement is achieved.

[0143] Dynamically adjust key hyperparameters based on model performance metrics. Specific implementation methods include:

[0144] The time window length is adjusted based on the prediction accuracy of the LSTM model. The window length is increased when accuracy decreases to capture longer-term dependencies. The prediction accuracy of the LSTM model is periodically evaluated, and the mean absolute error between the predicted utilization and the actual utilization is calculated. When the error exceeds a preset error threshold, the length of the historical time window is automatically increased, gradually increasing from 24 time steps to 48 or more, to capture longer-term dependencies. The default preset error threshold is 0.08, determined based on a trade-off between prediction accuracy requirements and computational complexity. Adjusting the window length directly affects the construction of the feature vector in step 300.

[0145] The number of decision trees is adjusted to balance the computational resource consumption and accuracy improvement during model training. The training and prediction time is monitored, while the improvement in prediction accuracy is tracked. When computational resources are sufficient and there is still room for accuracy improvement, the number of decision trees is increased; when computational pressure is high and the marginal effect of accuracy improvement diminishes, the number of trees is appropriately reduced. Adjusting the number of trees affects the computational accuracy and response speed of the comprehensive scheduling score of the upper-layer switch nodes in step 300.

[0146] The size of the candidate set in step 400 is dynamically adjusted based on the overall call success rate to achieve a balance between efficiency and fault tolerance. When the overall success rate is high, the number of candidates is reduced to improve efficiency. The overall call success rate within the most recent time window is statistically analyzed. When the success rate consistently exceeds a preset high success rate threshold (default value 95%, determined based on the quality requirements of high-efficiency scheduling), the candidate set size is reduced from 5 to 3 to reduce pre-detection overhead. When the overall success rate is low, the number of candidates is increased to improve fault tolerance. When the success rate falls below a preset low success rate threshold (default value 85%, determined based on the minimum requirements for fault tolerance assurance), the candidate set size is increased to 7 or more to provide more alternative solutions to cope with upper-layer switch node failures or network fluctuations.

[0147] Through the above complete optimization process, a closed-loop learning mechanism is formed, from data collection and model updates to parameter tuning, ensuring that intelligent call allocation can continuously adapt to changes in the network environment and continuously improve scheduling effectiveness and user experience.

[0148] Online updating and adaptive optimization mechanisms for machine learning models offer significant technical advantages. First, online learning mechanisms can respond to changes in the network environment in real time, avoiding the lag issues of traditional offline training and ensuring that model prediction accuracy remains optimal. Second, the Bayesian smoothing update method effectively addresses data sparsity by appropriately fusing prior knowledge with observed data, avoiding model bias caused by single instances of outlier data and improving the stability and reliability of prediction results. Third, the exploration of the UCB algorithm—utilizing a balancing strategy—can continuously discover better scheduling strategies while maintaining system performance, avoiding getting trapped in local optima and ensuring sustained long-term performance improvement.

[0149] Complete collection of call feedback data is a necessary input foundation for online learning mechanisms. Feedback metrics such as call success rate, setup latency, and duration directly reflect the actual service quality of upper-layer switch nodes, providing an accurate objective function for model parameter updates. Continuous accumulation of historical utilization sequence data provides the LSTM model with sufficient time-series samples, ensuring the model can capture the periodic patterns and long-term trends of network load. The introduction of the sliding window mechanism ensures the model's sensitivity to the latest data while avoiding the complete discarding of historical data, achieving an optimal balance between model adaptability and stability. The dynamic calculation of confidence intervals in the UCB algorithm requires statistical information based on the number of historical selections and reward variance; the accuracy of this input data directly affects the effectiveness of the explore-utilization balance strategy.

[0150] Step 800, based on the intelligent call allocation system and machine learning optimization mechanism established in steps 100 to 700, constructs a complete compliance reporting and audit trail system. This system ensures the compliance, traceability, and continuous optimization capabilities of intelligent call allocation through multi-layered data collection, statistical analysis, and audit support. The compliance reporting and audit trail system adopts a layered architecture design, forming a complete data governance and regulatory support framework from basic call detail records to high-level performance analysis reports.

[0151] As the foundational layer of the compliance reporting system, a complete Call Detail Record (CDR) generation and reporting mechanism is first established. Based on the intelligent call allocation execution results from steps 400 to 600, each call attempt is recorded in detail, with a strict compliance reporting process implemented, especially for calls that are not connected or are incomplete.

[0152] Call detail records are categorized and processed based on different call outcome statuses. For successfully established calls, the complete call setup process is recorded, including key information such as the candidate set construction results, the final selected upper-layer switch node, call setup latency, and call duration. For unsuccessful or incomplete calls, the focus is on recording the failure reason analysis, including detailed information such as the attempt results of each upper-layer switch node in the candidate set, the response status of the OPTIONS pre-check, capacity token consumption, and the triggering process of the fallback mechanism. Call detail records use a standardized data format to ensure compatibility with live network compliance requirements, while also including extended fields unique to intelligent scheduling, providing a complete data foundation for subsequent statistical analysis and audit trails.

[0153] Based on the generated call detail records, a dual-channel reporting mechanism ensures full compliance with requirements. The main channel uses the standard SIP signaling protocol to report call detail records to the home upper-layer switch node in real time. The reported content strictly follows the existing network CDR format specifications, including standard fields such as call start time, end time, calling number, called number, call status, failure reason code, and billing information. The auxiliary channel uses the lightweight control channel established in step 100 to perform batch summary reporting. The reported content includes extended information for intelligent scheduling, such as the candidate set construction process, machine learning model prediction results, UCB strategy selection criteria, and capacity token usage. The dual-channel reporting mechanism ensures compatibility with the existing network system and provides rich data support for in-depth analysis of intelligent scheduling.

[0154] Based on the established call detail records and compliant reporting data, a cross-regional statistical analysis mechanism is further constructed. This mechanism provides data support for system optimization and capacity planning through quantitative evaluation of the effectiveness of intelligent call allocation. The cross-regional statistical analysis adopts a multi-dimensional indicator system to comprehensively evaluate the performance of intelligent scheduling from the perspectives of call allocation effectiveness, load balancing degree, and resource utilization efficiency.

[0155] Based on the upper-layer switch node selection information in the call detail records, the call allocation ratio and trend for each region are statistically analyzed. Specifically, according to preset statistical periods (e.g., hourly, daily, weekly), the number and proportion of calls carried by upper-layer switch nodes in each region are summarized, and the allocation ratio of cross-regional calls is calculated, i.e., the number of calls outside the local area divided by the total number of calls. Simultaneously, the temporal trend of call allocation ratios is analyzed to identify cross-regional allocation patterns during peak business hours, providing a basis for capacity planning and resource allocation decisions. The success rate of cross-regional calls is also statistically analyzed; by comparing the success rates of local and cross-regional calls, the effectiveness of intelligent scheduling strategies and network interconnection quality are evaluated.

[0156] Based on the machine learning prediction results from step 300 and the actual load distribution, load balancing effectiveness evaluation metrics are calculated. Load balancing effectiveness is quantified using the variance coefficient, which is the standard deviation of the utilization rate of each upper-layer switch node divided by the average utilization rate. A smaller variance coefficient indicates a more uniform load distribution. The load variance coefficients before and after enabling intelligent scheduling are periodically compared to quantify the degree of improvement in load balancing brought about by intelligent scheduling. Simultaneously, the improvement in resource utilization is statistically analyzed. By comparing the overall resource utilization rate before and after enabling intelligent scheduling, the system's resource optimization effect is evaluated. Resource utilization improvement metrics include the percentage increase in average utilization rate, the smoothness of peak utilization rate, and the reduction in resource waste rate, providing a quantitative basis for system value assessment.

[0157] Based on the above statistical analysis results, statistical information on cross-regional call allocation is periodically reported to the network management center through the lightweight control channel established in step 100. The reported information uses a structured data format, including a statistical table of call allocation ratios for each region, a trend chart of cross-regional call success rates, a load balancing effect evaluation report, and resource utilization improvement analysis. The reporting cycle can be flexibly configured according to business needs, supporting multiple modes such as real-time reporting, hourly summaries, and daily summaries. The statistical information reporting provides network operations personnel with a comprehensive view of the intelligent scheduling operation status, supporting data-driven decision-making and system optimization.

[0158] Based on compliance reporting data and statistical analysis results, a complete audit log generation and in-depth analysis support mechanism is constructed. This mechanism provides comprehensive data support and analysis tools for capacity planning, performance analysis, fault diagnosis, and system optimization by recording the decision-making process and operational status of intelligent scheduling in detail.

[0159] The entire process of each intelligent scheduling decision is meticulously recorded, forming a traceable decision-making chain. The audit logs include: the utilization prediction results of the LSTM neural network in step 300; the comprehensive scheduling score calculation process of the random forest model; the selection criteria for constructing the candidate set in step 400; the response details of the OPTIONS pre-screening in step 500; the decision logic for the final node selection in step 600; and the online update process of the machine learning model in step 700. Each audit log entry contains complete information such as a timestamp, decision context, input parameters, intermediate calculation results, final decision output, and execution results, ensuring complete traceability of the decision-making process. The audit logs are stored in a standardized JSON format, supporting efficient query and analysis operations.

[0160] Based on the load fingerprint data from step 100 and the actual call allocation results, the load distribution and utilization trends of each upper-layer switch node are continuously tracked. Specifically, this involves maintaining time-series utilization data for each upper-layer switch node, recording key information such as real-time utilization changes, peak occurrence time, and duration of low periods. Simultaneously, the correlation between utilization changes and intelligent scheduling decisions is analyzed to evaluate the impact of scheduling strategies on load distribution. Furthermore, the call load distribution of each node is statistically analyzed to identify high-load and low-load nodes, providing a basis for capacity expansion and resource reconfiguration decisions. Load distribution data is presented in chart form, supporting multi-dimensional visualization analysis.

[0161] Based on the online learning and adaptive optimization process in step 700, the evolution trend of machine learning model parameters is tracked, and the changing patterns of model performance are analyzed. Parameter evolution analysis includes the changing trends of LSTM neural network weight parameters, the evolution of the decision tree structure in the random forest model, the adjustment history of the exploration-utilization balancing parameters in the UCB strategy, and the adaptive adjustment trajectories of various hyperparameters. Through parameter evolution analysis, the model convergence state is identified, potential overfitting or underfitting problems are discovered, and the model's stability and generalization ability are evaluated. Parameter evolution data provides important references for model tuning and algorithm improvement, supporting continuous optimization through intelligent scheduling.

[0162] Based on complete audit data, a comprehensive performance evaluation is performed to quantify the performance improvement of intelligent scheduling compared to traditional scheduling methods. Performance evaluation metrics include the percentage increase in call success rate, the reduction in average call setup latency, the degree of improvement in resource utilization, the improvement in load balancing, and the improvement in user satisfaction. Comparative analysis methods are employed, using A / B testing or historical data comparison to quantify the value contribution of intelligent scheduling. The evaluation results are output in the form of a comprehensive report, including quantitative data on performance improvements, visual charts of the improvement effects, and optimization suggestions based on data analysis. The comprehensive evaluation report provides a scientific basis for the system's promotion and continuous improvement, ensuring that intelligent scheduling can continuously create business value.

[0163] Through the aforementioned comprehensive compliance reporting and audit tracking system, the entire chain from basic data collection to high-level analysis and evaluation is covered, ensuring that intelligent call allocation provides high-quality service while meeting compliance requirements and supporting continuous optimization, thus providing a reliable guarantee for the intelligent upgrade of enterprise voice communication systems.

[0164] This embodiment achieves intelligent call allocation for voice gateways while maintaining SIP protocol compatibility, providing an efficient and reliable solution for enterprise voice communication systems.

[0165] Example 2:

[0166] See Figure 4 As shown, an intelligent call distribution system for a voice gateway is provided, which stores computer-readable instructions. When the computer-readable instructions are read, the system can execute the aforementioned intelligent call distribution method for the voice gateway. The system includes: a voice gateway, and an upper-layer switch node connected to the voice gateway via a network; the voice gateway includes:

[0167] The fingerprint generation module 101 collects performance data through the upper-layer switch node, calculates the node health based on the performance data, encapsulates the performance data and node health into a load fingerprint and distributes it to the voice gateway.

[0168] The token generation module 102 calculates the number of capacity tokens based on the node health and performance data. The upper-layer switch node generates the number of capacity tokens. The voice gateway receives and verifies the capacity tokens and then establishes a token pool.

[0169] The scheduling scoring module 103, based on the load fingerprint and token pool, uses a utilization prediction model to predict the future utilization of the upper-layer switch nodes, and calculates a comprehensive scheduling score based on the future utilization through the scheduling scoring model.

[0170] The ready set module 104 filters candidate nodes based on the comprehensive scheduling score and constructs a ready set based on the candidate nodes;

[0171] The call monitoring module 105, when receiving a call request, selects a first node from the ready set for call allocation and monitors the call status;

[0172] The operation management module 106 monitors the inbound call rate and capacity token acquisition rate in real time. When the inbound call rate exceeds a preset multiple of the capacity token acquisition rate, the backpressure mechanism is activated.

[0173] The embodiments of the present invention have been described above. However, the embodiments are 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 more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for intelligent call distribution in a voice gateway, characterized in that, Includes the following steps: The performance data is collected by the upper-layer switch node, the node health is calculated based on the performance data, and the performance data and node health are encapsulated into a load fingerprint and distributed to the voice gateway. The number of capacity tokens is calculated based on the node health and performance data. The upper-layer switch node generates the number of capacity tokens. The voice gateway receives and verifies the capacity tokens and then establishes a token pool. Based on the load fingerprint and token pool, the utilization prediction model predicts the future utilization of the upper-layer switch nodes, and based on the future utilization, the comprehensive scheduling score is calculated through the scheduling scoring model. Candidate nodes are selected based on the comprehensive scheduling score, and a ready set is constructed based on the candidate nodes; When a call request is received, a first node is selected from the ready set for call allocation, and the call status is monitored. Real-time monitoring of inbound call rate and capacity token acquisition rate; activation of backpressure mechanism when inbound call rate exceeds a preset multiple of capacity token acquisition rate.

2. The intelligent call allocation method for a voice gateway according to claim 1, characterized in that, The steps for encapsulating a load fingerprint include: Each upper-layer switch node collects performance data within a preset sliding time window. The performance data includes utilization, call failure rate, and call setup delay. The utilization rate is the number of concurrent calls currently being made by the upper-layer switch node divided by the maximum allowed capacity. The call failure rate is the number of failed calls divided by the total number of call attempts. The call setup delay is the complete time delay from the initiation of each call to the establishment of a connection. The node health score is the sum of the preset utilization rate weight multiplied by the normalized utilization rate score, the preset call failure rate weight multiplied by the normalized call failure rate score, and the preset call setup delay weight multiplied by the normalized call setup delay score. The normalized utilization rate score is 1 minus the utilization rate, the normalized call failure rate score is 1 minus the call failure rate, and the normalized call setup delay score is the negative delay term of the natural constant raised to the power of the delay term, where the delay term is the call setup delay divided by the preset baseline call setup delay.

3. The intelligent call allocation method for a voice gateway according to claim 1, characterized in that, Establishing a token pool includes: The number of capacity tokens is the product of the preset security reduction factor, the remaining capacity ratio, the total capacity limit, and the node health. The remaining capacity ratio is 1 minus the utilization rate. Capacity tokens include a unique identifier, issuance time, validity period, applicable service type, issuing upper-layer switch node identifier, and anti-counterfeiting signature; The voice gateway verifies the anti-counterfeiting signature of the capacity token and filters out expired or soon-to-expire capacity tokens. It then puts the valid capacity tokens that have passed the verification into the token pool. Capacity tokens that are about to expire are those that have not exceeded their expiration date, but whose remaining validity period is less than the preset security threshold.

4. The intelligent call allocation method for a voice gateway according to claim 1, characterized in that, A utilization prediction model is constructed based on Long Short-Term Memory (LSTM) networks. The input to the utilization prediction model is time-series data, which includes historical utilization sequences, time feature codes, load feature sequences, and context feature sequences. The historical utilization sequence includes a sequence of utilization values ​​calculated backward from the current time step by step. The time feature codes include time period identifiers and periodic features. The time period identifier is the current time period, and the periodic features include hourly, daily, and weekly features. The load feature sequence includes historical call failure rate sequences and call setup delay sequences. The context feature sequences include average status and network-wide traffic trends. The average status includes the average utilization and average call failure rate of multiple other upper-layer switch nodes in the same area, and the network-wide traffic trend is the rate of change of total call volume.

5. The intelligent call allocation method for a voice gateway according to claim 4, characterized in that, Calculating the overall scheduling score using the scheduling scoring model includes the following steps: Construct a comprehensive feature vector, which includes a basic feature layer, a derived feature layer, an interaction feature layer, and a strategy feature layer; A scheduling scoring model is constructed based on the random forest algorithm. The scheduling scoring model includes a preset number of decision trees. Each decision tree is trained independently based on a feature subset and a sample subset, with the historical call success rate as the supervision label. The comprehensive feature vector is input into the scheduling scoring model, and the predicted score is output through each decision tree. The arithmetic mean of all predicted scores is calculated as the original score. The original score is standardized and mapped to the [0, 1] interval. Then, the sigmoid function is applied to smooth the score to obtain the comprehensive scheduling score.

6. The intelligent call allocation method for a voice gateway according to claim 1, characterized in that, The steps to construct a ready set include: Upper-layer switch nodes whose comprehensive scheduling scores are greater than the scoring threshold are set as candidate nodes. The scoring threshold is the median of the comprehensive scheduling scores of multiple upper-layer switch nodes multiplied by a preset adjustment coefficient. The candidate nodes are filtered for health to obtain the remaining candidate nodes. The health filtering includes the candidate node’s node health being greater than a preset health threshold and the candidate node’s call setup latency being less than a preset call setup latency threshold. The remaining candidate nodes are sorted in descending order according to the comprehensive scheduling score, and the top-ranked number of remaining candidate nodes are selected to form a candidate set. Send a SIP OPTIONS message and a pre-occupied capacity token request to each upper-layer switch node in the candidate set; filter out the upper-layer switch nodes in the candidate set whose SIP OPTIONS response is 200 OK, whose pre-occupied capacity token confirmation is valid, and whose overall response time is less than the preset response threshold, and form a ready set; the overall response time is the sum of the SIP response time multiplied by the preset response weight and the pre-occupied capacity token response time multiplied by the preset token weight.

7. The intelligent call allocation method for a voice gateway according to claim 6, characterized in that, If the current overall utilization rate is greater than or equal to the preset high utilization rate, the number of candidates is the preset high node number. If the current overall utilization rate is less than or equal to the preset low utilization rate, the number of candidates is the preset low node number. If the current overall utilization rate is between the preset low utilization rate and the preset high utilization rate, the number of candidates is the preset basic node number.

8. The intelligent call distribution method for a voice gateway according to claim 1, characterized in that, Monitoring call status includes: The first node is the upper-layer switch node with the highest comprehensive scheduling score and available capacity tokens. Available capacity tokens are valid capacity tokens that have been verified by the voice gateway, are not expired, are not occupied, and are stored in the token pool. Send a SIP INVITE message to the first node; Monitor the call status within the preset fast rollback trigger threshold. If a 180 Ringing or 200 OK response is received, continue the normal call process. If a timeout occurs or a congestion failure response code is received, immediately execute the rollback. Specifically, this includes sending a capacity token release notification to the original upper-layer switch node to return the occupied capacity token to the available token pool; selecting a second node from the ready set, which is the upper-layer switch node with the second highest comprehensive scheduling score in the ready set and still having available capacity tokens; and resending the SIP INVITE message to the second node.

9. The intelligent call allocation method for a voice gateway according to claim 1, characterized in that, Activating the backpressure mechanism includes: Lower the priority of accepting new calls, send a flow control signal upstream, and activate the micro-queue mechanism; The micro-queue mechanism buffers calls that exceed the immediate processing capacity. The micro-queue uses a first-in-first-out (FIFO) scheduling strategy, and calls in the micro-queue are processed after the capacity is restored.

10. An intelligent call distribution system for a voice gateway, characterized in that, A method for implementing an intelligent call distribution system for a voice gateway as described in any one of claims 1-9; the system includes: a voice gateway, and an upper-layer switch node connected to the voice gateway via a network; the voice gateway includes: The fingerprint generation module collects performance data through the upper-layer switch node, calculates the node health based on the performance data, encapsulates the performance data and node health into a load fingerprint, and distributes it to the voice gateway. The token generation module calculates the number of capacity tokens based on the node health and performance data. The upper-layer switch node generates the number of capacity tokens required for the specified capacity tokens. The voice gateway receives and verifies the capacity tokens and then establishes a token pool. The scheduling scoring module, based on the load fingerprint and token pool, uses a utilization prediction model to predict the future utilization of upper-layer switch nodes, and calculates a comprehensive scheduling score based on the future utilization through the scheduling scoring model. The ready set module filters candidate nodes based on the comprehensive scheduling score and constructs a ready set based on the candidate nodes; The call monitoring module, upon receiving a call request, selects a first node from the ready set for call allocation and monitors the call status. The operation management module monitors the inbound call rate and capacity token acquisition rate in real time. When the inbound call rate exceeds a preset multiple of the capacity token acquisition rate, the backpressure mechanism is activated.

Citation Information

Patent Citations

  • A method and system for reporting incomplete calls from a voice gateway

    CN111404894B

  • Voice guidance system and operation method thereof

    CN114664328A

  • Call task management method and device, electronic equipment and storage medium

    CN119603397A