Intelligent short message scheduling method and device based on multi-dimensional dynamic optimization

By employing a multi-dimensional, dynamically optimized intelligent SMS scheduling method, the problems of insufficient dynamic adaptability and resource waste in existing systems are solved. This method enables intelligent channel selection and retry strategies, reducing invalid retry rates and sending costs, and improving delivery rates and resource utilization efficiency.

CN120916116AActive Publication Date: 2025-11-07BEIJING YULORE INNOVATION TECH

Patent Information

Application Number
CN202511438439.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-11-07
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing SMS dispatch systems suffer from insufficient dynamic adaptability, serious resource waste, lack of multi-objective collaboration, high operation and maintenance costs, inability to respond to channel status changes in real time, inability to intelligently identify terminal status, and difficulty in balancing timeliness and cost.

Method used

The intelligent SMS scheduling method based on multi-dimensional dynamic optimization acquires SMS channel performance data, performs cleaning and normalization processing, calculates channel health scores, and combines decision tree models and reinforcement learning algorithms to realize intelligent channel selection and retry strategies. It also applies Huffman coding compression and regional grouping to optimize resource utilization.

Benefits of technology

It improves the accuracy and adaptability of channel selection, significantly reduces the invalid retry rate, lowers transmission costs, improves delivery rate and system resource utilization efficiency, and achieves a balance between cost and timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120916116A_ABST
    Figure CN120916116A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent short message scheduling method and device based on multi-dimensional dynamic optimization, and the method comprises the steps: obtaining the performance data of a plurality of short message channels, and calculating a channel health score based on a weight dynamic adjustment model; determining a scheduling strategy according to the priority identifier of the to-be-sent message, and performing channel screening and optimal matching; executing message sending and monitoring a sending state; terminal state detection is carried out on the failure message through operator base station signaling, and a decision tree model is applied to determine a retry strategy; and performing Huffman coding compression processing on the P2-level marketing messages which fail in retry, and performing batch sending in an idle window. According to the method, a comprehensive performance evaluation index and reward function model is also constructed, and parameter optimization is performed by applying a reinforcement learning algorithm. According to the invention, multi-dimensional dynamic channel scoring, intelligent retry decision making based on terminal state perception, batch processing with balanced cost-time efficiency and a closed-loop self-optimization system are realized, the short message delivery rate is obviously improved, and the invalid retry rate and the sending cost are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of mobile communication, in particular to an intelligent short message scheduling method and device based on multi-dimensional dynamic optimization. BACKGROUND

[0002] As an important communication means, short message service (SMS) is widely used in financial verification, notification reminder, marketing promotion and other scenarios. In order to ensure the efficient and reliable delivery of messages, the short message scheduling system plays a key role as a bridge between the sending terminal and the operator network, responsible for message routing, channel selection and retry mechanism, and other core functions.

[0003] The common short message scheduling technology in the current industry mainly includes polling scheduling method and simple retry mechanism. The polling scheduling method distributes short messages to different channels in a fixed order by presetting a channel list, while the simple retry mechanism reattempts the sending of failed messages at a fixed time interval (such as 5 minutes). Some systems also use static priority queues to set different sending priorities according to message types (such as verification code, notification, marketing), or optimize only for a single dimension such as success rate or cost.

[0004] The existing technology uses a short message scheduling system based on preset rules. This technology realizes the scheduling of short message sending through manually configured channel selection rules and fixed retry strategies. The system uses success rate as the main basis for channel selection, performs simple timed retry on failed messages, and adjusts system parameters through manual monitoring.

[0005] However, this traditional scheduling technology has obvious defects: first, it lacks dynamic adaptability and cannot respond to sudden changes in channel status (such as operator downtime, network congestion) in real time; second, it wastes resources seriously, with a high proportion of indiscriminate retries for unreachable terminals (such as off state) of more than 25%; third, it lacks multi-target coordination, making it difficult to meet the timeliness requirements of high-priority messages and cost control of low-priority messages at the same time; finally, it has high operation and maintenance costs, requiring manual continuous monitoring of channel quality and manual adjustment of strategies, with a response delay usually exceeding 30 minutes.

[0006] Therefore, there is an urgent need for an intelligent short message scheduling method that can dynamically adapt to changes in channel status, intelligently identify terminal status, balance timeliness and cost, and achieve self-optimization, in order to improve short message delivery rate and reduce invalid retry rate and sending cost. SUMMARY

[0007] The purpose of the present application is to provide an intelligent short message scheduling method and device based on multi-dimensional dynamic optimization, to solve the problems of insufficient dynamic adaptability, serious resource waste, lack of multi-target coordination and high operation and maintenance costs of existing short message scheduling systems.

[0008] To achieve the above object, the technical scheme provided by the present application is as follows: An intelligent short message scheduling method based on multi-dimensional dynamic optimization, comprising the following steps: Obtain performance data of a plurality of short message channels within a preset time, the performance data including success rate, delay, cost and quota usage, perform cleaning and normalization processing on the performance data, calculate health scores of the plurality of short message channels based on a weight dynamic adjustment model, and obtain channel health evaluation results; Receive a message to be sent and its priority identifier, the priority identifier including P0-level verification code messages, P1-level notification messages and P2-level marketing messages, determine scheduling strategy requirements according to the priority identifier, perform channel screening and optimal matching based on the channel health evaluation results and the scheduling strategy requirements, and obtain a matching result of the message and the channel; Perform message sending based on the matching result of the message and the channel, monitor sending status and channel response in real time, receive and analyze sending result data, and obtain sending result information; Obtain failed message data in the sending result information, perform terminal state detection through operator base station signaling, determine a retry strategy by applying a decision tree model, obtain a retry decision result, and screen out P2-level marketing messages that fail to retry from the retry decision result; Perform Huffman coding compression processing on the P2-level marketing messages that fail to retry, perform geographical grouping according to receiver base station information, perform batch sending operation of the P2-level marketing messages after compression processing in an idle time window, obtain sending result information after the operation is completed, and corresponding cost saving data.

[0009] Preferably, the method further comprises: constructing a comprehensive performance evaluation index by using the sending result information and the cost saving data, constructing a reward function model based on the comprehensive performance evaluation index, applying a reinforcement learning algorithm to optimize parameters, generating optimized weight coefficients and scheduling strategies, and updating short message scheduling operation based on the scheduling strategies.

[0010] Preferably, the performance data is cleaned and normalized, the health scores of the plurality of short message channels are calculated based on a weight dynamic adjustment model, and the channel health evaluation results are obtained, comprising: Perform outlier detection and cleaning processing on the performance data to obtain a cleaned data set; Perform normalization processing on success rate, delay, cost and quota usage indicators in the cleaned data set, unify multi-dimensional index data to the 0-1 interval, and obtain a normalized data set; Select a preset weight template based on time period characteristics according to current time period characteristics, determine success rate weight, delay weight, cost weight and quota weight, and obtain weight coefficient configuration; Based on the normalized data set and the weight coefficient configuration, the health score value of the plurality of short message channels is calculated based on a weight dynamic adjustment model, and the channel health evaluation result is obtained.

[0011] Preferably, based on the channel health evaluation result and the scheduling strategy requirement, channel screening and optimal matching are performed to obtain a message and channel matching result, including: Receiving and parsing the to-be-sent message content, identifying the priority identifier corresponding to the to-be-sent message content, and obtaining a priority classification result; According to the priority classification result, the corresponding scheduling strategy requirement is determined to obtain a strategy parameter configuration, wherein the scheduling strategy requirement includes: P0 level message requires health score ≥ 90 points and delay ≤ 3 seconds, P1 level message requires health score ≥ 70 points and delay ≤ 15 seconds, and P2 level message requires health score ≥ 50 points and priority consideration of cost factors; Combined with the channel health evaluation result and the strategy parameter configuration, multi-level screening is performed, including health score threshold-based screening, specific dimension-based hard condition screening, and availability screening based on quota management, to obtain a channel candidate set that meets the conditions; Applying an optimal matching algorithm to the channel candidate set, calculating the utility value of each channel through an utility function, selecting the channel with the maximum utility value, and obtaining the message and channel matching result.

[0012] Preferably, based on the message and channel matching result, message sending is performed, and the sending state and channel response are monitored in real time to obtain sending result information, including: According to the message and channel matching result, message sending parameters are prepared, content format conversion and security signature processing are performed on the message sending parameters, request parameters conforming to the channel API specification are constructed, and sending request configuration is obtained; Based on the sending request configuration, a message sending request is initiated to the selected channel through an asynchronous non-blocking HTTP client, and the request initiation timestamp and tracking identifier are recorded to obtain the sending execution state; Real-time monitoring of the sending execution state, tracking the complete cycle of network connection establishment, request sending, and response receiving, recording key time nodes and state changes, and obtaining state tracking data; Receiving and parsing the sending result data returned by the channel, mapping the specific status codes of each channel into the system unified status definition, and performing success determination, temporary failure determination, and permanent failure determination to obtain standardized sending results; According to the standardized sending result, the channel performance index is updated, the channel health score is recalculated, and the feedback is given to the channel scoring system to obtain the sending result information.

[0013] Preferably, the failure message data in the sending result information is acquired, terminal state detection is performed through operator base station signaling, a decision tree model is applied to determine a retry strategy, and a retry decision result is obtained, including: The failure message data in the sending result information is acquired, error codes returned by the channel are mapped and analyzed to obtain a failure cause classification result, and the failure cause classification result includes channel failure, terminal problem, content problem, or quota problem. Based on the failure cause classification result, terminal real-time state is queried through operator base station signaling or manufacturer API to obtain terminal state data, and the terminal state data includes online accessibility, shutdown inaccessible, weak and unstable signal, or roaming state. The failure cause classification result and the terminal state data are input into a decision tree model, multi-layer conditional judgment is performed based on failure type, terminal state, message priority, and historical retry number to obtain a retry strategy type. According to the retry strategy type, corresponding retry operations are performed, including immediate retry, channel switching, delay retry, timing retry, content adjustment, or termination retry, to obtain a retry execution result. The retry execution result is recorded, retry effect statistics and decision model parameters are updated, success rate indicators of different retry strategies are calculated, and the retry decision result is obtained.

[0014] Preferably, the retry-failed P2-level marketing messages are subjected to Huffman coding compression processing, regional grouping is performed according to receiver base station information, batch sending operations of the P2-level marketing messages subjected to compression processing in the idle time window are performed, sending result information after the operations are completed is acquired, and corresponding cost saving data is acquired, including: P2-level marketing messages are collected from the to-be-sent messages and the retry-failed P2-level marketing messages, marketing property message content is identified through keyword matching, and time window aggregation is performed to obtain a P2-level message set. The P2-level message set is subjected to content compression processing by applying a Huffman coding algorithm, a character frequency dictionary and an encoding mapping table are constructed, original messages are converted into compressed binary streams, and compressed message data is obtained. According to receiver mobile phone numbers, the P2-level message set is subjected to content compression processing by applying a Huffman coding algorithm, a character frequency dictionary and an encoding mapping table are constructed, original messages are converted into compressed binary streams, and compressed message data is obtained. An idle time window is set as a 00:00-06:00 period, a batch sending plan is formulated for the compressed message data corresponding to the regional grouping result, load balancing distribution is performed by using an operator discount channel, and an idle time sending plan is obtained. In the specified idle time window, the idle time sending plan is performed on each region in the regional grouping result, the compression rate, sending cost and delivery rate data are recorded, the cost saving range compared with the standard sending mode is calculated to obtain the cost saving data.

[0015] Preferably, the method further comprises: using a decentralized multi-agent reinforcement learning architecture, and applying a reinforcement learning algorithm for parameter optimization to generate optimized weight coefficients and scheduling strategies, including: A multi-agent framework is established, and a plurality of distributed agents are deployed in the framework, including a channel evaluation agent, a routing decision agent, a retry strategy agent and a resource scheduling agent, and each agent is distributed in different physical nodes; A minimum communication mechanism between agents in the multi-agent framework is established, only local reward information is exchanged, secure data exchange is realized through an encrypted communication channel, and a distributed collaboration network is obtained; In the distributed collaboration network, a participant-critic network structure is constructed for each agent, the participant network is used to learn the optimal policy mapping and output action selection, and the critic network is used to evaluate the action value and provide policy gradient guidance; In the participant-critic network structure, a hybrid reward structure is designed, including individual rewards and team rewards, policy entropy regularization is used to maintain policy diversity, and a collaboration behavior incentive mechanism is established; Distributed model updating is realized through a consensus algorithm, the number of agents is dynamically adjusted according to the system size, cross-scene knowledge transfer is realized, and global optimization parameters are obtained; Based on the global optimization parameters, the channel score weight coefficients are output by the channel evaluation agent, the channel selection strategy is output by the routing decision agent, the retry decision parameters are output by the retry strategy agent, and the resource allocation strategy is output by the resource scheduling agent, to obtain the optimized weight coefficients and scheduling strategies.

[0016] Preferably, the optimal matching algorithm is applied to the channel candidate set, the utility value of each channel is calculated through the utility function, the channel with the maximum utility value is selected, and the matching result of the message and the channel is obtained, including: Based on the state information of the channel candidate set, a double deep Q network architecture is constructed, including a main network responsible for action selection and a target network used to calculate target Q values, and multi-dimensional information such as channel health scores, message features and system load is fused as state representation; The greedy strategy optimization operation is realized on the double deep Q network architecture, the action with the highest current Q value is selected, the exploration probability is reserved for random exploration, the exploration probability is gradually reduced by a preset proportion as the learning progresses, and the greedy action selection strategy is output; perform time series analysis based on the greedy action selection strategy, identify traffic characteristics in different time periods, consider network topology relationships between channels for routing decisions, monitor bandwidth, delay and reliability of each link in real time, and generate a link activation scheme based on traffic and topology; According to the link activation scheme based on traffic and topology, a hierarchical scheduling architecture is established, including a master scheduler responsible for global resource allocation and a sub-scheduler focusing on local optimization, efficient state sharing and decision coordination are realized, and a multi-agent DDQN allocator is obtained; The neural network quantization and GPU acceleration technology is applied to the multi-agent DDQN allocator to realize the cache mechanism of scene decision results, batch processing of similar requests is performed, and the matching results of the message and the channel are obtained.

[0017] Preferably, based on the greedy action selection strategy, time series analysis is performed, traffic characteristics in different time periods are identified, routing decisions are made considering network topology relationships between channels, bandwidth, delay and reliability of each link are monitored in real time, and a link activation scheme based on traffic and topology is generated, including: Collect historical traffic data in each period, identify periodic traffic patterns and burst traffic characteristics through an LSTM time series model, predict traffic demand distribution in future periods, and obtain traffic prediction results; Based on the traffic prediction results, a network topology graph between channels is constructed, the geographical location, network delay and bandwidth capacity of each channel are recorded, the path cost and reachability matrix between channels are calculated, and a topology relationship model is obtained; In combination with the topology relationship model, the current load rate, average delay and packet loss rate of each link are monitored in real time, potential network bottlenecks and fault risks are identified, and link state evaluation is obtained; Based on the link state evaluation, standby links are activated in advance and channel capacity is expanded during traffic peak periods, redundant resources are released and operating costs are reduced during traffic trough periods, and a predictive activation strategy is obtained; The predictive activation strategy is combined with real-time traffic scheduling to dynamically adjust the weight distribution and load balancing parameters of each link, and the link activation scheme based on traffic and topology is obtained.

