Message issuing speed control method and system based on AI large model
By using an AI-based large model approach to collect and fuse multi-source data in real time, and by dynamically adjusting message delivery rate and resource allocation using the BERT-CNN distillation architecture and reinforcement learning model, the instability and uneven resource allocation of message middleware in high-concurrency scenarios in existing technologies are solved, thereby improving system stability and resource utilization.
Patent Information
- Application Number
- CN202511326980.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-01-06
AI Technical Summary
Existing message middleware cannot dynamically adjust the message delivery rate in high-concurrency scenarios, leading to system overload or insufficient resource utilization. Furthermore, it is difficult to adapt to differences in different scenarios and languages, resulting in system instability and uneven resource allocation.
We adopt an AI-based large model approach, which constructs multi-dimensional fusion feature vectors by collecting multi-source data in real time, uses the BERT-CNN distillation architecture to detect anomalies, combines reinforcement learning models to predict future message delivery rates and dynamically adjust priorities, combines mixed integer programming and deep reinforcement learning for resource scheduling, and adapts to different business scenarios and languages through domain adversarial training and multilingual BERT encoding.
It enables precise control of message delivery rate, improves system stability and resource utilization, reduces operating costs, adapts to different loads and language environments, and prevents system overload and crashes.
Smart Images

Figure CN121283885A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, specifically to a message delivery speed control method and system based on an AI large model. Background Technology
[0002] As internet services become increasingly complex, message middleware plays a more crucial role in distributed systems. In high-concurrency scenarios, the surge in message traffic poses a significant challenge to existing message rate control technologies. Therefore, optimizing message middleware technology is essential to improving system stability and efficiency. However, current technologies have the following limitations: Existing systems cannot dynamically adjust message delivery rate control based on real-time business needs and system resource status. Furthermore, they struggle to coordinate and optimize multiple objectives such as throughput, latency, success rate, and resource consumption, leading to system overload during peak periods and insufficient resource utilization during off-peak periods. Traditional threshold detection has low accuracy in recognizing complex anomaly patterns and a high false positive rate, causing system instability or even crashes under abnormal conditions. Resource allocation is decoupled from traffic requirements, resulting in high latency during scaling up and down, and it does not consider elastic allocation across resource types (CPU / memory / bandwidth). A single model is insufficient to adapt to the differentiated needs of different scenarios. Semantic parsing errors in multilingual messages cause rate control failures. Summary of the Invention
[0003] The purpose of this invention is to provide a message delivery speed control method and system based on an AI large model, so as to solve the problems mentioned in the background art, such as inability to dynamically adjust, low recognition accuracy, high misjudgment rate, decoupling of resource allocation and traffic demand, and difficulty in adapting to different scenarios and languages.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: According to one aspect of the present invention, a message delivery rate control method based on an AI large model is provided, the method comprising: Real-time acquisition of multi-source data and construction of multi-dimensional fusion feature vectors; Anomaly detection and tiered circuit breaking based on BERT-CNN distillation architecture; Based on the fused feature vectors, a reinforcement learning model is used to predict the message delivery rate for multiple future time windows and dynamically adjust the priority. In the offline phase, a mixed-integer programming model is used to generate the minimum cloud resource cost, while in the online phase, a deep reinforcement learning model is used for real-time resource fine-tuning. Based on node health, a smooth weighted round-robin algorithm is used to calculate traffic allocation weights for load balancing. It adapts to different business scenarios through domain adversarial training and multi-task learning, and adapts to different languages through multilingual BERT coding.
[0005] Based on the aforementioned scheme, the fused feature vector is constructed by extracting multi-dimensional features through temporal convolutional networks, BERT models, graph neural networks, and convolutional neural networks, and generating a fused embedding vector by concatenating the features; the fused feature vector is generated through a multimodal spatiotemporal fusion network; the multi-dimensional features include traffic temporal features, business semantic features, user behavior graph features, and resource state space features.
[0006] Based on the aforementioned scheme, the fused embedding vector is input into the multimodal spatiotemporal fusion network, and a spatiotemporal cross-attention mechanism is used to perform multimodal feature fusion, generating a spatiotemporal attention weight matrix as follows: ; Among them, Q time For time feature query matrix, Q time = TCN(X flow )×W Q X flow W is the flow time-series vector. Q To query the transformation matrix; K space Let K be the spatial characteristic key matrix. space =CNN(X res )×W K X res W is a resource state space vector. K d is the key transformation matrix; k Dimension scaling factor for the attention mechanism; The output of the multimodal spatiotemporal fusion network is: ; Let E be the predicted traffic sequence for the next H time steps, and let A be the fused embedding vector. ts Let P(t) be the spatiotemporal attention weight matrix, and let P(t) be the position code of timestamp t.
[0007] Based on the aforementioned scheme, the reinforcement learning model employs a proximal policy optimization algorithm to generate adjustment rates and adjustment priorities; the proximal policy optimization algorithm defines the state input as a five-dimensional state vector: s t =[L t ,S t C t A t B t ], L t For load factor, S t For SLA compliance rate, C t For CPU utilization, A t For anomaly scoring, B t Assign business weights; output action space vector at =[Δ rate , Δ priority ], Δ rate For rate adjustment, Δ priority Priority adjustment.
[0008] Based on the aforementioned scheme, the business weight is the output of the dependency tree, and the dependency tree is: ; Let M be the predicted traffic volume for the i-th time window. j For the semantics of the j-th message within the i-th time window, α ij Let α be the weight of the influence of the semantics of the j-th message on the traffic of the i-th time window. ij =Softmax(MLP(E ij )); E ij Let be the joint feature vector of the semantics of the j-th message and the i-th time window.
[0009] Based on the aforementioned scheme, the objective function of the mixed-integer programming model is: ; c CPU As the weight of CPU unit cost, c Mem As a weight for unit cost of memory, c BW Weighted by bandwidth unit cost; Assign decision 0 / 1 variables to the CPU of node n; Decisions on memory allocation for node n; Bandwidth allocation decision for node n.
[0010] Based on the aforementioned scheme, the node health status is: CPU n Mem represents the CPU utilization of node n. n Latency is the memory utilization rate of node n. n α represents the delay of node n, and β and γ are weighting coefficients used to balance the importance of different resource consumption in health calculation. Traffic allocation is performed using a smooth weighted round-robin algorithm. ; P n Selecting probabilities for nodes, i.e., assigning weights to traffic, Health n Let k be the health score of node n, k be the smoothing coefficient, and t be the current time. The time when node n was last selected. Indicates the waiting time.
[0011] Based on the aforementioned scheme, the domain adversarial training uses the maximum mean difference to measure the difference in feature distributions between the source and target domains: ; The feature mapping function maps the input to the reproducing kernel Hilbert space, D. s For the source domain, D t For the target domain, n s n is the number of samples in the source domain. t Let H be the number of samples in the target domain, and H be the Gaussian kernel space used to calculate the distance between distributions.
[0012] Based on the aforementioned scheme, the multilingual BERT encoding to adapt to different languages includes mapping texts in different languages to a unified semantic space, using contrastive learning to reduce the semantic differences between different languages in specific business domains, and performing semantic equivalence calculations to trigger the same speed control strategy.
[0013] According to another aspect of the present invention, a message delivery speed control system based on an AI large model is provided. The system includes: a data acquisition module, an intelligent decision-making module, a security protection module, a resource scheduling module, a load balancing module, and a global adaptation module. The data acquisition module collects multi-source data in real time and constructs a multi-dimensional fusion feature vector; the security protection module, based on the BERT-CNN distillation architecture, detects anomalies and executes tiered circuit breakers; the intelligent decision-making module, based on the fusion feature vector, uses a reinforcement learning model to predict the message delivery rate for multiple future time windows and dynamically adjusts priorities; the resource scheduling module uses a mixed integer programming model to generate the minimum cloud resource cost in the offline phase and a deep reinforcement learning model for real-time resource fine-tuning in the online phase; the load balancing module calculates traffic allocation weights based on node health using a smooth weighted round-robin algorithm for load balancing; and the global adaptation module adapts to different business scenarios through domain adversarial training and multi-task learning, and adapts to different languages through multi-language BERT encoding.
[0014] As can be seen from the above technical solutions, the present invention has at least the following advantages and positive effects compared with the prior art: By collecting and fusing multi-source data in real time, a unified feature vector is constructed, and a reinforcement learning model is used for intelligent rate prediction and priority adjustment, thereby achieving precise control of message delivery rate and improving system stability and resource utilization under different loads; Based on the BERT-CNN distillation architecture, rapid detection and graded circuit breaking of abnormal traffic patterns are achieved, effectively preventing system overload and crash, and improving system robustness and security; Combining offline mixed integer programming and online deep reinforcement learning, minimum cost scheduling and real-time fine-tuning of cloud resources are achieved, significantly reducing operating costs while ensuring service quality; Through domain adversarial training and multilingual BERT encoding, the system can quickly adapt to different business scenarios and language environments, reducing the development cost and time of new business scenarios and languages.
[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a schematic diagram of a message delivery rate control method based on an AI large model according to the present invention; Figure 2 This is a schematic diagram illustrating the tiered circuit breaker strategy implemented in this invention; Figure 3 This is a schematic diagram illustrating the reinforcement learning model used in this invention; Figure 4 This is a schematic diagram illustrating the use of a mixed integer programming model to minimize the total cost in this invention; Figure 5 This is a schematic diagram illustrating adversarial training and multi-task learning in the field of this invention. Detailed Implementation
[0017] To more clearly illustrate the purpose, technical solutions, and advantages of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein. On the contrary, these embodiments are provided so that the present invention will be more comprehensive and complete, and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0018] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.
[0019] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0020] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0021] The present invention will now be described in detail with reference to specific embodiments: Example 1
[0022] like Figure 1 As shown in the figure, this embodiment provides a message delivery rate control method based on an AI large model. The specific steps of the method are as follows: S1: Real-time acquisition of multi-source data and construction of multi-dimensional fusion feature vectors.
[0023] In this embodiment, historical SMS traffic data, business semantic information, user behavior data, and resource status information are collected in real time. The collected data is standardized and subjected to sliding window anomaly detection to remove dirty data. A fusion feature vector is constructed, including extracting multi-dimensional features through temporal convolutional networks, BERT models, graph neural networks, and convolutional neural networks, and generating a fusion embedding vector by concatenating the features. A fusion feature vector is generated through a multimodal spatiotemporal fusion network. The multi-dimensional features include traffic temporal features, business semantic features, user behavior graph features, and resource status space features.
[0024] Specifically, historical SMS traffic data includes SMS queue throughput (QPS), latency distribution (P50 / P95 / P99), and error rate (classified by message type); business semantic information includes SMS tags (payment verification codes, notifications, marketing, etc.) and SLA levels (L0 urgent / L1 high / L2 medium / L3 low); user behavior data includes user activity time distribution, operation frequency patterns (such as peak time SMS link click rate), and geographic access characteristics; resource status information includes SMS sending server cluster CPU / memory utilization, network bandwidth utilization, and disk IOPS.
[0025] Furthermore, the collected data is standardized, including building a unified data pipeline, converting the raw data into data types according to a predefined pattern, normalizing the CPU utilization field, and using a sliding window anomaly detection algorithm to remove dirty data.
[0026] Furthermore, by integrating features from four dimensions—traffic, business, user, and resource—and employing a feature concatenation (Concat) operation to combine the outputs of the four independent encoders, a fused embedding vector E=Concat(E flow E biz E user E res Specifically, a Temporal Convolutional Network (TCN) is used to extract the temporal traffic features E. flow The BERT model is used to encode the business semantic features E. biz The graph neural network (GraphSAGE) is used to aggregate user behavior graph features E. user The resource state space feature E is extracted using a convolutional neural network (CNN). res ; Furthermore, the fused embedding vector is input into the Multi-modal Spatiotemporal Fusion Network (MSFN), and a spatiotemporal cross-attention mechanism is used to fuse multimodal features, generating the spatiotemporal attention weight matrix as follows: ; Among them, A ts This is a spatiotemporal attention weight matrix, used to quantify and visualize the dynamic correlation strength between temporal and spatial features. The matrix element value range is [0,1], and the row sum equals 1 (Softmax normalization). Larger values indicate stronger spatiotemporal correlation. The temporal feature query matrix Q... time =TCN(X flow )×W Q This represents the dynamic changes in message traffic over time, and extracts the periodicity and trend characteristics of historical traffic data through a Temporal Convolutional Network (TCN); X flow W is the flow time-series vector; Q To query the transformation matrix, the traffic features extracted by TCN are projected onto the attention query space to characterize the demand intensity over time. During the morning peak payment message surge, W... Q Encode it as a high-demand query to drive resource scheduling; spatial feature key matrix K space =CNN(X res )×W K This represents the spatial distribution and relationships of server cluster resources, capturing the topological dependencies of resources such as CPU, memory, and bandwidth among server nodes using a spatial convolutional network (CNN); X res W is a resource state space vector. K The key transformation matrix projects the resource features extracted by the CNN onto the attention key space to calculate the importance of resource states. When the server CPU > 90%, W... K Encode it as a high-weight key vector, and trigger resizing first; d k This is the dimensionality scaling factor for the attention mechanism, used to prevent the dot product result from becoming too large, leading to gradient vanishing or exploding. The default value is the square root of the key vector dimension (e.g., if the dimension is 64, then d...). k =8), dynamically adjusted according to feature dimensions; d k =dim(K space ) / scaling factor; Furthermore, multi-window traffic prediction, output of the multimodal spatiotemporal fusion network (MSFN): ; Let E be the predicted flow sequence for the next H time steps (t+1 to t+H), and let A be the fused embedding vector. ts Here, P(t) is the spatiotemporal attention weight matrix, where P(t) is the location encoding of the timestamp t, marking the relative / absolute time position of the prediction window; ⊕ represents the feature concatenation operation, which concatenates the three types of information (global features, spatiotemporal weights, and time position) into the input of the LSTM; H represents the number of prediction windows.
[0027] Furthermore, a traffic-business-resource dependency tree is constructed to predict time-series traffic. Message semantics (BERT(M) j Resource states (node load) are mapped to a unified topology to solve the problem of feature fragmentation; the dependency tree is as follows: ;in, M represents the predicted traffic volume for the i-th time window; j The semantics of the j-th message within the i-th time window; α ij Let α be the weight of the influence of the semantics of the j-th message on the traffic of the i-th time window. ij =Softmax(MLP(E ij )); E ij Let be the joint feature vector of the semantics of the j-th message and the i-th time window; the dependency tree has time window i as the root node, business message j as the child node, and edge weight α. ij The resource node is mounted to the associated business message by the MLP calculation.
[0028] S2: Detect anomalies and perform tiered circuit breaking based on the BERT-CNN distillation architecture.
[0029] In this embodiment, the semantic features of abnormal messages are identified using the BERT large model, and millisecond-level anomaly detection is achieved through a lightweight CNN model; the lightweight CNN model learns anomaly detection capabilities from the BERT large model through knowledge distillation technology.
[0030] Specifically, the original message text x is processed by WordPiece word segmentation and then input into the BERT teacher model. The semantic understanding network is: h teacher =BERT CLS ( x )∈R 768 ; Calculate the probability of four types of anomalies (DDoS / slow call / message storm / semantic conflict): ; h teacher The hidden layer representation of the CLS token, dimension 768, captures global semantics, W∈R 768×4 The anomaly classification weight matrix corresponds to four anomaly types, σ is the sigmoid activation function, and the output multi-label probability is (0-1); further, the training objective of the teacher model is: ; y ic ∈{0,1} indicates whether message i belongs to the c-th type of anomaly (manually labeled), p ic This represents the probability that the model predicts for the c-th type of abnormality.
[0031] Furthermore, knowledge distillation is used to transfer the knowledge from the BERT teacher model to the lightweight CNN student model, and the loss function is distilled as follows: ; α represents the supervised learning weight; in this embodiment, α = 0.7, balancing labeled data and teacher knowledge. The temperature scaling function T(p) = Softmax(p / τ); in this embodiment, τ = 2, softening the probability distribution. When the temperature τ > 1, a "softer" probability distribution is output, making it easier for students to learn the implicit confidence information from the teacher. KL divergence measures the difference between the teacher's and student's predicted distributions; minimizing the difference in probability distributions between teachers and students, L... CE The cross-entropy loss between the student model and hard labels (0 / 1); p teacher p student These are the class probability vectors for the same input for the teacher and student models, respectively.
[0032] Furthermore, the student model employs a lightweight CNN architecture, primarily for feature compression, which reduces computation and parameter count while preserving key information. Specifically, in the lightweight CNN student model, the input layer uses message character-level embedding (256 dimensions) to avoid latency caused by word segmentation; the convolutional layer uses depthwise separable convolution instead of standard convolution to reduce computation; the attention mechanism uses channel attention to dynamically adjust the importance of feature channels and enhance key features; and residual connections are used to alleviate the vanishing gradient problem and improve training stability.
[0033] Furthermore, such as Figure 2 As shown, based on the anomaly detection results, traffic surge coefficient, and real-time error rate, a comprehensive risk score is calculated, the circuit breaker threshold is dynamically adjusted, and a tiered circuit breaker strategy is executed. The dynamic circuit breaker decision further includes: dynamically adjusting the circuit breaker threshold based on CPU utilization; and executing a tiered circuit breaker rate limiting strategy of 30%, 50%, or 100% based on the risk score.
[0034] Specifically, calculate the comprehensive risk score: R t =β1S t +β2C t +β3A t Among them, S t The anomaly probability S output by the CNN student model t ∈[0,1], taking the maximum value of four categories; C t C is the flow surge coefficient. t= Current QPS / Baseline QPS (baseline is the average of the same period over the past 7 days). For example, Ct=1 indicates normal traffic, Ct>1 indicates a sudden increase in traffic (the larger the value, the higher the risk), and Ct<1 indicates a decrease in traffic. t A is a real-time error rate metric. t = Number of failed requests / Total number of requests; Value range At∈[0,1], directly representing the error rate (the larger the value, the higher the risk); β is a dynamic weight, for example, β1=0.6, β2=0.3, β3=0.1 (can be adjusted online).
[0035] Further, calculate the dynamic circuit breaker threshold: ; In this embodiment, a basic threshold τ is set. base =0.8 (effective when CPU < 70%), resource sensitivity coefficient γ = 0.5, the threshold increases linearly after CPU exceeds 70%, CPU t This represents the current average CPU utilization of the cluster (in real-time). Furthermore, a tiered circuit breaker strategy is implemented, calculating the latest comprehensive risk score R every 200ms. t Based on system metrics and a decision tree, the circuit breaker ratio is selected, and the token bucket capacity is updated in real time. Capacity=BaseRate×(1-RejectRatio); Capacity is the actual capacity, BaseRate is the system's baseline throughput (adjusted for resource margin factor), and RejectRatio is the rate limiting ratio for tiered circuit breaker returns; the overall risk score is R. t Updated every 200ms, the system metric is resource health, representing the real-time status of the server cluster, collected every 100ms. If the overall risk score is R... t Greater than the dynamic circuit breaker threshold τ t If the circuit breaker is not triggered, normal release will proceed; if the comprehensive risk score is R... t Greater than the dynamic circuit breaker threshold τ t The system checks if the CPU utilization is ≥90%. If it is, all messages are blocked and only those on the whitelist are allowed to pass. Otherwise, it checks if the CPU utilization is between 80% and 90%. If it is, the flow is limited to 50%, and high-priority messages are still allowed to pass. Otherwise, the flow is limited to 30%.
[0036] Furthermore, through whitelist filtering, gradual rollout, and semantic auditing mechanisms, traffic is gradually restored after anomaly recovery; the gradual rollout mechanism includes gradually restoring traffic in an exponential increment; and the semantic auditing mechanism verifies whether the abnormal pattern has been eliminated. Specifically, whitelist filtering allows requests containing specific semantic tags to pass through, as shown in:
[0037] Allow(m) is the decision to allow a single message m. If a tag t of message m belongs to the whitelist set W, a result of 1 indicates direct allowance; a result of 0 indicates continued execution of rate limiting logic. W is a preset whitelist tag set (pre-configured by operations and maintenance). Tags(m) is the set of all tags carried by the message. Gradual release, with the allowance ratio increasing exponentially over time: AllowRatio t =min(1,0.1×2 t / Δ For example, the recovery period Δ = 30 seconds, and the release rate doubles every 30 seconds until it reaches 100%. Semantic auditing involves performing a full log analysis of release requests to verify whether abnormal patterns have been eliminated. ; If more than or equal to 95% of the requests are judged to be normal during the gray-scale release phase, RecoveryFlag is set to 1, the system immediately announces the anomaly is resolved, and traffic is fully restored; the number of normal requests is the count of requests judged to be "no anomaly" after semantic auditing; the total number of released requests is the count of all requests actually released in the current gray-scale batch; Ⅱ(·) is an indicator function: output 1 if the condition is true, otherwise 0; when RecoveryFlag = 1, the circuit breaker policy ends, the token bucket capacity is restored to BaseRate, and the system returns to the full release state.
[0038] S3: Based on the fused feature vector, a reinforcement learning model is used to predict the message delivery rate for multiple future time windows and dynamically adjust the priority.
[0039] In this embodiment, as Figure 3 As shown, the reinforcement learning model employs the Proximal Policy Optimization (PPO) algorithm to generate adjustment rates and priorities. The reward function comprehensively considers throughput, latency, success rate, and resource cost. Multi-time window prediction involves inputting a fused feature vector E, outputting a rate sequence for the next H windows through the PPO Actor network, and synchronously generating a priority adjustment Δ using the business priority weight matrix. priority ; Specifically, the PPO algorithm engine defines the state input as a five-dimensional state vector to describe the real-time state of the system: s t =[L t ,S t C t A t B t ];L t For load factor, S t For SLA compliance rate, C t For CPU utilization, A t For anomaly scoring, B tAssign business weights; monitor traffic in real time to obtain load factor (L). t =Current QPS / System Maximum QPS); SLA Compliance Rate S t This indicates the percentage of requests that meet latency targets; CPU utilization C t Indicates the average CPU utilization of the cluster; anomaly score A t The risk probability output by the lightweight CNN anomaly detection model; business weight B t For the output of the traffic-business-resource dependency tree (step S1), for example, payment messages have a weight of 0.9, and marketing messages have a weight of 0.3. Further, the dependency tree outputs the business weights... The injected state vector guides the PPO algorithm in action Δ priority Prioritize high-weight business operations, and the dependency tree needs to be dynamically updated in each decision cycle, synchronized with the speed control actions.
[0040] A five-dimensional state vector is constructed, and corresponding feature values are extracted from the fused feature vector. These features are then transformed into metrics that reflect the system state. For example, historical traffic features are transformed into current traffic volume metrics; business semantic features are transformed into business urgency metrics; user behavior features are transformed into user activity metrics; resource status features are transformed into resource utilization metrics; and real-time feedback features are transformed into system latency metrics. The extracted metrics are then normalized.
[0041] Specifically, the PPO algorithm engine employs an Actor-Critic dual-network structure in its network space. The Actor network outputs the action probability distribution, while the Critic network evaluates the state value V(S). t The real-time five-dimensional state vector is input into the Actor network, and the output is a. t =[Δ rate , Δ priority ] ∈[-1,1]×{0,1} n Δ rate For rate adjustment, Δ represents the adjustment ratio relative to the current rate, rather than the absolute target value. rate ∈[-1,1]; discrete value Δ priority For priority adjustment, a one-hot encoded priority adjustment flag (e.g., [1,0,0] indicates that only payment messages are prioritized). Furthermore, the Actor network generates a token bucket capacity scaling factor and a service queue priority ranking result based on the actions; the system multiplies the token bucket capacity by (1+Δ). rate ) and press Δ priorityThe message queue to be sent is rearranged to maintain one decision cycle; the Critic network evaluates the value of the system state after execution and calculates the advantage function to measure the merits of the action; the parameters of the Actor network and the Critic network are updated according to the PPO objective function to complete the policy iteration.
[0042] Furthermore, the objective function updated by the PPO algorithm is: ; in, , representing the ratio of the probabilities of the new and old strategies, and the probability of the new strategy in state s. t Output action a t The probability of θ; θ is the network parameter of the new strategy (to be optimized); Let be the advantage function, representing the state s. t Next, execute action a t The degree of advantage over the expected return obtained by the average strategy is calculated by the Critic network; ε is the pruning hyperparameter, which is 0.2 in this embodiment to limit the policy update range and prevent crashes.
[0043] Furthermore, the multi-objective reward function of the PPO algorithm is: ; Among them, throughput rewards: The tanh function is used to compress the results to the range [-1,1]. When the actual QPS is greater than the target QPS, a penalty (negative value) is given, and when the actual QPS is less than the target QPS, a reward (positive value) is given. Delay penalty: ; When the P95 latency exceeds the SLA threshold, an exponential amplification penalty is applied. For example, if the latency exceeds the threshold by 20%, R... 延迟 =− e 0.12 ≈−1.127; Success rate bonus: ; With a baseline of 95%, a reward of 0.02 is given for every 1% increase in absolute success rate. Resource cost penalty: , Indicates CPU cost. Indicates memory cost, This represents network cost. The reward function constructs a multi-objective collaborative optimization reward mechanism, balancing four core metrics: throughput, latency, success rate, and resource cost, driving the reinforcement learning strategy towards Pareto optimality.
[0044] S4: In the offline phase, a mixed integer programming model is used to generate the minimum cloud resource cost, while in the online phase, a deep reinforcement learning model is used for real-time resource fine-tuning.
[0045] In this embodiment, based on the predicted traffic demand, a basic resource allocation scheme is generated using a mixed integer programming (MILP) model with the goal of minimizing cloud resource costs. Specifically, such as Figure 4 As shown, the offline phase employs a mixed-integer programming (MILP) model for basic resource allocation; the predicted traffic... Inputting data into the MILP model, the output includes CPU allocation decisions, memory allocation decisions, and bandwidth allocation decisions; predicting traffic. Based on historical traffic data, business semantic information, user behavior data, and resource status information, future traffic demand is predicted through machine learning models such as time series analysis, LSTM, and Transformer. To minimize cloud resource costs while meeting business traffic demands, an optimal resource allocation scheme is achieved through mathematical programming. The objective function is: ; c CPU As the weight of CPU unit cost, c Mem As a weight for unit cost of memory, c BW Weighted by bandwidth unit cost; Decision 0 / 1 variable for CPU allocation of node n, whether the nth server should be allocated CPU; The memory allocation decision for node n determines whether or not to allocate memory. The bandwidth allocation decision for node n determines whether or not bandwidth should be allocated; the constraints are: (CPU capacity constraint) (Memory capacity constraint) (Bandwidth capacity constraint) (Does node n match?) in, The predicted flow rate (QPS) for time window t is output by the multi-dimensional feature fusion module; This is a benchmark for CPU consumption per request. This is a benchmark for memory consumption per request. This serves as a baseline for bandwidth consumption per request. , , Based on historical monitoring data, MILP outputs CPU, memory, and bandwidth allocation decisions to minimize total cost.
[0046] Furthermore, in the online phase, based on the deep reinforcement learning (DQN) model, CPU, memory, and bandwidth resources are adjusted in real time on the basis of the basic resource allocation scheme to achieve second-level scaling up and down response; the state space of the deep reinforcement learning (DQN) model includes traffic deviation, pressure index, latency risk, and economic indicators.
[0047] Specifically, based on the basic resource allocation output by the offline MILP phase, online real-time fine-tuning is performed through the DQN fine-tuner; the real-time input monitoring status outputs fine-tuning actions for CPU / memory / bandwidth, and resource adjustments are executed immediately; the execution results are returned to DQN as reward feedback, achieving closed-loop optimization and enabling second-level elastic scaling. Furthermore, a DQN state space is constructed, and action decisions are made based on this state space. The decided actions trigger second-level scaling operations, and then, based on cost and performance feedback, the process returns to the DQN state space, forming a closed-loop scheduling process.
[0048] The state space contains four dimensions, including: flow deviation. This indicates the degree to which actual traffic deviates from the forecast. The normal value range is [0.8, 1.2]. The warning value is set at 1.5. A value greater than 1.5 indicates that the actual traffic exceeds the forecast by 50% (risk triggering an alarm). Pressure Index = The overall resource load is within the normal range of [0,1]. The warning value is set to 1.0; a value greater than 1.0 indicates that the CPU utilization exceeds 80%. Latency risk = The severity of latency exceeding the limit is defined by a normal range of [0,1], with a warning value set at 1.0. A value greater than 1.0 indicates that the latency exceeds the SLA threshold. Economic indicators = The budget consumption progress has a normal range of [0.2, 1], and the warning value is set to 0.1. If it is less than 0.1, it means that the budget is about to be exhausted.
[0049] The action space includes 7 action codes and their corresponding action types, resource impacts, and applicable scenarios, as shown in Table 1: Furthermore, the reward function is: The traffic target achievement reward weight is 0.6, where ΔQ is the traffic deviation and sign(ΔQ) is the traffic direction indicator, which determines the direction: exceeding the target is positive, and falling short is negative; For deviation smoothing; To mitigate resource waste, a delay optimization penalty is assigned a weight of 0.3; a cost control penalty is assigned a weight of 0.1. This refers to the amount of cost change, controlling the cost changes caused by resource adjustments.
[0050] Furthermore, a lightweight decision cache caches the most recently scheduled decisions, reducing the number of model inferences. ; State change threshold By using cosine similarity to determine system stability, scheduling latency can be reduced to below 5ms when the cache is hit. Furthermore, batch operations are merged, combining repeated scaling requests within a short period to reduce the number of API calls and avoid cloud platform rate limitations.
[0051] S5: Based on node health, traffic allocation weights are calculated using a smooth weighted round-robin algorithm to achieve load balancing.
[0052] In this embodiment, traffic allocation weights are dynamically calculated based on node health, and request distribution is achieved through a smooth weighted round-robin algorithm; node health is based on the weighted calculation results of CPU utilization, memory utilization, and latency indicators.
[0053] Specifically, metrics are collected for each node n: CPU utilization (CPU) n Memory utilization (Mem) n P95 Latency n ; Calculate dynamic weights and allocate traffic based on the real-time load of nodes. The dynamic weights are: ; CPU n Mem represents the CPU utilization of node n. n Latency is the memory utilization rate of node n. n Let α, β, and γ represent the latency of node n, and α, β, and γ be weighting coefficients used to balance the importance of different resource consumption in health calculation. It should be noted that CPU... n Mem n The value is a normalized dimensionless value; the unhealthiness of a node is represented by a weighted sum of CPU utilization, memory utilization, and latency, with weight w. n The health of node n is inversely proportional to its degree of unhealthiness; therefore, the health of node n is: .
[0054] Furthermore, traffic allocation is performed using the Smooth Weighted Round Robin (SWRR) algorithm: ; P n Selecting probabilities for nodes, i.e., assigning weights to traffic, Health n Let k be the health score of node n, k be the smoothing coefficient, and t be the current time. The time when node n was last selected. This indicates the waiting time. It should be noted that the traffic allocation weight p...n It is the core basis for the load balancer to distribute requests, p n Larger nodes have a higher probability of being selected, thus achieving a more rational allocation of traffic; p n The value directly reflects the health status and load pressure of the node. When p n When the overall value is low, it indicates that the cluster resources may be insufficient, and the elastic scaling mechanism needs to be triggered to adjust the resources.
[0055] S6: Adapts to different business scenarios through domain adversarial training and multi-task learning, and adapts to different languages through multilingual BERT coding.
[0056] like Figure 5 As shown, through domain adversarial training and multi-task learning, the model adapts to different business scenarios. In this embodiment, a shared feature extractor is used to extract features from source and target domain data to obtain preliminary feature representations. A gradient inversion layer (GRL) is added after the feature extractor to invert the gradient sign during backpropagation, ensuring that the domain classifier cannot distinguish the feature source, thereby learning domain-invariant features. The features are then input into the domain classifier after passing through the GRL, training it to distinguish between source and target domain features, prompting the feature extractor to generate domain-independent features. The domain loss of the domain classifier and the task loss of the main task predictor are calculated. The domain loss and task loss are combined into a joint loss function, and the parameters of the feature extractor, domain classifier, and main task predictor are updated simultaneously through backpropagation to achieve domain adaptation and main task performance optimization.
[0057] Specifically, the maximum mean difference (MMD) is used to measure the difference in feature distributions between the source and target domains: ; The feature mapping function maps the input to the reproducing kernel Hilbert space (RKHS), D s and D t The source domain and the target domain are respectively, n s and n t , respectively, represent the number of samples in the source and target domains, and H is the Gaussian kernel space used to calculate the distance between distributions.
[0058] Furthermore, a gradient inversion layer (GRL) is introduced in the domain adversarial training to backpropagate shared features to the domain classifier, achieving domain-invariant feature learning and making the feature distribution of the model more consistent across different business scenarios; the loss function is: L total =L main -λ·L domain L main Main task loss, L domainLet λ be the cross-entropy loss of the domain classifier, and λ be the adversarial weight coefficient, which increases linearly with the number of training epochs (λ=min(1,0.1⋅epoch)); "-λ·L domain Gradient inversion ensures that features are indistinguishable. The feature extractor generates neighborhood-invariant features by maximizing the neighborhood classification error.
[0059] Furthermore, multi-task joint optimization is implemented, including constructing auxiliary tasks such as business type classification. A joint loss function is designed, and weights are dynamically adjusted to balance the main and auxiliary tasks, making the model more adaptable to different scenarios. The joint loss function is: ; L main Main task loss, L aux To assist in mission loss, MMD 2 The term represents the square of the maximum mean difference in the domain, constraining feature distribution alignment. For example, the main task weight α = 0.7, the auxiliary task weight β = 0.2, and the domain difference penalty term weight γ = 0.1. Furthermore, dynamic weight adjustments are made based on task performance. ; ; Where η=0.5 is used to adjust the sensitivity. The lower the task loss, the higher the weight. The denominator is summed over the main task and all auxiliary tasks to ensure that the weights are normalized.
[0060] Furthermore, a multi-progressive domain transfer strategy is adopted to gradually integrate features from different domains, progressively increasing the proportion of target domain data according to the training stage to achieve feature distribution alignment. Initially, source domain data is dominant; as training progresses, the proportion of target domain data is increased, prompting the feature extractor to generate a unified feature distribution. Specifically, the proportion of target domain data is increased in stages: ; t represents the current training step count, T max This represents the total number of training steps, exemplified by a default of 10,000 steps. Initially, the training uses 80% source domain and 20% target domain, gradually transitioning to 100% target domain. Feature distribution alignment is achieved by adjusting feature statistics through Domain Conditional Batch Normalization (DCBN). ; ; and These are the mean and standard deviation of the source domain data, respectively. and These are the mean and standard deviation of the target domain data, respectively, and are dynamic mixture statistics that allow for a smooth transition in the feature distribution.
[0061] Furthermore, perform multilingual BERT encoding, use mBERT to map texts in different languages to a unified semantic space, and achieve cross - language semantic understanding; perform domain adaptation fine - tuning, adopt contrastive learning to narrow the semantic differences between different languages in specific business domains, and improve the semantic parsing ability of the model in multilingual business scenarios; perform semantic equivalence calculation, calculate the semantic similarity of messages in different languages based on cosine similarity, trigger the same speed control strategy, and ensure precise control in cross - language scenarios.
[0062] Specifically, use mBERT to map messages in different languages to a unified semantic space: ; x msg is the input message text, which is input after WordPiece tokenization; h msg is the hidden layer representation of the CLS token, with a dimension of 768, capturing the global semantics of the message.
[0063] Furthermore, narrow the domain differences between languages through contrastive learning. The contrastive loss function is: ; h i and h j are respectively different language expressions (positive sample pairs) of the same business intention, h k is a random sample (negative sample) of different business intentions, and the margin threshold , forcing the similarity of positive samples to be higher than that of negative samples.
[0064] Furthermore, perform semantic equivalence calculation. First, calculate the semantic similarity of messages in different languages based on cosine similarity: ; measures the similarity between two vectors m1 and m2; Exemplarily, the semantic similarity between the Chinese message "Issued successfully" and the English "Delivery succeeded" > 0.9 is regarded as equivalent semantics, and the similarity between the German message "Verteilung abgeschlossen" and the Chinese "Issued completed" > 0.85 triggers the same speed control strategy.
[0065] Optionally, introduce a cross - language attention mechanism to capture fine - grained associations and perform attention - enhanced alignment. The attention weight is: ; represents the attention weight of message m1 and message m2 at positions i, j, Q m1 is the query vector, representing the features of message m1; is the transpose of the key vector, representing the features of message m2, d kThis is a scaling factor used to stabilize the output of Softmax. Alignment feature aggregation: the alignment features of messages m1 and m2 are as follows: ; Let be the value vector, representing the feature value at position i,j.
[0066] Furthermore, dynamic priority mapping is implemented. First, a business rule knowledge graph is constructed, and a multilingual business tag system is established. This system includes keywords for different business types and their corresponding priority weights. For example, for the business type "Delivery succeeded", the English keyword is "Delivery succeeded" and the German keyword is "Verteilung abgeschlossen", and a priority weight of 0.9 is assigned.
[0067] Furthermore, a hybrid priority scoring system is implemented, combining semantic similarity and keyword matching. ; t k This is the standard semantic vector of the k-th type of business (such as the mean vector of all language expressions for payment). Let I be the set of multilingual keywords for the k-th business category, with semantic similarity weight α = 0.7, and II be the keyword matching indicator function.
[0068] Optionally, cross-language consistency verification is performed. First, terminology conflict detection is conducted, involving real-time comparison of multilingual terminology databases to identify and resolve potential terminology conflicts; the degree of conflict is then calculated. ; β=0.9 represents the weight of the old terms, maintaining the stability of the terminology database. context Contextual text for new terms, used to capture semantic changes.
[0069] Example 2 This embodiment exemplarily presents a message delivery rate control system based on an AI large model, including a data acquisition module, an intelligent decision-making module, a security protection module, a resource scheduling module, a load balancing module, and a global adaptation module. The data acquisition module collects multi-source data in real time and constructs multi-dimensional fusion feature vectors; In the intelligent decision-making module, a reinforcement learning model is used based on fused feature vectors to predict the message delivery rate for multiple future time windows and dynamically adjust the priority. The security protection module, based on the BERT-CNN distillation architecture, detects anomalies and executes tiered circuit breakers. It uses the BERT model to understand business semantics, utilizes the CNN model to extract traffic features, and achieves knowledge distillation through comparative learning. Based on the anomaly detection results, it executes the corresponding circuit breaker operation according to the preset tiered circuit breaker strategy.
[0070] The resource scheduling module uses a mixed integer programming model to generate the minimum cloud resource cost in the offline phase and a deep reinforcement learning model for real-time resource fine-tuning in the online phase. The load balancing module calculates traffic allocation weights based on node health using a smooth weighted round-robin algorithm to achieve load balancing. The global adaptation module adapts to different business scenarios through domain adversarial training and multi-task learning, and adapts to different languages through multi-language BERT encoding.
[0071] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims. It should be understood that the invention is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An AI large model-based message issuing speed control method, characterized in that, The method comprises: Real-time acquisition of multi-source data and construction of a multi-dimensional fusion feature vector; Detecting abnormalities and performing hierarchical fusing based on a BERT-CNN distillation architecture; Based on the fusion feature vector, a reinforcement learning model is used to predict the message issuing rate of multiple future time windows and dynamically adjust the priority; In the offline stage, a mixed integer programming model is used to generate the minimum cloud resource cost, and in the online stage, a deep reinforcement learning model is used for real-time resource fine-tuning; Based on the node health degree, the traffic distribution weight is calculated by a smooth weighted round robin algorithm for load balancing; Through domain adversarial training and multi-task learning to adapt to different business scenarios, and through multi-language BERT encoding to adapt to different languages.
2. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The fusion feature vector is constructed, including extracting multi-dimensional features through a time convolution network, a BERT model, a graph neural network, and a convolutional neural network, and generating a fusion embedding vector through feature splicing; the fusion feature vector is generated through a multi-modal spatio-temporal fusion network; the multi-dimensional features include traffic time series features, business semantic features, user behavior graph features, and resource state space features.
3. The AI large model-based message issuing speed control method according to claim 2, characterized in that, The fusion embedding vector is input into the multi-modal spatio-temporal fusion network, and a spatio-temporal cross attention mechanism is used for multi-modal feature fusion to generate a spatio-temporal attention weight matrix as follows: ; wherein Q time is a time feature query matrix, Q time = TCN(X flow )×W Q , X flow is a flow time series vector, and W Q is a query transformation matrix; K space is a spatial feature key matrix, K space = CNN(X res )×W K , X res is a resource state space vector, and W K is a key transformation matrix; d k is a dimension scaling factor of the attention mechanism. The multi-modal spatio-temporal fusion network outputs: ; is the predicted flow sequence for future H time steps, E is the fused embedding vector, A ts is the spatio-temporal attention weight matrix, P(t) is the position encoding for timestamp t.
4. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The reinforcement learning model adopts a proximal policy optimization algorithm to generate adjustment rates and adjustment priorities; the proximal policy optimization algorithm defines state input as a five-dimensional state vector: s t =[L t ,S t ,C t ,A t ,B t ],L t is a load rate, S t is an SLA compliance rate, C t is a CPU utilization rate, A t is an exception score, and B t is a service weight; an output action space vector a t =[Δ rate , Δ priority ],Δ rate is a rate adjustment, and Δ priority is a priority adjustment.
5. The AI large model-based message issuing speed control method according to claim 4, characterized in that, The business weight is the output of a dependency tree, and the dependency tree is as follows: ; M is the traffic prediction value for the i-th time window j is the j-th message semantic within the i-th time window, α ij is the weight of the j-th message semantic on the i-th time window traffic, α ij = Softmax(MLP(E ij )); E ij is the joint feature vector of the j-th message semantic and the i-th time window.
6. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The objective function of the mixed integer programming model is as follows: ; c CPU is the CPU unit cost weight, c Mem is the memory unit cost weight, c BW is the bandwidth unit cost weight; is the CPU allocation decision 0 / 1 variable for node n; is the memory allocation decision for node n; is the bandwidth allocation decision for node n.
7. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The node health degree is: ; CPU n is the CPU utilization of node n, Mem n is the memory utilization of node n, Latency n is the latency of node n, and α, β, and γ are weight coefficients for balancing the importance of different resource consumptions in the health degree calculation. Traffic distribution is performed through a smooth weighted round robin algorithm: ; P n The probability, i.e. the traffic distribution weight, is selected for the node, Health n Health is the health degree of the node n, k is the smoothing coefficient, t is the current time, is the time when the node n was last selected, denotes the waiting time.
8. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The domain adversarial training uses maximum mean discrepancy to measure the feature distribution difference between the source domain and the target domain: ; For the feature mapping function, the input is mapped to a reproducing kernel Hilbert space, D s For the source domain, D t For the target domain, n s For the number of samples of the source domain, n t For the number of samples of the target domain, H is the Gaussian kernel function space, used to calculate the distance between distributions.
9. The AI large model-based message issuing speed control method according to claim 1, characterized in that, The multi-language BERT encoding to adapt to different languages includes mapping texts in different languages to a unified semantic space, using contrastive learning to reduce the semantic difference of different languages in a specific business field, and performing semantic equivalence calculation to trigger the same speed control strategy.
10. An AI large model-based message issuing speed control system, characterized in that, It comprises a data acquisition module, an intelligent decision-making module, a security protection module, a resource scheduling module, a load balancing module, and a global adaptation module. The data acquisition module acquires multi-source data in real time and constructs a multi-dimensional fusion feature vector; the security protection module detects abnormalities and performs hierarchical fusing based on a BERT-CNN distillation architecture; the intelligent decision-making module uses a reinforcement learning model to predict the message issuing rate of multiple future time windows and dynamically adjust the priority based on the fusion feature vector; the resource scheduling module uses a mixed integer programming model to generate the minimum cloud resource cost in the offline stage, and uses a deep reinforcement learning model for real-time resource fine-tuning in the online stage; The load balancing module calculates the traffic distribution weight based on the node health degree through a smooth weighted round robin algorithm for load balancing; The global adaptation module adapts to different business scenarios through domain adversarial training and multi-task learning, and adapts to different languages through multi-language BERT encoding.
Citation Information
Cited By
Weight-based dynamic throttling control method and system
CN122457553A
