A shunt decision method and system fusing multi-dimensional dynamic coupling
By employing a multi-dimensional, dynamically coupled traffic diversion decision-making method that combines user attributes, business attributes, and channel performance data, the problem of real-time adaptability and single decision-making dimensions in existing technologies is solved. This enables refined governance and cost control of channel anomalies, and improves system stability and the accuracy and flexibility of traffic diversion decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YULORE INNOVATION TECH
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-23
Smart Images

Figure CN122268874A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and specifically to a diversion decision method and system that integrates multi-dimensional dynamic coupling. Background Technology
[0002] In the fields of financial risk control and service distribution, a key technical challenge is how to intelligently allocate user requests to different service channels while balancing performance, cost, and business needs. With the increasing complexity of financial transactions and rising demands for user experience, channel routing technology has become a core technical means to ensure high system availability, a good user experience, and reasonable cost control.
[0003] Currently, common traffic splitting technologies in the industry mainly include fixed-weight round-robin splitting and load-based dynamic splitting. The former determines the request allocation ratio for each channel through preset static weights, making it simple to implement; the latter monitors the load of each channel and directs requests to channels with lighter loads, thereby improving overall throughput. These methods have been widely used in e-commerce, cloud services, and many other fields.
[0004] In financial risk control scenarios, existing technologies mostly employ fixed-weight strategies for channel triage, with triage weights for different customer dimensions manually configured in the backend. These weights are typically set based on a single metric (such as channel cost or performance). When a channel anomaly is detected (such as request timeout or returning abnormal data) and reaches a preset threshold, the system will directly mark the channel as unavailable and take it offline, completely excluding it from participating in subsequent triage decisions.
[0005] However, this simple strategy of fixed weights plus direct removal has several technical flaws: First, it lacks real-time adaptability and cannot dynamically adjust the traffic allocation ratio based on the real-time performance of the channels. Furthermore, the removal of abnormal channels can cause sudden changes in the traffic allocation ratio of the remaining channels, leading to traffic fluctuations. Second, the abnormal handling mechanism is too crude, with direct removal rather than smooth weight reduction resulting in poor system stability. Finally, the decision-making dimension is too singular, failing to comprehensively consider multiple factors such as user attributes, business value, channel performance, and cost, and thus failing to achieve globally optimal traffic allocation decisions in complex scenarios. Summary of the Invention
[0006] In view of this, the embodiments of this application provide a diversion decision method and system that integrates multi-dimensional dynamic coupling, aiming to solve the technical problems in the prior art such as lack of real-time adaptability, crude anomaly handling mechanism, and single decision dimension.
[0007] In a first aspect, embodiments of this application provide a traffic splitting decision method that integrates multi-dimensional dynamic coupling, comprising the following steps:
[0008] Acquire user attribute data, business attribute data, channel performance data, and channel cost data;
[0009] Based on the channel performance data, channel anomaly index data is determined. Based on the channel anomaly index data, anomaly weighting coefficient is calculated, and circuit breaker status detection is performed to obtain the circuit breaker status. Based on the anomaly weighting coefficient and the circuit breaker status, anomaly management strategy is generated. The channel anomaly index data includes the channel error rate and timeout rate.
[0010] Extract the basic cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic cost information, the dynamic premium factor, the user attribute data, and the business attribute data.
[0011] Calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies.
[0012] Convert the channel rating into a traffic splitting probability;
[0013] Based on the real-time call counts of each channel and the effective cost coefficient, the budget ratio is determined, the budget ratio is evaluated to obtain the budget status, and cost control parameters are determined based on the budget status.
[0014] Based on the traffic diversion probability, a target channel is selected, a processing request is sent to the target channel, and a response result is received from the target channel after responding to the processing request. The channel performance data or the channel anomaly indicator data is updated according to the response result.
[0015] As an improvement to the above solution, the acquisition of user attribute data, business attribute data, channel performance data, and channel cost data includes:
[0016] The user identifier is obtained through the user authentication interface, and the attribute data corresponding to the user identifier is queried from the user configuration center to generate user attribute data, which includes VIP level, historical complaint rate and abnormal sensitivity.
[0017] The business parameters of the current request are parsed, and the order value, transaction type and risk level are extracted from the business parameters. Combined with the business attribute parsing rules that match the business scenario, business attribute data is generated.
[0018] The request latency, success rate, accuracy, and stability metrics for each channel are calculated using a sliding time window to generate channel performance data.
[0019] Obtain basic cost information for each channel and monitor the real-time load status of each channel. Generate channel cost data based on the basic cost information and the real-time load status, whereby the real-time load status includes the distribution of request volume and response time.
[0020] As an improvement to the above solution, the steps include determining channel anomaly index data based on the channel performance data, calculating anomaly weighting coefficients based on the channel anomaly index data, performing circuit breaker status detection to obtain the circuit breaker status, and generating anomaly management strategies based on the anomaly weighting coefficients and the circuit breaker status, including:
[0021] According to the preset time window, channel performance data is obtained. Based on the number of erroneous requests, timeout requests, and total requests in the channel performance data, the error rate and timeout rate of each channel are calculated, and channel anomaly indicator data is generated.
[0022] The error rate and timeout rate of each channel are weighted and calculated to obtain the abnormal weighting coefficient of each channel. The abnormal weighting coefficient is used to control the degree of influence of the error rate and the timeout rate on the weighting.
[0023] When the number of consecutive errors indicated by the channel anomaly indicator data is greater than a preset error number threshold, or the error rate indicated by the channel anomaly indicator data within a specified time window is greater than a preset error rate threshold, the channel status is triggered to be marked as circuit breaker status.
[0024] When it is detected that the current channel status is in the circuit-broken state and the circuit-broken time exceeds the preset recovery time threshold, the channel status is updated to the half-open state to generate the circuit breaker status.
[0025] The abnormal weighting coefficient of the channel in the circuit breaker state is determined as the first value. The channel in the half-open state is allocated a preset proportion of detection traffic. The abnormal weighting coefficient is used for the channel in the normal state to generate an abnormal management strategy.
[0026] As an improvement to the above solution, the channel performance data includes real-time load data, error rate, and response time; the step of extracting the basic channel cost information of each channel from the channel cost data, determining the dynamic premium factor of each channel based on the channel performance data, and determining the effective cost coefficient of each channel based on the basic channel cost information, the dynamic premium factor, the user attribute data, and the business attribute data includes:
[0027] Extract the basic channel cost information for each channel from the channel cost data;
[0028] The dynamic premium factor for each channel is obtained by weighting the real-time load data, the error rate calculated based on channel performance data, the response time, and the preset maximum load data.
[0029] Based on the aforementioned channel basic cost information and the aforementioned dynamic premium factor, the actual cost coefficient of each channel is calculated;
[0030] Based on the user attribute data, determine the current user weight of the current request; based on the business attribute data, determine the current business weight of the current request; and based on the sum of the current user weight and the current business weight, determine the request value.
[0031] When the requested value exceeds a preset value threshold, the effective cost coefficient for each channel is determined based on the actual cost coefficient and the preset cost discount factor.
[0032] Alternatively, when the requested value is lower than the value threshold, the actual cost coefficient may be used as the effective cost coefficient.
[0033] As an improvement to the above solution, the step of calculating user weights based on user attribute data, calculating business weights based on business attribute data, calculating performance scores based on channel performance data, and determining channel scores for each channel based on user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies includes:
[0034] User-related attributes are extracted from the user attribute data, and the user-related attributes are weighted to obtain user weight values.
[0035] Extract business-related attributes from the business attribute data, and perform weighted calculations on the business-related attributes to obtain business weight values;
[0036] The performance indicators of each channel are extracted from the channel performance data, and the performance indicators are weighted to obtain the performance score of each channel.
[0037] The channel score for each channel is calculated using the user weight, the business weight, the performance score, the effective cost coefficient, the anomaly reduction indicated by the anomaly management strategy, and a preset saturation index. The saturation index is used to indicate the non-linear sensitivity of the user weight, the business weight, the performance score, and the effective cost coefficient to the channel score.
[0038] As an improvement to the above solution, the step of converting the channel score into a traffic splitting probability includes:
[0039] Based on preset temperature parameters, the channel score values are converted into an initial probability distribution;
[0040] Channels whose probabilities in the initial probability distribution exceed the preset maximum allocation ratio are selected, the selected channels are truncated, and the remaining probabilities are renormalized to generate an adjusted probability distribution.
[0041] Using a preset ε-greedy strategy, the adjusted probability distribution is used with a specified first probability, and a channel is randomly selected from a channel pool with a cost lower than a preset threshold with a second probability corresponding to the first probability, thereby generating a diversion probability.
[0042] As an improvement to the above solution, the step of determining the budget ratio based on the real-time call counts of each channel and the effective cost coefficient, performing a status assessment on the budget ratio to obtain the budget status, and determining cost control parameters based on the budget status includes:
[0043] Based on the aforementioned effective cost coefficient, determine the cost per transaction;
[0044] Based on the real-time call count of each channel, the cost per call, and the preset budget limit, calculate the total consumption cost and budget ratio for the current period;
[0045] When the budget ratio is lower than a preset first threshold, the budget status is marked as normal; when the budget ratio is between the first threshold and a preset second threshold, the budget status is marked as alert; when the budget ratio is higher than the second threshold, the budget status is marked as emergency. The first threshold is less than the second threshold.
[0046] In the normal budget state, the default parameters are maintained; in the alert state, the cost weighting coefficient is increased, the exploration coefficient is decreased, and the high-value exemption threshold is increased; in the emergency state, the cost weighting coefficient is increased, the exploration coefficient is set to 0, and the high-value exemption threshold is limited, in order to determine the cost control parameters.
[0047] As an improvement to the above solution, after determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy, the following is added:
[0048] Based on the channel score of each channel, a set of orthogonal basis functions are selected, which are used to characterize the candidate traffic splitting strategy;
[0049] Based on the channel score and the pre-acquired historical traffic distribution data, the key objectives of the candidate traffic distribution strategy are determined. The key objectives include performance objectives, cost objectives, load measurement objectives, and strategy stability objectives.
[0050] Based on preset current business priority data, determine the target weight of the key objective;
[0051] Based on the target weights, the performance target, the cost target, the load measurement target, and the strategy stability target are weighted and calculated to obtain the energy functional of the candidate traffic splitting strategy.
[0052] Any candidate splitting strategy is represented as a linear combination of the basis functions. The minimization problem of the energy functional is projected onto the subspace spanned by the basis functions using a preset Galerkin algorithm. An optimized splitting strategy is generated by iteratively calculating the residual, projection, line search, and coefficient update. The residual is determined by the current splitting strategy.
[0053] Based on the optimized traffic splitting strategy, the actual traffic splitting effect indicated by the response result, and the preset error tolerance threshold, the error between the actual effect of each local area and the optimized traffic splitting strategy is calculated.
[0054] For regions where the error is less than a preset first error threshold, the weight coefficients of the corresponding basis functions are fine-tuned; for regions where the error is greater than the first error threshold but less than a preset second error threshold, the corresponding basis functions are subdivided; and for regions where the error is greater than the preset first error threshold, the basis functions are reconstructed to obtain adaptively adjusted basis functions.
[0055] Based on the channel score and the optimized traffic splitting strategy, the score adjustment amount for each channel is calculated, and the enhanced traffic splitting score is obtained based on the channel score and the score adjustment amount.
[0056] As an improvement to the above solution, after obtaining user attribute data, business attribute data, channel performance data, and channel cost data, the following steps are included:
[0057] Based on the user attribute data, the business attribute data, the channel performance data, and the channel cost data, a feature space and a feature mapping function are constructed.
[0058] Based on the feature space and the pre-acquired historical decision data, the traffic diversion decision problem is represented as a high-dimensional tensor, where each dimension of the high-dimensional tensor corresponds to a decision factor in the feature space, and the dimensions include user dimension, business dimension, channel dimension, performance dimension and cost dimension;
[0059] Based on the historical decision data and the feature mapping function, the factor correlation between each decision factor is calculated, and a dependency graph is constructed based on the factor correlation. The factor correlation includes one of mutual information and conditional entropy. The nodes in the dependency graph represent the decision factors, and the edge weights in the dependency graph represent the strength of the factor correlation.
[0060] Based on the dependency graph, a tree structure is generated by using a preset tree structure optimization algorithm to minimize the overall tensor rank and group decision factors with a correlation strength greater than a preset strength threshold into adjacent nodes.
[0061] Using a preset alternating least squares algorithm, the high-dimensional tensor is split into multiple low-rank tensor cores according to the tree structure, and the core connection information is determined based on the position of the low-rank tensor cores in the tree structure and the association dimension of the low-rank tensor cores.
[0062] As an improvement to the above solution, the step of determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy further includes:
[0063] Using the feature mapping function, the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy are mapped to the feature space to construct a real-time feature vector;
[0064] Based on the core connectivity information, locate the low-rank tensor core in the tree structure that is related to the response result;
[0065] Based on the real-time feature vector and the located low-rank tensor core, a preset tensor shrinking algorithm is used to calculate from the leaf to the root along the tree structure. Each component of the real-time feature vector is shrunk with the corresponding dimension of the low-rank tensor core. Information is passed from bottom to top according to the tree structure and the scoring vector is obtained at the root node to obtain the channel scoring value.
[0066] Secondly, embodiments of this application also provide a traffic diversion decision system that integrates multi-dimensional dynamic coupling, including:
[0067] The multi-dimensional data acquisition module is used to acquire user attribute data, business attribute data, channel performance data, and channel cost data.
[0068] The channel anomaly status processing module is used to determine channel anomaly index data based on the channel performance data, calculate anomaly weighting coefficient based on the channel anomaly index data, perform circuit breaker status detection to obtain the circuit breaker status, and generate anomaly management strategy based on the anomaly weighting coefficient and the circuit breaker status. The channel anomaly index data includes the channel error rate and timeout rate.
[0069] The dynamic cost coefficient calculation module is used to extract the basic cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic cost information of the channel, the dynamic premium factor, the user attribute data and the business attribute data.
[0070] The traffic distribution scoring calculation module is used to calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, the business weights, the performance scores, the effective cost coefficient, and the anomaly management strategy.
[0071] The traffic diversion probability generation module is used to convert the channel score into a traffic diversion probability;
[0072] The budget cost control module is used to determine the budget ratio based on the real-time call count of each channel and the effective cost coefficient, to evaluate the budget ratio to obtain the budget status, and to determine the cost control parameters based on the budget status.
[0073] The request execution module is used to select a target channel based on the traffic splitting probability, send a processing request to the target channel, receive the response result returned by the target channel after responding to the processing request, and update the channel performance data or the channel abnormality indicator data according to the response result.
[0074] This invention integrates multi-dimensional information such as user attributes, business attributes, channel performance, and cost data, and employs a dynamically coupled decision-making mechanism to achieve more intelligent and efficient traffic allocation decisions. By introducing an anomaly weighting coefficient and a circuit breaker mechanism, this invention achieves refined management of channel anomalies, improving system stability. It also introduces a dynamic premium factor and a high-value request exemption mechanism, enabling refined cost control. Furthermore, by integrating multi-dimensional factors through a nonlinear decision formula and combining it with a multi-level probability adjustment mechanism, this invention improves the accuracy and flexibility of traffic allocation decisions. In addition, this invention introduces a budget-aware cost control strategy to ensure strict control over cost expenditures. Attached Figure Description
[0075] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1A flowchart illustrating a traffic splitting decision method integrating multi-dimensional dynamic coupling, provided as an embodiment of this application;
[0077] Figure 2 This is a schematic diagram of a diversion decision system that integrates multi-dimensional dynamic coupling, provided as an embodiment of this application. Detailed Implementation
[0078] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0079] like Figure 1 As shown in the figure, this application provides a diversion decision method that integrates multi-dimensional dynamic coupling, which includes the following steps S1 to S7.
[0080] S1. Obtain user attribute data, business attribute data, channel performance data, and channel cost data.
[0081] In this invention, user attribute data refers to characteristic information related to the request initiator. User identifiers (such as user IDs or accounts) are obtained through a user authentication interface, and then detailed attributes corresponding to these identifiers are queried from the user configuration center. These attributes typically include VIP level (reflecting user value tier), historical complaint rate (reflecting user sensitivity), and anomaly sensitivity (the user's tolerance for service anomalies). For new users, default attribute values are assigned and they are marked as pending observation. The purpose of collecting user attribute data is to identify high-value users and provide a basis for subsequent differentiated services.
[0082] Business attribute data reflects the business characteristics and importance of the current request. The system parses the business parameters carried in the current request to extract key information such as order value (transaction amount), transaction type (e.g., payment, query, transfer), and risk level (transaction risk assessment result). Simultaneously, it selects matching business attribute parsing rules based on the business scenario to ensure that only relevant and effective attributes are obtained. For example, in a payment scenario, the order amount has a higher weight; while in a risk control scenario, the risk level may be more important. The collection of business attribute data enables the system to distinguish between critical and general business transactions, providing a more reliable service channel for important transactions.
[0083] Channel performance data is a quantitative description of the real-time operational status of each service channel. Employing a sliding time window technique, it continuously calculates core performance indicators for each channel, including request latency (the time interval from sending a request to receiving a response), success rate (the proportion of successful requests out of total requests), accuracy (the proportion of requests returning correct results out of total successful requests), and stability indicators (the degree of performance fluctuation). The sliding time window is a dynamic data statistics method that considers only data from the most recent period (e.g., 5 minutes, 30 minutes, 24 hours), making performance evaluation more reflective of the current state of the channel. This multi-timescale performance data constitutes a "performance profile" of the channel, providing an objective basis for traffic allocation decisions.
[0084] Channel cost data includes economic cost information generated by using each channel. It acquires basic cost information for each channel, such as cost parameters under per-use, per-traffic, or hybrid billing models. Simultaneously, it monitors the real-time load status of each channel, including request volume (number of requests per unit time) and response time distribution (the proportion of requests in different response time intervals). Load status reflects the channel's activity level, indirectly affecting service quality and cost-effectiveness. By combining static cost parameters and dynamic load data, a comprehensive assessment of the actual costs and potential risks of using a specific channel can be achieved.
[0085] S2. Based on the channel performance data, determine the channel anomaly index data, calculate the anomaly weighting coefficient based on the channel anomaly index data, and perform circuit breaker status detection to obtain the circuit breaker status. Based on the anomaly weighting coefficient and the circuit breaker status, generate an anomaly management strategy. The channel anomaly index data includes the channel error rate and timeout rate.
[0086] First, it's necessary to determine the channel anomaly metrics. Anomaly metrics are key parameters for quantifying channel health, primarily including two core indicators: error rate and timeout rate. Channel performance data is acquired according to a preset time window (e.g., the last 5 minutes), and the error rate and timeout rate for each channel are calculated based on the number of erroneous requests, timeout requests, and total requests. The error rate is the proportion of requests returning incorrect results out of the total requests, while the timeout rate is the proportion of requests whose response time exceeds a preset threshold out of the total requests. These two metrics directly reflect the stability and reliability of the channel and are the foundational data for anomaly detection.
[0087] Next, the anomaly weighting coefficient is calculated. This coefficient is a smooth adjustment mechanism used to dynamically adjust the weight of a channel in traffic allocation decisions based on the severity of the anomaly. The error rate and timeout rate of each channel are weighted and calculated to generate a coefficient value typically between 0 and 1. The weighting parameters in the calculation determine the degree of influence of the error rate and timeout rate on the final weighting coefficient and can be adjusted according to business characteristics. For example, for time-sensitive businesses, the weight of the timeout rate may be higher; while for businesses emphasizing data accuracy, the weight of the error rate is greater. The design philosophy of the anomaly weighting coefficient is "progressive response," which can smoothly adjust the traffic allocation strategy according to the severity of the anomaly, avoiding system turbulence caused by sudden traffic changes.
[0088] Next, circuit breaker status checks are performed. A circuit breaker is a design pattern originating from electrical engineering used to prevent system cascading failures. It monitors the health of channels and "breaks the circuit" when a serious anomaly is detected, preventing requests from continuing to be sent to the faulty channel. Specifically, it checks whether the number of consecutive errors on the channel exceeds a preset error threshold (e.g., 5 consecutive errors) or whether the error rate within a specified time window exceeds a preset error rate threshold (e.g., an error rate exceeding 50% within 30 seconds). When these conditions are met, the channel status is marked as "frozen," suspending new requests to that channel. When the channel is in a frozen state and the frozen time exceeds a preset recovery time threshold (e.g., 60 seconds), the channel status is updated to "half-open," allowing a small number of test requests to pass through to probe whether the channel has returned to normal. This state machine-based design ensures that the system can automatically isolate faults and attempt to restore service at appropriate times.
[0089] Finally, an anomaly management strategy is generated based on the anomaly weighting coefficient and circuit breaker status. This strategy is a complete channel access control scheme that determines how traffic is allocated under different anomaly conditions. For channels in a circuit-breaker-broken state, the system sets their anomaly weighting coefficient to an extremely low value (e.g., a first value of 0.01), effectively excluding them from normal traffic distribution. For channels in a half-open state, a preset proportion (e.g., 1%) of probe traffic is allocated to verify the channel status. For channels in a normal state, the previously calculated anomaly weighting coefficient is used to achieve smooth performance-based adjustments. This multi-level anomaly management strategy combines "flexible weighting" and "hard circuit breaker" mechanisms, capable of handling both minor fluctuations and severe faults, significantly improving the system's resilience and adaptability.
[0090] Specifically, in calculating the abnormal weighting coefficient, to avoid channel scores dropping directly to zero or experiencing drastic fluctuations due to individual indicator fluctuations, this embodiment sets a lower limit for the weighting coefficient. The specific calculation formula is as follows:
[0091]
[0092] Here, w1 and w2 are the penalty weights for error rate and timeout rate, respectively. The function max(0.1,…) ensures that the weighting coefficient will not fall below 0.1 (the minimum guarantee). The technical effect of this design is that even if a channel performs poorly, the system still retains its extremely low probability of traffic diversion (rather than complete disconnection), allowing it to maintain a small amount of 'probe traffic'. This enables the system to quickly sense and automatically restore its weight once the channel recovers on its own through feedback from the probe traffic, achieving a closed loop of 'flexible weighting' and 'self-healing recovery', which is smoother than the traditional direct circuit breaker mechanism.
[0093] S3. Extract the basic channel cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic channel cost information, the dynamic premium factor, the user attribute data and the business attribute data.
[0094] First, the system extracts the basic cost information for each channel from the channel cost data. Basic cost refers to the cost per use of a channel under standard conditions, typically set based on contract terms, historical call costs, or operational strategies; it is a relatively stable parameter. Basic cost may employ different billing models, such as per-use (fixed cost per call), per-traffic (charge based on data volume), or a hybrid billing model (basic cost plus variable costs). The system standardizes this cost information for subsequent calculations.
[0095] Next, dynamic premium factors for each channel are determined based on channel performance data. A dynamic premium factor is a dynamically adjusted coefficient reflecting the current load and performance status of a channel, used to convert potential performance risks into quantifiable cost increases. The dynamic premium factor is calculated by weighting real-time load data (the ratio of current request volume to processing capacity), error rate (the percentage change in current error rate relative to the baseline), response time (the percentage change in current response time relative to the baseline), and a preset maximum load data (the theoretical processing limit of the channel). When the channel load approaches its limit, or the error rate or response time increases significantly, the premium factor increases accordingly, reflecting the potential risk cost of using the channel. This "risk pricing" mechanism allows the system to detect performance bottlenecks in advance and proactively adjust traffic allocation before problems escalate.
[0096] Then, based on the channel's basic cost information and dynamic premium factor, the actual cost coefficient for each channel is calculated. The actual cost coefficient is the product of the basic cost and the dynamic premium factor, comprehensively reflecting the channel's nominal cost and current usage risk. This dynamic cost model breaks through the limitations of traditional fixed cost calculation, making cost assessment closer to actual operating conditions, and is particularly suitable for scenarios with large load fluctuations.
[0097] Next, a mechanism for exempting high-value requests is implemented. The user weight of the current request is determined based on user attribute data, and the business weight is determined based on business attribute data. These two values are then added together to obtain the total request value. The request value reflects a comprehensive assessment of the business importance and user importance of the current transaction. When the request value exceeds a preset value threshold, the system considers it a "high-value request" and prioritizes its service quality. In this case, a discounted effective cost coefficient is calculated based on the actual cost coefficient and a preset cost discount factor (a value less than 1). The cost discount factor is essentially a "cost concession rate," allowing the system to provide a higher-quality service channel for important requests, even if their costs are higher. Conversely, when the request value is below the value threshold, the actual cost coefficient is used directly as the effective cost coefficient, and no cost discount is provided. This differentiated cost handling strategy ensures a balance between cost control and service quality, providing better protection for important business operations.
[0098] In this step, a dynamic premium factor is introduced when calculating dynamic costs, aiming to map the real-time load pressure of the channel into a virtual cost increment. The calculation of this dynamic premium factor does not rely on lagging growth rate indicators, but is based on a weighted sum of real-time status indicators. The specific calculation formula is as follows:
[0099]
[0100] Where k1-k3 are adjustable weight coefficients.
[0101] The dynamic premium factor calculated using the above formula can reflect the degree of channel congestion in real time. When the premium factor is greater than 1, it is multiplied by the channel's base cost, artificially increasing the perceived cost of the channel in the decision-making system. This allows it to play a role in the inhibition term of the core formula, proactively avoiding potential performance risk areas.
[0102] Furthermore, the determination of the effective cost coefficient involves a 'high-value exemption' decision logic based on business value, rather than a simple attribute weighting. The specific steps are as follows:
[0103] First, calculate the total value of the current request, that is:
[0104] Total value = User value + Business value.
[0105] Then, the total value is compared with the preset exemption threshold (T). h Compare:
[0106] If total value > T h The request is determined to be high-value, triggering the exemption mechanism. In this case, the effective cost coefficient = actual cost coefficient × δ. Here, δ is a preset discount factor (0 < δ < 1, e.g., 0.6), used to mitigate the inhibitory effect of cost on scoring and ensure that critical business operations are matched with high-performance channels.
[0107] If the total value is less than or equal to Th: it is considered a normal request and no waiver is triggered. In this case, the effective cost coefficient equals the actual cost coefficient (i.e., the product of the base cost and the dynamic premium factor), and the cost control strategy is strictly enforced.
[0108] The resulting effective cost coefficient will be used in subsequent traffic allocation and scoring calculations, influencing the final probability of channel selection. This dynamic, multi-factor cost calculation method allows for differentiated service options for requests of varying value, while ensuring overall cost control.
[0109] S4. Calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies.
[0110] First, user weights are calculated based on user attribute data. User weights are quantitative indicators that measure a user's importance and directly impact the personalized configuration of service quality. Relevant user attributes are extracted from the user attribute data, including VIP level (reflecting user value level), historical complaint rate (reflecting user complaint tendency), and anomaly sensitivity (reflecting user tolerance for service anomalies). These attributes are then weighted to generate a standardized user weight (typically between 0 and 1). The weighting configuration in the calculation can be adjusted according to business characteristics; for example, financial institutions may place more emphasis on VIP level, while content services may focus more on user anomaly sensitivity. The introduction of user weights enables the system to identify important users and provide them with a better service experience.
[0111] Next, business weights are calculated based on business attribute data. These weights quantify the business importance of the current request and are another key basis for differentiated services. Business-related attributes are extracted from the data, including order value (transaction amount), transaction type (e.g., payment, inquiry, transfer), and risk level (transaction risk assessment result). Standardized business weights are then generated through weighted calculations. The weights of each attribute may differ in different business scenarios. For example, in payment scenarios, order value may have a higher weight; while in security-sensitive scenarios, risk level may be more important. The calculation of business weights enables the system to distinguish between core and general business transactions, providing more reliable service channels for critical transactions.
[0112] Then, performance scores are calculated based on channel performance data. These scores reflect the service quality level of each channel and are an important reference indicator for channel selection. Performance metrics for each channel are extracted from the performance data, including success rate (the percentage of requests successfully completed), response time (the time required to process a request), accuracy (the percentage of correct results returned), and stability (the degree of fluctuation in performance metrics). These metrics are then weighted to generate standardized performance scores for each channel. The weighting of performance metrics can be adjusted according to business needs; for example, time-sensitive businesses may prioritize response time, while businesses with high data accuracy requirements may focus more on accuracy. The calculation of performance scores allows for an objective assessment of the service capabilities of each channel and the identification of high-quality channels.
[0113] Finally, user weights, business weights, performance scores, effective cost coefficients, and anomaly reductions indicated by anomaly management strategies are integrated into a unified decision formula to calculate the channel score for each channel. This decision formula employs a non-linear design, adjusting the influence of each factor on the final score through a preset saturation index. The saturation index is a non-linear parameter used to control the sensitivity of each factor to changes in the channel score. When the saturation index is greater than 1, the influence of the corresponding factor increases, amplifying small differences; when the saturation index is less than 1, the influence decreases, compressing large differences. By reasonably setting the saturation index, the preference for decision-making can be precisely controlled. For example, a higher user weight saturation index can be set to give VIP users significant priority, or a lower cost coefficient saturation index can be set to reduce the impact of cost differences.
[0114] It should be noted that in this embodiment, the determination of the channel score for each channel is not achieved through a simple linear weighted summation. Instead, a nonlinear decision formula incorporating incentive, inhibition, and adjustment terms is constructed to achieve multi-dimensional dynamic balance. Specifically, the formula for calculating the channel score is as follows:
[0115]
[0116] The numerator consists of incentive components: the sum of the user's weight and the business's weight represents the total value of the current request, while the performance score represents the service quality of the channel. The indices α and β are preset saturation indices (or sensitivity coefficients) used to adjust the non-linear response of the score to value and performance. For example, when α > 1, the positive impact of high-value requests on the score is amplified.
[0117] The denominator is a suppression term: the higher the effective cost coefficient, the lower the final score, reflecting the cost control objective. The constant λ (e.g., 0.01) is a regularization parameter used to prevent calculation anomalies where the denominator is zero due to zero cost. The exponent γ is used to control the system's sensitivity to cost changes.
[0118] The abnormal weighting coefficient is an adjustment item: this coefficient is a value between 0 and 1, which directly reduces the weight of the final score and is used to quickly and smoothly reduce the probability of a channel being selected when abnormal signs appear.
[0119] Through this nonlinear formula, the system can ensure that low-cost channels are prioritized when they perform well (small denominator, large numerator); while when dealing with high-value business, even if the cost is slightly higher, a higher score can still be obtained due to the incentive effect of the value weight in the numerator, thus achieving intelligent decision-making.
[0120] S5. Convert the channel rating value into a traffic diversion probability.
[0121] First, based on preset temperature parameters, the channel ratings are converted into an initial probability distribution. The Softmax function is used for this conversion; it's a common normalization method in machine learning that can transform any real value into a probability distribution. The temperature parameter is a key adjustment factor in the Softmax function, controlling the "smoothness" of the generated probability distribution. A lower temperature parameter produces a "sharp" distribution, giving high-rated channels an extremely high selection probability, exhibiting a strong "winner-takes-all" effect; a higher temperature parameter produces a smoother distribution, allowing channels with smaller rating differences to also have a reasonable probability of selection, increasing the system's exploratory nature. Setting the temperature parameter requires a balance between "utilizing" known high-quality channels and "exploring" potentially better channels, and can be dynamically adjusted according to the system's operational stage and business needs.
[0122] Next, capacity limiting and renormalization are performed. To prevent excessive traffic concentration on a single channel, a maximum allocation ratio is set for each channel. Channels whose probabilities exceed the upper limit in the initial probability distribution are selected, and their probabilities are truncated to the upper limit. Then, the remaining probabilities are renormalized to ensure that the sum of all probabilities is still 1. This capacity control mechanism has three important functions: first, it prevents single point of failure risks by avoiding all requests being concentrated on a single channel; second, it ensures sufficient redundancy and elasticity, enabling rapid switching in the event of a major channel failure; and third, it promotes load balancing, preventing performance degradation due to overload of high-performance channels. Capacity limiting parameters can be configured based on the actual processing capacity of the channel, the system's reliability requirements, and the business's risk tolerance.
[0123] Then, an ε-greedy strategy is applied to balance exploration and exploitation. ε-greedy is a commonly used policy selection method in reinforcement learning. Its core idea is to select the currently evaluated optimal option (exploitation) with a primary probability (1-ε), and randomly select other options (exploration) with a small probability ε. A channel is selected using an adjusted probability distribution with a specified first probability (1-ε), and a channel is randomly selected from a pool of channels with costs below a preset threshold with a corresponding second probability ε. The exploration mechanism allows the system to continuously try various channels, collect more performance data, and avoid suboptimal decisions due to inaccurate initial evaluations or environmental changes. In particular, limiting the exploration scope to the set of lower-cost channels reduces the financial risk of the exploration process and ensures that costs remain controllable even during the exploration phase. The ε value can be adjusted according to the system's learning stage; a higher value can be set initially to increase exploration, while a lower value can be set during the stable period to focus on exploiting known high-quality channels.
[0124] Through the synergistic effect of the above three mechanisms, a final diversion probability distribution is generated, reflecting both the priority selection based on multidimensional scoring and incorporating capacity control and exploration mechanisms, making diversion decisions both efficient and robust. Compared with deterministic strategies, this probabilistic diversion strategy is more flexible and adaptable, capable of continuous optimization in complex and ever-changing environments, achieving a long-term balance between system performance and cost.
[0125] In one embodiment, during the process of converting channel rating values into traffic splitting probabilities, this embodiment uses a Softmax function with a temperature parameter (Temperature, T) for normalization. The calculation formula is as follows:
[0126]
[0127] Among them, P initial (i) represents the initial probability. The temperature parameter T plays a crucial role in balancing 'exploration' and 'exploitation' in this system.
[0128] When the T value is small (close to 0): the probability distribution becomes more 'sharp', and the system tends to 'winner-takes-all', that is, the channel with a slightly higher score will get a very high probability of selection (biased to exploit).
[0129] When the T value is large: the probability distribution becomes smoother or more uniform, and channels with lower scores can also obtain a considerable probability of selection, increasing the randomness of the system (biased towards exploration).
[0130] The system can dynamically adjust the T value based on the current budget status or business stage. For example, when the budget is sufficient, the T value can be increased to discover potential high-quality new channels.
[0131] S6. Based on the real-time call counts of each channel and the effective cost coefficient, determine the budget ratio, evaluate the budget ratio to obtain the budget status, and determine the cost control parameters based on the budget status.
[0132] First, the cost per request is determined based on the effective cost coefficient. The cost per request refers to the estimated cost of processing a single request using a specific channel, determined by the effective cost coefficient calculated in the previous steps. This cost figure will be used for subsequent total cost statistics and budget ratio calculations, serving as the foundational data for cost control.
[0133] Next, based on the real-time call count, cost per call, and preset budget cap for each channel, the total cost and budget ratio for the current period are calculated. Total cost is the cumulative cost generated by all channel calls within the current period (e.g., today, month), while the budget ratio is the ratio of total cost to the preset budget cap, reflecting the progress of budget usage. The budget ratio is a key financial health indicator that directly impacts the system's cost control strategy. The preset budget cap is typically determined by the business department based on financial planning and represents the maximum allowable cost expenditure for the system within a specific period.
[0134] Then, the current budget status is assessed based on the budget ratio. The budget status is categorized into three types: when the budget ratio is below a preset first threshold (e.g., 70%), it is marked as "normal budget status"; when the budget ratio is between the first threshold and a preset second threshold (e.g., 90%), it is marked as "alert status"; and when the budget ratio is above the second threshold, it is marked as "emergency status". This tiered management mechanism allows the system to take control measures of varying intensities based on budget consumption, ensuring business continuity while strictly controlling cost expenditures.
[0135] Finally, the system determines cost control parameters based on the budget status. Different parameter adjustment strategies are adopted under different budget statuses: Under normal budget status, default parameters are maintained without special adjustments, ensuring that routing decisions are primarily based on performance and business needs; under alert status, the cost weighting coefficient is increased (giving cost factors a greater weight in routing decisions), the exploration coefficient is decreased (reducing uncertain choices to control potential high-cost risks), and the high-value exemption threshold is raised (reducing special cases of high-cost services), proactively controlling cost growth; under emergency status, the cost weighting coefficient is significantly increased, the exploration coefficient is set to 0 (completely stopping exploration and focusing on known low-cost options), and the high-value exemption threshold is strictly limited, implementing the strictest cost control measures to ensure the budget is not exceeded.
[0136] The cost weighting coefficient is a parameter used to adjust the influence of the effective cost coefficient in channel scoring calculations. The cost weighting coefficient ranges from 0 to 1, with a higher value indicating a greater weight of cost factors in the scoring. The value of the cost weighting coefficient varies under different budget conditions.
[0137] Under normal budget conditions, the cost weighting coefficient remains at its default value, typically set to 0.3 to 0.5;
[0138] Under alert conditions, the cost weighting coefficient increases by 20% to 50%, such as from 0.4 to 0.5 or 0.6;
[0139] In an emergency, the cost weighting factor increases significantly by 50% to 100% or more, such as from 0.4 to 0.6 or 0.8.
[0140] In the channel scoring formula, the effective cost coefficient is weighted by a cost weighting coefficient before being used in the scoring calculation. Specifically, the adjusted formula for calculating the effective cost coefficient is as follows:
[0141] Adjusted effective cost coefficient = Effective cost coefficient × (1 + Cost weight coefficient)
[0142] The adjusted effective cost coefficient is used in the denominator of the channel score calculation formula.
[0143] This state-based parameter adjustment mechanism can automatically adjust decision preferences according to changes in budget consumption. When the budget is sufficient, it prioritizes service quality and user experience, and gradually shifts towards cost-effectiveness when the budget is tight, achieving intelligent decision optimization under financial constraints. Budget-aware cost control not only enables the system to strictly adhere to financial discipline, but also avoids drastic fluctuations in service quality that may result from sudden extreme measures through gradual strategy adjustments, ensuring a smooth transition between cost control and service quality.
[0144] S7. Select a target channel based on the diversion probability, send a processing request to the target channel, and receive the response result returned by the target channel after responding to the processing request. Update the channel performance data or the channel abnormality indicator data according to the response result.
[0145] First, the target channel is selected based on the traffic distribution probability. A probability sampling method is used to select a specific channel as the processing channel for the current request based on the traffic distribution generated in the previous step. A common sampling method is Roulette Wheel Selection: a random number in the interval [0,1) is generated, and then the cumulative probability distribution of the channels is traversed, selecting the channel whose cumulative probability first exceeds that random number. This probability-based selection mechanism ensures that the channel selection result is proportional to its score and adjusted probability, while maintaining a certain degree of randomness and avoiding overly mechanical decision-making.
[0146] Next, a processing request is sent to the selected target channel. Before sending the request, appropriate request parameters for the target channel need to be prepared, including authentication information, business data, and request format. Since different channels may have different interface specifications, necessary format conversions and parameter adaptations should be performed according to the channel characteristics to ensure that the request can be processed correctly. Simultaneously, a timer is started to monitor the request response time, providing data support for subsequent performance evaluation.
[0147] Then, it receives the response results returned after receiving the response request from the target channel. It parses the response content to determine whether the request was successfully completed and whether the response meets the expected format and content requirements. For successful requests, it extracts the valid results; for failed requests, it records information such as the error type and error code to provide a basis for anomaly analysis. Simultaneously, it calculates the actual response time of the request as an important performance evaluation metric.
[0148] Finally, channel performance data or channel anomaly indicator data is updated based on the response results. Information such as the execution result (success / failure), response time, and error type (if any) of this request are integrated into the corresponding dataset. For successful requests, the success rate, response time distribution, and accuracy in the channel performance data are primarily updated; for failed requests, in addition to updating performance data, error rate and error type distribution in the channel anomaly indicator data are also updated. This updated data will be used for the next round of traffic allocation decision calculations, forming a data-driven closed-loop optimization mechanism.
[0149] The core value of the request execution and feedback process lies in connecting theoretical decisions with actual results. By continuously collecting and analyzing execution results, it verifies the effectiveness of traffic diversion decisions, detects discrepancies between model predictions and actual outcomes, updates channel performance profiles in real time to ensure decisions are based on the latest data, quickly identifies and responds to channel anomalies to improve system resilience, accumulates historical data to provide a foundation for long-term optimization and pattern recognition, and forms a self-regulating mechanism to adapt to environmental changes and business evolution. Through this closed-loop design based on real-time feedback, continuous learning and optimization are possible, making traffic diversion decisions increasingly accurate and continuously improving service quality and cost-effectiveness.
[0150] In some embodiments, acquiring user attribute data, business attribute data, channel performance data, and channel cost data includes:
[0151] The user identifier is obtained through the user authentication interface, and the attribute data corresponding to the user identifier is queried from the user configuration center to generate user attribute data, which includes VIP level, historical complaint rate and abnormal sensitivity.
[0152] The business parameters of the current request are parsed, and the order value, transaction type and risk level are extracted from the business parameters. Combined with the business attribute parsing rules that match the business scenario, business attribute data is generated.
[0153] The request latency, success rate, accuracy, and stability metrics for each channel are calculated using a sliding time window to generate channel performance data.
[0154] Obtain basic cost information for each channel and monitor the real-time load status of each channel. Generate channel cost data based on the basic cost information and the real-time load status, whereby the real-time load status includes the distribution of request volume and response time.
[0155] In this embodiment, user attribute data collection refers to obtaining characteristic information related to the request initiator through a standardized process, which is used to identify user value and service demand characteristics, and to provide a basis for subsequent differentiated services.
[0156] First, the user identifier is obtained through the user authentication interface. The user authentication interface is a security mechanism used to verify a user's identity and obtain a unique identifier. In practice, the user authentication interface can be an API based on OAuth 2.0, JSON Web Token (JWT), or other authentication standards. When a user initiates a request, authentication information (such as a token, cookie, or API key) is transmitted along with the request. This authentication information is verified, and the user identifier (such as user ID, account name, or customer number) is extracted from it. For anonymous users who are not logged in, a temporary identifier may be generated based on the device identifier, session ID, or IP address. Obtaining the user identifier is a prerequisite for subsequent attribute queries, ensuring that the system can associate a request with a specific user.
[0157] Next, the system queries the attribute data corresponding to the user identifier from the user configuration center. The user configuration center is a dedicated database or service that centrally stores user information, including basic user information, behavioral characteristics, value assessments, and preference settings. The query process typically employs a caching optimization strategy: first, it checks if the latest user attribute data exists in the local cache; if it does and has not expired, the cached data is used directly; otherwise, a real-time query is initiated to the user configuration center to obtain the latest data and update the cache. Caching strategies can significantly improve system performance and reduce access pressure on the user configuration center. To prevent cached data expiration from causing decision-making bias, the system sets a reasonable cache expiration time and configures a cache refresh mechanism triggered by critical events.
[0158] Weighting is based on collecting the following three types of user attribute data:
[0159] 1. VIP Level: This directly reflects a user's value level and is typically determined based on a combination of factors, including spending amount, frequency of purchases, and cardholding duration. The criteria for VIP level classification may differ depending on the scenario. For example, banks might use a tiered system of "Regular Customer - Premium Customer - VIP Customer - Private Banking," while e-commerce platforms might use "Regular Member - Silver Member - Gold Member - Diamond Member." A higher VIP level generally indicates greater user value and warrants a higher level of service.
[0160] 2. Historical Complaint Rate: This reflects a user's sensitivity to service quality and their tendency to complain. The historical complaint rate is typically defined as the ratio of the number of complaints a user has made within a specific timeframe (e.g., the last 3 months, the last 6 months) to the total number of service requests. Users with high complaint rates have higher expectations for service quality, and service anomalies may lead to even more complaints; therefore, these users need to be assigned more reliable service channels.
[0161] 3. Anomaly Sensitivity: Measures the degree to which users react to service fluctuations. Anomaly sensitivity can be assessed through user behavior after a service outage, such as reduced usage frequency, decreased spending, or increased complaints. Based on historical data, machine learning methods (such as cluster analysis or regression models) are used to quantify user anomaly sensitivity. Users with high sensitivity are more likely to churn or reduce usage after encountering service outages; therefore, they should be prioritized for access to more stable service channels.
[0162] For new users or users with incomplete attribute data, a default value strategy and an incremental update mechanism are employed. The default value strategy assigns reasonable initial values to missing attributes based on limited known information; for example, an initial VIP level can be inferred based on a user's registration channel, device type, or first transaction amount. The incremental update mechanism continuously collects behavioral data and updates user attributes as the user uses the system, making attribute evaluation increasingly accurate. New users are typically marked as "under observation," and their official attribute values are determined only after sufficient behavioral data has been collected.
[0163] Finally, the aforementioned attribute data is integrated and standardized to generate structured user attribute data for subsequent traffic allocation decisions. Standardization ensures that different attributes can be compared and calculated on a uniform scale, avoiding weight biases caused by different units of measurement.
[0164] Business attribute data collection refers to the process of parsing the current request content, extracting key parameters related to the business, and assessing the importance and characteristics of the business in combination with scenario-specific rules. This process can identify key and ordinary businesses, providing a better service channel for important transactions.
[0165] First, parse the business parameters of the current request. Business parameters refer to data fields related to specific business content carried in the request, usually contained in the URL parameters, request headers, or request body. The parsing process requires the use of appropriate parsing strategies based on different interface specifications and data formats (such as JSON, XML, URL encoding, etc.). A predefined parameter mapping table is used to identify key business fields, and data type conversion and validity verification are performed to ensure the accuracy of the extracted parameter values. For sensitive data transmitted with encryption, decryption is performed first; for missing or incorrectly formatted parameters, default values are used or supplementary information is requested.
[0166] Next, extract three types of core metrics from the business parameters:
[0167] 1. Order Value: This directly reflects the transaction amount and is typically extracted from the amount field in the request. The calculation method for order value may differ across different business scenarios. For example, in a payment transaction, the order value is the actual payment amount; in a loan application, the order value might be the loan amount; and in an investment transaction, the order value might be the investment principal. Choose the appropriate field as the basis for order value based on the business type, and perform necessary unit conversions and standardization. Order value directly impacts the economic importance of the business; higher-value orders usually require more reliable service guarantees.
[0168] 2. Transaction Type: Reflects the nature and purpose of the business operation, typically extracted from the request's interface path or a dedicated type field. A predefined transaction type classification system is provided, such as "Query - Payment - Transfer - Loan - Investment," with each type assigned an importance weight. Different transaction types may have significantly different service requirements. For example, query operations have high real-time requirements but low risk, while payment operations require both high real-time performance and high security. The focus of the traffic routing strategy is adjusted based on the transaction type to provide the most suitable service channel for different types of transactions.
[0169] 3. Risk Level: This indicates the potential risk level of a transaction and may require assessment based on multiple parameters. Risk level assessment is typically based on pre-defined risk control rules or real-time risk control models. Rule-based assessments check whether the transaction triggers specific risk flags, such as large transactions, unusual times, or logins from different locations; model-based assessments use machine learning algorithms (such as decision trees and neural networks) to analyze transaction characteristics and output a risk score or level. High-risk transactions require more rigorous verification and more reliable processing channels to prevent fraud and losses.
[0170] Then, the extracted business metrics are combined with business attribute parsing rules that match the business scenario to generate comprehensive business attribute data. Business attribute parsing rules are a set of evaluation criteria and weight configurations customized for specific business scenarios, used to transform raw business metrics into standardized business attributes. The rule base is built based on business domain knowledge, considering the relative importance of each metric in different scenarios. For example, in cross-border e-commerce scenarios, order amount and logistics timeliness may be key metrics; while in financial payment scenarios, transaction security and risk control may be more important. The system automatically selects the matching rule set based on the current requested business scenario, ensuring that the business attribute evaluation conforms to the characteristics of the scenario.
[0171] Business attribute parsing rules typically employ a hierarchical structure, including basic rules (applicable to all businesses) and scenario-specific rules (applicable only to specific business scenarios). Rules can be updated periodically to adapt to business development and market changes. The update process supports A / B testing to ensure that new rules deliver the expected improvements. The rule engine utilizes efficient execution strategies, such as rule pre-compilation and partial execution, to guarantee rapid business attribute evaluation even under high concurrency environments.
[0172] Finally, the evaluation results are integrated into standardized business attribute data for subsequent traffic allocation decisions. This business attribute data typically includes dimensions such as business importance score, timeliness requirements, and security requirements, comprehensively reflecting the characteristics and service needs of the current business requests.
[0173] Channel performance data collection refers to the process of continuously monitoring the operation of each service channel, quantifying channel performance indicators through scientific statistical methods, and providing objective basis for traffic allocation decisions. It can identify high-performance and low-performance channels and optimize resource allocation.
[0174] Performance metrics for each channel are calculated using a sliding time window technique. A sliding time window is a dynamic data statistics method that considers only data from the most recent period, ensuring that the statistical results reflect the current state of the channel in a timely manner. In practice, multiple time scale windows are maintained (e.g., 1 minute, 5 minutes, 30 minutes, 24 hours, etc.) to form a multi-granularity performance evaluation system. Smaller time windows can quickly detect performance fluctuations and are suitable for short-term decision-making; larger time windows provide more stable performance evaluations and are suitable for long-term strategy formulation. Window data updates use an incremental calculation method. Whenever new data arrives or old data expires, only the affected statistics are updated, without recalculating the entire window's data, significantly improving computational efficiency.
[0175] Monitor the following four types of performance metrics:
[0176] 1. Request Latency: This refers to the time interval between sending a request and receiving a response, directly reflecting the channel's response speed. Record the actual latency for each request and calculate statistical metrics such as average latency, median latency, 95th percentile latency, and 99th percentile latency within different windows. Quantile latency (especially the 95th and 99th percentiles) reflects the actual user experience better than average latency because it captures performance issues in long-tail requests. Calculate the standard deviation or coefficient of variation of latency to assess the stability of the channel's response time. Different businesses have different sensitivities to latency; for example, real-time payment transactions have high latency requirements, while batch data processing is relatively less demanding. Adjust the weight of latency metrics according to the business type.
[0177] 2. Success Rate: This refers to the proportion of successfully completed requests out of all requests, reflecting the reliability and stability of the channel. Success is determined based on the request's returned status code or response content. Typically, HTTP 2xx status codes indicate success, while 4xx and 5xx indicate failure. However, in some scenarios, even with a 200 status code, if the response content indicates business processing failure (e.g., containing error codes), it is still marked as a failed request. Success rates are calculated for different time windows, and trends in success rates are monitored to promptly detect fluctuations in channel quality. Specifically, different types of failures (e.g., client-side errors, server-side errors, network errors, etc.) are differentiated, and different weights are assigned to each type of failure for a more accurate assessment of channel quality.
[0178] 3. Accuracy: This refers to the proportion of requests that return correct results out of successful requests, reflecting the data quality and processing precision of the channel. Unlike success rate, accuracy focuses on correctness at the business level, not just successful completion at the technical level. Assessing accuracy requires certain business rules or benchmarks. In some scenarios, the accuracy of results is determined through consistency checks (such as comparing data with internal systems), logical verification (such as checking whether the returned data conforms to business rules), or user feedback (such as user confirmation or complaints). Because accuracy assessment may require additional verification steps, it is usually performed by sampling a portion of requests rather than checking all requests. Accuracy is particularly important for data-sensitive businesses (such as risk control decisions, financial calculations, etc.).
[0179] 4. Stability Metrics: These metrics comprehensively assess the volatility of channel performance, reflecting the consistency of service quality. Stability assessment is based on multiple aspects, including the coefficient of variation of response time (the ratio of standard deviation to mean), the range of success rate fluctuations, and the peak frequency of anomaly rates. The degree of change in these metrics across different time windows is calculated to identify channels with significant performance fluctuations. Even if a channel has good average performance, poor stability can negatively impact user experience due to occasional performance degradation, especially in high-value transactions. For a comprehensive stability assessment, short-term stability (e.g., fluctuations within 1 minute) and long-term stability (e.g., fluctuations within 24 hours) are considered, balancing the perception of short-term fluctuations and long-term trends.
[0180] In addition to basic metrics, several derived and combined metrics are calculated. For example, effective throughput (number of successfully completed requests divided by time) reflects the channel's processing capacity; cost-effectiveness metrics (the ratio of performance metrics to costs) measure the channel's value efficiency; and health scores (a weighted average of multiple metrics) provide a simplified view of the overall channel quality. These metrics describe channel performance from different perspectives, enriching the information base for decision-making.
[0181] This embodiment also implements a mechanism for handling abnormal data to ensure the accuracy of performance statistics. For example, for extreme outliers (which may be monitoring errors or atypical scenarios), robust statistics such as truncated mean or median are used; for missing data (such as temporary failures of the monitoring system), interpolation or recent averages are used for reasonable estimation; for channels with insufficient data in the initial stage, confidence intervals are set to mark the reliability of the performance evaluation.
[0182] Ultimately, all metrics are integrated into structured channel performance data for subsequent traffic allocation decisions. This performance data is updated regularly to ensure that traffic allocation decisions are based on the latest channel conditions. Under high load, the update frequency is adjusted to balance data real-time performance and resource consumption.
[0183] Channel cost data collection refers to the process of acquiring and calculating information related to the usage costs of various service channels, providing decision support for cost-sensitive scenarios, and controlling operating costs while ensuring service quality. First, basic cost information for each channel is obtained. Basic cost refers to the basic fee for using channel services under standard conditions, usually determined based on contractual terms with the service provider or internal cost accounting. Different channels may use different billing models:
[0184] 1. Pay-per-use billing model: A fixed fee is charged for each call, regardless of the data volume or processing time. For example, a risk control service might charge 0.1 yuan per call, regardless of the amount of data queried. This model primarily focuses on optimizing the number of calls to minimize unnecessary requests.
[0185] 2. Pay-as-you-go billing: Charges are based on the amount of data transmitted or processed. For example, a cloud service might charge 0.8 yuan per GB of data transmission. Under this model, optimization techniques such as data compression and batch processing are necessary to reduce data transmission volume.
[0186] 3. Resource-based billing model: Billing is based on the computing resources used (such as CPU time, memory usage, etc.). For example, a computing service might be charged per CPU core hour. This model requires optimizing algorithm efficiency and reducing resource usage time.
[0187] 4. Hybrid Billing Model: This combines several of the above models, such as a base fee plus variable fees, tiered pricing, or volume-based pricing. For example, an API service might have a monthly base fee of 1000 yuan covering 100,000 calls, with additional calls charged at 0.05 yuan per call. Under this model, multiple factors need to be considered to develop the most economical usage strategy.
[0188] Maintain a cost configuration repository to store information such as billing models, rate standards, and discount policies for each channel. This information can be manually configured through a management interface or automatically synchronized through a reconciliation system. For complex billing rules, a cost calculation engine is implemented, capable of accurately estimating costs based on specific usage scenarios. Cost configuration supports setting effective dates, allowing for the pre-configuration of upcoming price changes to ensure the accuracy of cost assessments.
[0189] Next, monitor the real-time load status of each channel. Real-time load refers to the current resource utilization of the channel, which directly affects service quality and potential cost risks. Two key load metrics will be monitored:
[0190] 1. Request Volume: This refers to the number of requests sent to the channel per unit of time (e.g., per second, per minute), reflecting the channel's processing pressure. Request volume statistics are recorded at different time granularities, such as instant request rate (QPS), request volume per minute, and request volume per hour, and compared with the channel's theoretical processing capacity to calculate resource utilization. High utilization may lead to performance degradation and even trigger additional overload costs. The temporal distribution pattern of request volume is also analyzed to identify peak and off-peak periods, providing a basis for load balancing.
[0191] 2. Response Time Distribution: This describes the proportion of requests in different response time intervals, reflecting the channel's processing efficiency and congestion level. Response times are divided into multiple intervals (e.g., <50ms, 50-100ms, 100-200ms, etc.), and the proportion of requests in each interval is statistically analyzed to generate a response time distribution histogram. By monitoring changes in the distribution, subtle changes in channel performance can be detected promptly; for example, an increase in the proportion of long-tail requests is often an early signal of channel congestion. Response time distribution can also be used to calculate various performance metrics, such as Service Level Agreement (SLA) achievement rate and performance degradation percentage.
[0192] By collecting data from the above four aspects, a comprehensive, real-time, and multi-dimensional decision-making foundation is established, enabling subsequent traffic allocation strategies to comprehensively consider user value, business importance, service quality, and economic costs, achieving intelligent resource scheduling and request allocation. The data collection module adopts a modular design, supporting flexible configuration and expansion. The scope, accuracy, and frequency of data collection can be adjusted according to actual business needs, balancing data integrity and system performance.
[0193] In some embodiments, the steps of determining channel anomaly indicator data based on the channel performance data, calculating anomaly weighting coefficients based on the channel anomaly indicator data, performing circuit breaker status detection to obtain the circuit breaker status, and generating anomaly management strategies based on the anomaly weighting coefficients and the circuit breaker status include:
[0194] According to the preset time window, channel performance data is obtained. Based on the number of erroneous requests, timeout requests, and total requests in the channel performance data, the error rate and timeout rate of each channel are calculated, and channel anomaly indicator data is generated.
[0195] The error rate and timeout rate of each channel are weighted and calculated to obtain the abnormal weighting coefficient of each channel. The abnormal weighting coefficient is used to control the degree of influence of the error rate and the timeout rate on the weighting.
[0196] When the number of consecutive errors indicated by the channel anomaly indicator data is greater than a preset error number threshold, or the error rate indicated by the channel anomaly indicator data within a specified time window is greater than a preset error rate threshold, the channel status is triggered to be marked as circuit breaker status.
[0197] When it is detected that the current channel status is in the circuit-broken state and the circuit-broken time exceeds the preset recovery time threshold, the channel status is updated to the half-open state to generate the circuit breaker status.
[0198] The abnormal weighting coefficient of the channel in the circuit breaker state is determined as the first value. The channel in the half-open state is allocated a preset proportion of detection traffic. The abnormal weighting coefficient is used for the channel in the normal state to generate an abnormal management strategy.
[0199] Channel anomaly handling is a crucial aspect of ensuring system stability and service quality in this invention. Through multi-level anomaly detection and intelligent governance mechanisms, the system can accurately identify abnormal conditions in service channels and take appropriate control measures to prevent abnormal channels from affecting overall service quality. This section will elaborate on the implementation principles, core technologies, and specific processes of channel anomaly handling.
[0200] First, channel performance data is acquired according to a preset time window. The time window is a crucial concept, specifying the time range considered in performance evaluation. Multiple time windows of varying sizes are typically maintained to balance real-time responsiveness and stability. Short windows (e.g., 30 seconds or 1 minute) quickly capture changes in channel status, suitable for detecting sudden anomalies; medium windows (e.g., 5 minutes or 10 minutes) provide more stable evaluations, reducing the impact of temporary fluctuations; long windows (e.g., 30 minutes or 1 hour) are used to identify long-term performance trends. The time windows are implemented using a sliding window technique, meaning that the window content is continuously updated over time, with old data removed and new data added. This design ensures that anomaly detection is always based on the latest performance data, while avoiding misjudgments caused by single fluctuations.
[0201] Next, based on the number of erroneous requests, timeout requests, and total requests from the channel performance data, two core anomaly metrics are calculated:
[0202] 1. Error Rate: Reflects the accuracy of a channel's request processing, calculated as the ratio of erroneous requests to the total number of requests within a specific time window. Erroneous requests are those that return incorrect results, typically determined by the response status code or content. For example, HTTP status codes 4xx (client error) and 5xx (server error) are generally considered errors; in some scenarios, even if the status code is 2xx (success), if the response content contains specific error codes or error messages, it will still be marked as an erroneous request. The error rate is a direct indicator of channel reliability; a high error rate usually indicates a serious problem with the channel, requiring traffic throttling.
[0203] 2. Timeout Rate: Reflects the stability of channel response speed, calculated as the ratio of the number of timeout requests to the total number of requests within a specific time window. Timeout requests are those whose processing time exceeds a preset timeout threshold. The setting of the timeout threshold needs to consider business characteristics and user experience; different types of businesses may have different timeout standards. For example, real-time transactions might set the timeout threshold to 300 milliseconds, while batch processing might set it to 2 seconds. A high timeout rate indicates unstable channel response speed or insufficient processing capacity, which may lead to a degraded user experience.
[0204] Error rates and timeout rates are calculated for multiple time windows for each channel, forming multi-dimensional anomaly indicator data. Furthermore, the rate of change and fluctuation of these indicators are calculated, such as the growth rate of the error rate and the standard deviation of the timeout rate, to detect dynamic changes in channel status. These raw and derived indicators together constitute complete channel anomaly indicator data.
[0205] To ensure the accuracy and reliability of anomaly indicators, several data processing mechanisms have been implemented: Data cleaning: filtering out obviously abnormal data points, such as extreme values caused by monitoring system failures; Data smoothing: using techniques such as moving averages or exponential smoothing to reduce the impact of short-term fluctuations; Data sampling protection: when the sample size is too small (e.g., total requests < 10), uncertainty assessment is added to avoid statistical errors caused by small samples; Context awareness: considering background factors such as time periods and business peaks, the anomaly judgment criteria are dynamically adjusted. Through these mechanisms, high-quality channel anomaly indicator data can be generated, providing a reliable foundation for subsequent anomaly handling.
[0206] The anomaly weighting coefficient is a smoothing adjustment mechanism used to dynamically adjust the weight of a channel in traffic allocation decisions based on the degree of anomaly. Compared to direct circuit breaker, anomaly weighting provides a more flexible governance approach, enabling smooth adjustment of channel traffic and avoiding system turbulence caused by sudden traffic fluctuations.
[0207] The error rate and timeout rate of each channel are weighted to obtain the anomaly devaluation coefficient for each channel. The core of the weighted calculation is to determine the influence weight of each error rate and timeout rate, reflecting their relative importance in a specific business scenario. The weighted model can be represented as a calculation function for the anomaly devaluation coefficient. This function takes the error rate, timeout rate, and their weights as input and outputs a coefficient value, typically between 0 and 1. The closer the value is to 1, the more normal the channel is; the closer it is to 0, the more severe the anomaly.
[0208] The setting of weight parameters needs to consider business characteristics: for businesses with high requirements for data accuracy (such as risk control decisions and financial calculations), the error rate weight should be larger; for businesses with high requirements for real-time performance (such as online payments and real-time searches), the timeout rate weight should be larger; for businesses that balance accuracy and real-time performance, a relatively balanced weight configuration can be adopted. This embodiment supports dynamic adjustment of weight configuration based on business scenarios, realizing scenario-adaptive anomaly assessment. Weight configuration can be centrally managed through a configuration center, supporting real-time updates without requiring a system restart.
[0209] In addition to the basic weighted model, it also implements a variety of advanced computational features:
[0210] 1. Nonlinear Mapping: Using nonlinear functions (such as exponential, logarithmic, or sigmoid functions) to map the original error rate and timeout rate to a new space, enhancing sensitivity to specific intervals. For example, for error rate, it may be necessary to maintain high sensitivity for low error rate intervals (such as 0-1%), while appropriately reducing sensitivity for high error rate intervals (such as >10%).
[0211] 2. Historical Trend Awareness: Anomaly weighting coefficients are calculated by combining current values and historical trends. Upward trends (such as a continuous increase in error rates) are given stricter weighting, while downward trends (such as a recovery in error rates) are given relatively more lenient weighting. This design helps to proactively address potential risks and encourages the recovery of abnormal channels.
[0212] 3. Threshold Range Design: Multiple threshold ranges are set, with different calculation strategies employed in different ranges. For example, when the error rate is below the safety threshold, there is almost no weight reduction; when the error rate is in the warning range, the weight reduction is linearly increased; and when the error rate exceeds the danger threshold, the weight reduction effect is significantly enhanced. This segmented design enables the system to take appropriate measures for anomalies of varying severity.
[0213] 4. Cross-Impact Consideration: Assess the cross-impact of error rate and timeout rate, and apply additional demotion penalties when both are abnormal. This collaborative assessment can more effectively identify deeper issues, such as channel resource depletion potentially leading to an increase in both error rate and timeout rate.
[0214] The calculation result of the anomaly weighting coefficient directly affects the channel's score in the traffic allocation decision, thus affecting its probability of being selected. Typically, the anomaly weighting coefficient is applied as a multiplicative factor to the channel's base score to achieve a smooth reduction in weight for abnormal channels. For example, if a channel's base score is 80 points and the anomaly weighting coefficient is 0.6, its final score will be adjusted to 48 points, significantly reducing its competitiveness in traffic allocation.
[0215] It's important to note that the anomaly weighting coefficient is dynamically adjusted and updated as channel status changes. Regularly recalculating the anomaly weighting coefficient for each channel ensures that traffic allocation decisions are always based on the latest anomaly assessment. As channel status improves, its anomaly weighting coefficient gradually recovers, allowing for a smooth redistribution of traffic to that channel.
[0216] A circuit breaker is a design pattern originating from electrical engineering, used to prevent system cascading failures. Its core idea is to "disconnect the circuit" when a service anomaly is detected, preventing requests from continuing to be sent to the faulty service, and attempting to restore service at an appropriate time. This mechanism effectively isolates faults and protects the overall stability of the system. This embodiment implements a complete circuit breaker state machine, including three key states:
[0217] 1. Closed State: Normal operating state, allowing requests to flow normally to the target channel while monitoring for failures. This is the default state of the channel, indicating that the channel is considered to be able to provide services normally.
[0218] 2. Circuit Breaker (Open): Fault isolation state, preventing new requests from being sent to the target channel, directly returning a circuit breaker response or forwarding to a backup channel. When a channel anomaly is detected and reaches a certain standard, the state will switch from closed to circuit breaker.
[0219] 3. Half-Open State: This is a probing recovery state, allowing a limited number of requests to pass through to test whether the channel has returned to normal. After the circuit breaker has been in effect for a period of time, the state is switched from half-open to begin attempting recovery.
[0220] The triggering conditions and specific implementation of state transitions are as follows:
[0221] The transition from the closed state to the fuse-open state is based on two anomaly detection mechanisms:
[0222] 1. Consecutive Error Counting: Records the number of consecutive errors in the channel. When this number exceeds a preset error count threshold, a circuit breaker is triggered. Consecutive error counting is a simple yet effective anomaly detection method, particularly suitable for identifying sudden, complete failures. The error count threshold needs to be set in a balance between sensitivity and stability, typically between 3 and 5 counts. A smaller threshold allows the system to respond quickly to faults but may lead to unnecessary circuit breakers due to occasional errors; a larger threshold increases the system's ability to withstand consecutive errors but may delay fault isolation.
[0223] 2. Error Rate Monitoring: Monitors the error rate within a specified time window. When this value exceeds a preset error rate threshold, a circuit breaker is triggered. Error rate monitoring is more robust than continuous error counting and can handle intermittent failure scenarios. The error rate threshold is typically set as a percentage value, such as 20% or 50%, indicating that a circuit breaker is triggered when the proportion of erroneous requests to total requests exceeds this value. The size of the time window affects the sensitivity of error rate calculation; a smaller window (e.g., 30 seconds) is more sensitive to sudden anomalies, while a larger window (e.g., 5 minutes) provides a more stable assessment.
[0224] These two mechanisms complement each other, working together to ensure timely identification of different types of anomalies. For sudden, severe failures, continuous error counting can quickly trigger circuit breakers; for gradual performance degradation, error rate monitoring can provide more accurate judgments.
[0225] The transition from the fuse-frozen state to the half-open state is based on time control:
[0226] When a channel is in a circuit-broken state and the circuit-broken time exceeds a preset recovery time threshold, the channel status will be updated to a half-open state. The recovery time threshold is a preset time interval that indicates how long to wait after a channel is completely circuit-broken before attempting recovery. This parameter setting needs to consider the typical time for fault repair and the system's fault tolerance. Shorter recovery times (e.g., 30 seconds) allow for rapid recovery and are suitable for temporary faults; longer recovery times (e.g., 5 minutes or more) are more suitable for handling severe faults requiring manual intervention.
[0227] The recovery time threshold can be fixed or employ a more complex strategy, such as exponential backoff. The exponential backoff strategy dynamically adjusts the recovery time based on the number of consecutive circuit breakers. For example, the first circuit breaker might wait 30 seconds to attempt recovery, the second 60 seconds, the third 120 seconds, and so on. This strategy can reduce invalid recovery attempts and lower system load in the event of continuous failures.
[0228] Conditions for returning from a half-open state to a closed state or a fuse-open state:
[0229] When the channel is in a half-open state, a limited number of "probe requests" are allowed to pass through, and the results of these requests are closely monitored. If the success rate of the probe requests is higher than a preset recovery threshold (e.g., 90%), the system considers the channel to be back to normal and switches the state back to the closed state; if the probe requests still show a high error rate, the state is switched back to the circuit breaker state, and the waiting time for the next recovery may be extended.
[0230] The number and selection of probe requests are also important design considerations. Typically, only a small number of requests (such as 5% of total traffic or a fixed 10 requests) are allowed as probes to reduce the potential impact. Probe requests can be randomly selected regular requests or specially designed health check requests; the latter are usually lighter and have less impact on the system.
[0231] The status information of circuit breakers needs to be kept consistent in a distributed environment to avoid conflicting decisions from different nodes. Typically, a distributed cache or configuration center is used to store the circuit breaker status, and all nodes periodically synchronize the latest status to ensure globally consistent circuit breaker decisions.
[0232] This embodiment employs a differentiated strategy based on the circuit breaker status of the channel:
[0233] 1. For channels in a circuit breaker state, force their abnormal weighting coefficient to an extremely low first value (e.g., 0.01 or less). This extremely low value effectively excludes the channel from normal traffic routing, ensuring that almost no new requests are assigned to it. The first value is not set to absolute zero to reserve a very small possibility of internal system monitoring requests, facilitating the detection of changes in channel status. Request handling in a circuit breaker state typically involves two options: directly rejecting the request and returning a predefined circuit breaker response (e.g., error code or degradation content), or rerouting the request to a pre-configured backup channel. Record the circuit breaker event, including triggering conditions, timestamps, and scope of impact, for subsequent analysis and auditing.
[0234] 2. For channels in a partially open state, allocate a preset percentage of probe traffic to verify channel status. This preset percentage is typically a small percentage, such as 1% or 5%, ensuring that the impact is limited even if the channel still has issues. These probe requests are specifically flagged, and their execution results are monitored preferentially as a basis for determining whether the channel has returned to normal. The selection of probe traffic can be based on various strategies, such as random sampling, prioritizing low-value requests, or selecting specific types of simple requests. Stricter monitoring and timeout limits are also set for probe requests to ensure that anomalies are detected quickly.
[0235] 3. For channels in normal operation, the previously calculated anomaly weighting coefficient is used to achieve smooth performance-based adjustments. This process allows for dynamic adjustment of traffic share based on the channel's real-time performance, initiating traffic adjustments in the early stages of anomalies and avoiding action only after the problem becomes severe. Anomaly weighting under normal conditions is a preventative measure, addressing issues before they escalate and enhancing the system's adaptability.
[0236] The above processing logic is integrated into a complete anomaly management strategy, which includes the status identifier of each channel, the anomaly weighting coefficient, and special processing markers (such as probe traffic markers). This information will be considered in subsequent traffic allocation decisions, directly affecting the probability of channel selection.
[0237] Several advanced features were implemented during the execution of the exception handling strategy:
[0238] 1. Tiered Degradation: Different levels of degradation measures are adopted according to the severity of the anomaly. Minor anomalies may only reduce traffic by 10-20%, moderate anomalies may reduce traffic by 50-70%, while severe anomalies may trigger a complete circuit breaker. This tiered response ensures that the system's reaction matches the severity of the problem.
[0239] 2. Gradual Recovery: When a channel begins to recover, traffic is not restored immediately, but rather gradually increased. For example, 10% of traffic might be restored initially, then increased to 30% after a period of observation, then to 60% after another period of observation, before finally achieving full recovery. This gradual recovery avoids sudden changes in traffic during the recovery process, reducing the risk of fluctuations.
[0240] 3. Business Priority Awareness: When implementing anomaly management, business priorities are considered, providing more protection for high-priority businesses. For example, even if a channel has been partially downgraded, requests from VIP users or critical transactions may still be allowed to pass first, ensuring that core businesses are not affected.
[0241] 4. Multi-level circuit breaker protection: Implements circuit breaker protection for different scopes, including instance-level circuit breaking (breaking only specific abnormal instances), cluster-level circuit breaking (breaking the entire service cluster), and dependency chain circuit breaking (breaking related upstream and downstream services). This multi-level protection ensures that the system can accurately isolate the scope of the fault.
[0242] 5. Adaptive Threshold Adjustment: Based on historical data and business patterns, dynamically adjust the circuit breaker threshold and recovery strategy. For example, a more conservative circuit breaker strategy may be adopted during peak business periods, while a more aggressive recovery attempt may be made during off-peak periods.
[0243] The generation and execution of anomaly management strategies is an ongoing process. Anomaly weighting coefficients and circuit breaker status are continuously updated based on the latest monitoring data to ensure that the anomaly management strategies always reflect the current status of the channels. Simultaneously, anomaly events and their management effects are recorded to provide data support for strategy optimization.
[0244] This two-tiered anomaly management mechanism, combining anomaly weighting and circuit breaker intervention, flexibly addresses different types and severity of anomalies. It can handle both gradual performance degradation (through smooth weighting) and sudden severe failures (through circuit breaker tripping). This comprehensive management ensures the system's high adaptability and resilience in the face of channel anomalies, effectively guaranteeing overall service quality and user experience.
[0245] In some embodiments, the channel performance data includes real-time load data, error rate, and response time; the step of extracting the basic channel cost information of each channel from the channel cost data, determining the dynamic premium factor of each channel based on the channel performance data, and determining the effective cost coefficient of each channel based on the basic channel cost information, the dynamic premium factor, the user attribute data, and the business attribute data includes:
[0246] Extract the basic channel cost information for each channel from the channel cost data;
[0247] The dynamic premium factor for each channel is obtained by weighting the real-time load data, the error rate calculated based on channel performance data, the response time, and the preset maximum load data.
[0248] Based on the aforementioned channel basic cost information and the aforementioned dynamic premium factor, the actual cost coefficient of each channel is calculated;
[0249] Based on the user attribute data, determine the current user weight of the current request; based on the business attribute data, determine the current business weight of the current request; and based on the sum of the current user weight and the current business weight, determine the request value.
[0250] When the requested value exceeds a preset value threshold, the effective cost coefficient for each channel is determined based on the actual cost coefficient and the preset cost discount factor.
[0251] Alternatively, when the requested value is lower than the value threshold, the actual cost coefficient may be used as the effective cost coefficient.
[0252] Channel basic cost information refers to the basic cost data for using services from various channels under standard conditions, serving as the starting point and benchmark for cost calculation. The system extracts this information from channel cost data, laying the foundation for subsequent dynamic cost calculation. First, it is necessary to identify and obtain the cost structure and billing model of different channels. Channel cost structure refers to the way service fees are composed; common structures include:
[0253] 1. Single-rate structure: A fixed fee is charged per call or per unit of data processed, such as 0.05 yuan per API call or 0.8 yuan per GB of data processed. This is the simplest cost structure, with transparent billing and easy prediction.
[0254] 2. Tiered Pricing Structure: A pricing model where the unit cost decreases progressively with increasing usage. For example, the first 100,000 calls per month cost 0.05 yuan each, calls from 100,000 to 1,000,000 cost 0.04 yuan each, and calls exceeding 1,000,000 cost 0.03 yuan each. Tiered pricing reflects economies of scale and encourages users to increase their usage.
[0255] 3. Basic Fee Plus Variable Fee Structure: This includes a fixed basic service fee and a variable fee calculated based on actual usage. For example, the basic service fee is 2,000 yuan per month, covering 500,000 calls, with each additional call costing 0.02 yuan.
[0256] 4. Multi-dimensional composite billing structure: A pricing model based on comprehensive calculations across multiple dimensions, such as the number of calls, data volume, computing resources, and storage time. For example, a data service might be tiered by query complexity (simple / medium / complex) and the number of results returned.
[0257] For complex cost structures, a dedicated cost analysis engine has been implemented, capable of accurately calculating the base cost based on different billing rules and usage scenarios. This engine supports advanced features such as conditional logic, tiered calculation, and multi-dimensional combinations, enabling it to handle various complex billing scenarios.
[0258] When extracting the basic cost, the following special factors will also be considered:
[0259] 1. Time-based pricing: Many services use different pricing standards at different times, such as weekday / rest day differences and peak / off-peak hour differences. The applicable pricing standard is automatically selected based on the current time.
[0260] 2. Bulk Discounts: Some services offer discounts for bulk processing, encouraging customers to package their requests. Assess the feasibility of bulk processing and apply bulk discount pricing where appropriate.
[0261] 3. Long-term contract terms: Long-term contracts typically include special pricing terms, such as guaranteed minimum spending, volume-based pricing, or exclusive resources. These special terms should be included in the basic cost calculation.
[0262] 4. Promotional Activities: Temporary price discounts or promotional activities can also affect base costs. Support for setting promotional rules to automatically apply special prices during the promotional period.
[0263] These mechanisms enable the accurate extraction of basic cost information from various channels under current conditions, providing a reliable foundation for subsequent dynamic cost calculations. The basic cost data is updated regularly to ensure that decision-making is always based on the latest pricing information.
[0264] The dynamic premium factor reflects a dynamic adjustment coefficient based on the current load and performance status of the channel, used to convert potential performance risks into quantifiable cost increases. Through the dynamic premium mechanism, the real-time status of the channel can be reflected at the cost level, providing a more comprehensive basis for traffic allocation decisions. The dynamic premium factor is calculated based on four key indicators:
[0265] 1. Real-time Load Data: This indicates the current resource utilization of the channel, typically expressed as the ratio of current request volume to processing capacity. Real-time load is a direct indicator of channel pressure; high load means the channel is nearing saturation, potentially leading to decreased service quality and increased risks. Information such as real-time request volume and queue length is obtained through monitoring interfaces and combined with estimated processing capacity to calculate standardized load metrics. Load metrics are usually expressed as a percentage, such as an 80% load rate indicating that the channel is using 80% of its processing capacity. When the load approaches a preset safety threshold (e.g., 90%), premium adjustments are applied; when the load exceeds the safety threshold, the premium factor rises rapidly, reflecting the additional risks associated with using the channel.
[0266] 2. Error Rate: This represents the percentage change in the current error rate relative to the baseline. The baseline error rate refers to the expected error rate of the channel under normal conditions, usually calculated based on historical data, such as the average error rate over the past 7 days. The formula for calculating the error rate is: (Current Error Rate - Baseline Error Rate) / Baseline Error Rate. A positive value indicates an increase in the error rate, while a negative value indicates a decrease. An increase in the error rate is an important signal of declining service quality. A high error rate increase indicates potential stability issues in the channel, increasing the risk of using it. The premium factor is adjusted based on the degree of error rate increase; a significant increase in the error rate will result in a higher premium.
[0267] 3. Response Time: This represents the percentage change in current response time relative to the baseline. Baseline response time refers to the expected response time for this channel under normal conditions, typically calculated based on historical data, such as the average or median response time over the past 7 days. Response time calculation is similar to error rate, reflecting changes in channel processing efficiency. Increased response time is often an early sign of channel congestion, potentially appearing before an increase in error rate. Monitoring response time increases allows for early detection of performance issues and enables traffic optimization through pricing mechanisms, preventing problems from escalating.
[0268] 4. Preset Maximum Load Data: This represents the channel's theoretical processing capacity or safe operating limit. Maximum load is a key design parameter, likely determined based on the service provider's technical specifications, historical peak performance, or capacity testing results. This parameter standardizes real-time load, allowing for fair comparisons of channels with different processing capabilities. Maximum load data may be adjusted based on actual operating conditions and channel upgrades to ensure it accurately reflects the channel's actual capabilities.
[0269] These four indicators are weighted to generate the final dynamic premium factor. The weighted calculation reflects the different contributions of each indicator to risk, with real-time load and error rate growth typically having higher weights because they directly relate to service availability and reliability. A non-linear factor is also introduced into the calculation, causing the premium factor to grow rapidly as the indicators approach critical values, forming a "risk acceleration zone" to proactively address potential bottlenecks.
[0270] The calculation of the dynamic premium factor may employ a piecewise function design to adapt to the risk characteristics of different load ranges: low load range (e.g., <50%): basically no premium is generated, maintaining the original cost; medium load range (e.g., 50%-80%): a slight premium is generated, slightly increasing the cost; high load range (e.g., 80%-90%): a medium premium is generated, significantly increasing the cost; extremely high load range (e.g., >90%): a high premium is generated, greatly increasing the cost and strongly suppressing selection.
[0271] This embodiment supports configuring channel-specific premium parameters, allowing for different premium sensitivities to be set for different types of channels. For example, the premium sensitivity may be lower for cloud services with strong elastic scaling capabilities, while it may be higher for traditional interfaces with fixed capacity.
[0272] Dynamic premium factors are typically values greater than or equal to 1, such as 1.0 indicating no premium, 1.5 indicating a 50% cost premium, and 3.0 indicating a 200% cost premium. Premium caps can be configured to prevent excessively high premiums in extreme cases. Through dynamic premium mechanisms, channel performance risks can be transformed into economic costs, achieving "risk pricing" at the decision-making level. This ensures that traffic allocation decisions consider both nominal and potential risk costs, thereby avoiding overuse of high-load or unstable channels and preventing service crashes caused by concentrated traffic.
[0273] The actual cost coefficient is a comprehensive result of the channel's basic cost and dynamic premium factor, reflecting the channel's overall cost situation, including nominal costs and potential risk costs. By using the actual cost coefficient, both static price factors and dynamic load factors can be considered in cost assessment, providing a more accurate cost basis for channel allocation decisions. Based on channel basic cost information and dynamic premium factor, the actual cost coefficient for each channel is calculated. The calculation process uses a multiplicative model, multiplying the basic cost by the dynamic premium factor to obtain the actual cost including the risk premium. This multiplicative model intuitively reflects the proportional characteristic of the risk premium; that is, the higher the risk, the larger the premium.
[0274] In the actual cost calculation process, the following aspects are also considered:
[0275] 1. Cost Normalization: Different channels may use different billing units and price scales. Normalization converts all costs into a unified standard unit to ensure cost comparability across different channels. Normalization may be based on metrics such as request count, data volume, or processing complexity, depending on business characteristics.
[0276] 2. Indirect Cost Estimation: In addition to direct service call costs, assess indirect costs such as data transfer fees, storage fees, and certificate fees. These indirect costs may vary with usage patterns and require dynamic estimation.
[0277] 3. Opportunity Cost Considerations: Using one channel may affect the availability of other channels. Assess the opportunity cost of this choice, especially when some channels have minimum usage requirements or tiered pricing. Opportunity cost analysis helps optimize long-term resource allocation strategies.
[0278] 4. Historical Cost Trends: Analyze historical cost data to identify cost change trends and predict future cost levels. This forward-looking assessment helps avoid sudden cost increases and keep budgets under control.
[0279] The actual cost coefficient is typically a standardized value that reflects the relative cost level of each request. A higher cost coefficient means that the channel is more expensive to use in the current state and may receive a lower probability of selection in subsequent traffic allocation decisions.
[0280] This embodiment periodically updates the actual cost coefficient to ensure that cost assessments reflect the latest base prices and performance conditions. The update frequency can be adjusted according to business needs and channel characteristics; more frequent updates may be needed in highly volatile environments, while the update frequency can be reduced in stable environments to decrease system overhead. By calculating the actual cost coefficient, static price information can be organically combined with dynamic performance conditions to form a comprehensive cost view, providing accurate decision-making basis for cost-sensitive scenarios. This dynamic cost model is particularly suitable for dealing with multi-channel environments with large load fluctuations and complex pricing strategies, effectively controlling operating costs while ensuring service quality.
[0281] Request value assessment identifies high-value requests, providing better service channels for critical business operations. Differentiated cost handling is a cost adjustment strategy based on request value, ensuring a balance between cost control and service quality. First, based on user attribute data, the current user weight for the current request is determined. User weight is a quantitative indicator measuring user importance, directly impacting the personalized configuration of service quality. During the calculation, key features are extracted from user attribute data, such as VIP level, historical complaint rate, and anomaly sensitivity, and a comprehensive score is calculated based on preset weights. The weight configuration reflects the relative importance of each attribute in user value assessment and can be adjusted according to business characteristics. For example, financial services may place greater emphasis on VIP level, while content services may focus more on user activity and loyalty. User weight is typically standardized to a value between 0 and 1, with higher values indicating greater user importance and a higher deserved service experience.
[0282] Next, based on business attribute data, the current business weight of the current request is determined. The business weight quantifies the business importance of the current request and is another key basis for differentiated services. The calculation process is similar to that of user weights, extracting key features from the business attribute data, such as order value, transaction type, and risk level, and calculating a comprehensive score based on preset weights. Weight configurations can also be adjusted according to business scenarios; for example, payment scenarios may place more emphasis on order value, while security scenarios may focus more on risk level. Business weights are typically standardized to values between 0 and 1, with higher values indicating greater business importance and a need for more reliable service channels.
[0283] Then, the request value is determined based on the sum of the current user weight and the current business weight. Request value is a comprehensive assessment of user importance and business importance, directly reflecting the overall value of the current request to the system. Using a summation method instead of a product method ensures that requests with high user value or high business value receive appropriate attention, avoiding an excessive reduction in the overall score due to a low score in one dimension. The calculated request value is typically between 0 and 2 (assuming both user weight and business weight are in the range of 0 to 1). A value threshold is set based on actual business needs to distinguish between high-value requests and ordinary requests.
[0284] The request value is compared with a preset value threshold, and a differentiated cost handling strategy is adopted based on the comparison result:
[0285] 1. When a request's value exceeds a preset value threshold, it is considered a high-value request, requiring priority in ensuring its service quality. In this case, a discounted effective cost coefficient is calculated based on the actual cost coefficient and a preset cost discount factor. The cost discount factor is a value less than 1 (e.g., 0.7 or 0.8), representing the degree of cost concessions willing to be made for high-value requests. The discounted effective cost coefficient will lower the cost score of high-performance but high-cost channels, increasing their competitiveness in subsequent traffic allocation decisions, making it more likely that high-value requests will be assigned to better-performing channels, even if those channels have higher actual costs.
[0286] 2. When the request value is below a certain threshold, it is considered a normal request and does not require special cost discounts. In this case, the previously calculated actual cost coefficient is used directly as the effective cost coefficient, without providing additional cost discounts. This approach ensures that the system remains cost-sensitive for normal requests, prioritizing channels that balance performance and cost, and effectively controlling overall operating costs.
[0287] Setting a value threshold is a critical business decision that requires balancing service quality and cost control. A lower threshold will classify more requests as high-value requests, improving overall service quality, but also increasing costs; a higher threshold will limit the scope of high-value requests and strictly control costs, but may affect the experience of some important users. Dynamic adjustment of the value threshold is supported, allowing for flexible adjustments to discount strategies based on factors such as business seasonality, budget constraints, or special events.
[0288] The setting of the cost discount factor also requires careful consideration, as it directly affects the system's resource allocation to high-value requests. A smaller discount factor (e.g., 0.5) indicates a larger cost concession, which may lead to high-value requests almost always choosing the highest-performance channel, significantly improving service quality, but may also lead to a substantial increase in costs. A larger discount factor (e.g., 0.9) indicates a smaller cost concession, maintaining strict cost control, but may not provide a significant service advantage for high-value requests. Customized discount strategies based on specific business scenarios are supported, such as VIP exclusive discounts, large transaction discounts, or promotional activity discounts.
[0289] This embodiment also implements a multi-tiered discount mechanism, providing tiered discounts based on different ranges of request value. For example, requests with a value between the threshold and threshold + 0.3 may receive a 10% cost discount, requests with a value between threshold + 0.3 and threshold + 0.6 may receive a 20% cost discount, and requests with a value exceeding threshold + 0.6 may receive a 30% cost discount. This tiered discount more precisely reflects the differences in request value, providing a more personalized service experience.
[0290] By employing request value assessment and differentiated cost processing mechanisms, higher-quality service channels can be provided for critical businesses and key users while strictly controlling overall costs, thus achieving optimal resource allocation. This intelligent differentiation strategy not only meets the service expectations of high-value users but also ensures economic sustainability.
[0291] Ultimately, the generated effective cost coefficient will serve as a crucial input for subsequent traffic allocation and scoring calculations, directly influencing the final selection probability of a channel. This dynamic, multi-factor cost calculation method enables differentiated service selection for requests of varying value while ensuring overall cost control, achieving intelligent resource allocation and precise service delivery.
[0292] In some embodiments, the process of calculating user weights based on user attribute data, calculating business weights based on business attribute data, calculating performance scores based on channel performance data, and determining channel scores for each channel based on user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies includes:
[0293] User-related attributes are extracted from the user attribute data, and the user-related attributes are weighted to obtain user weight values.
[0294] Extract business-related attributes from the business attribute data, and perform weighted calculations on the business-related attributes to obtain business weight values;
[0295] The performance indicators of each channel are extracted from the channel performance data, and the performance indicators are weighted to obtain the performance score of each channel.
[0296] The channel score for each channel is calculated using the user weight, the business weight, the performance score, the effective cost coefficient, the anomaly reduction indicated by the anomaly management strategy, and a preset saturation index. The saturation index is used to indicate the non-linear sensitivity of the user weight, the business weight, the performance score, and the effective cost coefficient to the channel score.
[0297] In this embodiment, user weight is a comprehensive indicator reflecting user characteristics and importance, serving as the foundation for personalized traffic allocation. By calculating user weight, the differentiated needs and value contributions of different users can be identified, providing user-dimensional input for subsequent channel scoring and achieving user-centric traffic allocation optimization. The calculation of user weight first requires extracting key user-related attributes from user attribute data. User attribute data is a multi-dimensional data set describing user characteristics and behaviors, potentially originating from multiple data sources such as user databases, behavior logs, transaction records, and preference settings. Through data integration and real-time querying, user attribute data relevant to the current request is obtained, ensuring that weight calculation is based on the latest user information.
[0298] User-related attributes are key user characteristics that influence channel selection, and typically include the following categories:
[0299] 1. User identity characteristics: These include user level, membership level, account age, and identity verification status, reflecting the user's value level and level of trust. For example, VIP users may be given higher authority and access to better channel resources.
[0300] 2. User behavior characteristics: These include activity level, usage frequency, session duration, and feature usage preferences, reflecting user habits and engagement. For example, frequently active users may receive higher weightings to ensure a consistent user experience.
[0301] 3. Transaction behavior characteristics: These include spending amount, frequency of purchases, willingness to pay, and refund rate, reflecting the user's commercial value and the importance of the transaction. For example, high-value transaction users may receive priority access to channel resources, ensuring smooth transaction completion.
[0302] 4. Geographic location characteristics: These include the user's country / region, network environment, and access method, which affect channel compatibility and performance. For example, users in different regions may need to connect to different optimized channels to obtain the best network performance.
[0303] 5. Device characteristics: These include device type, operating system, screen resolution, and hardware performance, which affect channel compatibility and responsiveness. For example, users of high-end devices may be better suited to channels that offer richer features but consume more resources.
[0304] 6. Sensitivity Characteristics: These include the degree of sensitivity to latency, stability, accuracy, and security, reflecting users' priorities across different service quality dimensions. For example, gamers who are highly sensitive to latency may have a greater need for low-latency channel support.
[0305] This embodiment selects an appropriate subset of user attributes for weight calculation based on the characteristics of the business scenario, avoiding interference from irrelevant attributes. For missing attribute data, default values or inferred values based on existing data are used to ensure the completeness of the weight calculation.
[0306] The core process of user weighting is the weighted calculation of user-related attributes. Each attribute is assigned a weight to reflect its relative importance in the current business scenario. Then, the weighted attribute values are aggregated to generate the final user weight.
[0307] This embodiment supports automatic weight optimization. By analyzing historical data, it evaluates the performance of user experience and business metrics under different weight settings, automatically adjusts the weight configuration, and achieves continuous optimization of weight calculation. Weight optimization can be based on various algorithms, such as gradient descent, genetic algorithms, or Bayesian optimization, and the appropriate optimization method is selected according to the system scale and data characteristics.
[0308] Business weighting is a comprehensive indicator that measures the characteristics and importance of a business, reflecting the specific requirements and priority differences in channel selection across different business scenarios. Calculating business weights allows us to identify the diversity of business needs, providing business-dimensional input for subsequent channel scoring and enabling business-oriented traffic allocation strategies. The calculation of business weights first requires extracting key business-related attributes from business attribute data. Business attribute data is a multi-dimensional data set describing business characteristics and requirements, potentially originating from multiple sources such as business configurations, API parameters, request context, and runtime environment. Through configuration parsing and real-time monitoring, business attribute data relevant to the current request is obtained, ensuring that the weight calculation accurately reflects the current business requirements.
[0309] Business-related attributes are key business characteristics that influence channel selection, and typically include the following categories:
[0310] 1. Business Type: This includes business scenarios, functional modules, processing types, and interaction modes, reflecting the basic classification and characteristics of the business. Different types of businesses may require different channel characteristics; for example, transaction-based businesses may place greater emphasis on security and consistency, while content-based businesses may prioritize throughput and response speed.
[0311] 2. Business Importance: This includes business priority, criticality, SLA requirements, and scope of impact, reflecting the value and importance of the business. High-priority businesses may receive higher weighting to ensure priority resource allocation.
[0312] 3. Business Timeliness: This includes real-time requirements, processing windows, and timeout tolerance, reflecting the business's sensitivity to time response. Businesses with high timeliness requirements may prefer low-latency channels, even if it increases costs.
[0313] 4. Data characteristics: These include data size, data sensitivity, data structure complexity, and data consistency requirements, all of which affect the adaptability of the channel. For example, processing large amounts of data may require selecting a channel with high throughput capabilities.
[0314] 5. Transaction characteristics: These include transaction amount, frequency, complexity, and risk level, all of which influence the security requirements of the transaction channel. High-value transactions may require channels with stronger security guarantees.
[0315] 6. Compliance Requirements: These include regulatory compliance, data sovereignty, privacy protection, and audit trails, which affect the compliance adaptability of channels. Some businesses may be subject to specific compliance constraints, requiring the selection of channels that meet these requirements.
[0316] This embodiment selects a suitable subset of business attributes for weight calculation based on the characteristics of the application scenario, avoiding increased computational complexity and noise introduction caused by too many attributes. Different attribute sets can be defined for different application scenarios to ensure the relevance and efficiency of weight calculation. The weighted calculation of business-related attributes is the core process for forming business weights. Each attribute is assigned a weight to reflect its relative importance in business evaluation. Then, the weighted attribute values are aggregated to generate the final business weight. The weighted calculation supports several advanced features:
[0317] 1. Nonlinear Transformation: Some attributes may require nonlinear transformations, such as logarithmic or exponential transformations, to better reflect changes in their importance. For example, transaction amounts may be transformed logarithmically so that the sensitivity of the weights to the amount decreases as the amount increases.
[0318] 2. Threshold Effect: Some attributes may exhibit a threshold effect, meaning that the weight is only significantly affected when a certain threshold is exceeded. These attributes can be addressed using a step function or a smoothing threshold function.
[0319] 3. Combination Effects: Combinations of multiple attributes may produce unique effects that go beyond simple weighting. These complex relationships can be addressed by introducing interaction terms or conditional rules.
[0320] 4. Time-dependent: The importance of attributes may change over time, such as during promotional events or peak business periods. The system supports adjusting the weight of time-related conditions to adapt to changes in business rhythm.
[0321] A key characteristic of business weight calculation is its adaptability. The following mechanisms enhance the adaptability of weight calculation:
[0322] 1. Dynamic Priority: Dynamically adjust business priorities based on real-time monitoring of business status. For example, if an increase in the error rate of a certain business is detected, its weight can be increased, and more reliable channels can be prioritized for allocation.
[0323] 2. Load Awareness: Considering the current load situation, the weight of critical business operations may be increased during periods of high load to ensure the service quality of core functions.
[0324] 3. Seasonal Adjustment: Identify seasonal patterns in business and apply different weighting strategies at different times, such as increasing the weight of transaction-related businesses during shopping festivals.
[0325] 4. A / B testing support: Supports running multiple sets of weight calculation rules in parallel, comparing their effects, and selecting the optimal configuration. This experiment-driven optimization method helps discover better weight calculation strategies.
[0326] These mechanisms enable the generation of weights that accurately reflect business needs and importance, providing business-dimensional input for subsequent channel scoring and achieving business-oriented traffic optimization. The calculation of business weights is dynamic, adapting to changes in business needs and fluctuations in the operating environment, ensuring that traffic allocation decisions always align with current business priorities.
[0327] Channel performance evaluation is a key process for measuring the service capabilities of each channel. It generates performance scores that reflect the actual service quality of the channel through the collection, analysis and weighted calculation of multi-dimensional indicators, providing objective performance dimension inputs for the final channel score.
[0328] The first step in channel performance evaluation is to extract key performance indicators from channel performance data. Channel performance data is a multi-dimensional dataset describing the operational status and service capabilities of a channel, typically sourced from multiple monitoring sources such as real-time monitoring systems, log analysis platforms, external probing services, and historical performance databases. Through data integration and real-time querying, the latest performance data for each channel is obtained, ensuring that the evaluation is based on the current, accurate state.
[0329] Performance metrics are key measures of channel service capabilities and typically include the following dimensions:
[0330] 1. Response Time Metrics: These include average response time, 95th / 99th percentile response time, first byte time, and completion time, reflecting the speed and efficiency of the channel. Response time is a direct factor affecting user experience and is usually one of the core performance indicators.
[0331] 2. Reliability metrics: These include success rate, error rate, timeout rate, and anomaly rate, reflecting the stability and reliability of the channel. Reliability metrics are directly related to the continuity and accuracy of business operations and are the fundamental guarantee of channel quality.
[0332] 3. Throughput metrics: These include requests per second (QPS), concurrent processing capacity, peak capacity, and resource utilization, reflecting the channel's capacity and processing power. Throughput metrics affect the system's scalability and peak performance.
[0333] 4. Consistency metrics: These include result consistency, data integrity, version matching, and behavioral stability, reflecting the consistency level of channel services. Consistency metrics are particularly important for businesses that require a high degree of predictability.
[0334] 5. Security metrics: These include security ratings, number of vulnerabilities, encryption levels, and compliance status, reflecting the channel's security protection capabilities. Security metrics are crucial for businesses handling sensitive information.
[0335] 6. Adaptability metrics: These include functional coverage, feature support rate, compatibility range, and customization level, reflecting the channel's adaptability to business needs. Adaptability metrics affect whether a channel can meet the functional requirements of specific business scenarios.
[0336] This embodiment supports multi-level performance data acquisition:
[0337] 1. Real-time metrics: Current performance data collected through a real-time monitoring system reflects the immediate status of the channel and responds fastest to environmental changes.
[0338] 2. Short-term metrics: Summarize recent performance data (such as the past few minutes or hours) to smooth out short-term fluctuations and provide a more stable performance assessment.
[0339] 3. Long-term metrics: Analyze historical data over longer periods (such as days or weeks) to identify performance trends and patterns and predict future performance.
[0340] 4. Differentiated metrics: Performance data is segmented according to different dimensions (such as region, network environment, device type, etc.) to support more refined performance evaluation and adaptability analysis.
[0341] The weighted calculation of performance indicators is the core process for forming channel performance scores. This embodiment assigns a weight to each indicator to reflect its relative importance in performance evaluation, and then aggregates the weighted indicator values to generate the final performance score. The weighted calculation considers multiple factors:
[0342] 1. Business Sensitivity: Different businesses have different sensitivities to performance metrics. For example, real-time interactive businesses may be more sensitive to response time, while data processing businesses may be more concerned with throughput.
[0343] 2. User perception: Some metrics directly affect user perception (such as response time), while other metrics may affect backend processing but are not directly perceived by users (such as resource utilization).
[0344] 3. Indicator Reliability: Considering the reliability and completeness of indicator data, the weight of indicators that may have sampling bias or incomplete data should be appropriately reduced.
[0345] 4. Historical correlation: Analyze the historical correlation between indicators and end-user satisfaction or business success rate, and assign higher weight to indicators with strong correlation.
[0346] This embodiment supports a dynamic adjustment mechanism for performance evaluation:
[0347] 1. Adaptive Weighting: Based on historical data analysis, the weights of each metric are automatically adjusted to optimize the accuracy of performance evaluation. For example, if a metric is found to be highly correlated with business success rate, its weight will be automatically increased.
[0348] 2. Anomaly Detection: Identify outliers in performance data, such as sudden performance drops or fluctuations, and handle these anomalies appropriately in the evaluation to avoid temporary fluctuations excessively affecting the score.
[0349] 3. Trend Perception: Consider the changing trends of performance metrics, focusing not only on the absolute values but also on the direction of change. For example, a channel whose performance is gradually declining may receive a lower score, even if its current absolute performance is still acceptable.
[0350] 4. Environmental Adaptability: Adjust the evaluation criteria according to different environmental conditions (such as network conditions, load levels, time factors, etc.) to improve the environmental adaptability of the evaluation.
[0351] This embodiment also implements performance benchmark management, ensuring consistency and fairness in the evaluation through the following mechanisms:
[0352] 1. Relative Score: Compare channel performance with benchmark performance to generate a relative score, reducing the impact of absolute value fluctuations.
[0353] 2. Normalization: Normalize indicators with different dimensions and distributions to make them comparable and combinable.
[0354] 3. Weighted average: The weighted average method is used to combine multiple indicators, balance the influence of each indicator, and form a comprehensive performance evaluation.
[0355] 4. Threshold control: Set acceptable thresholds for performance indicators and penalize indicators that fail to meet the standards by lowering their scores to ensure that basic performance requirements are met.
[0356] These mechanisms enable the generation of performance scores that comprehensively reflect the actual service capabilities of each channel, providing objective and accurate performance dimensions for the final channel evaluation. Performance evaluation is dynamic, quickly reflecting changes in channel status and supporting real-time optimization and adjustment of traffic allocation decisions.
[0357] Multi-factor integration is the core of the channel scoring mechanism. By scientifically integrating various factors such as user weighting, business weighting, performance scores, effective cost coefficients, and anomaly management strategies, a comprehensive score reflecting channel quality is generated, providing a direct basis for subsequent traffic allocation decisions. The key to multi-factor integration lies in balancing the influence of various factors to achieve comprehensiveness, accuracy, and adaptability in the scoring. The first key point of multi-factor integration is the balance and trade-off between factors. It is necessary to reasonably allocate the weight of each factor to ensure that the scoring results reflect the importance of each dimension. Weight allocation considers multiple factors:
[0358] 1. Business Objectives: Adjust the weight of each factor based on current business priorities and strategic goals. For example, cost-sensitive businesses may increase the weight of the effective cost coefficient, while quality-critical businesses may emphasize performance scores.
[0359] 2. Factor Reliability: Considering the reliability and completeness of the data for each factor, factors with high data quality are given higher weights to reduce the impact of uncertainty.
[0360] 3. Factor Correlation: Analyze the correlation between factors to avoid double counting and weight inflation caused by highly correlated factors.
[0361] 4. Environmental adaptability: The weight configuration is dynamically adjusted according to the system environment and operating status. For example, the weight of performance factors may be increased during periods of high load.
[0362] This embodiment supports multiple weight setting strategies:
[0363] 1. Static configuration: Based on expert experience and historical data analysis, fixed weight configurations are set, which are suitable for stable environments and scenarios with clear requirements.
[0364] 2. Rule-driven: Based on preset rules, the weights are dynamically adjusted according to conditions, which is suitable for scenarios with clear adjustment logic.
[0365] 3. Data-driven: By using machine learning methods to analyze historical data and automatically optimize weight configuration, it is suitable for scenarios with rich data and complex patterns.
[0366] 4. Hybrid Strategy: Combining the above methods to form a multi-level weight management mechanism that balances stability and adaptability.
[0367] The second key aspect of multi-factor fusion is the non-linear scoring mechanism, achieved by introducing a saturation index. The saturation index is a crucial technical concept used to control the sensitivity of the score to changes in each factor, thus achieving a non-linear scoring response.
[0368] The basic principle of the saturation index is to adjust the response curve of the score to changes in factors. When the saturation index is 1, the score has a linear relationship with the factor; when the saturation index is greater than 1, the score is less sensitive to changes in factors, forming a "saturation effect," that is, after the factor increases to a certain extent, the rate of increase in the score slows down; when the saturation index is less than 1, the score is more sensitive to changes in factors, forming a "magnification effect," that is, a small change in the factor may lead to a significant change in the score.
[0369] The integration of anomaly management strategies includes the following aspects:
[0370] 1. Anomaly Detection: Based on performance monitoring, error logs, and abnormal events, detect abnormal states of various channels in real time, including performance degradation, increased error rate, and increased timeouts.
[0371] 2. Anomaly Classification: Classify detected anomalies, such as temporary performance fluctuations, continuous performance degradation, intermittent errors, or system failures, and formulate corresponding handling strategies for different types of anomalies.
[0372] 3. Weighting Calculation: Based on the type, severity, and duration of the anomaly, calculate an appropriate weighting coefficient to adjust the channel's final score. For example, minor temporary fluctuations may result in a small weighting reduction, while severe system failures may lead to a significant weighting reduction or even complete exclusion.
[0373] 4. Recovery Mechanism: Define a score recovery mechanism after anomaly recovery to avoid prolonged penalties after the anomaly is resolved. The system supports gradual recovery, meaning the score gradually recovers over time until it returns to normal.
[0374] This embodiment supports multiple anomaly handling modes:
[0375] 1. Threshold mode: When an abnormal indicator exceeds a preset threshold, a weight reduction is triggered. This mode is suitable for scenarios with clearly defined abnormal criteria.
[0376] 2. Deviation Mode: Triggers a weight reduction when the indicator deviates significantly from the historical baseline. This mode is suitable for scenarios with high volatility but regular patterns.
[0377] 3. Trend Pattern: Triggers a deweighting when the indicator shows a continuous deterioration trend, suitable for scenarios that require early intervention.
[0378] 4. Combination mode: Combining the above multiple modes to form a multi-level anomaly detection and governance mechanism.
[0379] The final output of multi-factor fusion is the score for each channel. These scores comprehensively reflect multiple dimensions such as user needs, business needs, channel performance, and cost-effectiveness, and serve as the direct basis for subsequent traffic allocation decisions. The calculation of these scores needs to ensure the following characteristics:
[0380] 1. Comparability: The ratings from different channels can be directly compared, and the relative strengths and weaknesses of the channels are clearly reflected in the scores.
[0381] 2. Stability: When the system state and environment are relatively stable, the score value remains relatively stable, avoiding meaningless frequent fluctuations.
[0382] 3. Sensitivity: The score can react promptly to important state changes and performance fluctuations, supporting real-time adjustment of traffic diversion decisions.
[0383] 4. Explainability: Changes in the rating can be traced back to changes in specific factors, supporting the explanation of the rating and the analysis of causes.
[0384] This embodiment supports a post-processing mechanism for the scoring values:
[0385] 1. Normalization: Normalize the scores to a uniform range for easier understanding and comparison.
[0386] 2. Smoothing: Time smoothing is applied to the score values to reduce the impact of short-term fluctuations and improve the stability of the scores.
[0387] 3. Threshold processing: Threshold limits are imposed on extreme score values to prevent outliers from having an excessive impact on the triage decision.
[0388] 4. Grouping: Group channels with similar scores to simplify subsequent traffic allocation decisions and improve system efficiency.
[0389] Through these mechanisms, the system can generate scientific, comprehensive, and accurate channel scores, providing a reliable foundation for generating traffic diversion probabilities. The multi-factor fusion scoring mechanism is one of the core innovations of this invention. By comprehensively considering multiple dimensions, it achieves precise channel quality assessment, supports intelligent and optimized traffic diversion decisions, and meets diverse needs in complex business environments.
[0390] Adaptive optimization of the scoring mechanism is crucial for ensuring the long-term effectiveness of the channel scoring system. Through continuous data collection, performance evaluation, and parameter optimization, the accuracy and adaptability of the scoring can be continuously improved to address evolving business needs and the technological environment. The first step in adaptive optimization is establishing a robust data collection and feedback mechanism. This requires the continuous collection of the following types of data:
[0391] 1. Scoring input data: This includes user attributes, business attributes, channel performance, and cost data, used to analyze the quality and trends of the input data.
[0392] 2. Rating Result Data: Record historical rating values for each channel and analyze the distribution characteristics, time changes, and fluctuation patterns of the ratings.
[0393] 3. Traffic diversion effect data: Collect traffic diversion decisions made based on the scoring results and their actual effects, including service quality indicators, user experience feedback and business success rate.
[0394] 4. Environmental Status Data: Monitor changes in the system environment, such as load levels, resource utilization, and network conditions, and analyze the impact of environmental factors on the scoring results.
[0395] This embodiment collects feedback data through multiple channels:
[0396] 1. Automatic monitoring: Automatically collect service quality and system status data through the performance monitoring system.
[0397] 2. User feedback: Collect explicit user feedback (such as satisfaction ratings) and implicit feedback (such as changes in behavioral metrics).
[0398] 3. Business metrics: Track core business metrics such as conversion rate, completion rate, and error rate.
[0399] 4. A / B testing: Through a controlled experiment, compare the differences in performance under different scoring configurations.
[0400] Based on the collected data, this embodiment implements multi-level adaptive optimization:
[0401] 1. Parameter-level optimization: Adjusting specific parameters in the scoring calculation, such as the weights of each factor, saturation index, and thresholds. Parameter optimization is usually based on historical data analysis and uses machine learning methods, such as gradient descent, Bayesian optimization, or genetic algorithms, to automatically find the optimal parameter configuration.
[0402] 2. Structural-level optimization: Adjusting the structure and logic of the scoring calculation, such as adding or removing factors, modifying the combination of factors, or updating the form of the scoring function. Structural optimization typically combines expert knowledge and data analysis to identify the limitations of the current scoring mechanism and design a more effective scoring structure.
[0403] 3. Strategy-level optimization: Update the overall scoring strategy and application methods, such as adjusting the scoring update frequency, changing the mapping relationship between scoring and traffic allocation decisions, or optimizing the application scenarios of scoring. Strategy optimization is usually based on long-term effect analysis and changes in business objectives to ensure that the scoring mechanism is consistent with business needs.
[0404] This embodiment supports multiple optimization strategies:
[0405] 1. Incremental optimization: Make minor adjustments based on the current configuration to maintain system stability. Suitable for mature systems and stable environments.
[0406] 2. Exploratory optimization: Try significantly different configurations to discover potential optimization opportunities, suitable for scenarios with poor performance or large environmental changes.
[0407] 3. Multi-objective optimization: Simultaneously consider multiple optimization objectives, such as performance improvement, cost control, and stability enhancement, and find a balance point among these objectives.
[0408] 4. Constraint optimization: Finding the optimal configuration under specific constraints (such as budget restrictions, compliance requirements, etc.).
[0409] The implementation of adaptive optimization should consider the following key technical points:
[0410] 1. Optimization Cycle: Set an appropriate optimization cycle to balance optimization frequency and system stability. Different parameters may have different optimization cycles; for example, weights may be fine-tuned daily, while structures may be evaluated monthly.
[0411] 2. Change control: Implement a strict change control mechanism, conduct thorough testing and verification before making major adjustments, and avoid introducing new problems during the optimization process.
[0412] 3. Rollback Mechanism: Establish a fast rollback mechanism so that when the optimization results are not as expected, the system can quickly revert to the previous stable configuration.
[0413] 4. Multi-environment support: Supports gradual optimization in different environments (such as testing, pre-production and production) to reduce risks.
[0414] 5. Effect Verification: Establish scientific effect verification methods to objectively evaluate optimization results and avoid optimization bias caused by subjective judgment.
[0415] This embodiment also supports context-aware adaptive optimization, allowing for customized optimization strategies for different business scenarios, user groups, or time periods:
[0416] 1. Scenario Differentiation: Identify the specific needs of different business scenarios and set independent optimization goals and parameters for each scenario.
[0417] 2. User segmentation: Optimize the scoring mechanism for different user groups based on user importance and characteristics.
[0418] 3. Time-based adaptation: Consider the impact of time factors on business needs and apply different optimization strategies at different times.
[0419] Through these adaptive optimization mechanisms, the scoring system can continuously evolve, improving its accuracy, adaptability, and effectiveness, ensuring long-term validity and business value. Adaptive optimization forms a closed-loop system, enabling the scoring mechanism to continuously improve itself as business develops and the environment changes, maintaining its optimal state.
[0420] Channel scoring scientifically integrates multiple factors such as user needs, business requirements, channel performance, and cost-effectiveness to assign a comprehensive score to each channel, serving as a direct basis for subsequent traffic allocation decisions. This invention's multi-dimensional factor fusion scoring mechanism, combined with nonlinear sensitivity adjustment and adaptive optimization, achieves accurate, comprehensive, and dynamic channel quality assessment, providing a solid foundation for intelligent traffic allocation.
[0421] In some embodiments, converting the channel score into a traffic splitting probability includes:
[0422] Based on preset temperature parameters, the channel score values are converted into an initial probability distribution;
[0423] Channels whose probabilities in the initial probability distribution exceed the preset maximum allocation ratio are selected, the selected channels are truncated, and the remaining probabilities are renormalized to generate an adjusted probability distribution.
[0424] Using a preset ε-greedy strategy, the adjusted probability distribution is used with a specified first probability, and a channel is randomly selected from a channel pool with a cost lower than a preset threshold with a second probability corresponding to the first probability, thereby generating a diversion probability.
[0425] Temperature, a concept originating from statistical physics, is used in decision-making systems to adjust the "sharpness" or "smoothness" of probability distributions. It controls the balance between deterministic selection (choosing the highest score) and stochastic exploration (considering all possibilities), making it a key parameter for achieving a balance between precise channel allocation and dynamic exploration. In this invention, temperature is used to convert channel scores into an initial probability distribution. The role of temperature can be understood as controlling the "heat" or "coolness" of the decision: high temperature (large temperature parameter) makes the decision more stochastic, with all channels receiving a relatively even probability allocation, favoring exploration; low temperature (small temperature parameter) makes the decision more deterministic, with high-scoring channels receiving a significantly higher probability allocation than low-scoring channels, and the system tending to utilize known advantageous options.
[0426] Choosing the right temperature parameter requires balancing several factors. Lower temperature values (such as 0.1) make the system more "greedy," almost always choosing the highest-scoring option, which may achieve optimal performance in the short term, but could cause the system to ignore potentially better options or react slowly to environmental changes. Higher temperature values (such as 5.0) make the system more "exploratory," trying various options, which can help discover new advantageous options or adapt to changes, but may sacrifice some performance in the short term.
[0427] In practice, temperature parameter settings are typically based on system maturity and environmental stability: higher temperature values are used in the early stages of a system or when the environment changes frequently to enhance exploratory capabilities; lower temperature values are used in the mature stage of a system or when the environment is relatively stable to improve determinism; in mixed scenarios, an adaptive temperature mechanism can be designed to dynamically adjust the temperature parameter based on real-time feedback. In this invention, the temperature parameter is a configurable system parameter managed through a configuration center and supports real-time adjustment. This embodiment also implements multi-level temperature settings, allowing different temperature parameters to be set for different business scenarios, user groups, or time periods, enabling refined management of traffic diversion strategies.
[0428] The conversion process employs the Softmax function or its variants, which can transform any real value into a probability distribution while preserving relative magnitudes. During conversion, the temperature parameter acts as a scaling factor in the Softmax function, directly affecting the shape of the probability distribution. The conversion result is a normalized probability distribution where the sum of probabilities for all channels is 1, and the probability of each channel reflects its relative tendency to be selected in the diversion decision. A key characteristic of temperature parameter conversion is that it preserves the relative advantage between channels but alters the strength of this advantage. For example, if channel A's score is 10 points higher than channel B's, then at a low temperature setting (e.g., 0.1), A might have a 99% probability while B has only a 1% probability; while at a high temperature setting (e.g., 5.0), A might have a 55% probability while B has a 45% probability. This flexible adjustment capability allows the system to achieve the optimal diversion strategy in different scenarios. It is worth noting that temperature parameter conversion is a lossy conversion, meaning the converted probability distribution cannot completely restore the original score values. This lossiness is necessary because it realizes the transformation from deterministic scoring to probabilistic selection, introducing the necessary exploratory and adaptive capabilities.
[0429] Probability distribution truncation and normalization is a risk control mechanism used to prevent excessive traffic concentration from a single channel, ensuring stability and reliability. By setting a maximum allocation ratio limit and reallocating the probability of the excess portion, more balanced resource utilization and more robust service delivery can be achieved. First, the probabilities of each channel in the initial probability distribution are filtered to identify those channels exceeding the preset maximum allocation ratio limit. The maximum allocation ratio limit is a preset safety threshold, representing the maximum proportion of traffic a single channel can handle, typically set between 50% and 80%. Setting this parameter requires a balance between efficiency and safety: setting it too high may lead to excessive traffic concentration, increasing the risk of single points of failure; setting it too low may limit the efficiency of high-performance channels, reducing overall service quality.
[0430] The maximum allocation ratio can be determined based on several factors: Channel capacity: Set an upper limit based on the processing capacity of the channel to ensure that it does not exceed the safe load; Dependency: Consider the dependencies between channels to avoid overloading critical nodes; Failure impact: Assess the potential impact of a single channel failure; Business resilience: Consider the business's tolerance for service interruption.
[0431] This embodiment supports multi-level allocation limit settings, allowing different limit values to be set for different types of channels. For example, high-reliability channels may receive a higher limit (e.g., 80%), while less stable channels may receive a lower limit (e.g., 30%). The system also supports dynamic limit adjustment, adjusting the limit value based on the channel's historical performance and real-time status to improve adaptability. For channels exceeding the maximum allocation ratio limit, probability truncation is performed, forcibly setting their probability to a preset limit value. The truncation operation generates "residual probabilities," which are the sum of probabilities of the truncated portion. To maintain the property that the sum of probabilities is 1, these residual probabilities need to be redistributed.
[0432] Redistribution typically employs a proportional allocation method, distributing the remaining probability to the uncut channels in proportion to their original probabilities. For example, if the original probability distribution is A:70%, B:20%, C:10%, with a maximum limit of 50%, then A is truncated to 50%, resulting in a 20% remaining probability. The original probability ratio of B to C is 2:1, so the remaining 20% is distributed in a 2:1 ratio: B receives 13.33% (the original 20% plus the remaining 13.33%, totaling 33.33%), and C receives 6.67% (the original 10% plus the remaining 6.67%, totaling 16.67%). This redistribution maintains the relative dominance among the uncut channels while limiting the traffic concentration of any single channel.
[0433] In special cases, if only one channel remains after truncation, or if all channels are truncated, the system will employ special handling strategies, such as evenly distributing the remaining probability or allocating based on channel capacity. The system will also record truncation events as reference data for optimizing the traffic distribution strategy.
[0434] Probability truncation and normalization is an iterative process because after redistribution, other channels may exceed the upper limit, requiring further truncation and redistribution. The system will perform multiple rounds of iteration until the probability of all channels is lower than or equal to the maximum allocation ratio upper limit, or until the preset maximum number of iterations is reached.
[0435] By using probabilistic truncation and normalization, excessive traffic concentration can be avoided, reducing the risk of single points of failure and improving the overall stability and reliability of the service. This mechanism is particularly suitable for scenarios with significant differences in channel ratings, ensuring that a reasonable traffic distribution is maintained even when one channel is significantly better than others.
[0436] The ε-greedy strategy is a classic exploration-exploitation balancing mechanism, used in this invention to introduce necessary exploration while integrating cost control functions. This strategy enables continuous exploration of low-cost channels while primarily adhering to optimal traffic allocation decisions, achieving long-term performance optimization and cost-effectiveness.
[0437] The core idea of the ε-greedy strategy is to use a known optimal strategy (exploitation) with a probability of 1-ε (first probability), and to conduct random exploration with a probability of ε (second probability). In this invention, "exploitation" corresponds to using the previously generated adjusted probability distribution, and "exploration" corresponds to randomly selecting from a pool of channels with costs below a preset threshold.
[0438] The ε parameter (i.e., the second probability) is typically set to a small value, such as 0.05 or 0.1, indicating a 5% or 10% probability of choosing exploration over exploitation. Setting this parameter requires a trade-off between short-term performance and long-term benefits: a smaller ε value favors exploiting the currently known optimal choice, providing more stable short-term performance; a larger ε value increases exploration opportunities, helping to discover potential better choices, but may reduce short-term performance.
[0439] The system supports multi-level cost threshold settings, allowing different cost thresholds to be set for different types of businesses or users, enabling refined cost control. For example, high-value businesses may be granted higher cost thresholds, allowing exploration of more high-performance but costly channels; while low-value businesses may be granted lower cost thresholds, limiting exploration to low-cost channels.
[0440] The determination of the cost threshold is based on the previously calculated effective cost coefficient, which takes into account the results of dynamic premiums and differentiated cost treatment, thus achieving a more comprehensive cost assessment. For example, even if a channel has a low base cost, it may be excluded from the low-cost channel pool if its current load is too high, resulting in a high premium; conversely, even if a channel has a slightly higher base cost, it may be included in the low-cost channel pool if it has a low load and therefore no premium.
[0441] A key characteristic of the ε-greedy strategy is its simplicity and robustness. Compared to complex exploration strategies (such as UCB or Thompson Sampling), ε-greedy is easier to implement and debug, and exhibits stable performance in practical applications. This simplicity makes it particularly suitable for large-scale distributed systems, reducing implementation complexity and operational risks. During the application of the ε-greedy strategy, the results of each exploration are recorded, including the selected channel, performance data, and cost data. This data is used to evaluate the effectiveness of the exploration and may trigger updates to the channel scoring model or adjustments to the ε value. This closed-loop feedback mechanism ensures that learning can be made from exploration, continuously optimizing the routing decisions. Ultimately, through the application of the ε-greedy strategy, the generated routing probability incorporates both the optimal selection tendency based on scoring and the necessary exploratory nature and cost control, achieving a balance between short-term performance and long-term optimization, as well as between service quality and cost-effectiveness.
[0442] After the traffic splitting probability is generated, it needs to be translated into actual traffic splitting decisions and their effective execution needs to be ensured. This process includes actual channel selection, request distribution, result monitoring, and strategy optimization, forming a complete traffic splitting closed loop. First, channel selection is performed based on the generated splitting probability. The selection process employs efficient algorithms such as Roulette Wheel or Alias Method to ensure that the distribution of selection results is consistent with the splitting probability. To guarantee the fairness and accuracy of the selection process, a high-quality random number generator is used to avoid potential selection bias. In high-concurrency environments, batch selection optimization is also employed to reduce the overhead of random number generation and improve selection efficiency.
[0443] Once the channel is selected, the request is distributed to the chosen channel. During distribution, necessary request transformations and adaptations are performed to ensure the request conforms to the target channel's interface specifications. Necessary metadata, such as timestamps, tracking IDs, and selection criteria, is also attached to the request for subsequent monitoring and analysis. To ensure the reliability of request processing, a robust error handling mechanism is implemented to handle timeouts, connection failures, or abnormal responses.
[0444] After a request is processed, detailed execution data is collected, including response time, result status, error messages, and resource consumption. This processed data updates the performance metrics for each channel, providing a basis for the next round of traffic allocation decisions. Execution data is also used to verify the effectiveness of the traffic allocation strategy and assess whether it has achieved the expected performance and cost targets. If significant deviations are found, strategy adjustments may be triggered, such as modifying temperature parameters, updating the maximum allocation ratio limit, or adjusting the ε value.
[0445] To ensure the stable implementation of the traffic diversion strategy, several safeguards have been implemented:
[0446] 1. Caching Mechanism: The probability of traffic splitting and related parameters are cached to reduce redundant calculations and improve response speed. The cache supports periodic refresh and event-triggered refresh to ensure data timeliness.
[0447] 2. Degradation Strategy: In extreme cases (such as abnormal calculation process or missing data), the degradation mechanism is activated to use the preset default probability or the last valid calculation result to ensure the continuous operation of the system.
[0448] 3. Smooth transition: When the diversion probability changes significantly, a gradual adjustment may be adopted to avoid the impact of sudden changes in traffic.
[0449] 4. Consistency Guarantee: In a distributed environment, a configuration center or state synchronization mechanism ensures that all nodes use the same flow distribution probability, avoiding inconsistent selection.
[0450] 5. A / B testing support: Supports A / B testing for specific user groups or business scenarios, comparing the effects of different traffic splitting strategies and providing empirical evidence for strategy optimization.
[0451] These mechanisms effectively translate theoretical traffic splitting probabilities into actual traffic allocation, ensuring the reliability, consistency, and adaptability of the splitting process. As the system operates and data accumulates, the splitting strategy will be continuously optimized, achieving optimal resource utilization and maximizing cost-effectiveness while guaranteeing service quality.
[0452] In practical applications, the traffic diversion probability generation mechanism of this invention performs excellently, possessing the following advantages: Strong adaptability: It can dynamically adjust the traffic diversion strategy according to channel status and business needs, adapting to changing environments; Good balance: It achieves a good balance between service quality, system stability, and cost-effectiveness; High scalability: It supports flexible parameter configuration and strategy customization, adapting to different business scenarios; Controllable risk: Through probability truncation, cost control, and exploration mechanisms, it effectively manages traffic diversion risks; Significant benefits: While ensuring service quality, it achieves reasonable cost control and efficient resource utilization.
[0453] In some embodiments, determining the budget ratio based on the real-time call counts of each channel and the effective cost coefficient, performing a status assessment on the budget ratio to obtain the budget status, and determining cost control parameters based on the budget status includes:
[0454] Based on the aforementioned effective cost coefficient, determine the cost per transaction;
[0455] Based on the real-time call count of each channel, the cost per call, and the preset budget limit, calculate the total consumption cost and budget ratio for the current period;
[0456] When the budget ratio is lower than a preset first threshold, the budget status is marked as normal; when the budget ratio is between the first threshold and a preset second threshold, the budget status is marked as alert; when the budget ratio is higher than the second threshold, the budget status is marked as emergency. The first threshold is less than the second threshold.
[0457] In the normal budget state, the default parameters are maintained; in the alert state, the cost weighting coefficient is increased, the exploration coefficient is decreased, and the high-value exemption threshold is increased; in the emergency state, the cost weighting coefficient is increased, the exploration coefficient is set to 0, and the high-value exemption threshold is limited, in order to determine the cost control parameters.
[0458] Budget-aware adaptive cost control is one of the core innovations of this invention. It dynamically adjusts traffic allocation strategy parameters by monitoring system cost consumption in real time, ensuring that the system strictly adheres to budget constraints while providing high-quality service. This mechanism enables the system to intelligently respond to changes in budget pressure and take corresponding control measures under different budget conditions, achieving a dynamic balance between service quality and cost control. This section will elaborate on the principles, implementation process, and key technologies of budget-aware control.
[0459] Unit cost refers to the cost incurred when a single request is processed through a specific channel, and it is the basic unit of cost control. Calculating unit cost based on effective cost coefficients provides foundational data for subsequent budget monitoring and control. The calculation of unit cost first requires determining the billing benchmark. Different channels may use different billing models, such as billing by the number of calls, by data volume, or by computing resource usage. The system will select an appropriate billing benchmark based on the billing characteristics of each channel to ensure the accuracy of cost calculation. For hybrid billing models (such as a base fee plus variable fees), the calculation is broken down to ensure that all types of costs are correctly included in the cost assessment.
[0460] In the actual cost calculation process, the previously generated effective cost coefficient is used as the primary basis. The effective cost coefficient integrates factors such as base cost, dynamic premium, and differentiated discounts, comprehensively reflecting the actual cost level of using the channel under the current conditions. Multiplying the effective cost coefficient by the channel's standard billing unit yields the absolute cost value per unit request, i.e., the cost per transaction.
[0461] For different types of requests, their specific characteristics should be considered, and the cost per request should be adjusted accordingly. For example, requests with large amounts of data may incur higher processing costs, and complex queries may consume more computing resources; these factors will all affect the final cost per request. By analyzing request characteristics and matching cost models, it can be ensured that the cost per request reflects the actual resource consumption of the request.
[0462] Historical cost data for each channel is maintained, and a cost trend model is built for cost forecasting and anomaly detection. When an abnormal fluctuation occurs in the cost of a channel, an alert is triggered and in-depth analysis is conducted to prevent costs from spiraling out of control. The cost trend model also supports seasonal adjustments and long-term trend identification, improving the accuracy of cost forecasting.
[0463] The total cost for the current period is calculated based on the number of real-time calls and the cost per call. The period definition is a crucial parameter for budget management; it can be hourly, daily, weekly, monthly, or a custom time period, depending on business characteristics and budget management needs. Multi-level period settings are supported, allowing simultaneous monitoring of cost consumption at different time scales, such as real-time monitoring of hourly consumption while tracking daily and monthly cumulatives, ensuring that budgets across all time dimensions remain within manageable limits.
[0464] Calculating total cost requires aggregating cost data from all channels. Distributed counting and aggregation techniques are employed to ensure the accuracy and real-time performance of cost statistics in high-concurrency environments. To address network latency and data synchronization issues, consistent hashing and eventual consistency strategies are implemented to balance data accuracy and system performance.
[0465] When calculating the total cost, the system also considers the following special cases:
[0466] 1. Volume Discount: Some channels may offer volume processing discounts, applying the corresponding discount rate based on the actual call volume to reflect the true cost.
[0467] 2. Package Deduction: Prepaid packages or resource packs may change the actual cash outflow, and the effective cost calculation will be adjusted according to the package usage.
[0468] 3. Periodic base fee: Some services may charge a fixed periodic base fee, which is proportionally allocated to each request.
[0469] 4. Fee ceiling or floor: The service contract may stipulate a fee ceiling or floor, and these constraints should be taken into account in the calculation.
[0470] These mechanisms enable accurate calculation and statistics of single-use costs and total consumption costs across all channels, providing a reliable data foundation for budget ratio calculations and status assessments.
[0471] The budget ratio is a core indicator for assessing system cost consumption. It reflects the ratio of actual cost consumption to the budget ceiling and serves as a direct basis for triggering cost control measures. By calculating the budget ratio and conducting status assessments, potential budget risks can be identified in a timely manner, allowing for appropriate control measures to be taken. The budget ratio is calculated based on the total cost consumption for the current period and a preset budget ceiling. The budget ceiling is the maximum allowable cost expenditure, typically determined by business needs, financial planning, and resource constraints. The budget ceiling can be set as a fixed value (e.g., 1000 yuan per day) or a dynamic value (e.g., a forecast value based on historical data plus a safety margin). Multi-level budget management is supported, allowing for the setting of overall budget ceilings and categorized budget ceilings, such as sub-budgets divided by business lines, user groups, or functional modules.
[0472] Setting a reasonable budget ceiling requires consideration of several factors:
[0473] 1. Business Value: Assess the business revenue or value generated by the service to ensure that the budget's return on investment is reasonable.
[0474] 2. User needs: Analyze users' dependence on the service and their quality expectations, and balance cost control and user satisfaction.
[0475] 3. Historical data: Predict future demand based on historical cost data to avoid over- or under-budgeting.
[0476] 4. Seasonal factors: Consider the cyclical fluctuations in business and reserve sufficient budget for peak periods.
[0477] 5. Growth Expectations: Based on business growth expectations, reserve appropriate space for new demand.
[0478] This embodiment also supports dynamic budget adjustments, allowing for real-time modification of the budget ceiling based on actual business conditions and financial status. Budget adjustments typically require authorization, implementing a multi-level approval process and change log to ensure the standardization and traceability of budget management.
[0479] Calculate the budget ratio based on total cost and budget ceiling. The budget ratio is usually expressed as a percentage, such as 60% of the budget currently used. During the calculation, the cycle progress is considered, comparing the budget ratio with the time schedule to assess whether the rate of consumption is reasonable. For example, in a monthly budget, if 50% of the budget has been used up in the first 10 days, the rate of consumption is too high and may require early intervention.
[0480] After the budget ratio is calculated, a status assessment is performed, classifying the current budget situation into one of three states: normal budget status, alert status, or emergency status. The status assessment is based on a comparison of the budget ratio with two key thresholds:
[0481] 1. First Threshold: This represents the warning line for budget usage. When the budget ratio exceeds this value, a warning state is entered, and mild control measures are implemented. The first threshold is typically set between 60% and 75%, depending on the business's cost sensitivity and acceptable level of control.
[0482] 2. Second Threshold: This represents the emergency threshold for budget usage. When the budget ratio exceeds this value, an emergency state is activated, and strict cost control measures are initiated. The second threshold is typically set between 85% and 95% to leave a certain safety margin and prevent the budget from being completely exhausted.
[0483] The system determines the current budget status by comparing the budget ratio with a threshold: when the budget ratio is below the first threshold, it is in a normal budget state, indicating that current cost consumption is within an acceptable range and no special control measures are needed. When the budget ratio is between the first and second thresholds, it is in a warning state, indicating that the cost consumption rate is high and appropriate control measures are needed to prevent the budget from being exhausted too quickly. When the budget ratio is above the second threshold, it is in an emergency state, indicating that cost consumption is approaching the budget limit and strict control measures are needed to ensure that the budget constraint is not exceeded. The status assessment results are recorded in the system log and trigger corresponding notification mechanisms, such as email reminders, SMS alerts, or dashboard updates, to ensure that relevant personnel are informed of the budget status in a timely manner. It also supports a status transition history record, facilitating subsequent analysis of budget usage patterns and optimization of control strategies. Through budget ratio calculation and status assessment, cost consumption can be monitored in real time, budget risks can be identified in a timely manner, and a clear decision-making basis can be provided for subsequent cost control.
[0484] The core of this invention is the adaptive cost control based on budget status parameter adjustment. It dynamically adjusts the key operating parameters of the system according to different budget statuses, realizes automatic adjustment of cost control intensity, maintains the best service quality when the budget is sufficient, and gradually tightens cost expenditures when the budget is tight, ensuring that budget constraints are strictly adhered to.
[0485] Based on the previously assessed budget status (normal budget, alert status, or emergency status), adjust the following three key control parameters:
[0486] 1. Cost Weighting Coefficient: Determines the relative importance of cost factors in traffic allocation decisions. The cost weighting coefficient is a crucial parameter in channel scoring calculations, directly affecting the score of each channel and the final traffic allocation probability. A higher cost weighting coefficient makes the system more inclined to select lower-cost channels, even if their performance may be slightly lower; a lower cost weighting coefficient makes the system prioritize performance and willing to pay higher costs for better performance.
[0487] 2. Exploration Coefficient: This determines the system's tendency to explore new options, i.e., the ε value in the ε-greedy strategy mentioned earlier. The exploration coefficient determines the proportion of requests allocated to random exploration by the system, affecting its ability to discover new cost-benefit equilibrium points. A higher exploration coefficient increases exploration and may discover better options, but may also increase short-term costs; a lower exploration coefficient reduces exploration, focusing on known optimal options, which helps control short-term costs, but may miss potentially better options.
[0488] 3. High-Value Exemption Threshold: This threshold determines which high-value requests are exempt from cost control and continue to enjoy optimal service. The high-value exemption threshold is a key parameter for achieving differentiated service; it allows the system to provide the best experience for important business and users even under cost control conditions. A lower exemption threshold means more requests are considered "high-value" and receive exemptions; a higher threshold limits the scope of exemptions, making more requests subject to cost control.
[0489] Depending on the budget status, different parameter adjustment strategies are adopted:
[0490] 1. Parameter settings under normal budget conditions:
[0491] When the system is in a normal budget state, the budget is sufficient, and no special cost control measures are required. Maintain default parameter settings to ensure optimal service quality and moderate exploration. The cost weighting coefficient should be kept at its default value, typically set to a level that balances cost and performance, such as between 0.3 and 0.5. The exploration coefficient should be kept at its default value, typically set to a moderate level of exploration, such as between 0.05 and 0.1, ensuring the system continuously explores potential better options. The high-value exemption threshold should be kept at its default value, typically set to a moderate level, such as between 1.0 and 1.2, ensuring that truly high-value requests receive special handling.
[0492] In this state, the operational parameters focus on optimizing overall service quality and user experience. Cost control is a necessary consideration, but not the primary one. The effectiveness of these default parameters should be evaluated regularly, and fine-tuned based on long-term operational data to ensure optimal balance across different business scenarios.
[0493] 2. Parameter adjustment in alert status:
[0494] When entering alert mode, the budget consumption rate exceeds expectations, requiring moderate control measures to slow cost growth without excessively impacting service quality. The following parameter adjustments can be made: Increase the cost weighting coefficient, typically by 20% to 50%, such as from the default 0.4 to 0.5 or 0.6. This places greater emphasis on cost factors in traffic allocation decisions, favoring more economical channels without completely ignoring performance factors. Decrease the exploration coefficient, typically by 30% to 50%, such as from the default 0.1 to 0.05 or 0.07. This reduces the proportion of random exploration, focusing more on utilizing known cost-effective options and minimizing potential additional costs from exploration. Increase the high-value exemption threshold, typically by 10% to 20%, such as from the default 1.2 to 1.3 or 1.4. This narrows the range of requests eligible for exemption; only higher-value requests continue to enjoy optimal service, while medium-value requests begin to be affected by cost control. Parameter adjustments during alert mode are a moderate cost control strategy designed to slow cost growth without significantly impacting the core business experience. Monitor the effects of these adjustments. If the budget ratio continues to rise, further adjustments may be made to the parameters. If the budget ratio begins to fall, the current settings may be maintained or the default values may be gradually restored.
[0495] 3. Parameter adjustment in emergency situations:
[0496] When the system enters an emergency state, budget consumption is nearing its limit, requiring strict control measures to ensure it does not exceed budget constraints. The system will adjust the following parameters: Significantly increase the cost weighting coefficient, typically by 50% to 100% or more, such as from the default 0.4 to 0.6 or 0.8. This makes cost factors dominate the triage decision, strongly favoring the most economical channel, even if it may lead to some performance degradation. Set the exploration coefficient to 0, completely stopping random exploration. This ensures the system focuses on known optimal cost-effectiveness options, no longer trying potential new options, and maximizing control over short-term cost expenditures. Significantly increase the high-value exemption threshold, typically by 30% to 50% or more, such as from the default 1.2 to 1.6 or 1.8, and may even set an upper limit (e.g., not exceeding 2.0). This strictly limits the scope of requests eligible for exemptions; only the highest-value critical business can continue to enjoy optimal service, and most requests are subject to strict cost control.
[0497] Parameter adjustments during emergencies are a strict cost control strategy, prioritizing budget constraints and potentially sacrificing some non-core business experience. Closely monitor the effects of these adjustments, providing real-time alerts to notify business teams of potential service level changes. As the budget situation improves, gradually relax controls and restore parameter settings.
[0498] This embodiment supports fine-grained adjustment of various parameters, allowing for different adjustment strategies to be set for different business lines, user groups, or functional modules. For example, core businesses may receive a more moderate adjustment strategy to maintain basic service quality even in emergency situations; while non-critical businesses may adopt a more aggressive adjustment strategy to significantly reduce costs when budgets are tight.
[0499] This embodiment also implements a smooth transition mechanism to avoid drastic fluctuations in service quality caused by sudden changes in parameters. When the budget status changes, a gradual adjustment may be adopted, such as gradually reaching the target parameter value over 30 minutes or 1 hour, giving the business and users time to adapt.
[0500] This dynamic parameter adjustment mechanism based on budget status intelligently responds to different budget pressures, ensuring core business experience while strictly controlling cost expenditures and guaranteeing adherence to budget constraints. This adaptive cost control strategy satisfies both financial management requirements and maintains service continuity and reliability, representing a key innovation in maximizing cost-effectiveness in this invention.
[0501] A differentiated control strategy ensures that differentiated service levels can be provided for businesses of different value, even under cost-control conditions. This strategy allows for overall cost control while prioritizing service quality for core businesses, achieving optimal resource allocation.
[0502] The core of differentiated control is the high-value exemption mechanism mentioned earlier, which allows eligible high-value requests to be exempt from or partially exempt from cost control measures. This mechanism ensures that critical business operations receive optimal service, maintaining business continuity and user experience, even under tight budgets.
[0503] The implementation of the high-value exemption mechanism is based on the following key technical points:
[0504] 1. Value Assessment: Based on user and business attributes, a value score is calculated for each request. During the assessment, the system considers multiple value dimensions, such as: Business Criticality: determining whether the request belongs to a core business process; User Level: considering the user's VIP or membership level; Transaction Value: assessing the transaction amount involved in the request; Compliance Requirements: considering legal or contractual requirements for service levels; Risk Level: assessing the potential risk impact of request failure; Usage Frequency: considering the frequency of function usage and traffic share. The value assessment model supports dynamic updates, allowing adjustments to the scoring rules based on business changes to ensure that the assessment results reflect current business priorities.
[0505] 2. Exemption Threshold Management: Different high-value exemption thresholds can be set based on budget status, and multi-level threshold designs are supported: Full Exemption Threshold: Requests exceeding this threshold are completely unaffected by cost control; Partial Exemption Threshold: Requests exceeding this threshold but below the full exemption threshold receive partial cost control exemption; No Exemption Threshold: Requests below this threshold are fully subject to cost control policies. This embodiment also supports time-differentiated thresholds, allowing different exemption policies to be set at different times, such as providing a more lenient exemption policy during peak business periods and adopting stricter exemption standards during off-peak periods.
[0506] 3. Exemption Implementation: For requests granted exemptions, the following differentiated processing is provided: Parameter Exemption: More lenient cost control parameters, such as lower cost weighting coefficients, are used for exemption requests; Channel Exemption: Exemption requests are allowed to use high-performance but more expensive premium channels; Quota Exemption: Dedicated resource quotas are reserved for exemption requests to ensure service quality; Priority Enhancement: Exemption requests are given higher processing priority during resource contention. A marking mechanism maintains consistency in exemption status at each stage of request processing, ensuring end-to-end differentiated service.
[0507] The implementation of differentiated control strategies also includes the following advanced features:
[0508] 1. Tiered Exemption: Provides tiered exemption effects based on the value of the request. The higher the value, the greater the exemption, creating smooth service differentiation and avoiding the "cliff effect" (i.e., a significant difference in service quality caused by a request value that is slightly higher or lower than a threshold).
[0509] 2. Scenario Adaptation: Customize exemption strategies for different business scenarios. For example, transaction-related scenarios may focus more on transaction amount, while content-related scenarios may focus more on user level, supporting scenario-based exemption rule configuration.
[0510] 3. Exemption Quota Management: Set a total exemption quota to control the overall proportion of exemption requests. When exemption requests exceed the preset proportion, the exemption standard may be raised to ensure that the overall cost control target is not affected.
[0511] 4. Exemption Effectiveness Feedback: Record and analyze performance and cost data of exemption requests to evaluate the effectiveness of exemption strategies. Based on feedback data, exemption thresholds or exemption effects may be adjusted to optimize differentiated control strategies.
[0512] Implementing differentiated control strategies requires an efficient request processing mechanism. The following techniques are employed to ensure low overhead and high performance:
[0513] 1. Pre-calculated caching: Value scores for frequently accessed users and services are pre-calculated and cached to reduce real-time computing overhead.
[0514] 2. Hierarchical judgment: Employs multi-level judgment logic to quickly filter requests that clearly do not meet the exemption conditions, reducing the number of detailed evaluations required.
[0515] 3. Batch processing: Supports batch evaluation and exemption judgment of requests, improving processing efficiency, and is especially suitable for high-concurrency scenarios.
[0516] 4. Asynchronous optimization: Some complex evaluation logic can be executed asynchronously without affecting the performance of the main request path.
[0517] A differentiated control strategy can maintain business flexibility and service differentiation even under cost control conditions, avoiding the business disruptions or severe decline in user experience that may result from a simplistic "one-size-fits-all" cost control approach. This strategy is particularly suitable for systems with significant differences in business value, enabling optimal resource allocation and maximization of business value within a limited budget.
[0518] By comprehensively utilizing budget awareness monitoring, status assessment, dynamic parameter adjustment, and differentiated control strategies, this invention achieves an intelligent, precise, and flexible cost control mechanism that can strictly adhere to budget constraints while providing differentiated services based on business importance, thus finding the optimal balance between business growth and budget management.
[0519] In some embodiments, after determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy, the process includes:
[0520] Based on the channel score of each channel, a set of orthogonal basis functions are selected, which are used to characterize the candidate traffic splitting strategy;
[0521] Based on the channel score and the pre-acquired historical traffic distribution data, the key objectives of the candidate traffic distribution strategy are determined. The key objectives include performance objectives, cost objectives, load measurement objectives, and strategy stability objectives.
[0522] Based on preset current business priority data, determine the target weight of the key objective;
[0523] Based on the target weights, the performance target, the cost target, the load measurement target, and the strategy stability target are weighted and calculated to obtain the energy functional of the candidate traffic splitting strategy.
[0524] Any candidate splitting strategy is represented as a linear combination of the basis functions. The minimization problem of the energy functional is projected onto the subspace spanned by the basis functions using a preset Galerkin algorithm. An optimized splitting strategy is generated by iteratively calculating the residual, projection, line search, and coefficient update. The residual is determined by the current splitting strategy.
[0525] Based on the optimized traffic splitting strategy, the actual traffic splitting effect indicated by the response result, and the preset error tolerance threshold, the error between the actual effect of each local area and the optimized traffic splitting strategy is calculated.
[0526] For regions where the error is less than a preset first error threshold, the weight coefficients of the corresponding basis functions are fine-tuned; for regions where the error is greater than the first error threshold but less than a preset second error threshold, the corresponding basis functions are subdivided; and for regions where the error is greater than the preset first error threshold, the basis functions are reconstructed to obtain adaptively adjusted basis functions.
[0527] Based on the channel score and the optimized traffic splitting strategy, the score adjustment amount for each channel is calculated, and the enhanced traffic splitting score is obtained based on the channel score and the score adjustment amount.
[0528] First, based on the channel ratings for each channel, a set of orthogonal basis functions is selected as the mathematical foundation for strategy representation. Basis functions are a set of mutually orthogonal mathematical functions capable of expressing complex traffic splitting strategy spaces. Orthogonality guarantees the linear independence between basis functions, ensuring that any traffic splitting strategy can be uniquely represented by a linear combination of basis functions. Polynomial basis functions, wavelet basis functions, or radial basis functions are typically chosen as the initial basis function set, as these functions possess good mathematical properties and computational efficiency. The selection of basis functions follows a "low-order priority" principle, that is, low-order simple functions are first used to capture the main features of the strategy, and then higher-order functions are gradually introduced to describe detailed changes. This aligns with the human cognitive process of decision-making from coarse to fine, ensuring expressive power while controlling computational complexity.
[0529] Next, based on channel scores and pre-acquired historical traffic distribution data, the key objectives of the candidate traffic distribution strategies are clearly defined. These objectives include four dimensions: performance objectives, cost objectives, load measurement objectives, and strategy stability objectives. Performance objectives focus on user experience metrics, such as average response time and success rate; cost objectives focus on resource utilization efficiency, such as the average cost per request; load measurement objectives focus on system balance, such as the uniformity of load distribution across channels; and strategy stability objectives focus on the smoothness of strategy changes, avoiding system instability caused by frequent and drastic adjustments. Historical traffic distribution data provides a reference benchmark in the actual business environment for objective definition, making the objective settings more in line with actual needs.
[0530] Subsequently, based on pre-defined current business priority data, the target weights of each key objective are determined. Business priority data reflects the degree of emphasis placed on different objectives in the current business environment; for example, system stability may be prioritized during peak periods, while cost-effectiveness may be emphasized during off-peak periods. The target weights determine the influence of each objective in the final decision-making process and serve as a crucial bridge between business needs and technical strategies.
[0531] Based on defined objective weights, performance, cost, load measurement, and policy stability objectives are weighted and calculated to construct an energy functional for candidate traffic splitting strategies. The energy functional is a mathematical function that maps any traffic splitting strategy to a real value; a smaller value indicates a better strategy. The construction of the functional follows the variational calculus principle, transforming the multi-objective optimization problem into a minimization problem of a single functional, simplifying the subsequent optimization process. The energy functional comprehensively considers the deviation between the expected and actual values of each objective, as well as factors such as policy smoothness and computational complexity.
[0532] After establishing the energy functional, any candidate splitting strategy is represented as a linear combination of basis functions, and then the optimization problem is solved using the pre-defined Galerkin algorithm. The Galerkin method is a classic numerical method for solving variational problems. Its core idea is to project the infinite-dimensional variational problem onto a finite-dimensional subspace, transforming it into a computable system of linear equations. Specifically, the splitting strategy is progressively optimized through four steps: residual calculation, projection, line search, and coefficient update. The residual is the difference between the current strategy and the ideal strategy, represented by the gradient of the energy functional; projection maps the residual to the subspace spanned by the basis functions; line search determines the optimal step size along the projection direction; and update corrects the combination coefficients of the basis functions based on the step size. This iterative process continues until the residual is less than a preset threshold or the maximum number of iterations is reached, ultimately generating the optimized splitting strategy.
[0533] After the optimized strategy is generated, it guides actual traffic allocation decisions, and response results are collected. To evaluate the effectiveness of the strategy, the actual traffic allocation effect indicated by the response results is compared with the expected effect of the optimized traffic allocation strategy, and the error for each local region is calculated. A local region refers to a sub-region in the feature space, corresponding to a certain type of requests with similar characteristics. The error calculation considers a preset error tolerance threshold to ensure that the system is not sensitive to small fluctuations and avoids over-optimization.
[0534] Based on the error assessment results, a hierarchical adaptive adjustment strategy is adopted: for regions with errors less than a preset first error threshold, only the weight coefficients of the corresponding basis functions are finely adjusted, maintaining the overall structure of the strategy unchanged; for regions with errors greater than the first threshold but less than the second threshold, the corresponding basis functions are subdivided to increase local expressiveness, similar to adaptive mesh refinement; for regions with errors greater than the second threshold, the basis functions are completely reconstructed, and a new set of basis functions more suitable for the characteristics of that region is adopted. This hierarchical adjustment strategy balances computational efficiency and optimization effect, concentrating computational resources on the regions most in need of improvement.
[0535] Finally, based on the original channel scores and the optimized traffic allocation strategy, the score adjustment amount for each channel is calculated. The score adjustment amount reflects the change from the initial score to the optimized score, integrating the influence of historical experience and real-time feedback. Adding the original channel score to the score adjustment amount yields the enhanced traffic allocation score, which more comprehensively reflects the overall value and applicability of the channel. The enhanced traffic allocation score becomes the direct input for generating subsequent traffic allocation probabilities, improving the accuracy and adaptability of the final traffic allocation decision.
[0536] This traffic allocation strategy optimization mechanism based on variational principles achieves closed-loop optimization from theoretical models to actual feedback. By using mathematical methods to capture the complex relationship between business needs and system states, it significantly improves the intelligence and adaptability of traffic allocation decisions. Especially when dealing with highly dynamic and complex business scenarios, this mechanism can quickly identify local performance bottlenecks and perform targeted optimizations, demonstrating flexibility and accuracy that traditional fixed strategies cannot match.
[0537] In some embodiments, after obtaining user attribute data, business attribute data, channel performance data, and channel cost data, the following steps are included:
[0538] Based on the user attribute data, the business attribute data, the channel performance data, and the channel cost data, a feature space and a feature mapping function are constructed.
[0539] Based on the feature space and the pre-acquired historical decision data, the traffic diversion decision problem is represented as a high-dimensional tensor, where each dimension of the high-dimensional tensor corresponds to a decision factor in the feature space, and the dimensions include user dimension, business dimension, channel dimension, performance dimension and cost dimension;
[0540] Based on the historical decision data and the feature mapping function, the factor correlation between each decision factor is calculated, and a dependency graph is constructed based on the factor correlation. The factor correlation includes one of mutual information and conditional entropy. The nodes in the dependency graph represent the decision factors, and the edge weights in the dependency graph represent the strength of the factor correlation.
[0541] Based on the dependency graph, a tree structure is generated by using a preset tree structure optimization algorithm to minimize the overall tensor rank and group decision factors with a correlation strength greater than a preset strength threshold into adjacent nodes.
[0542] Using a preset alternating least squares algorithm, the high-dimensional tensor is split into multiple low-rank tensor cores according to the tree structure, and the core connection information is determined based on the position of the low-rank tensor cores in the tree structure and the association dimension of the low-rank tensor cores.
[0543] First, based on the acquired user attribute data, business attribute data, channel performance data, and channel cost data, a feature space and feature mapping function are constructed. The feature space is a multi-dimensional mathematical space, where each dimension corresponds to a decision factor, such as user VIP level, business risk level, or channel response time. Each decision request is represented as a coordinate point in the feature space, the position of which is determined by the specific values of each decision factor. The feature mapping function is a set of mathematical transformations that convert the original attribute data into a standardized representation in the feature space. This process includes feature extraction, normalization, and dimensionality reduction. Feature extraction identifies key information from the original data; normalization unifies features of different dimensions to the same scale, typically using Min-Max normalization or Z-score standardization; dimensionality reduction uses techniques such as Principal Component Analysis (PCA) or t-SNE to remove redundant features and retain the most informative feature combinations. The core purpose of constructing the feature space is to transform the traffic splitting decision problem into a mapping relationship in the feature space, laying the foundation for subsequent tensor modeling.
[0544] Next, based on the feature space and pre-acquired historical decision data, the traffic allocation decision problem is represented as a high-dimensional tensor. A tensor is a high-dimensional generalization of a matrix and can be viewed as a multi-dimensional array, naturally representing complex systems with multiple interacting factors. In this invention, traffic allocation decision is modeled as a five-dimensional tensor, with the five dimensions corresponding to the user dimension, business dimension, channel dimension, performance dimension, and cost dimension, respectively. The user dimension represents different combinations of user characteristics, such as different combinations of VIP level and activity level; the business dimension represents different business types and parameters; the channel dimension represents the available service channels; the performance dimension quantifies service quality indicators; and the cost dimension represents the resource consumption level. Each element value in the tensor represents the optimal traffic allocation decision under a specific five-dimensional coordinate system. Historical decision data is used to initialize this tensor, filling in the values of known decision points and providing a basis for inference for unknown decision points.
[0545] Subsequently, based on historical decision data and feature mapping functions, the factor correlations among decision factors are calculated, and a dependency graph is constructed. Factor correlation is a quantitative description of the strength of the association between decision factors. This invention uses mutual information and conditional entropy from information theory as measurement tools. Mutual information measures the amount of information shared between two variables; a higher value indicates a stronger association. Conditional entropy measures the uncertainty of one variable given the knowledge of another; a lower value indicates a stronger association. By calculating the mutual information or conditional entropy between all pairs of decision factors in the feature space, the system constructs a complete factor correlation matrix. Based on this matrix, the system constructs a dependency graph, which is a weighted undirected graph where nodes represent decision factors and edge weights represent the strength of the correlation between factors. The dependency graph intuitively displays the topological structure of the decision space, providing structured guidance for subsequent tensor decomposition.
[0546] Based on the constructed dependency graph, an optimal tree structure is generated using a pre-defined tree structure optimization algorithm. The tree structure optimization has two objectives: firstly, to minimize the overall tensor rank, reducing computational complexity; and secondly, to ensure that highly correlated decision factors are grouped in adjacent nodes, guaranteeing the model's expressive power. The tree structure optimization algorithm typically employs a modified minimum spanning tree algorithm, using the inverse of factor correlation as edge weights to minimize the total weight while ensuring connectivity. The algorithm also introduces constraints requiring decision factors with correlation strength greater than a preset threshold to be located in adjacent nodes. The generated tree structure reflects the hierarchical relationship between decision factors, decomposing the high-dimensional problem into a series of low-dimensional sub-problems, significantly reducing the complexity of subsequent computations.
[0547] Finally, the pre-defined Alternating Least Squares (ALS) algorithm is used to decompose the high-dimensional tensor into multiple low-rank tensor cores based on the generated tree structure. Alternating Least Squares is a classic algorithm for tensor decomposition; its core idea is to alternately optimize each factor until convergence, while keeping other factors fixed. In this invention, the ALS algorithm is used to implement Tree Tensor Network (TTN) decomposition, splitting the original high-dimensional tensor into a series of low-rank tensor cores according to a tree structure. Each core corresponds to a node in the tree structure, has low dimensionality, and is easy to compute. Based on the position of these low-rank tensor cores in the tree structure and their associated dimensions, core connection information is determined. Core connection information describes how to recombine these low-rank cores to recover the original tensor and is a key basis for subsequent decision calculations.
[0548] This tensor network-based decision modeling framework transforms the complex triage decision problem into a structured tensor computation problem. It preserves the complete information of the complex interactions between decision factors while significantly reducing computational complexity through tree-structure decomposition. Particularly when dealing with high-dimensional sparse decision spaces, this framework efficiently captures key patterns and makes accurate inferences, overcoming the limitations of traditional methods in the face of the curse of dimensionality. Simultaneously, the framework exhibits good interpretability, intuitively displaying the decision logic through dependency graphs and tree structures, facilitating maintenance and optimization. This enables the triage decision system to handle more complex business scenarios and higher-dimensional decision spaces, providing more accurate decision support while maintaining high computational efficiency.
[0549] In some embodiments, determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy further includes:
[0550] Using the feature mapping function, the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy are mapped to the feature space to construct a real-time feature vector;
[0551] Based on the core connectivity information, locate the low-rank tensor core in the tree structure that is related to the response result;
[0552] Based on the real-time feature vector and the located low-rank tensor core, a preset tensor shrinking algorithm is used to calculate from the leaf to the root along the tree structure. Each component of the real-time feature vector is shrunk with the corresponding dimension of the low-rank tensor core. Information is passed from bottom to top according to the tree structure and the scoring vector is obtained at the root node to obtain the channel scoring value.
[0553] First, using feature mapping functions, user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies are mapped to the feature space to construct a real-time feature vector. The feature mapping function is a set of predefined mathematical transformations responsible for converting raw data of different types and dimensions into standardized feature representations. In this step, various types of data undergo specific processing: user weights and business weights are mapped to the user and business dimensions of the feature space through piecewise linear functions; performance scores are normalized and mapped to the performance dimension; the effective cost coefficient (effective cost coefficient is obtained by adjusting the cost coefficient as cost coefficient = cost coefficient * δ only when (user weight + business weight) > threshold Th; user and business attributes are triggering conditions) is logarithmically transformed and mapped to the cost dimension; the weighting coefficient in the anomaly management strategy directly affects the feature values of the channel dimension. The mapping process ensures the compatibility and comparability of different types of data in the feature space while preserving key information from the original data. The constructed real-time feature vector is a multi-dimensional vector, with each component corresponding to a coordinate value in the feature space, fully describing the feature state of the current request.
[0554] Next, based on the core connectivity information, the low-rank tensor cores related to the response result in the tree structure are located. The core connectivity information is the structural data obtained through tensor decomposition mentioned earlier, recording the connection relationships and dimensional correspondences between the cores in the tree tensor network. The low-rank tensor cores related to the response result refer to those core tensors in the tensor network that are directly related to the decision output of the current request (i.e., the channel score). The location process first confirms the position of the output dimension, i.e., the channel dimension, in the tree structure; then, along the tree structure, all core tensors on the path from the leaf node to the node containing that dimension are determined; finally, the validity of each core tensor is verified to ensure data integrity. This location process is similar to determining the activation path in a neural network, providing a precise computational range for subsequent calculations.
[0555] Finally, based on the real-time feature vector and the localized low-rank tensor core, a pre-defined tensor shrinking algorithm is used to calculate the channel score. Tensor shrinking is a fundamental operation in tensor computation, referring to the summation operation along a specific dimension of the tensor, merging two tensors into a new tensor while reducing the overall dimensionality. In this invention, a hierarchical shrinking algorithm unique to tree tensor networks is adopted, calculating from the leaves to the root along the tree structure. The specific process is as follows: First, each component of the real-time feature vector is shrunk with the low-rank tensor core of the corresponding leaf node, that is, the feature value is multiplied with the tensor element of the corresponding dimension and summed along that dimension to obtain a lower-dimensional intermediate result; then, these intermediate results are passed up the tree structure, and a new round of shrunking operation is performed with the low-rank tensor core of each parent node; finally, when the calculation reaches the root node, a score vector is obtained, where each element corresponds to the score value of a channel. This bottom-up contraction computation method fully utilizes the hierarchical characteristics of tree structures, reducing the original complexity of direct tensor computation (O(n^d) where n is the number of values per feature dimension and d is the total number of dimensions) to O(n·d·r^2) (where r is the tensor rank), achieving an exponential reduction in computational complexity.
[0556] The core of the tensor shrinking algorithm lies in its utilization of the conditional independence structure in the decision space, decomposing globally complex relationships into combinations of locally simple relationships through a tree structure. This computational process can be compared to information transfer in probabilistic graphical models or forward propagation in neural networks, but its mathematical foundation is more rigorous and its computational efficiency is higher. Especially for high-dimensional sparse decision spaces, traditional methods often face the "curse of dimensionality," while tensor network models effectively avoid this problem through low-rank decomposition and structured computation.
[0557] Furthermore, the tensor shrinkage algorithm exhibits excellent parallel computing characteristics, allowing node computations at the same level to be executed in parallel, fully utilizing the parallel computing capabilities of modern hardware to further improve computational efficiency. It also implements a result caching mechanism, enabling the reuse of intermediate computation results for requests with minimal changes in feature values over a short period, thus avoiding redundant calculations.
[0558] This invention achieves efficient processing of complex, multidimensional decision-making problems through this tensor network-based scoring mechanism. Compared to traditional linear weighting or rule-based judgment methods, this mechanism can accurately capture the nonlinear relationships and higher-order interactions between various decision factors, producing more precise scoring results. Furthermore, because the entire calculation process is based on a rigorous mathematical model, it is predictable and interpretable, facilitating subsequent optimization and adjustment. This provides a solid theoretical foundation and efficient computational framework for the triage decision system, enabling it to handle more complex and dynamic business scenarios while maintaining high computational efficiency and decision accuracy.
[0559] like Figure 2As shown in the figure, this application provides a traffic diversion decision system that integrates multi-dimensional dynamic coupling, including:
[0560] The multidimensional data acquisition module 201 is used to acquire user attribute data, business attribute data, channel performance data, and channel cost data.
[0561] The channel abnormal status processing module 202 is used to determine channel abnormal indicator data based on the channel performance data, calculate the abnormal weighting coefficient based on the channel abnormal indicator data, and perform circuit breaker status detection to obtain the circuit breaker status, and generate an abnormal management strategy based on the abnormal weighting coefficient and the circuit breaker status, wherein the channel abnormal indicator data includes the channel error rate and timeout rate.
[0562] The dynamic cost coefficient calculation module 203 is used to extract the basic cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic cost information of the channel, the dynamic premium factor, the user attribute data and the business attribute data.
[0563] The traffic distribution scoring calculation module 204 is used to calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, the business weights, the performance scores, the effective cost coefficient, and the anomaly management strategy.
[0564] The diversion probability generation module 205 is used to convert the channel score into a diversion probability;
[0565] The budget cost control module 206 is used to determine the budget ratio based on the real-time call count of each channel and the effective cost coefficient, to perform a status assessment on the budget ratio to obtain the budget status, and to determine cost control parameters based on the budget status.
[0566] The request execution module 207 is used to select a target channel based on the traffic splitting probability, send a processing request to the target channel, receive the response result returned by the target channel after responding to the processing request, and update the channel performance data or the channel abnormality indicator data according to the response result.
[0567] The system of this application embodiment can execute the method provided in this application embodiment. The implementation principle is similar. The actions performed by each module in the system of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the system, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0568] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A diversion decision-making method integrating multi-dimensional dynamic coupling, characterized in that, Includes the following steps: Acquire user attribute data, business attribute data, channel performance data, and channel cost data; Based on the channel performance data, channel anomaly index data is determined. Based on the channel anomaly index data, anomaly weighting coefficient is calculated, and circuit breaker status detection is performed to obtain the circuit breaker status. Based on the anomaly weighting coefficient and the circuit breaker status, anomaly management strategy is generated. The channel anomaly index data includes the channel error rate and timeout rate. Extract the basic cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic cost information, the dynamic premium factor, the user attribute data, and the business attribute data. Calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies. Convert the channel rating into a traffic splitting probability; Based on the real-time call counts of each channel and the effective cost coefficient, the budget ratio is determined, the budget ratio is evaluated to obtain the budget status, and cost control parameters are determined based on the budget status. Based on the traffic diversion probability, a target channel is selected, a processing request is sent to the target channel, and a response result is received from the target channel after responding to the processing request. The channel performance data or the channel anomaly indicator data is updated according to the response result.
2. The method according to claim 1, characterized in that, The acquisition of user attribute data, business attribute data, channel performance data, and channel cost data includes: The user identifier is obtained through the user authentication interface, and the attribute data corresponding to the user identifier is queried from the user configuration center to generate user attribute data, which includes VIP level, historical complaint rate and abnormal sensitivity. The business parameters of the current request are parsed, and the order value, transaction type and risk level are extracted from the business parameters. Combined with the business attribute parsing rules that match the business scenario, business attribute data is generated. The request latency, success rate, accuracy, and stability metrics for each channel are calculated using a sliding time window to generate channel performance data. Obtain basic cost information for each channel and monitor the real-time load status of each channel. Generate channel cost data based on the basic cost information and the real-time load status, whereby the real-time load status includes the distribution of request volume and response time.
3. The method according to claim 2, characterized in that, Based on the channel performance data, the process involves determining channel anomaly indicator data, calculating anomaly weighting coefficients based on the channel anomaly indicator data, performing circuit breaker status detection to obtain the circuit breaker status, and generating anomaly management strategies based on the anomaly weighting coefficients and the circuit breaker status, including: According to the preset time window, channel performance data is obtained. Based on the number of erroneous requests, timeout requests, and total requests in the channel performance data, the error rate and timeout rate of each channel are calculated, and channel anomaly indicator data is generated. The error rate and timeout rate of each channel are weighted and calculated to obtain the abnormal weighting coefficient of each channel. The abnormal weighting coefficient is used to control the degree of influence of the error rate and the timeout rate on the weighting. When the number of consecutive errors indicated by the channel anomaly indicator data is greater than a preset error number threshold, or the error rate indicated by the channel anomaly indicator data within a specified time window is greater than a preset error rate threshold, the channel status is triggered to be marked as circuit breaker status. When it is detected that the current channel status is in the circuit-broken state and the circuit-broken time exceeds the preset recovery time threshold, the channel status is updated to the half-open state to generate the circuit breaker status. The abnormal weighting coefficient of the channel in the circuit breaker state is determined as the first value. The channel in the half-open state is allocated a preset proportion of detection traffic. The abnormal weighting coefficient is used for the channel in the normal state to generate an abnormal management strategy.
4. The method according to claim 3, characterized in that, The channel performance data includes real-time load data, error rate, and response time; the extraction of basic channel cost information from the channel cost data, the determination of dynamic premium factors for each channel based on the channel performance data, and the determination of effective cost coefficients for each channel based on the basic channel cost information, the dynamic premium factors, the user attribute data, and the business attribute data, including: Extract the basic channel cost information for each channel from the channel cost data; The dynamic premium factor for each channel is obtained by weighting the real-time load data, the error rate calculated based on channel performance data, the response time, and the preset maximum load data. Based on the aforementioned channel basic cost information and the aforementioned dynamic premium factor, the actual cost coefficient of each channel is calculated; Based on the user attribute data, determine the current user weight of the current request; based on the business attribute data, determine the current business weight of the current request; and based on the sum of the current user weight and the current business weight, determine the request value. When the requested value exceeds a preset value threshold, the effective cost coefficient for each channel is determined based on the actual cost coefficient and the preset cost discount factor. Alternatively, when the requested value is lower than the value threshold, the actual cost coefficient may be used as the effective cost coefficient.
5. The method according to claim 4, characterized in that, The process of calculating user weights based on user attribute data, business weights based on business attribute data, performance scores based on channel performance data, and determining channel scores for each channel based on user weights, business weights, performance scores, effective cost coefficients, and anomaly management strategies includes: User-related attributes are extracted from the user attribute data, and the user-related attributes are weighted to obtain user weight values. Extract business-related attributes from the business attribute data, and perform weighted calculations on the business-related attributes to obtain business weight values; The performance indicators of each channel are extracted from the channel performance data, and the performance indicators are weighted to obtain the performance score of each channel. The channel score for each channel is calculated using the user weight, the business weight, the performance score, the effective cost coefficient, the anomaly reduction indicated by the anomaly management strategy, and a preset saturation index. The saturation index is used to indicate the non-linear sensitivity of the user weight, the business weight, the performance score, and the effective cost coefficient to the channel score.
6. The method according to claim 5, characterized in that, The step of converting the channel rating value into a traffic splitting probability includes: Based on preset temperature parameters, the channel score values are converted into an initial probability distribution; Channels whose probabilities in the initial probability distribution exceed the preset maximum allocation ratio are selected, the selected channels are truncated, and the remaining probabilities are renormalized to generate an adjusted probability distribution. Using a preset ε-greedy strategy, the adjusted probability distribution is used with a specified first probability, and a channel is randomly selected from a channel pool with a cost lower than a preset threshold with a second probability corresponding to the first probability, thereby generating a diversion probability.
7. The method according to claim 6, characterized in that, The process involves determining a budget ratio based on the real-time call counts of each channel and the effective cost coefficient, evaluating the budget ratio to obtain a budget status, and determining cost control parameters based on the budget status, including: Based on the aforementioned effective cost coefficient, determine the cost per transaction; Based on the real-time call count of each channel, the cost per call, and the preset budget limit, calculate the total consumption cost and budget ratio for the current period; When the budget ratio is lower than a preset first threshold, the budget status is marked as normal; when the budget ratio is between the first threshold and a preset second threshold, the budget status is marked as alert; when the budget ratio is higher than the second threshold, the budget status is marked as emergency. The first threshold is less than the second threshold. In the normal budget state, the default parameters are maintained; in the alert state, the cost weighting coefficient is increased, the exploration coefficient is decreased, and the high-value exemption threshold is increased; in the emergency state, the cost weighting coefficient is increased, the exploration coefficient is set to 0, and the high-value exemption threshold is limited, in order to determine the cost control parameters.
8. The method according to claim 7, characterized in that, After determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy, the process includes: Based on the channel score of each channel, a set of orthogonal basis functions are selected, which are used to characterize the candidate traffic splitting strategy; Based on the channel score and the pre-acquired historical traffic distribution data, the key objectives of the candidate traffic distribution strategy are determined. The key objectives include performance objectives, cost objectives, load measurement objectives, and strategy stability objectives. Based on preset current business priority data, determine the target weight of the key objective; Based on the target weights, the performance target, the cost target, the load measurement target, and the strategy stability target are weighted and calculated to obtain the energy functional of the candidate traffic splitting strategy. Any candidate splitting strategy is represented as a linear combination of the basis functions. The minimization problem of the energy functional is projected onto the subspace spanned by the basis functions using a preset Galerkin algorithm. An optimized splitting strategy is generated by iteratively calculating the residual, projection, line search, and coefficient update. The residual is determined by the current splitting strategy. Based on the optimized traffic splitting strategy, the actual traffic splitting effect indicated by the response result, and the preset error tolerance threshold, the error between the actual effect of each local area and the optimized traffic splitting strategy is calculated. For regions where the error is less than a preset first error threshold, the weight coefficients of the corresponding basis functions are fine-tuned; for regions where the error is greater than the first error threshold but less than a preset second error threshold, the corresponding basis functions are subdivided; and for regions where the error is greater than the preset first error threshold, the basis functions are reconstructed to obtain adaptively adjusted basis functions. Based on the channel score and the optimized traffic splitting strategy, the score adjustment amount for each channel is calculated, and the enhanced traffic splitting score is obtained based on the channel score and the score adjustment amount.
9. The method according to claim 8, characterized in that, After obtaining user attribute data, business attribute data, channel performance data, and channel cost data, the following steps are included: Based on the user attribute data, the business attribute data, the channel performance data, and the channel cost data, a feature space and a feature mapping function are constructed. Based on the feature space and the pre-acquired historical decision data, the traffic diversion decision problem is represented as a high-dimensional tensor, where each dimension of the high-dimensional tensor corresponds to a decision factor in the feature space, and the dimensions include user dimension, business dimension, channel dimension, performance dimension and cost dimension; Based on the historical decision data and the feature mapping function, the factor correlation between each decision factor is calculated, and a dependency graph is constructed based on the factor correlation. The factor correlation includes one of mutual information and conditional entropy. The nodes in the dependency graph represent the decision factors, and the edge weights in the dependency graph represent the strength of the factor correlation. Based on the dependency graph, a tree structure is generated by using a preset tree structure optimization algorithm to minimize the overall tensor rank and group decision factors with a correlation strength greater than a preset strength threshold into adjacent nodes. Using a preset alternating least squares algorithm, the high-dimensional tensor is split into multiple low-rank tensor cores according to the tree structure, and the core connection information is determined based on the position of the low-rank tensor cores in the tree structure and the association dimension of the low-rank tensor cores.
10. The method according to claim 9, characterized in that, The method of determining the channel score for each channel based on the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy further includes: Using the feature mapping function, the user weight, the business weight, the performance score, the effective cost coefficient, and the anomaly management strategy are mapped to the feature space to construct a real-time feature vector; Based on the core connectivity information, locate the low-rank tensor core in the tree structure that is related to the response result; Based on the real-time feature vector and the located low-rank tensor core, a preset tensor shrinking algorithm is used to calculate from the leaf to the root along the tree structure. Each component of the real-time feature vector is shrunk with the corresponding dimension of the low-rank tensor core. Information is passed from bottom to top according to the tree structure and the scoring vector is obtained at the root node to obtain the channel scoring value.
11. A diversion decision system integrating multi-dimensional dynamic coupling, characterized in that, include: The multi-dimensional data acquisition module is used to acquire user attribute data, business attribute data, channel performance data, and channel cost data. The channel anomaly status processing module is used to determine channel anomaly index data based on the channel performance data, calculate anomaly weighting coefficient based on the channel anomaly index data, perform circuit breaker status detection to obtain the circuit breaker status, and generate anomaly management strategy based on the anomaly weighting coefficient and the circuit breaker status. The channel anomaly index data includes the channel error rate and timeout rate. The dynamic cost coefficient calculation module is used to extract the basic cost information of each channel from the channel cost data, determine the dynamic premium factor of each channel based on the channel performance data, and determine the effective cost coefficient of each channel based on the basic cost information of the channel, the dynamic premium factor, the user attribute data and the business attribute data. The traffic distribution scoring calculation module is used to calculate user weights based on the user attribute data, calculate business weights based on the business attribute data, calculate performance scores based on the channel performance data, and determine the channel score for each channel based on the user weights, the business weights, the performance scores, the effective cost coefficient, and the anomaly management strategy. The traffic diversion probability generation module is used to convert the channel score into a traffic diversion probability; The budget cost control module is used to determine the budget ratio based on the real-time call count of each channel and the effective cost coefficient, to evaluate the budget ratio to obtain the budget status, and to determine the cost control parameters based on the budget status. The request execution module is used to select a target channel based on the traffic splitting probability, send a processing request to the target channel, receive the response result returned by the target channel after responding to the processing request, and update the channel performance data or the channel abnormality indicator data according to the response result.