[0018] Preferably, before the cost saving data is obtained, the idle time sending plan is performed on each region in the regional grouping result in the specified idle time window, the compression rate, sending cost and delivery rate data are recorded, the cost saving range compared with the standard sending method is calculated, and the cost saving data is obtained. Based on the idle time sending plan, a double and duel deep Q-Learning architecture is constructed, two independent Q networks are used to reduce overestimation bias, Q values are decomposed into state value function V(s) and advantage function A(s,a), and Q values are calculated, and a D3QL network structure is obtained; The D3QL network structure is used to implement a multi-level service deployment strategy, and processing logic is divided into a core layer, an edge layer and a terminal layer, wherein the core layer is used to process critical business logic and data storage, the edge layer is used to process localized message processing and caching, and the terminal layer is used to implement preprocessing and state detection to determine a layered service architecture. Based on intelligent prediction of service demand distribution in the layered service architecture, service instances are deployed in advance at optimal positions, and service instance distribution is dynamically adjusted according to load changes to obtain an intelligent service placement strategy. According to the intelligent service placement strategy, differentiated quality of service requirements are defined for different service types, a dedicated resource pool is reserved for first priority services, and QoS parameters are dynamically adjusted according to load and service importance. A micro-service architecture and a containerized deployment method are used, Kubernetes is used to manage dynamic scaling of service instances, state dependencies between services are minimized, and system adaptability is tested through fault injection.

[0019] Preferably, the method further comprises: obtaining an intelligent service placement strategy using a greedy multiple access scheme, comprising: Based on the intelligent service placement strategy, multiple independent channels are used for parallel transmission of critical messages, forward error correction code technology is applied to enhance transmission reliability, and a multi-channel parallel transmission mechanism is generated. Using the multi-channel parallel transmission mechanism, the success rate, delay and stability indicators of each transmission path are evaluated in real time, the traffic distribution ratio is dynamically adjusted according to path quality, and the best performing path is preferentially used to obtain an adaptive path selection strategy. Based on the adaptive path selection strategy, channel capacity, network delay and transmission cost are considered, a weighted round-robin algorithm is applied to implement intelligent load distribution, and a load balancing algorithm is obtained. According to the load balancing algorithm, a channel fault detection and switching mechanism is established, and when a primary channel is detected to be abnormal, the system automatically switches to a backup channel. The channel fault detection and switching mechanism is combined with the multi-channel parallel transmission mechanism, the adaptive path selection strategy and the load balancing algorithm to obtain the greedy multiple access scheme.

[0020] The application also provides an intelligent short message scheduling device based on multi-dimensional dynamic optimization, comprising a memory and a processor, wherein the processor is used to execute the method of any one of the above.

[0021] The application has the following advantages: Innovative dynamic channel scoring mechanism: combining success rate, delay, cost and quota in four dimensions, real-time calculation of channel health score through an adjustable weight formula enables the system to quickly respond to changes in channel quality, improving the accuracy and adaptability of channel selection.

[0022] Intelligent retry decision tree based on terminal state awareness: Real-time acquisition of user equipment state through operator base station signaling, automatic selection of optimal retry strategy for different failure reasons, significantly reducing invalid retry rate from 25-40% to less than 5%, improving system resource utilization efficiency.

[0023] Cost-time balanced batch processing framework: Combined with Huffman coding compression, regional grouping and idle time channel utilization, it reduces the cost of low priority messages while ensuring the timeliness of high priority messages, reducing the cost of a single message from 0.048 yuan to 0.026 yuan, achieving about 45% cost savings.

[0024] Closed-loop reinforcement learning self-optimization system: Through the reward function driven reinforcement learning algorithm, the automatic optimization of scheduling parameters and the continuous evolution of the system are realized, so that the system can adapt to environmental changes and continuously improve performance.

[0025] Complete multi-dimensional hierarchical scheduling architecture: From channel scoring, message grading, intelligent routing to failure retry, a complete scheduling closed loop is formed, solving the limitations of single-dimensional optimization of traditional solutions, with a comprehensive success rate increase of 4.5-9.5%, and a delay reduction of 60-80% in peak hours. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. The drawings herein are incorporated into the specification and form a part of the specification, which illustrate the embodiments consistent with the present disclosure, and together with the specification, serve to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show certain embodiments of the present disclosure, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0027] Figure 1 The flowchart of the intelligent short message scheduling method based on multi-dimensional dynamic optimization provided by the embodiments of the present disclosure; Figure 2 The flowchart of the dynamic channel scoring system provided by the embodiments of the present disclosure; Figure 3 The flowchart of intelligent channel selection based on message priority and channel health score provided by the embodiments of the present disclosure; Figure 4 The flowchart of executing message sending and state monitoring provided by the embodiments of the present disclosure. DETAILED DESCRIPTION

[0028] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to specific embodiments and drawings.

[0029] Please refer to Figure 1 , Figure 1 The flow chart of the intelligent short message scheduling method based on multi-dimensional dynamic optimization provided by the embodiment of the present application. As shown in Figure 1 , the method comprises the following steps: Step S101: acquiring performance data of a plurality of short message channels within a preset time, the performance data including success rate, delay, cost and quota usage rate, performing cleaning and normalization processing on the performance data, calculating health scores of the plurality of short message channels based on a weight dynamic adjustment model, and obtaining channel health evaluation results.

[0030] In the embodiment, the short message scheduling system (hereinafter referred to as the system) first acquires real-time performance data from each short message channel, including success rate, delay, cost and quota usage rate, four-dimensional indicators. These data are collected from the operator system through the API interface, or recorded by the monitoring module of the system itself. The collected raw data is cleaned to remove outliers and invalid data, and then normalized to unify different indicators to the 0-1 interval, facilitating subsequent calculation.

[0031] The system selects the corresponding weight template according to the current period characteristics (such as peak period, daily period or night period), and determines the weight coefficients of each dimension indicator. For example, more attention may be paid to success rate and delay in peak period, and more attention may be paid to cost factors at night. Based on the normalized data and weight coefficients, the formula: health score = W1x success rate + W2x (1 / delay) + W3x (1 / cost) + W4x quota usage rate is used to calculate the health score value (0-100 points) of each channel, forming the channel health evaluation results.

[0032] Step S102: receiving a message to be sent and its priority identifier, the priority identifier including P0 level verification message, P1 level notification message and P2 level marketing message, determining the scheduling strategy requirement according to the priority identifier, performing channel screening and optimal matching based on the channel health evaluation results and the scheduling strategy requirement, and obtaining the matching result of the message and the channel.

[0033] In this embodiment, the system receives a short message sending request from a business application, parses the message content and priority identification. The priority is divided into three levels: P0 level (high priority messages such as verification codes), P1 level (medium priority messages such as notifications), and P2 level (low priority messages such as marketing messages). The system determines the corresponding scheduling strategy requirements according to the message priority, such as P0 level messages requiring a health score ≥ 90 points and a delay ≤ 3 seconds, P1 level messages requiring a health score ≥ 70 points and a delay ≤ 15 seconds, and P2 level messages requiring a health score ≥ 50 points and giving priority to cost factors.

[0034] Based on the channel health evaluation results and scheduling strategy requirements, the system performs multi-level screening, including screening based on health score thresholds, hard condition screening based on specific dimensions, and availability screening based on quota management, to obtain a set of channel candidates that meet the conditions. Then, the optimal matching algorithm is applied to the channel candidate set, and the utility value of each channel is calculated through the utility function. The channel with the maximum utility value is selected to obtain the matching result of the message and the channel.

[0035] Step S103: Perform message sending based on the matching result of the message and the channel, real-time monitor the sending state and channel response, receive and parse the sending result data, and obtain the sending result information.

[0036] In this embodiment, the system prepares message sending parameters based on the matching result, performs content format conversion and security signature processing on the parameters, and constructs request parameters that meet the channel API specifications. The system initiates a message sending request to the selected channel through an asynchronous non-blocking HTTP client, records the request initiation timestamp and tracking identifier.

[0037] The system real-time monitors the sending execution state, tracks the complete cycle of network connection establishment, request sending, and response reception, records key time nodes and state changes. The system receives and parses the sending result data returned by the channel, maps the specific status codes of each channel into the system's unified state definition, performs success determination, temporary failure determination, and permanent failure determination, and obtains standardized sending results. The system updates the channel performance indicators based on the sending results, recalculates the channel health score, and feeds back to the channel scoring system.

[0038] Step S104: Obtain the failed message data in the sending result information, perform terminal state detection through operator base station signaling, apply a decision tree model to determine the retry strategy, obtain the retry decision result, and filter out the P2 level marketing messages that fail to retry from the retry decision result.

[0039] In this embodiment, the system obtains the failed message data in the sending result, maps and analyzes the error codes returned by the channel, and obtains the failure reason classification result, including channel failure, terminal problem, content problem, or quota problem, etc.

[0040] Based on the failure reason classification result, the system obtains terminal state data by querying the real-time state of the terminal through operator base station signaling (such as AT+CPING instruction) or manufacturer API, including online reachable, shutdown inaccessible, weak and unstable signal or roaming state and other information.

[0041] The failure reason classification result and the terminal state data are input into a decision tree model, and multi-layer conditional judgment is performed based on the failure type, terminal state, message priority and historical retry number to obtain a retry strategy type. According to the strategy type, corresponding retry operations are performed, including immediate retry, channel switching, delay retry, timing retry, content adjustment or termination of retry, to obtain a retry execution result. The system records the retry execution result, updates the retry effect statistics and the decision model parameters, and filters out the P2 marketing messages that fail to retry for subsequent batch processing.

[0042] Step S105: Perform Huffman coding compression processing on the P2 marketing messages that fail to retry, perform geographical grouping according to the base station information of the receiver, perform batch sending operation of the P2 marketing messages after compression processing in the idle time window, and obtain sending result information and corresponding cost saving data after operation completion.

[0043] In this embodiment, the system collects P2 marketing messages from the to-be-sent messages and the messages that fail to retry, identifies the marketing message content through keyword matching, and performs time window aggregation to obtain a P2 message set.

[0044] The Huffman coding algorithm is applied to the P2 message set for content compression processing, a character frequency dictionary and an encoding mapping table are constructed, the original message is converted into a compressed binary stream, compressed message data is obtained, and the compression rate is usually more than 35%.

[0045] According to the receiver's mobile phone number, the system analyzes the home location and operator information, performs first-level grouping according to the operator type, second-level grouping according to the provincial administrative division, and third-level grouping according to the city or region, to obtain a geographical grouping result.

[0046] The system sets the idle time window as the period of 00:00-06:00, formulates a batch sending plan for the compressed message data corresponding to the geographical grouping result, and performs load balancing distribution using the discount channel provided by the operator in this period. The batch sending operation is performed in the specified idle time window, the compression rate, sending cost and delivery rate data are recorded, the cost saving range compared with the standard sending mode is calculated, and the cost saving data is obtained.

[0047] Step S106: constructing a comprehensive performance evaluation index using the sending result information and the cost saving data, constructing a reward function model based on the comprehensive performance evaluation index, applying a reinforcement learning algorithm for parameter optimization, generating an optimized weight coefficient and a scheduling strategy, and updating the SMS scheduling operation based on the scheduling strategy.

[0048] In this embodiment, the system constructs a comprehensive performance evaluation index using sending result information and cost saving data to reflect the overall operation effect of the system. Based on the evaluation index, a reward function model is constructed, which is in the form of: R = α × success rate - β × delay - γ × cost, where α, β, γ are weight coefficients, and satisfy α + β + γ = 1.

[0049] The system applies a reinforcement learning algorithm (such as DQN, DDPG or PPO) for parameter optimization, gradually finds the optimal weight coefficient and scheduling strategy by continuously trying different parameter configurations and evaluating their effects. The generated optimization results include channel score weight coefficients, channel selection strategy parameters, retry decision parameters and resource allocation strategies, etc. The system applies these optimized parameters to the corresponding modules to update the SMS scheduling operation, forming a closed-loop optimization mechanism.

[0050] Please refer to Figure 2 , Figure 2 The flowchart of the dynamic channel scoring system provided by the embodiment of the present application. As shown in Figure 2 , step S101 specifically includes the following sub-steps: Step S201: performing outlier detection and cleaning processing on the performance data to obtain a cleaned data set.

[0051] In this embodiment, the system performs outlier detection and cleaning processing on the original performance data collected from the operator API interface. Outlier detection uses statistical methods (such as 3σ rule) or machine learning algorithms (such as isolation forest) to identify data points that are significantly deviated from the normal range. Cleaning processing includes removing outliers, filling missing values (using mean, median or interpolation method) and smoothing processing (using moving average method to reduce data fluctuations). The processed cleaned data set contains valid performance indicators of each channel.

[0052] Step S202: normalizing the success rate, delay, cost and quota utilization rate indicators in the cleaned data set to unify the multi-dimensional indicator data to the 0-1 interval to obtain a normalized data set.

[0053] In this embodiment, the system normalizes four-dimensional indicators in the cleaned data set, unifies indicators of different dimensions and ranges to the interval of 0-1, and facilitates subsequent weighted calculation. The normalization processing adopts the maximum and minimum value normalization method: Xnorm = (X - Xmin) / (Xmax - Xmin), where X is the original value, Xmin and Xmax are the minimum value and the maximum value of the indicator respectively, and Xnorm is the normalized value. For indicators such as delay and cost, which are "the smaller the better", the conversion of 1-Xnorm is adopted to make all indicators consistent with "the larger the better".

[0054] Step S203: According to the current period characteristics, a preset weight template based on the period characteristics is selected to determine the success rate weight, the delay weight, the cost weight and the quota weight, and the weight coefficient configuration is obtained.

[0055] In this embodiment, the system selects the corresponding weight template according to the current period characteristics. The system presets a plurality of weight templates for period characteristics, such as: Peak period template (such as 9:00-18:00 on weekdays): success rate weight = 0.4, delay weight = 0.4, cost weight = 0.1, quota weight = 0.1; Daily period template (such as other time periods on weekdays): success rate weight = 0.35, delay weight = 0.3, cost weight = 0.2, quota weight = 0.15; Night period template (such as 00:00-06:00): success rate weight = 0.3, delay weight = 0.2, cost weight = 0.4, quota weight = 0.1; The system determines the current period through time judgment, selects the corresponding weight template, and obtains the specific weight coefficient configuration. This dynamic weight adjustment mechanism enables the system to flexibly adjust the importance of each-dimensional indicator according to the business characteristics of different periods.

[0056] Step S204: Based on the normalized data set and the weight coefficient configuration, the health score value of the plurality of SMS channels is calculated based on a weight dynamic adjustment model, and the channel health evaluation result is obtained.

[0057] In this embodiment, the system uses the weight dynamic adjustment model to calculate the health score value of each channel based on the normalized data set and the weight coefficient configuration. The calculation formula is: Health score = W1XS + W2X(1 / D) + W3X(1 / C) + W4XQ Wherein, S is the normalized success rate, D is the normalized delay, C is the normalized cost, Q is the normalized quota usage rate, and W1, W2, W3 and W4 are the weight coefficients of each indicator.

[0058] The calculation result is multiplied by 100 to obtain a channel health score value in the range of 0-100. The system organizes the health score of each channel and its constituent elements (dimension score and weight) into a structured channel health evaluation result, which is an important basis for subsequent channel selection.

[0059] Please refer to Figure 3 , Figure 3 The flowchart of intelligent channel selection based on message priority and channel health score provided by the embodiment of the application. As shown in Figure 3 , step S102 specifically includes the following sub-steps: Step S301: receiving and analyzing the content of the message to be sent, identifying the priority identifier corresponding to the content of the message to be sent, and obtaining a priority classification result.

[0060] In this embodiment, the system receives the short message request sent by the business system through RESTful API or message queue (such as Kafka / RabbitMQ), decodes and formats the message content, and ensures that it meets the system requirements (such as length limit, character encoding, etc.).

[0061] The system identifies the priority identifier of the message, which supports two ways: Explicit marking: the business system directly specifies the priority parameter in the API request; Intelligent inference: the system automatically judges the message priority through keyword matching, content analysis and historical pattern recognition; For example, messages containing keywords such as "verification code" and "security confirmation" will be automatically classified as P0 level; messages containing words such as "notification" and "reminder" will be identified as P1 level; messages containing words such as "activity" and "discount" will be identified as P2 level. The system outputs a priority classification result containing standardized message content and explicit priority identifier.

[0062] Step S302: determining the corresponding scheduling strategy requirement according to the priority classification result to obtain a strategy parameter configuration, wherein the scheduling strategy requirement includes: P0 level message requires health score ≥ 90 points and delay ≤ 3 seconds, P1 level message requires health score ≥ 70 points and delay ≤ 15 seconds, and P2 level message requires health score ≥ 50 points and priority consideration of cost factors.

[0063] In this embodiment, the system converts the priority identifier into specific scheduling parameters by configuring the pre-set strategy mapping table in the database according to the priority classification result.

[0064] For P0 level messages (such as verification codes), the system applies the following strategy parameters: Time effectiveness requirement: ≤ 3 seconds to arrive; Channel screening condition: health score ≥ 90 points; Resource allocation: Allows parallel transmission across multiple channels; Retry strategy: Trigger fast retry immediately upon failure; For P1 level messages (such as notifications), the applied policy parameters are: Timeliness requirement: Delivery within 15 seconds; Channel screening criteria: Health score ≥ 70; Resource allocation: Standard channel single-path transmission; Retry policy: Retry within 30 seconds after failure; For P2 level messages (such as marketing messages), the application's strategy parameters are: Time requirement: Delivery within ≤30 minutes; Channel selection criteria: Health score ≥ 50, cost factors are given priority; Resource allocation: Allows batch processing and delayed sending; Retry policy: Allow long window for retrying (1-4 hours); The system will also dynamically adjust these strategy parameters based on the current load and time period characteristics to achieve optimal resource allocation. The output strategy parameter configuration includes specific timeliness indicators, channel filtering conditions, resource allocation rules, and retry strategies.

[0065] Step S303: Combine the channel health evaluation results and the strategy parameter configuration to perform multi-level screening, and perform screening based on health score threshold, screening based on hard conditions of specific dimensions, and availability screening based on quota management to obtain a set of candidate channels that meet the conditions.

[0066] In this embodiment, the system obtains the health score data of all currently available channels from the channel pool and performs multi-level filtering in conjunction with the configured strategy parameters: Level 1: Threshold filtering based on health score: For P0 messages, filter channels with a health score ≥ 90; For P1 messages, filter channels with a health score ≥ 70; For P2 messages, filter channels with a health score ≥ 50; Level 2: Filtering based on hard criteria of specific dimensions: For P0 messages, further filter channels with a delay of ≤3 seconds and a success rate of ≥95%; For P1 messages, further filter channels with a delay of ≤15 seconds and a success rate of ≥90%; For P2 messages, further filter for channels with lower costs (e.g., unit price ≤ 0.05 yuan / message). Level 3: Availability filtering based on quota management: Exclude channels that have reached their daily limit; Exclude channels that have reached peak traffic; Exclude channels that are in maintenance; For special scenarios, the system will also apply additional filtering logic: High priority messages (P0): Ensure at least 2 alternative channels; Sensitive content messages: Filter channels that support compliance for corresponding content type; International SMS: Filter channels that have routing capability for corresponding country / region; The filtering results form a set of eligible channel candidates, including the health score and key performance indicators of each channel.

[0067] Step S304: Apply the optimal matching algorithm to the set of channel candidates, calculate the utility value of each channel through the utility function, select the channel with the maximum utility value, and obtain the matching result of the message and the channel.

[0068] In this embodiment, the system applies different matching algorithms according to the message priority: P0 level message: Apply "highest reliability priority" algorithm, mainly consider success rate and delay indicators; P1 level message: Apply "balanced" algorithm, balanced consideration of success rate, delay and cost; P2 level message: Apply "cost priority" algorithm, minimize cost under the premise of meeting basic delivery requirements; The mathematical model of the matching algorithm is based on the utility function: U = w1×(success rate) + w2×(1 / delay) + w3×(1 / cost) Where w1, w2, w3 are weight coefficients, adjusted according to message priority: P0 level: w1=0.5, w2=0.4, w3=0.1; P1 level: w1=0.4, w2=0.3, w3=0.3; P2 level: w1=0.3, w2=0.1, w3=0.6; The system calculates the utility value of each channel in the set of channel candidates, and selects the channel with the maximum utility value as the optimal matching result. For special scenarios, the system will also apply additional processing mechanisms: For extremely high priority messages (such as bank verification code), enable parallel sending mode; For targeted regional messages, preferentially match local channels in the target region; For messages of important customers, apply VIP channel reservation strategy; The system also implements load balancing and flow control, monitors the concurrent load of each channel in real time, avoids overloading a single channel, and ensures that the channel usage rate is evenly distributed. The final output message and the matching result of the channel include the message ID, selected channel information, backup channel information, and sending parameter configuration.

[0069] Referring to Figure 4 , Figure 4 The flowchart provided by the embodiment of the present application for executing message sending and performing state monitoring is shown in FIG. 3. As shown in FIG. 3, step S103 specifically includes the following sub-steps: Figure 4 Step S401: Prepare message sending parameters according to the matching result of the message and the channel, perform content format conversion and security signature processing on the message sending parameters, construct request parameters conforming to the channel API specification, and obtain sending request configuration.

[0070] In this embodiment, the system prepares message sending parameters according to the matching result, including basic information such as recipient number, message content, and sender signature. Content format conversion is performed on these parameters, such as Unicode encoding, URL encoding, or Base64 encoding, to ensure compliance with the channel API requirements.

[0071] The system also performs security signature processing, applies encryption algorithms (such as MD5, HMAC-SHA256) to generate security signatures for API calls, performs desensitization or encryption processing on sensitive information (such as mobile phone numbers), implements a replay attack prevention mechanism, and adds a timestamp and a unique request identifier.

[0072] According to the API specification of the selected channel, the system constructs complete request parameters, including specific parameters required by the channel (such as signature, template ID, business code, etc.). The system also performs pre-check and verification, performs parameter integrity and validity checks before sending, and verifies whether the recipient number format and message content meet the channel requirements. Finally, the standardized sending request configuration is obtained, preparing for actual sending operations.

[0073] Step S402: Based on the sending request configuration, initiate a message sending request to the selected channel through an asynchronous non-blocking HTTP client, record the request initiation timestamp and tracking identifier, and obtain the sending execution state.

[0074] In this embodiment, the system uses an asynchronous non-blocking HTTP client (based on the Netty / Reactor mode) to initiate a message sending request to the selected channel. HTTPS encryption communication is used to ensure data transmission security, and TCP connection pool management is implemented to optimize connection reuse efficiency.

[0075] ​The system applies a token bucket algorithm to achieve precise sending frequency control and avoid triggering the channel throttling mechanism. The number of concurrent sending threads is configured according to the channel capacity to maximize throughput. A priority queue is implemented to ensure that high-priority messages are processed first.

[0076] When sending a request, the system records the request initiation timestamp for subsequent delay calculation, assigns a globally unique request tracking ID to enable full-link tracking, and records request state changes in real time, including queuing, sending, and response reception.

[0077] For special scenarios, the system implements differentiated processing strategies: For P0 high-priority messages, a multi-channel parallel sending mechanism is enabled; For newly accessed channels or configuration changes, a gray sending strategy is implemented; Under high system load, targeted degradation is supported to prioritize core business message sending; The system also implements a fuse mode, quickly switching to a backup channel when detecting channel abnormalities, applies timeout control to actively interrupt and retry slow-response requests, and maintains request context information to support correct matching of asynchronous responses.

[0078] Step S403: Real-time monitoring of the sending execution state, tracking the complete cycle of network connection establishment, request sending, and response reception, recording key time nodes and state changes, and obtaining state tracking data.

[0079] In this embodiment, the system implements a multi-level state monitoring mechanism: HTTP layer monitoring: tracking the complete cycle of network connection establishment, request sending, and response reception; Business layer monitoring: analyzing channel response content to identify success / failure status and error codes; End-to-end monitoring: obtaining the final delivery status of messages through channel callbacks or state query APIs; The system performs real-time data collection and analysis, records key time nodes (request initiation time, response reception time, and state update time), calculates key performance indicators (API response time, processing delay, and end-to-end delay), and classifies and counts error responses (network errors, authentication errors, and business errors).

[0080] The system implements anomaly detection and early warning, uses a sliding window algorithm to detect channel performance anomalies (such as sudden drops in success rate and sudden increases in delay), sets multiple threshold alarms, triggers system warnings when indicators exceed normal ranges, and applies anomaly pattern recognition to automatically detect recurring error patterns.

[0081] The monitoring data is written into a distributed time series database (such as InfluxDB) in real time, and a real-time state query interface is provided to support business systems to obtain message sending progress, realize historical data archiving, and support long-term trend analysis. The system also builds a real-time monitoring panel to visually display the health status and performance indicators of each channel, provides a quick positioning function for abnormal channels, and supports custom monitoring views.

[0082] Step S404: Receive and parse the sending result data returned by the channel, map the specific status codes of each channel to the system's unified status definition, and perform success determination, temporary failure determination, and permanent failure determination to obtain standardized sending results.

[0083] In this embodiment, the system obtains sending result data through multiple ways: Synchronous response analysis: Process direct HTTP response data of API calls; Asynchronous callback processing: Receive state callback notifications (Webhook) pushed by the channel; Active query: For channels that do not support callbacks, periodically call the query API to obtain the latest status; The system uses a channel adapter mode to implement a dedicated parser for the return format of different channels. The specific status codes of each channel are mapped to the system's unified status definition, and the returned error information is classified into network errors, authentication errors, content errors, etc.

[0084] The system implements the result state determination logic: Success determination: According to the channel specification, determine whether the message is successfully sent or delivered; Temporary failure determination: Identify temporary errors that can be resolved by retry (such as channel congestion); Permanent failure determination: Identify permanent errors that cannot be resolved by retry (such as non-existent number); The system also performs advanced semantic analysis to extract structured failure reason information from error descriptions, identifies specific error patterns (such as "blacklist", "content violation", etc.), and uses NLP technology to perform semantic analysis and classification on unstructured error descriptions.

[0085] The system associates the sending result data with the original request information to form a complete request-response record, calculates the end-to-end performance indicators, adds environmental context information (such as system load and network conditions at the time of sending), and obtains standardized sending results.

[0086] Step S405: Update the channel performance indicators based on the standardized sending results, recalculate the channel health score, and feed back to the channel scoring system to obtain the sending result information.

[0087] In this embodiment, the system updates the channel performance indicators in real time according to the standardized sending results: Success rate calculation: incorporate the new sending results into the sliding window (e.g. 5 minutes) success rate calculation; Delay statistics: update the average delay, P95 delay (95% of the message delay is lower than this value), and other indicators of the channel; Error distribution: update the proportion of each type of error statistics to identify the main failure mode; Throughput capacity: update the actual processing rate and load level of the channel; The system recalculates the channel health score using the formula in step S101 based on the updated performance indicators, and feeds back the latest health score to the channel scoring system for subsequent message channel selection.

[0088] The system writes the complete sending record to the persistent storage (such as a distributed database), backs up high-value data in real time to ensure data security, and implements a data tiered storage strategy, with hot data retained in high-speed storage and cold data migrated to low-cost storage.

[0089] The system pushes the sending results according to the callback method (HTTP callback, message queue, etc.) preset by the business system, provides differentiated result data for different result states (success / failure), and triggers immediate alarm notification for important business failure results.

[0090] The system also performs real-time aggregation analysis on the sending result data to generate operation reports, identify abnormal patterns and performance bottlenecks, extract business value information such as user active time period, regional distribution, etc., and obtain complete sending result information.

[0091] Step S104 specifically includes the following sub-steps: Step S501: obtain the failed message data in the sending result information, perform mapping analysis on the error code returned by the channel, and obtain the failure cause classification result, which includes channel failure, terminal problem, content problem, or quota problem.

[0092] In this embodiment, the system filters out message records with a status of "failure" from the sending result information, collects complete failure context information including message content summary, receiver number characteristics, sending time, and used channel, extracts the original error code and error description information returned by the channel.

[0093] The system performs error code mapping analysis to map the error code returned by the channel to a standardized failure type. For unstructured error descriptions, NLP technology is applied to extract key information and failure causes. By comparing with historical failure cases, similar failure patterns are identified.

[0094] The system classifies the analysis results into system-defined standard failure types: Temporary channel failure: such as network fluctuations, server busy; Permanent channel failure: such as interface changes, authentication failure; Temporary terminal problem: such as weak signal, temporary offline; Permanent terminal problem: such as number not existing, long-term shutdown; Content-related problems: such as sensitive words, length exceeding limit; Quota or flow limiting problem: such as daily quota exhausted, frequency exceeding limit; The system calculates the failure severity score based on the failure type and frequency, and increases the severity rating for the same type of failure that occurs in batches, and assigns a higher severity level to the failure of key business messages. The system also detects the association pattern between failure messages, analyzes the failure time distribution, and evaluates whether the failure is related to the message content characteristics to obtain a structured failure cause classification result.

[0095] Step S502: Based on the failure cause classification result, query the terminal real-time state through operator base station signaling or manufacturer API to obtain terminal state data, including: online reachable, shutdown inaccessible, weak and unstable signal, or roaming state.

[0096] In this embodiment, the system detects the terminal state in multiple ways according to the failure cause classification result for failures that may be related to the terminal state: Base station signaling detection: query terminal state through AT+CPING base station signaling instruction provided by the operator; Manufacturer API integration: for mobile phone manufacturers that support device state query, call their open API; Push service state: use the push service integrated by the system to obtain the terminal online state; Operator network API: interface with terminal state query interfaces provided by operators 1, 2, and 3; The system constructs a standardized state query request containing the target mobile number and query type, selects the corresponding query channel according to the number's home location and operator characteristics, sends the query request and sets appropriate timeout parameters (usually 1-3 seconds), receives and parses the query result, and extracts the state information.

[0097] The system classifies the terminal state into the following categories: Online / Reachable: The terminal is in normal working state and can receive SMS; Shutdown / Inaccessible: The terminal has been shut down or has not been connected to the network for a long time; Weak / Unstable signal: The terminal is in the edge of signal coverage or in an unstable network area; Roaming state: the terminal is in international or domestic roaming state; Unknown state: unable to obtain the determined state information; The system performs state credibility evaluation, when multiple detection methods are available, the state information from multiple sources is integrated, the current credibility is evaluated according to the acquisition time of the state data, and it is checked whether the state information is consistent with the failure mode.

[0098] The system implements a hierarchical caching mechanism to reduce repeated queries, sets different cache expiration times according to state types (such as 30 minutes for shutdown state and 5 minutes for weak signal state), and forcibly performs real-time queries for high-priority messages, ignoring the cache. Finally, reliable terminal state data is obtained.

[0099] Step S503: input the failure cause classification result and the terminal state data into the decision tree model, perform multi-layer conditional judgment based on failure type, terminal state, message priority and historical retry number, and obtain the retry strategy type.

[0100] In this embodiment, the system takes the failure cause classification result and the terminal state data as input, applies an intelligent decision tree model, and determines the optimal retry strategy for each failed message.

[0101] The core decision factors of the decision tree model include: failure type, failure cause, terminal state, message priority, and historical retry number. The decision tree structure uses multi-layer conditional judgment nodes, and each node branches according to specific conditions. The implementation combines a hybrid decision system of preset rules and machine learning to support online updating of decision rules.

[0102] The main logic of the decision-making process includes: First-level judgment: preliminary shunt based on failure type (temporary / permanent); Second-level judgment: refine the processing strategy in combination with the terminal state (online / offline / weak signal); Third-level judgment: consider message priority and historical retry situation to optimize the strategy; Special case handling: apply special handling rules for specific error codes (such as sensitive content); The system defines the following retry strategy types: Immediate retry: use the same channel to retry immediately (suitable for temporary network fluctuations); Channel switching: change to an alternative channel for retry (suitable for specific channel failure); Delay retry: try again after a certain delay (suitable for temporary unavailability of the recipient); Timed retry: schedule a retry at a specific time (suitable for users who shut down at night); Content Adjustment: Retry after modifying message content (for content violation issues); Termination Retry: Give up further retry attempts (for permanent failures or maximum retry count reached); The system also implements advanced policy optimization features, including adaptive delay calculation, parallel retry decision, cost constraint handling, and gradual retry. Based on the decision tree's judgment results, the system outputs specific retry strategy types.

[0103] Step S504: Perform corresponding retry operations according to the retry strategy type, including immediate retry, channel switching, delay retry, timed retry, content adjustment, or termination retry, to obtain retry execution results.

[0104] In this embodiment, the system performs specific retry operations according to the retry strategy type. The system constructs a retry task queue, sorts it by priority and scheduled execution time, implements a distributed timing scheduling system, and ensures that retry tasks are executed on schedule.

[0105] For different retry strategies, the system implements differentiated processing logic: Immediate Retry: Retain the original sending parameters and directly submit a new sending request; Channel Switching: Select a new sending channel based on channel health score and current load, and update sending parameters; Delay Retry: Set a delay trigger to trigger retry after a specified delay (e.g., 5 minutes, 30 minutes); Timed Retry: Calculate the optimal retry time window (e.g., user active period) and schedule a fixed-point retry; Content Adjustment: Apply content optimization rules (e.g., sensitive word replacement, length adjustment) to generate new message content; Parallel Retry: Submit sending requests to multiple channels simultaneously, using the "first success returns" strategy; The system implements retry resource management and control, including retry quota control to prevent a single message from occupying resources through unlimited retries; priority-based resource allocation strategy to ensure that high-priority messages have sufficient retry opportunities; and intelligent traffic shaping algorithm to prevent retry storms from causing system overload.

[0106] The system tracks the retry history and current state of each message in real time, monitors the success rate trend of retries, identifies abnormal patterns, provides a manual intervention interface, and allows operations personnel to adjust automatically generated retry strategies.

[0107] The system also handles various boundary conditions, including maximum retry count limits, retry timeout mechanisms, and emergency interruption handling. After performing the retry operation, the system records detailed retry execution results.

[0108] Step S505: record the retry execution result, update the retry effect statistics and decision model parameters, calculate the success rate indicators of different retry strategies, and obtain the retry decision result.

[0109] In this embodiment, the system tracks the execution status and result of each retry operation, records key performance indicators: retry delay, channel response time, final state, establishes the association between the original failure and the retry result, and forms a complete failure-retry chain.

[0110] The system calculates the success rate indicators of different retry strategies: Immediate retry success rate = immediate retry success number / immediate retry total number; Delay retry success rate = delay retry success number / delay retry total number; Channel switching success rate = channel switching success number / channel switching total number; The system analyzes the relationship between retry time and success rate, identifies the best retry time window, and evaluates the correlation between terminal state detection accuracy and retry success.

[0111] The system updates multiple system data: Update channel performance indicators: include retry data in channel success rate, delay, etc. indicators calculation; Update decision model parameters: adjust the weight and branch condition of the decision tree according to the retry result; Update the terminal state database: record the active mode and reachability characteristics of the user terminal; Update the failure mode library: accumulate the mapping relationship between failure causes and the best recovery strategy; The system generates a retry effect analysis report, including the success rate comparison of various strategies, calculates resource efficiency indicators: retry resource input and success benefit ratio, identifies system bottlenecks and optimization opportunities, provides retry mode time distribution and regional distribution analysis.

[0112] The system establishes a retry knowledge base, accumulates experience data of efficient retry strategies, implements a strategy effect scoring mechanism, provides a reward signal for reinforcement learning, generates retry strategy optimization suggestions, and guides system parameter adjustment direction. Finally, output the complete retry decision result, and select the retry failed P2 level marketing messages for subsequent batch processing.

[0113] Step S105 specifically includes the following sub-steps: Step S601: Collect P2 level marketing messages from the to-be-sent messages and the retry failed P2 level marketing messages, identify marketing nature message content through keyword matching, perform time window aggregation, and obtain a P2 level message set.

[0114] In this embodiment, the system collects P2-level marketing messages from two sources: one is new P2-level messages received directly from the business system, and the other is P2-level marketing messages filtered from messages that failed to retry. The system applies multiple criteria to identify low-priority messages: Priority flag: directly filter messages marked as P2-level; Content feature recognition: identify marketing nature messages (such as "offer", "activity", "promotion") through keyword matching; Sender feature: based on the historical classification of the sending business system (such as e-commerce marketing platform); Time-sensitive requirement: filter non-urgent messages with SLA requirements over 30 minutes; The system implements intelligent classification algorithms, including rule-based classifiers, machine learning models (such as BERT, FastText), and hybrid classification strategies to improve classification accuracy.

[0115] The system designs a batch collection mechanism, including time window aggregation (setting a dynamic time window of 5-30 minutes to collect messages), capacity threshold aggregation (triggering batch processing when reaching a certain number such as 1000), and intelligent dynamic window (automatically adjusting the collection window according to message traffic and time sensitivity).

[0116] The system performs grouping and index construction, grouping by content similarity, grouping by recipient characteristics, and constructing efficient indexes to support fast query and retrieval. The system also implements priority balancing and resource scheduling, real-time monitoring of system load, and dynamic adjustment of collection strategies to appropriately reduce collection windows during peak periods and expand collection windows during trough periods. Finally, a structured P2-level message set is obtained.

[0117] Step S602: Apply the Huffman coding algorithm to the P2-level message set for content compression processing, construct a character frequency dictionary and an encoding mapping table, convert the original message to a compressed binary stream, and obtain compressed message data.

[0118] In this embodiment, the system first performs content analysis and preprocessing on the P2-level message set, including text feature extraction, template recognition, variable extraction, and content normalization, to prepare for compression processing.

[0119] The system implements the Huffman coding algorithm, including the following steps: Construct frequency dictionary: count the frequency of characters or word groups in the message set; Generate Huffman tree: build an optimal prefix coding tree based on the frequency dictionary; Encoding mapping table generation: map common characters or phrases to short codes; Compression execution: convert the original message to a Huffman-encoded binary stream; The system also implements adaptive coding, dynamically adjusting the coding strategy according to the characteristics of different types of messages to improve compression efficiency.

[0120] The system applies multiple advanced compression techniques: Template compression: For similar template messages, only transmit the template ID and variable parameters; Incremental compression: For batch messages with high similarity, use the transmission method of reference message + difference data; Dictionary compression: Establish a compression dictionary for commonly used marketing vocabulary to achieve more efficient phrase-level compression; Multi-level compression: Combine Huffman coding and LZ77 algorithms to achieve higher compression rates; The system evaluates and controls the compression effect, monitors the actual compression rate (average ≥ 35%), ensures that the time cost of compression processing does not affect the overall processing efficiency, verifies the integrity and decodability of the compressed content, and automatically skips the compression step when the compression effect is poor (compression rate < 10%).

[0121] The system also handles channel compatibility issues, adjusts the compression output according to the data format supported by the target channel, embeds necessary decoding instructions in the compressed data, designs an efficient batch compression message transmission protocol, and automatically switches to standard transmission mode for channels that do not support compressed transmission. Finally, obtain high-efficiency compressed message data.

[0122] Step S603: According to the receiver's mobile phone number, parse the home location and operator information, perform one-level grouping according to the operator type, two-level grouping according to the provincial administrative division, and three-level grouping according to the city or region, to obtain the regional grouping result. Each region corresponds to a group of compressed message data to be sent.

[0123] In this embodiment, the system parses the home location and operator information of the receiver's mobile phone number through multiple technologies: Number segment library query: Maintain a nationwide mobile phone number segment home location database to support high-speed query; Operator identification: Identify the operator's home based on the number segment rules; Real-time API query: For numbers that cannot be parsed locally, call the operator's real-time query interface; Cache mechanism: Establish a multi-level cache to speed up the home location analysis of high-frequency numbers; The system implements a multi-dimensional grouping strategy: One-level grouping: Grouping by operator type; Two-level grouping: Grouping by provincial administrative division; Three-level grouping: Subdivide by city or region; Virtual operator processing: Establish special mapping rules for virtual operator numbers; The system applies an intelligent routing optimization algorithm, performs channel-territory affinity analysis, identifies the delivery performance of each channel in different territories, constructs a cost matrix, establishes a cost difference matrix between operators and territories, calculates an optimal grouping scheme, calculates the most economical grouping scheme based on performance and cost data, considers load balancing, and avoids single channel overload while ensuring cost optimization.

[0124] The system establishes an efficient grouping data structure and management mechanism, establishes multi-layer indexes for grouped messages, maintains grouping information, quantity statistics, priority metadata, sets the validity period and processing priority of the group, and supports dynamic adjustment of the group.

[0125] The system also handles special scenarios, including cross-border message processing, unknown home address processing, small-scale group merging, and high-priority penetration. Finally, a complete territory grouping result is obtained, with each territory corresponding to a group of compressed message data to be sent.

[0126] Step S604: Set the idle time window to the 00:00-06:00 period, develop a batch sending plan for the compressed message data corresponding to the territory grouping result, and use operator discount channels for load balancing distribution to obtain an idle time sending plan.

[0127] In this embodiment, the system first defines and optimizes the idle time window: Standard idle time window: set to 00:00-06:00 based on industry experience; Dynamic window adjustment: accurately identify the true trough period by analyzing historical traffic patterns; Hierarchical period division: subdivide the idle time window into multiple time periods (e.g., 00:00-02:00, 02:00-04:00, 04:00-06:00); Differential pricing awareness: identify the optimal discount period for different operators and channels; The system designs a sending plan algorithm, including a load balancing algorithm (distributes messages evenly within the idle time window to avoid instantaneous traffic peaks), priority sorting (maintains the relative priority between messages even in batch processing), timeliness constraint processing (ensures that messages with a deadline are sent before the deadline), and dynamic scheduling optimization (automatically adjusts the sending plan based on real-time system load).

[0128] The system implements intelligent time point selection, builds a receiver activity pattern based on historical data, selects time points with a higher activity probability, predicts the possible delivery rate at different time points, optimizes time periods with high delivery rates, balances discount rates and delivery rates, and calculates the best sending time point. For large batches of messages, a small-scale trial sending mechanism is used, and the main sending is performed after the effect is verified.

[0129] The system performs capacity planning and control, evaluates the processing capacity of each discount channel at different times, sets a smooth sending rate curve, reserves part of the channel capacity for possible emergency messages, and makes intelligent decisions to delay or switch to regular sending when the batch message exceeds the idle time window capacity.

[0130] The system generates a visual sending plan, supports manual review, converts the sending plan into precise timing tasks, monitors plan execution and actual delivery effect, and supports manual intervention and adjustment during plan execution. Finally, an optimized idle time sending plan is obtained.

[0131] Step S605: Execute the idle time sending plan in the specified idle time window for each region in the regional grouping result, record the compression rate, sending cost and delivery rate data, calculate the cost saving range compared with the standard sending method, and obtain the cost saving data.

[0132] In this embodiment, the system implements a batch sending execution mechanism, including accurately triggering batch sending tasks based on pre-designed plans, performing final channel availability and parameter validity checks before execution, decomposing large batch tasks into multiple small batches for progressive sending, dynamically adjusting sending rate based on channel feedback, and implementing automatic detection and recovery for various exceptions during sending.

[0133] The system applies batch API optimization techniques, including combining multiple messages into a single API request to reduce the number of interface calls, maintaining a persistent connection with the channel server to reduce connection establishment overhead, optimizing request packet size and format based on channel characteristics, and using multi-threading to process different batches in parallel to improve overall throughput.

[0134] The system collects and analyzes cost data, records the theoretical sending cost of messages in standard channels and standard time periods, records the actual sending cost in discount channels and idle time windows, quantifies the API call cost savings brought by content compression, quantifies the cross-network cost savings brought by regional grouping optimization, and summarizes the comprehensive cost savings brought by various optimizations.

[0135] The system implements delivery quality monitoring and protection, closely tracks the delivery rate of batch sending, triggers an alarm when the delivery rate is below the expected threshold, automatically switches batches with abnormal delivery rates to backup channels, and collects and analyzes detailed delivery status reports.

[0136] The system evaluates the optimization effect and provides feedback, analyzes the cost-quality balance relationship, compares the cost-effectiveness and delivery effect of different idle time periods, generates optimization suggestions for future batch processing based on actual effects, tracks the long-term trend of cost savings, and verifies the sustained effectiveness of optimization strategies. Finally, detailed cost saving data is obtained, including a single message cost reduction from 0.048 yuan per message to 0.026 yuan per message, achieving about 45% cost savings.

[0137] Step S106 specifically includes the following sub-steps: Step S701: Collect system operation data and send result statistics to build a complete performance data set.

[0138] In this embodiment, the system implements a multi-dimensional data collection architecture to collect multiple types of data: Send result data: including success rate, delivery delay, state distribution, and other core indicators; Channel performance data: real-time health status, load level, and failure mode of each channel; Resource consumption data: API call volume, bandwidth usage, processing time, and other resource metrics; Cost-related data: unit cost, actual expenditure, and cost savings of each channel; User experience data: message delivery timeliness, stability, and user feedback; The system uses real-time data stream processing technology, collects real-time events based on Kafka / Flink stream processing architecture, uses a professional time series database (such as InfluxDB) to store performance indicators, implements full-link data collection based on OpenTelemetry, and implements intelligent sampling on high-frequency data to balance data accuracy and storage cost.

[0139] The system applies various statistical analysis methods, including sliding window analysis of different time spans (5 minutes, 1 hour, 24 hours), abnormal pattern recognition based on statistics and machine learning, correlation and causal relationship analysis between indicators, and trend prediction based on LSTM time series model.

[0140] The system performs data aggregation and standardization to achieve hierarchical aggregation from single message to batch, channel, and business line, normalize indicators of different dimensions, assign weights to different indicators according to business importance, and generate comprehensive indicators reflecting the overall health of the system.

[0141] The system also takes data quality assurance measures to detect data collection completeness, ensure consistency and comparability of cross-system data, ensure real-time of key data, identify and handle abnormal values, duplicate data, and other quality problems. Finally, a complete performance data set is built to provide a foundation for subsequent analysis.

[0142] Step S702: Build a reward function model (R = α × success rate - β × delay - γ × cost) to quantitatively evaluate system behavior.

[0143] In this embodiment, the system designs a reward function mathematical model: R = α × success rate - β × delay - γ × cost Wherein, the success rate is the percentage of the final delivery of the message (0-100%), the delay is the average delivery time (seconds), the cost is the average sending cost of a single message (yuan), and a, b, and g are weight coefficients of each factor, satisfying a + b + g = 1.

[0144] The system implements a dynamic weight adjustment mechanism, and presets a weight template according to different business scenarios: The verification code scenario: a = 0.3, b = 0.6, and g = 0.1 (highly value timeliness); The notification scenario: a = 0.5, b = 0.3, and g = 0.2 (balance success rate and timeliness); The marketing scenario: a = 0.4, b = 0.1, and g = 0.5 (focus on success rate and cost control); The system supports adaptive weights, automatically fine-tunes the weight coefficients according to actual running effects, and uses different weight configurations in peak and valley periods.

[0145] The system performs reward normalization and balancing processing, uniformly converts different dimension indicators to the [0, 1] interval, applies a nonlinear function to adjust the sensitivity of some indicators (such as taking the logarithm of the delay), sets the upper and lower threshold values of the indicators, controls the influence of extreme values, and applies a sliding average technique to reduce the interference of data fluctuations on reward calculation.

[0146] The system implements a multi-target balancing technique, finds a Pareto optimal solution among multiple targets, sets hard constraints for key indicators (such as a minimum success rate of 95%), first meets the core target, and then optimizes the secondary target, and dynamically adjusts the relative importance of each target according to the current system state.

[0147] The system also handles reward delay and credit distribution problems, applies a time decay factor to the reward of historical behavior, reasonably allocates the reward of the final result to the contributing decision-making link, handles reward expectation calculation in partially observable scenarios, and balances immediate rewards and long-term cumulative returns. Finally, a scientific and flexible reward function model is obtained, which can accurately evaluate the comprehensive effect of different scheduling strategies.

[0148] Step S703: Apply a reinforcement learning algorithm to optimize parameters, and find the optimal parameter combination through the balance between exploration and utilization.

[0149] In this embodiment, the system designs a reinforcement learning framework, defines a state space (a representation of the current state of the system, including channel health status, message queue length, period characteristics, etc.), an action space (actions that the system can take, such as adjusting channel score weights, modifying retry strategy parameters, etc.), an agent architecture (agent design based on deep Q network or policy gradient algorithm), and an environment model (constructing a system environment model for predicting the consequences and rewards of actions).

[0150] The system implements the core algorithm, selects the appropriate RL algorithm (such as DQN, DDPG, PPO, etc.) according to the characteristics of the problem, maintains the experience pool, stores the <state, action, reward, next state> four-tuple, approximates the Q function or value function through the neural network, optimizes the parameterized policy using gradient ascent method, realizes the exploration strategy based on ε-greedy or entropy, and balances exploration and utilization.

[0151] The system controls the learning process, dynamically adjusts the learning rate, balances the convergence speed and stability; samples mini-batch from the experience pool for batch training; uses soft update or periodic update method to update the target network; designs reasonable early stopping conditions to avoid overfitting; and gradually transitions from simple scenes to complex scenes through curriculum learning.

[0152] The system performs multi-parameter joint optimization, including channel score weight (optimizing w1~W4 parameters to make channel selection more accurate), retry strategy parameters (learning the best retry interval and retry channel selection strategy), batch threshold (optimizing the trigger condition and execution parameters of batch processing), and resource allocation ratio (learning the optimal resource allocation scheme for different priority messages).

[0153] The system implements safety constraints and explainability design, limits the parameter change range to avoid extreme unreasonable configuration; limits the amplitude of single adjustment to ensure system stability; supports a hybrid learning mode guided by expert knowledge and manual intervention; provides an explanation mechanism for decision basis and parameter change reasons. Through continuous learning and self-adjustment, the system gradually optimizes the configuration of key parameters and improves overall performance.

[0154] Step S704: Generate new weight coefficients and scheduling strategies to provide optimized decision basis for system operation.

[0155] In this embodiment, the system extracts the optimized parameters from the learning model, including channel score weight coefficients (w1~W4), various decision thresholds (such as health screening threshold, retry trigger threshold), and key parameters of scheduling strategies (such as priority queue configuration, resource allocation ratio), and converts the model output into system configuration format to ensure compatibility.

[0156] The system performs parameter verification and adjustment, checks whether the generated parameters are within a reasonable range, ensures the logical consistency between related parameters, reasonably restricts parameters that exceed the safety range, and smooths parameters with large change amplitudes to avoid system shock.

[0157] The system implements scene-based policy customization, generates differentiated policies for different time periods (peak / flat / low), customizes special policies for different business types (finance / e-commerce / government affairs, etc.), adjusts matching policies according to channel characteristics (such as stability / cost characteristics), and customizes optimized regional policies for different regional user groups.

[0158] The system performs policy packaging and version management, packages related parameters into complete policy configuration sets, assigns unique version numbers to each policy set, supports version tracking, records parameter change content and optimization purposes in detail, and supports quick rollback to previous versions when necessary.

[0159] The system prepares deployment and switching plans, identifies the subset of parameters that need to be updated, supports incremental deployment; designs a gradual deployment scheme to control the scope of influence; predicts the performance changes and business impact brought by new parameters; and formulates emergency handling procedures in the event of deployment exceptions. Finally, a set of optimized scheduling policy configurations that can be directly applied to the production environment is generated.

[0160] Step S705: Deploy the optimized parameters and monitor the effects to form a closed-loop optimization mechanism and realize the self-evolution of the system.

[0161] In this embodiment, the system implements parameter deployment, pushes parameter configurations to a distributed configuration center (such as Apollo / Nacos), supports dynamic loading of new parameters without system restart, implements batch deployment of policies by service instance or region, ensures that related parameters are updated simultaneously as a whole, and avoids inconsistent states.

[0162] The system performs gray release and control, initially switches 10% of the traffic to new parameter configurations, runs new and old parameter configurations simultaneously, collects and compares data, compares the performance differences of new and old configurations on core indicators in real time, gradually expands the application proportion of new configurations based on preliminary effect evaluation.

[0163] The system performs comprehensive effect monitoring, tracks changes in core performance indicators such as success rate, delay, and throughput, observes changes in system resource (CPU, memory, network) utilization, calculates changes in processing cost per message, closely monitors abnormal indicators such as error rate and timeout rate, and evaluates changes in end-user experience through sampling or feedback channels.

[0164] The system performs data analysis and effect evaluation, calculates the improvement percentage of key indicators, verifies whether the performance improvement has statistical significance, evaluates the impact of parameter optimization on abnormal scenarios and edge cases, and quantifies the ratio of input (such as computing resources and development costs) to performance improvement.

[0165] The system establishes a closed-loop feedback and continuous optimization mechanism, takes the monitoring results as input data for a new round of learning, identifies possible problems or limitations introduced by new parameters, adjusts the focus direction of the next round of optimization according to the actual effect, and sets an appropriate learning period according to the system stability and environmental change speed. Through this closed-loop mechanism, the system can continuously evolve itself, adapt to environmental changes, and continuously improve performance.

[0166] The application also provides a decentralized multi-agent reinforcement learning architecture, and applies a reinforcement learning algorithm for parameter optimization to generate optimized weight coefficients and scheduling strategies, including: Step S801: Establish a multi-agent framework, deploy multiple distributed agents in the framework, including channel evaluation agents, routing decision agents, retry strategy agents, and resource scheduling agents, and each agent is distributed on different physical nodes.

[0167] In this embodiment, the system replaces the single central learning system in the original scheme and establishes a completely decentralized multi-agent reinforcement learning (MARL) architecture. In this architecture, the system deploys multiple distributed agents, each responsible for decision optimization in different aspects: Channel evaluation agent: responsible for optimizing channel health score calculation strategy and adjusting weight coefficients of each dimension index; Routing decision agent: responsible for message routing and channel selection strategy, and optimizes matching algorithm; Retry strategy agent: responsible for retry decision of failed messages, and optimizes decision tree parameters; Resource scheduling agent: responsible for optimizing allocation of system resources and balancing resource demand of messages of different priorities; These agents are distributed on different physical nodes and have independent learning ability and decision-making authority. They collaborate to optimize the performance of the entire system. This distributed deployment improves the reliability of the system, avoids single point of failure, and also enables each agent to focus on its own field and provide more refined decision-making capabilities.

[0168] Step S802: Establish a minimum communication mechanism between agents in the multi-agent framework, exchange only local reward information, achieve secure data exchange through encrypted communication channels, and obtain a distributed collaboration network.

[0169] In this embodiment, the system designs an efficient inter-agent communication mechanism, adopts the principle of minimizing communication, and only exchanges necessary local reward information between agents, rather than complete state, which greatly reduces communication overhead. The system implements a Federated Learning style of distributed model update, where each agent learns locally and exchanges model parameters or gradient information regularly.

[0170] The system uses an encrypted communication channel to ensure the security of data exchange between agents, preventing sensitive information from being leaked or tampered with. The system also implements fault-tolerant design, so that even if a single agent fails, it will not affect the operation of the overall system, and other agents can continue to work and help the failed agent quickly synchronize the latest state after recovery.

[0171] Through this design, the system forms an efficient, secure, and reliable distributed collaboration network, where each agent can maintain relative independence while working together to optimize system performance.

[0172] Step S803: In the distributed collaboration network, an actor-critic network structure is constructed for each agent, where the actor network is used to learn the optimal policy mapping and output action selection, and the critic network is used to evaluate action value and provide policy gradient guidance.

[0173] In this embodiment, the system constructs an actor-critic network structure for each agent, which is a reinforcement learning architecture combining policy gradient and value function. In this structure: Actor network (Actor): responsible for learning the optimal policy mapping, a mapping function from state to action, which outputs specific action selection; Critic network (Critic): responsible for evaluating action value, learning state-action value function, and providing policy gradient guidance for the actor network; The network structure uses LSTM+attention mechanism structure suitable for time series decision-making, which can capture long-term dependencies in time series data and focus on the most relevant features. The system implements a hierarchical training strategy, first training on local data, and then aggregating the model through a consensus mechanism to improve learning efficiency.

[0174] The system also sets different learning rates for different agents, adjusts learning parameters according to environmental change speed and task complexity. For example, the channel evaluation agent may use a lower learning rate to maintain stability, while the retry strategy agent may use a higher learning rate to quickly adapt to changes.

[0175] This dual-network architecture allows the system to simultaneously learn "what to do" (policy) and "how good it is" (value), improving learning efficiency and policy quality.

[0176] Step S804: In the actor-critic network structure, a hybrid reward structure is designed, including individual rewards and team rewards, policy entropy regularization is used to maintain policy diversity, and a collaboration behavior incentive mechanism is established.

[0177] In this embodiment, the system designs a hybrid reward structure, which includes two parts: Individual reward: Reward based on the agent's own task completion, such as channel evaluation agents receiving rewards based on channel selection accuracy. Team reward: Shared reward based on the overall system performance, such as overall success rate improvement, cost reduction, etc. This hybrid reward structure encourages agents to optimize their own tasks while promoting overall collaboration, avoiding the situation where agents maximize individual rewards at the expense of the overall system performance.

[0178] The system implements policy entropy regularization by adding a policy entropy term to the objective function, encouraging agents to maintain policy diversity and avoid premature convergence to suboptimal strategies. This mechanism is particularly suitable for dynamic environments, enabling the system to continuously explore new possibilities.

[0179] The system also establishes a collaborative behavior incentive mechanism, specifically rewarding collaborative behaviors that benefit the overall system performance, such as resource transfer, information sharing, etc. For example, when a resource scheduling agent gives up resources for high-priority messages during peak hours, it will receive additional rewards.

[0180] Through this design, the system balances competition and collaboration, maintaining the autonomy of each agent while ensuring the consistency of the overall goal.

[0181] Step S805: Realize distributed model update through consensus algorithm, support the number of agents dynamically adjusted according to the system scale, realize cross-scene knowledge migration, get global optimization parameters.

[0182] In this embodiment, the system uses a consensus algorithm to realize distributed model update, and each agent regularly shares its model parameters or gradients, forming a consensus model through weighted averaging or other aggregation methods. This approach not only retains the efficiency of local learning, but also integrates global knowledge, improving learning quality.

[0183] The system supports dynamic adjustment of the number of agents according to the system scale, which can increase the number of agents in large-scale deployment to improve the processing capacity and decision-making accuracy of the system; in small-scale scenarios, it can reduce the number of agents to reduce computational overhead. This flexible architecture enables the system to adapt to different scales of business requirements.

[0184] The system realizes cross-scene knowledge migration, allowing agents to apply knowledge learned in one scenario to new scenarios, accelerating the learning process. For example, the short message scheduling strategy learned in an e-commerce platform can be migrated to a financial scenario and quickly adapted to the new environment after a small amount of adjustment.

[0185] Through these mechanisms, the system can continuously optimize parameters, adapt to environmental changes, and achieve true self-adaptive learning. The final global optimization parameters reflect the professional knowledge of each agent and maintain overall consistency.

[0186] Step S806: Based on the global optimization parameters, the channel evaluation agent outputs the optimized channel score weight coefficients, the routing decision agent outputs the optimized channel selection strategy, the retry strategy agent outputs the optimized retry decision parameters, and the resource scheduling agent outputs the optimized resource allocation strategy, to obtain the optimized weight coefficients and scheduling strategy.

[0187] In this embodiment, the system outputs the optimization results of each professional agent based on global optimization parameters: The channel evaluation agent outputs the optimized channel score weight coefficients (w1~W4), making the channel health score calculation more accurate; The routing decision agent outputs the optimized channel selection strategy, including matching algorithm parameters, utility function weights, etc. The retry strategy agent outputs the optimized retry decision parameters, including decision tree threshold, retry interval strategy, etc. The resource scheduling agent outputs the optimized resource allocation strategy, including resource allocation for different priority messages, flow control parameters, etc. These optimization results are integrated by the system to form a complete and consistent scheduling strategy configuration. Compared with the single-agent solution, the multi-agent architecture can provide more refined and specialized optimization results, and each agent can play the maximum role in its own field.

[0188] Experimental results show that in large-scale deployment, this scheme can reduce the overall system decision delay by 30%, while improving the decision accuracy by 5-8%. More importantly, this decentralized architecture improves the reliability and scalability of the system, making it adaptable to more complex and variable business scenarios.

[0189] The application also provides an optimal matching algorithm applied to the channel candidate set, calculates the utility value of each channel through a utility function, selects the channel with the maximum utility value, and obtains the matching result of the message and the channel, including: Step S901: Based on the state information of the channel candidate set, a double deep Q network architecture is constructed, including a main network responsible for action selection and a target network for calculating target Q values, and multi-dimensional information such as channel health score, message features and system load is fused as state representation.

[0190] In this embodiment, the system constructs a double deep Q network (Double Deep Q-Network, DDQN) architecture, including two functionally complementary networks: Main network (Q-Network): responsible for action selection, directly interacts with the environment, and has a higher update frequency; Target-Network: used to calculate target Q-values, providing stable learning targets, with lower update frequency; The network topology adopts a deep residual network structure, containing 6-8 convolutional layers and fully connected layers, which can effectively process high-dimensional input data. The system integrates multi-dimensional information as state representation, including: Channel health score: real-time health score of each channel and its constituent elements (success rate, delay, cost, quota); Message features: priority, content type, length, recipient characteristics, etc.; System load: current queue length, processing delay, resource utilization, etc.; Time features: time period, date type (weekday / weekend / holiday), etc.; The system defines a fine-grained action space, including possible channel selection and parameter configuration combinations, such as selecting a specific channel, setting specific sending parameters, adjusting retry strategies, etc.

[0191] This dual-network architecture effectively solves the overestimation problem in traditional Q-learning, improving the stability and efficiency of learning. The state representation that integrates multi-dimensional information enables the system to comprehensively consider various factors and make more accurate decisions.

[0192] Step S902: Implementing greedy policy optimization operation on the dual deep Q-network architecture, selecting the action with the highest current Q-value, retaining an ε probability for random exploration, and gradually reducing the exploration probability by a preset ratio as learning progresses, outputting a greedy action selection policy.

[0193] In this embodiment, the system implements greedy policy optimization operation and uses an ε-greedy strategy to balance exploration and exploitation: Greedy action selection: with a probability of (1-ε), the system selects the action with the highest current Q-value, i.e., maximizes the expected return; Random exploration: with a probability of ε, the system randomly selects an action to explore the unknown state-action space; The system implements an adaptive ε decay mechanism, initially setting a higher ε value (such as 0.3) to encourage exploration, and gradually reducing the ε value by a preset ratio as learning progresses, eventually reducing it to a lower level (such as 0.05), and more exploiting the learned knowledge.

[0194] The system also implements a Prioritized Experience Replay mechanism, giving higher sampling probability to important experience samples (such as samples leading to large errors), accelerating the learning of key knowledge. The system maintains an experience pool sorted by TD error, and preferentially samples high-error samples from it for learning.

[0195] Through this greedy strategy optimization operation, the system can balance between exploring new strategies and utilizing known effective strategies, neither converging to a suboptimal solution too early nor fully utilizing learned knowledge to improve decision-making efficiency.

[0196] Step S903: Based on the greedy action selection strategy, time series analysis is performed to identify traffic characteristics in different time periods, routing decisions are made considering the network topology relationship between channels, the bandwidth, delay and reliability of each link are monitored in real time, and a link activation scheme based on traffic and topology is generated.

[0197] In this embodiment, the system collects historical traffic data in each period, identifies periodic traffic patterns (such as daily peak, weekend features) and burst traffic features through the LSTM time series model, predicts the traffic demand distribution in the future period, and provides a basis for resource planning.

[0198] The system constructs a network topology graph between channels based on the traffic prediction results, records the geographical location, network delay and bandwidth capacity of each channel, calculates the path cost and reachability matrix between channels, and forms a complete topology relationship model.

[0199] The system combines the topology relationship model to monitor the current load rate, average delay and packet loss rate of each link in real time, identifies potential network bottlenecks and fault risks, and provides real-time basis for routing decisions.

[0200] The system realizes a predictive activation strategy based on link state evaluation, activates standby links and expands channel capacity in advance during traffic peak periods, releases redundant resources and reduces operating costs during traffic trough periods, and optimizes resource utilization efficiency.

[0201] The system combines the predictive activation strategy with real-time traffic scheduling to dynamically adjust the weight distribution and load balancing parameters of each link, forming a complete link activation scheme based on traffic and topology. This scheme can predictively manage system resources, expand capacity in advance during peak periods, and release resources in time during trough periods, significantly improving system throughput and resource utilization.

[0202] In this embodiment, based on the greedy action selection strategy, time series analysis is performed to identify traffic characteristics in different time periods, routing decisions are made considering the network topology relationship between channels, the bandwidth, delay and reliability of each link are monitored in real time, and a link activation scheme based on traffic and topology is generated. The specific implementation is as follows: Firstly, the system collects historical traffic data of each period, including hourly traffic within 24 hours, daily traffic changes for seven days a week, and special traffic patterns during holidays. The system analyzes these data through a long short-term memory network (LSTM) time series model, which contains a three-layer LSTM structure with 128 neurons per layer and is equipped with an attention mechanism to capture traffic features at key time points. Through this model, the system can identify the double-peak pattern of 9:00-11:00 and 14:00-16:00 on weekdays, the flat distribution of weekend traffic, and the sudden traffic features before and after holidays. The LSTM model trained by the system based on historical data can predict the traffic demand distribution of each period within the next 24 hours, with a prediction accuracy of over 92%, forming the traffic prediction results.

[0203] Based on the traffic prediction results, the system constructs a network topology graph between channels, which adopts a weighted directed graph structure, with nodes representing each SMS channel server and edges representing the connection relationship between channels. The system records the geographical location, network delay (end-to-end delay obtained through ICMP probe, usually within 10-200 ms), and bandwidth capacity (such as 100 Mbps, 1 Gbps, etc.) of each channel. The system uses Dijkstra's algorithm to calculate the shortest path cost between channels and constructs an N×N reachability matrix (N is the number of channels), with matrix elements representing the reachability and cost from the source channel to the target channel, obtaining a complete topology relationship model.

[0204] The system combines the topology relationship model to monitor the performance indicators of each link in real time through distributed probe nodes, including current load rate (usage percentage), average delay (milliseconds), and packet loss rate (percentage). The system uses a sliding window algorithm (window size of 5 minutes, step size of 1 minute) to analyze the trend of these indicators and uses an anomaly detection algorithm (based on Z-score and DBSCAN clustering) to identify potential network bottlenecks (such as links with load rates exceeding 85%) and fault risks (such as links with sudden increases in packet loss rates exceeding 5%). The system classifies the detection results into three levels: normal, warning, and danger, forming a link state assessment report.

[0205] Based on the link state assessment, the system implements a predictive activation strategy. In the 30 minutes before predicting a traffic peak period (such as 10 am on weekdays), the system automatically activates standby links (usually 50% of the capacity of the main link) and expands channel capacity (by calling the cloud service provider's elastic scaling function through API). Specific implementations include measures such as warming up standby servers, increasing the number of processing threads, and expanding database connection pools. During the traffic trough period (such as 2 am-5 am), the system gradually releases redundant resources (such as closing some service instances) and switches to economy channels to reduce operating costs. The system evaluates the effectiveness of the strategy through resource utilization and cost-effectiveness indicators and records historical decision results for continuous optimization.

[0206] Finally, the system combines the predictive activation strategy with real-time traffic scheduling to form a complete link activation plan. The system uses a load balancing algorithm that combines weighted round robin and minimum connection number to dynamically adjust the weight distribution of each link (weight range 1-100, step size 5) based on link status. When a link performance is detected to be degraded, the system automatically reduces its weight and transfers traffic to a link with better performance. The system also implements an adaptive load balancing parameter adjustment mechanism, such as connection timeout time (range 5-30 seconds) and retry interval (range 1-10 seconds), which can be automatically adjusted according to network conditions. Through this dynamic adjustment mechanism, the system can guarantee message delivery rate while optimizing resource utilization efficiency, and realize intelligent link activation scheme based on traffic and topology.

[0207] Step S904: Establish a hierarchical scheduling architecture according to the traffic and topology-based link activation scheme, including a master scheduler responsible for global resource allocation and a sub-scheduler focusing on local optimization, to achieve efficient state sharing and decision coordination, and obtain a multi-agent DDQN allocator.

[0208] In this embodiment, the system establishes a hierarchical scheduling architecture to form a multi-level decision system: Master scheduler: responsible for global resource allocation and strategy coordination, with system-level vision, formulating overall strategy; Sub-scheduler: focuses on local optimization of specific areas or business lines, with finer-grained control capabilities; The system implements a hierarchical decision-making process, with global decision-making determining the main strategy and resource allocation scheme, and local decision-making handling specific execution details. Both work together to ensure global optimality while considering local characteristics.

[0209] The system establishes an efficient inter-scheduler communication mechanism to achieve state sharing and decision coordination, reducing conflicts and resource waste. The system defines clear priority rules to handle potential decision conflicts and ensure consistent responses in emergency situations.

[0210] Through this hierarchical architecture, the system forms a multi-agent DDQN allocator, with each level of scheduler being able to work independently and collaboratively, improving decision-making efficiency and resource utilization. This architecture is particularly suitable for large-scale, geographically distributed SMS scheduling systems, and can balance global optimality and local characteristics.

[0211] Step S905: Apply neural network quantization and GPU acceleration techniques to the multi-agent DDQN allocator to implement a scenario decision result caching mechanism, batch process similar requests, and obtain the matching results of the messages and channels.

[0212] In this embodiment, the system optimizes the performance of the multi-agent DDQN dispatcher, applies neural network quantization technology to convert floating-point weights into low-precision integers (such as 8 bits or 4 bits), greatly reduces the model size and computational complexity, and maintains the decision accuracy.

[0213] The system uses GPU / TPU accelerators to improve inference speed, parallelizes neural network computation, and can obtain several to several dozen times performance improvement, especially when processing batch requests. For scenarios that do not require real-time response, the system can also use dedicated AI acceleration chips to further improve the energy efficiency ratio.

[0214] The system implements a cache mechanism for scenario decision results, caches the decision results for common scenarios, and directly returns the cached results when encountering similar requests to avoid repeated computation. The system uses an efficient similarity calculation algorithm to quickly identify reusable decision results.

[0215] The system processes similar requests in batches rather than individually, fully utilizes the parallel computing capabilities of hardware, and improves system throughput. In particular, for marketing batch messages, this batch processing mechanism can significantly improve processing efficiency.

[0216] Through these optimization techniques, the greedy DDQN scheduler can make optimal scheduling decisions within milliseconds, reducing decision delay by more than 60% compared to the rule-based selection in the original scheme, while system throughput is improved by 45% and resource utilization is increased by 30%.

[0217] The application also provides: before the idle-time sending plan is executed on each region in the regional grouping result in the specified idle-time window, the compression rate, the sending cost and the delivery rate data are recorded, the cost saving amplitude compared with the standard sending mode is calculated to obtain the cost saving data, and the application further comprises the following steps: Step S1001: constructing a double and duel deep Q-Learning architecture based on the idle-time sending plan, using two independent Q networks to reduce overestimation bias, decomposing Q values into state value function V(s) and advantage function A(s,a), and calculating Q values to obtain a D3QL network structure.

[0218] In this embodiment, the system constructs a double and duel deep Q-Learning (D3QL) architecture, which is an innovative reinforcement learning network structure combining the advantages of double Q-Learning and duel network.

[0219] Double Q-Learning uses two independent Q networks to reduce overestimation bias, one network is used to select actions, and the other network is used to evaluate the value of the selected actions, avoiding the positive bias problem in traditional Q-Learning.

[0220] The Dueling Network decomposes Q-values into state value function V(s) and advantage function A(s, a): Q(s, a) = V(s) + A(s, a) - mean[A(s, a')] Where V(s) represents the value of being in state s, independent of the chosen action; A(s, a) represents the advantage of choosing action a in state s relative to the average level; mean[A(s, a')] is the average advantage value of all actions.

[0221] This decomposition enables the network to learn the intrinsic value of states and the relative advantage of different actions separately, improving learning efficiency and generalization ability. The system uses hierarchical state representation, constructing a state vector containing system state, service demand, and resource constraints to comprehensively capture environmental information.

[0222] The system implements a progressive training strategy, with curriculum learning from simple scenarios to complex scenarios, accelerating network convergence. Through these techniques, the system obtains an efficient D3QL network structure, providing decision support for subsequent service placement and resource scheduling.

[0223] Step S1002: Implement a multi-level service deployment strategy using the D3QL network structure, dividing the processing logic into core, edge, and terminal layers. The core layer handles critical business logic and data storage, the edge layer handles localized message processing and caching, and the terminal layer implements preprocessing and state detection to determine the layered service architecture.

[0224] In this embodiment, the system uses the D3QL network structure to implement a multi-level service deployment strategy, distributing SMS processing services across three levels: Core layer: Located in the central data center, handling critical business logic, global decision-making, and data storage, with the highest computing power and reliability; Edge layer: Located at network edge nodes (such as regional data centers), handling localized message processing and caching, reducing network latency and improving response speed; Terminal layer: Located closest to users, implementing preprocessing and state detection, such as message format verification and terminal state detection; This layered architecture combines edge computing and cloud computing, leveraging the powerful computing capabilities of the cloud and the low-latency advantages of edge nodes. The system dynamically determines which layer each message processing task should be executed in, intelligently scheduling based on message priority, computational complexity, and network conditions.

[0225] For example, for P0 level verification code messages, the system can directly handle and send at the edge layer, avoiding the delay of the central node; while for marketing messages that require complex analysis, the system can handle them at the core layer and then distribute them to the edge layer for sending.

[0226] Through this layered service architecture, the system significantly reduces end-to-end latency, improves resource utilization efficiency, and maintains consistency and manageability of processing logic.

[0227] Step S1003: Based on the intelligent prediction of service demand distribution in the layered service architecture, deploy service instances in advance at optimal locations, dynamically adjust service instance distribution according to load changes, and obtain an intelligent service placement strategy.

[0228] In this embodiment, the system implements an intelligent service placement strategy based on the layered service architecture, predicts future service demand distribution through the D3QL network, including message processing demand in different regions and time periods.

[0229] The system deploys service instances in advance in high-demand areas predicted by the system, ensuring sufficient processing capacity when demand peaks arrive. For example, when the system predicts that there will be a large demand for marketing messages in a certain region, it deploys additional processing instances in the edge nodes of that region in advance.

[0230] The system dynamically adjusts service instance distribution according to actual load changes, automatically expands capacity when load increases, and automatically shrinks capacity when load decreases, maintaining the optimal balance of resource utilization. The system considers service migration costs and evaluates computing resources, network bandwidth, and migration overhead when deciding whether to expand existing instances or deploy instances in new locations.

[0231] The system also implements a service affinity strategy to maintain the geographical proximity of related services and reduce inter-service communication latency. For example, message processing services and data caching services are deployed on the same edge node to avoid cross-node data access.

[0232] Through this intelligent service placement strategy, the system can predictively manage resource distribution, ensuring service quality while minimizing resource costs. The average response time is reduced by 40%, and resource utilization is improved by 50%.

[0233] Step S1004: Define differentiated service quality requirements for different business types according to the intelligent service placement strategy, reserve a dedicated resource pool for first priority services, and dynamically adjust QoS parameters according to load and business importance.

[0234] In this embodiment, the system implements a strict Quality of Service (QoS) guarantee mechanism based on the intelligent service placement strategy. The system defines differentiated service quality requirements for different business types, such as: P0-level verification message: 99.99% availability, ≤3 seconds delivery, ≤0.1% loss rate; P1-level notification message: 99.9% availability, ≤15 seconds delivery, ≤0.5% loss rate; P2-level marketing message: 99% availability, ≤30 minutes delivery, ≤2% loss rate; The system reserves a dedicated resource pool for first-priority services (such as P0-level verification) to ensure that these critical services can obtain sufficient processing resources even during periods of high system load. This resource reservation mechanism adopts a flexible quota mode, allowing other services to use reserved resources during low load, but immediately reclaiming them when needed.

[0235] The system dynamically adjusts QoS parameters based on current load and service importance. When system pressure increases, it may appropriately relax the service quality requirements of non-critical services to ensure the normal operation of core services. For example, during traffic peaks, the system may temporarily adjust the delivery time requirement of P2-level messages from 30 minutes to 60 minutes to release resources to higher-priority messages.

[0236] The system implements QoS monitoring and alarm mechanisms to track service quality indicators of various services in real time. When indicators approach thresholds, it triggers early warnings, and when service level agreements (SLAs) are violated, it triggers alarms and automatically takes remedial measures such as increasing resources, adjusting routes, or downgrading processing.

[0237] Through this differentiated QoS management, the system can ensure the service quality of critical services while reasonably handling non-critical services, achieving the optimal balance of overall service quality under limited resources.

[0238] Step S1005: Adopting micro-service architecture and containerized deployment, using Kubernetes to manage dynamic scaling of service instances, minimizing inter-service state dependencies, and testing system adaptability through fault injection.

[0239] In this embodiment, the system adopts a modern micro-service architecture, splitting the SMS dispatching system into multiple independent functional services such as channel management service, message routing service, retry decision service, and monitoring service. Each service is responsible for a specific function and communicates with each other through standard APIs, achieving a loosely coupled design.

[0240] The system uses containerized deployment, packaging each micro-service as a container image to ensure environment consistency and deployment flexibility. The system uses Kubernetes as a container orchestration platform to manage the life cycle of service instances, achieving automated deployment, scaling, and fault recovery.

[0241] The system design horizontal expansion architecture, by increasing the number of service instances instead of increasing the single instance scale to cope with the load growth, improves the scalability and flexibility of the system. The system implements automatic scaling based on indicators, such as CPU usage, memory usage, request queue length, etc., to automatically adjust the number of service instances.

[0242] The system minimizes the state dependency between services, adopts a stateless design principle, and stores state information in distributed cache or database, so that service instances can be freely scaled without affecting system functionality. For the state that must be maintained, the system uses a distributed state management solution to ensure state consistency and reliability.

[0243] The system tests the system's adaptability by injecting faults into the system, simulates various fault scenarios (such as node crashes, network partitions, service timeouts, etc.), and verifies the system's automatic recovery capabilities and the effectiveness of the service degradation strategy. This "chaos engineering" practice enables the system to remain stable in the face of actual failures.

[0244] Through these modern architectures and deployment methods, the system has unprecedented scalability, flexibility, and reliability, and can comfortably handle various scenario requirements from small businesses to large-scale applications.

[0245] The present application also provides an intelligent service placement strategy using a greedy multiple access scheme, including: Step S1101: Based on the intelligent service placement strategy, use multiple independent channels for parallel transmission of critical messages, and apply forward error correction code technology to enhance transmission reliability, generating a multi-channel parallel transmission mechanism.

[0246] In this embodiment, the system implements a multi-channel parallel transmission mechanism for critical messages (such as P0-level verification codes) based on the intelligent service placement strategy. The system uses multiple independent channels (usually 2-3) to send the same message, and as long as any channel is successfully sent, it is considered a successful transmission, significantly improving the delivery reliability of critical messages.

[0247] The system applies forward error correction (FEC) technology to enhance transmission reliability. For particularly important messages, the system encodes the original message into multiple redundant fragments, so that even if some fragments are lost during transmission, the complete message can be reconstructed from the remaining fragments. This technology is particularly suitable for scenarios where network conditions are unstable.

[0248] The system implements intelligent redundancy control, dynamically adjusts the redundancy level according to message importance, network conditions, and historical delivery rates. For example, two channels may be used when the network conditions are good, while three or more channels may be used when the network fluctuates severely.

[0249] The system also implements a cross-operator dispersion strategy, ensuring that multiple channels used in parallel belong to different operators or network paths, maximizing path independence and avoiding single-point failure risks. For example, the same message is sent using channels from different operators simultaneously.

[0250] Through this multi-channel parallel transmission mechanism, the system provides nearly 100% reliability guarantee for critical messages, maintaining a 99.99% delivery rate even in severe network fluctuations.

[0251] Step S1102: Real-time evaluation of success rate, delay, and stability indicators of each transmission path using the multi-channel parallel transmission mechanism, dynamic adjustment of traffic distribution proportion based on path quality, preferential use of the best-performing path, and adaptive path selection strategy.

[0252] In this embodiment, the system implements an adaptive path selection strategy based on the multi-channel parallel transmission mechanism. The system continuously monitors and evaluates the key performance indicators of each transmission path (channel) in real time, including: Success rate: percentage of messages successfully delivered; Delay: time from sending request to receiving confirmation; Stability: degree of fluctuation in performance indicators; Throughput capacity: number of messages that can be processed per unit of time; The system dynamically adjusts the traffic distribution proportion of each path based on these real-time evaluation results. The best-performing path receives a higher traffic share, while the less-performing paths receive less traffic or are temporarily not used. This dynamic adjustment is performed every 5-15 minutes to ensure that the system always uses the currently optimal transmission path.

[0253] The system implements predictive path evaluation, considering not only current performance but also historical performance trends and predicted future states. For example, if a channel's performance shows a gradual downward trend, the system will reduce its use of that channel in advance to avoid potential quality of service degradation.

[0254] The system also considers path diversity, reserving some traffic distribution for certain paths even if their current performance is slightly lower, to continuously obtain performance data and maintain the active state of the paths. This strategy avoids the risk of single-point dependence caused by "winner-takes-all."

[0255] Through this adaptive path selection strategy, the system can intelligently utilize multiple transmission paths, ensuring delivery reliability while minimizing delay and resource consumption.

[0256] Step S1103: Based on the adaptive path selection strategy, consider channel capacity, network delay, and transmission cost, apply a weighted round-robin algorithm to achieve intelligent load distribution, and obtain a load balancing algorithm.

[0257] In this embodiment, the system implements a more refined load balancing algorithm based on an adaptive routing strategy. The system considers multiple key factors for load distribution decisions: Channel capacity: maximum processing capacity and current load level of each channel; Network latency: end-to-end transmission delay and delay stability of each channel; Transmission cost: per-message sending cost and overall economy of each channel; Priority policy: resource allocation strategy for messages of different priorities; The system implements intelligent load distribution using an improved weighted round-robin algorithm. Unlike simple round-robin, weighted round-robin assigns different weights to channels based on their performance indicators, with better-performing channels getting higher weights and thus handling more messages. The system dynamically adjusts these weights to reflect real-time changes in channel performance.

[0258] The system implements a smooth load transfer mechanism, gradually transferring load rather than abruptly switching, to avoid sudden pressure or traffic shock on channels when adjusting traffic distribution. For example, when reducing a channel's load share from 40% to 20%, the system gradually adjusts over several minutes rather than instantaneously.

[0259] The system also implements load prediction and advance adjustment, predicting future load based on historical traffic patterns and adjusting resource allocation in advance to avoid delays caused by temporary adjustments during load peaks. For example, the system increases the weight of high-performance channels in advance before predicting an upcoming traffic peak.

[0260] Through this refined load balancing algorithm, the system maximizes resource utilization efficiency, maintains reasonable distribution of channel loads, and avoids overloading a single channel or wasting resources.

[0261] Step S1104: Establish a channel failure detection and switching mechanism based on the load balancing algorithm, automatically switching to a backup channel when a primary channel is detected to be abnormal.

[0262] In this embodiment, the system establishes a robust channel failure detection and switching mechanism based on the load balancing algorithm. The system implements multi-level fault detection: Active health check: periodically sends probe requests to each channel to verify channel availability; Passive performance monitoring: analyzes the success rate, delay, and error patterns of actual message sending; Abnormal pattern recognition: uses machine learning algorithms to identify abnormal performance patterns and predict potential failures; External alarm integration: receives and processes failure alarms from operators or monitoring systems; The system defines clear failure criteria, including hard failures (such as connection interruption, authentication failure) and soft failures (such as success rate decrease, latency increase). The system sets multiple threshold levels, such as minor anomalies (success rate drops below 95%), serious anomalies (success rate drops below 85%), and complete failure (success rate drops below 50% or connection interruption).

[0263] The system implements intelligent failure response strategies: For minor anomalies, reduce the traffic allocation of the channel and increase the monitoring frequency; For serious anomalies, transfer most of the traffic to healthy channels and reserve a small amount of traffic for status detection; For complete failure, immediately switch all traffic to the backup channel and trigger an alarm notification; The system maintains a history of channel status, enabling historical-based reliability assessment and recovery strategies. For channels that frequently fail, the system will reduce their priority, even after recovery.

[0264] Through this advanced failure detection and switching mechanism, the system can quickly respond when the channel has problems, minimize service interruption, and ensure continuous and reliable message delivery.

[0265] Step S1105: Combine the detection and switching mechanism of the channel with the multi-channel parallel transmission mechanism, the adaptive path selection strategy, and the load balancing algorithm to obtain the greedy multiple access scheme.

[0266] In this embodiment, the system integrates the above mechanisms organically to form a complete greedy multiple access scheme. This scheme integrates multi-channel parallel transmission, adaptive path selection, intelligent load balancing, and failure detection and switching technologies to form a coordinated and consistent end-to-end solution.

[0267] The system implements a unified decision-making framework to coordinate the operation of each subsystem, ensuring consistency of decisions and optimal allocation of resources. For example, when the adaptive path selection strategy decides to increase the use of a certain channel, the load balancing algorithm will adjust the weight accordingly, and the failure detection mechanism will strengthen the monitoring of the channel.

[0268] The system establishes a global resource view to real-time grasp the status, capacity and performance of each channel, providing decision-making basis for the greedy multiple access scheme. The system maintains a unified performance index system, enabling different mechanisms to be evaluated and decided based on the same standard.

[0269] The system implements adaptive strategy selection, dynamically selecting the most suitable transmission strategy according to different scenarios and message types: For high-priority verification codes, full parallel transmission strategy may be used, using multiple channels at the same time; For general notification messages, a primary-backup switching strategy can be employed, setting up one primary channel and multiple backup channels; For marketing messages, a cost priority strategy can be employed, prioritizing the use of cost-effective channels; The system also implements end-to-end performance monitoring and optimization feedback, continuously evaluating the effectiveness of the greedy multiple access scheme, identifying improvement opportunities, and continuously optimizing decision parameters through reinforcement learning.

[0270] Through this highly integrated greedy multiple access scheme, the system achieves extremely high message transmission reliability and efficiency. Even in complex and variable network environments, the system can maintain stable service quality, providing 99.99% delivery guarantee for critical messages, while optimizing resource utilization and operating costs.

[0271] In this embodiment, the specific application of the greedy multiple access scheme can be illustrated by the following examples: A financial institution needs to send a large number of verification code messages. The system combines channel failure detection and switching mechanisms with multi-channel parallel transmission mechanisms, adaptive path selection strategies, and load balancing algorithms to form a complete greedy multiple access scheme. For example, when a user performs a transfer operation with an amount of 50,000 yuan, the system identifies it as a high-risk transaction and needs to send a verification code message. At this time, the greedy multiple access scheme first starts the multi-channel parallel transmission mechanism and simultaneously sends the same content verification code through three independent channels of different operators. The system applies forward error correction code technology to the verification code message, encoding the original 6-digit verification code "847295" into three data packets containing redundant information. Even if one of the data packets is partially damaged during transmission, the receiving party can reconstruct the complete verification code through the remaining information.

[0272] At the same time, the system evaluates the performance of the three channels in real time based on the adaptive path selection strategy. In this example, the system detects that the success rate of Operator 1 channel is 99.7% and the average delay is 1.2 seconds; the success rate of Operator 2 channel is 98.5% and the average delay is 1.8 seconds; the success rate of Operator 3 channel is 99.2% and the average delay is 1.5 seconds. Based on these real-time data, the system dynamically adjusts the traffic distribution ratio, allocating 50% of the traffic to Operator 1 channel, 30% to Operator 3 channel, and 20% to Operator 2 channel. This allocation ensures that most messages are transmitted through the channel with the best performance, while keeping the other channels active to obtain continuous performance data.

[0273] At the load balancing level, the system applies a weighted round-robin algorithm to achieve intelligent load distribution. For example, at 10 am on weekdays, which is a peak period, the system detects that the load rate of Operator 1 channel reaches 75%, close to the warning threshold, while the load rate of Operator 3 channel is only 45%. The system immediately adjusts the weight and transfers part of the messages originally planned to be sent through the mobile channel to Operator 3 channel, ensuring balanced load among channels and avoiding performance degradation caused by single channel overload.

[0274] In this example, the system also implements a detection and switching mechanism for channel failure. After the verification code message is sent through the three channels in parallel, the Operator 2 channel returns a successful response first, taking 1.5 seconds; while the Operator 1 channel still does not return a response after 2 seconds. The system's health check mechanism is triggered immediately and finds that there is network fluctuation in a certain regional node of Operator 1 channel, and the success rate drops from 99.7% to 85% in the past 5 minutes. The system immediately marks the channel as "warning" state and automatically switches most of the traffic originally allocated to the channel to Operator 3 and Operator 2 channels, while retaining a small amount of traffic for continuous monitoring of the recovery of the mobile channel.

[0275] Through this integrated solution, even in poor network conditions, the financial transaction verification code still reaches the user's mobile phone within 1.5 seconds, far below the 3-second threshold set by the system for P0-level messages, ensuring user experience and transaction security. System records show that after adopting the greedy multiple access scheme, the verification code delivery reliability of the financial institution has increased from 99.5% to 99.98%, and the average delivery time has decreased from 2.3 seconds to 1.4 seconds, greatly improving the security and user satisfaction of financial transactions.

[0276] The present application also provides an intelligent SMS scheduling device based on multi-dimensional dynamic optimization, comprising a memory and a processor, wherein the processor is used to execute the method of any one of the above.

[0277] In one specific embodiment, the device comprises: Memory: for storing program instructions, system configuration, historical data and runtime data; Processor: for executing program instructions to implement the above method steps; Communication interface: for data exchange with external systems (such as business systems, SMS channels); Database connector: for connecting and operating various databases used by the system; Monitoring module: for monitoring system running state and performance indicators; The processor executes program instructions stored in the memory to realize functions such as channel scoring, message routing, sending monitoring, retry decision, batch processing and reinforcement learning. The system adopts modular design, and each functional module can be independently upgraded and extended, improving the maintainability and scalability of the system.

[0278] The intelligent short message scheduling method and device of the application solve the problems of insufficient dynamic adaptability, serious resource waste, lack of multi-target cooperation and high operation and maintenance cost of the traditional short message scheduling system, significantly improve the short message delivery rate, and reduce the invalid retry rate and sending cost through multi-dimensional dynamic channel scoring, intelligent retry decision based on terminal state perception, cost-time efficiency balanced batch processing and closed-loop self-optimization system.

[0279] The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A method for intelligent short message dispatching based on multi-dimension dynamic optimization, characterized in that, The method comprises the following steps: obtaining performance data of a plurality of short message channels within a preset time, the performance data including success rate, delay, cost and quota usage, performing cleaning and normalization processing on the performance data, calculating health scores of the plurality of short message channels based on a weight dynamic adjustment model, and obtaining channel health evaluation results; receiving a message to be sent and a priority identifier thereof, the priority identifier including P0-level verification code messages, P1-level notification messages and P2-level marketing messages, determining scheduling strategy requirements according to the priority identifier, performing channel screening and optimal matching based on the channel health evaluation results and the scheduling strategy requirements, and obtaining a matching result of the message and the channel; performing message sending based on the matching result of the message and the channel, monitoring sending status and channel response in real time, receiving and analyzing sending result data, and obtaining sending result information; obtaining failed message data in the sending result information, performing terminal state detection through operator base station signaling, applying a decision tree model to determine a retry strategy, obtaining a retry decision result, and screening P2-level marketing messages that fail to retry from the retry decision result; performing Huffman coding compression processing on the P2-level marketing messages that fail to retry, performing regional grouping according to receiver base station information, performing batch sending operation of the P2-level marketing messages that have been compressed in an idle time window, obtaining sending result information after the operation is completed, and corresponding cost saving data.

2. The method of claim 1, wherein, The method further comprises: constructing a comprehensive performance evaluation index using the sending result information and the cost saving data, constructing a reward function model based on the comprehensive performance evaluation index, applying a reinforcement learning algorithm to optimize parameters, generating optimized weight coefficients and scheduling strategies, and updating short message scheduling operations based on the scheduling strategies.

3. The method of claim 1, wherein, The method further comprises: performing cleaning and normalization processing on the performance data, calculating health scores of the plurality of short message channels based on a weight dynamic adjustment model, and obtaining channel health evaluation results, including: performing outlier detection and cleaning processing on the performance data to obtain a cleaned data set; performing normalization processing on success rate, delay, cost and quota usage indicators in the cleaned data set, and uniformly converting multi-dimensional index data to the 0-1 interval to obtain a normalized data set; selecting a preset weight template based on time period characteristics according to current time period characteristics, determining success rate weight, delay weight, cost weight and quota weight, and obtaining weight coefficient configuration; 4. The method of claim 1, wherein, based on the normalized data set and the weight coefficient configuration, calculating health score values of the plurality of short message channels based on a weight dynamic adjustment model, and obtaining the channel health evaluation results. The method further comprises: receiving and analyzing the content of the message to be sent, identifying the priority identifier corresponding to the content of the message to be sent, and obtaining a priority classification result; determining a corresponding scheduling policy requirement according to the priority classification result, to obtain a policy parameter configuration, wherein the scheduling policy requirement comprises: a P0-level message requirement of a health score greater than or equal to 90 points and a delay less than or equal to 3 seconds, a P1-level message requirement of a health score greater than or equal to 70 points and a delay less than or equal to 15 seconds, and a P2-level message requirement of a health score greater than or equal to 50 points and a priority cost factor; performing multi-level screening in combination with the channel health evaluation result and the policy parameter configuration, respectively performing screening based on a health score threshold, screening based on a specific dimension hard condition, and availability screening based on quota management, to obtain a channel candidate set meeting the conditions; applying an optimal matching algorithm to the channel candidate set, calculating an utility value of each channel through an utility function, selecting a channel with the maximum utility value, and obtaining a matching result of the message and the channel.

5. The method of claim 1, wherein, performing message sending based on the matching result of the message and the channel, monitoring a sending state and a channel response in real time, and obtaining sending result information, comprising: preparing a message sending parameter according to the matching result of the message and the channel, performing content format conversion and security signature processing on the message sending parameter, constructing a request parameter meeting a channel API specification, and obtaining a sending request configuration; based on the sending request configuration, initiating a message sending request to a selected channel through an asynchronous non-blocking HTTP client, recording a request initiation timestamp and a tracking identifier, to obtain a sending execution state; monitoring the sending execution state in real time, tracking a complete cycle of network connection establishment, request sending, and response receiving, recording key time nodes and state changes, and obtaining state tracking data; receiving and analyzing sending result data returned by the channel, mapping specific status codes of each channel into a system unified state definition, performing success determination, temporary failure determination, and permanent failure determination, and obtaining a standardized sending result; updating a channel performance index according to the standardized sending result, recalculating a channel health score and feeding back to a channel scoring system, and obtaining the sending result information.

6. The method of claim 1, wherein, obtaining failure message data in the sending result information, performing terminal state detection through an operator base station signaling, applying a decision tree model to determine a retry strategy, and obtaining a retry decision result, comprising: obtaining failure message data in the sending result information, performing mapping analysis on error codes returned by the channel, and obtaining a failure cause classification result, wherein the failure cause classification result comprises: channel failure, terminal problem, content problem, or quota problem; based on the failure cause classification result, querying a terminal real-time state through an operator base station signaling or a manufacturer API, and obtaining terminal state data, wherein the terminal state data comprises: online accessibility, shutdown inaccessible, weak and unstable signal, or roaming state; inputting the failure cause classification result and the terminal state data into a decision tree model, performing multi-layer condition determination based on failure type, terminal state, message priority, and historical retry number, and obtaining a retry strategy type; performing a corresponding retry operation according to the retry strategy type, comprising: immediate retry, channel switching, delay retry, timing retry, content adjustment, or termination retry, and obtaining a retry execution result; Record the retry execution results, update the retry effect statistics and decision model parameters, calculate the success rate index of different retry strategies, and obtain the retry decision results.

7. The method of claim 1, wherein, The P2-level marketing messages that failed to retry are Huffman encoded and compressed. They are then grouped geographically based on the receiver's base station information. During off-peak hours, the compressed P2-level marketing messages are sent in batches. The sending results and corresponding cost-saving data are then obtained, including: Collect P2-level marketing messages from the messages to be sent and the P2-level marketing messages that failed to be retried, identify the content of marketing messages by keyword matching, and perform time window aggregation to obtain a set of P2-level messages; The P2 level message set is compressed by applying the Huffman coding algorithm to construct a character frequency dictionary and an encoding mapping table, and the original message is converted into a compressed binary stream to obtain compressed message data. Based on the recipient's mobile phone number, the location and operator information are parsed, and the data is grouped into three levels: first-level grouping by operator type, second-level grouping by provincial administrative division, and third-level grouping by city or region, resulting in regional grouping results. Each region corresponds to a set of compressed message data to be sent. Set the off-peak window to the period of 00:00-06:00, formulate a batch sending plan for the compressed message data corresponding to the regional grouping results, and use the operator discount channel to perform load balancing distribution to obtain the off-peak sending plan; During a specified off-peak window, the off-peak sending plan is executed for each region in the region grouping results. Compression rate, sending cost, and delivery rate data are recorded, and the cost savings compared to the standard sending method are calculated to obtain the cost savings data.

8. The method of claim 1, wherein, The method further includes: employing a decentralized multi-agent reinforcement learning architecture and applying reinforcement learning algorithms to optimize parameters, generating optimized weight coefficients and scheduling strategies, including: A multi-agent framework is established, in which multiple distributed agents are deployed, including a channel evaluation agent, a routing decision agent, a retry policy agent, and a resource scheduling agent, with each agent distributed across different physical nodes; A minimal communication mechanism is established among agents in the multi-agent framework, exchanging only local reward information and achieving secure data exchange through encrypted communication channels, thus obtaining a distributed cooperative network. In the distributed collaborative network, a participant-critic network structure is constructed for each agent. The participant network is used to learn the optimal policy mapping and output action selection, while the critic network is used to evaluate the value of actions and provide policy gradient guidance. In the participant-critic network structure, a hybrid reward structure is designed, which includes individual rewards and team rewards. Policy diversity is maintained by policy entropy regularization, and a collaborative behavior incentive mechanism is established. Distributed model updates are achieved through consensus algorithms, which support dynamic adjustment of the number of agents according to the system scale, enable cross-scenario knowledge transfer, and obtain global optimization parameters. Based on the global optimization parameters, the channel evaluation agent outputs optimized channel score weight coefficients, the routing decision agent outputs optimized channel selection strategies, the retry strategy agent outputs optimized retry decision parameters, and the resource scheduling agent outputs optimized resource allocation strategies, to obtain the optimized weight coefficients and scheduling strategies.

9. The method of claim 4, wherein, An optimal matching algorithm is applied to the channel candidate set, the utility values of each channel are calculated through an utility function, the channel with the maximum utility value is selected, and a matching result of the message and the channel is obtained, including: Based on the state information of the channel candidate set, a double deep Q network architecture is constructed, including a main network responsible for action selection and a target network for calculating target Q values, and multi-dimensional information such as channel health score, message features and system load is fused as state representation; A greedy strategy optimization operation is performed on the double deep Q network architecture, the action with the highest current Q value is selected, and an epsilon probability is reserved for random exploration. The exploration probability is gradually reduced by a preset ratio as the learning progresses, and a greedy action selection strategy is output; Based on the greedy action selection strategy, time series analysis is performed to identify traffic characteristics in different time periods, routing decisions are made considering the network topology relationship between channels, and a link activation scheme based on traffic and topology is generated by monitoring the bandwidth, delay and reliability of each link in real time; A hierarchical scheduling architecture is established according to the link activation scheme based on traffic and topology, including a main scheduler responsible for global resource allocation and a sub-scheduler focusing on local optimization, efficient state sharing and decision coordination are realized, and a multi-agent DDQN allocator is obtained; Neural network quantization and GPU acceleration techniques are applied to the multi-agent DDQN allocator to realize a caching mechanism for scenario decision results, and similar requests are processed in batches to obtain the matching result of the message and the channel.

10. The method of claim 9, wherein, Based on the greedy action selection strategy, time series analysis is performed to identify traffic characteristics in different time periods, routing decisions are made considering the network topology relationship between channels, and a link activation scheme based on traffic and topology is generated by monitoring the bandwidth, delay and reliability of each link in real time, including: Historical traffic data in each period is collected, periodic traffic patterns and burst traffic characteristics are identified through an LSTM time series model, future traffic demand distribution is predicted, and a traffic prediction result is obtained; Based on the traffic prediction result, a network topology graph between channels is constructed, the geographical location, network delay and bandwidth capacity of each channel are recorded, the path cost and reachability matrix between channels are calculated, and a topology relationship model is obtained; Real-time monitoring of the current load rate, average delay and packet loss rate of each link is performed in combination with the topology relationship model to identify potential network bottlenecks and fault risks, and a link state evaluation is obtained; Based on the link state evaluation, standby links are activated in advance and channel capacity is expanded during traffic peak periods, and redundant resources are released and operating costs are reduced during traffic trough periods, to obtain a predictive activation strategy; The predictive activation strategy is combined with real-time traffic scheduling to dynamically adjust the weight allocation and load balancing parameters of each link, and the link activation scheme based on traffic and topology is obtained.

11. The method of claim 7, wherein, Before the designated idle time window to each region in the geographical grouping results are performed idle time sending plan, record compression rate, sending cost and delivery rate data, calculate the cost saving range compared with the standard sending mode, get the cost saving data, it further includes: Based on the idle time sending plan to build a double and duel deep Q-Learning architecture, using two independent Q network to reduce overestimation bias, decompose the Q value into state value function V(s) and advantage function A(s, a), and calculate the Q value, get the D3QL network structure; Using the D3QL network structure to realize multi-level service deployment strategy, the processing logic is divided into core layer, edge layer and terminal layer, wherein the core layer is used to process key business logic and data storage, the edge layer is used to process localized message processing and cache, and the terminal layer is used to realize preprocessing and state detection, determine the hierarchical service architecture; Based on the intelligent prediction service demand distribution in the hierarchical service architecture, deploy service instances in advance at the optimal location, dynamically adjust the service instance distribution according to the load change, get the intelligent service placement strategy; According to the intelligent service placement strategy, define the differentiated service quality requirements for different business types, reserve dedicated resource pool for first priority service, dynamically adjust QoS parameters according to load and business importance; Adopting micro service architecture and containerized deployment method, using Kubernetes to manage dynamic scaling of service instances, minimizing state dependence between services, and adapting to the system through fault injection test.

12. The method of claim 11, wherein, The method further includes: adopting a greedy multiple access scheme to obtain an intelligent service placement strategy, including: Based on the intelligent service placement strategy, use multiple independent channels for parallel transmission of critical messages at the same time, apply forward error correction code technology to enhance transmission reliability, and generate a multi-channel parallel transmission mechanism; Using the multi-channel parallel transmission mechanism to evaluate the success rate, delay and stability indicators of each transmission path in real time, dynamically adjusting the traffic distribution ratio according to the path quality, and preferentially using the best performance path, to get an adaptive path selection strategy; Based on the adaptive path selection strategy, considering the channel capacity, network delay and transmission cost, applying a weighted round robin algorithm to realize intelligent load distribution, to get a load balancing algorithm; According to the load balancing algorithm, a channel fault detection and switching mechanism is established, which automatically switches to the backup channel when the main channel is detected to be abnormal; The channel fault detection and switching mechanism is combined with the multi-channel parallel transmission mechanism, the adaptive path selection strategy and the load balancing algorithm to get the greedy multiple access scheme.

13. An intelligent short message dispatching device based on multi-dimension dynamic optimization, characterized in that, It includes a memory and a processor, wherein the processor is used to execute the method of any one of claims 1-12.

Citation Information

Patent Citations

  • Self-adaptive short message retry control method and device

    CN101895846A

  • Intelligent short message channel configuration system

    CN119110250A

  • International short message multi-operator dynamic switching control system based on reinforcement learning

    CN119545459A

  • System and method for mobile device push communications

    US20130047034A1

Cited By

  • Credit control method and device for data message service and medium

    CN121193380A

  • Outbound routing method and system based on multi-dimensional index coupling and large model decision

    CN121486268A

  • Data synchronization method and system for multiple data sources

    CN121664824A

  • Intelligent compression transmission method and system of message body

    CN121665294A

  • Intelligent compression transmission method and system of message body

    CN121665294B