Method and device for allocating short message sending channel, electronic equipment and storage medium

By acquiring a set of candidate channels and using an alias sampling model for channel selection, the problems of number parsing and channel weight adjustment in high-concurrency international SMS scenarios are solved, achieving efficient and accurate channel allocation and improving sending quality and cost control.

CN122496782APending Publication Date: 2026-07-31HUNAN TAAO COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN TAAO COMM CO LTD
Filing Date
2026-05-09
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, international SMS sending struggles to achieve efficient number parsing and flexible channel weight adjustment in high-concurrency scenarios, resulting in inflexible allocation strategies that affect sending quality and cost control.

Method used

By analyzing the receiving numbers of international bulk SMS messages, a set of candidate channels is obtained. The bulk SMS channel groups are selected by combining cross-border complexity, channel cost indicators and task attributes. The channel selection is completed under fixed time complexity using an alias sampling model, and the dynamic weights are periodically adjusted based on the sending results.

Benefits of technology

It achieves high efficiency in number parsing and accuracy in channel selection under high concurrency scenarios, ensuring that the selection probability matches the dynamic weight, solving the problem of balancing channel allocation efficiency and accuracy, and improving the quality and cost control of international SMS sending.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496782A_ABST
    Figure CN122496782A_ABST
Patent Text Reader

Abstract

This invention relates to the technical field of international SMS communication, specifically to a method, apparatus, electronic device, and storage medium for allocating SMS sending channels. The technical solution of this invention addresses the characteristics of high-concurrency processing in international bulk SMS by parsing all receiving numbers to obtain a set of candidate channels; it then performs multi-dimensional screening of the candidate channel set based on cross-border complexity, channel cost indicators, and task attributes; and calculates the dynamic weight of each channel based on historical delivery data and predicted concurrency parameters. Using an aliasing sampling model, channel selection is completed with a fixed time complexity, ensuring that the selection probability always matches the dynamic weight, maintaining accuracy even with fluctuations in the number of channels. SMS messages are sent according to the selection results of the aliasing sampling model, and the sending results are used as feedback for periodic dynamic weight adjustments. This solves the technical problem of balancing channel allocation efficiency and accuracy in high-concurrency scenarios of international bulk SMS.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of international SMS communication, specifically to a method, apparatus, electronic device, and storage medium for allocating SMS sending channels. Background Technology

[0002] With the continuous growth of international SMS traffic, it is often necessary to send SMS messages to different countries and regions through multiple upstream channels. Since these channels differ in terms of rates and delivery rates, efficient number attribution resolution and rational allocation of sending channels have become key issues affecting the quality and cost control of international SMS delivery.

[0003] In existing technologies, number parsing largely relies on static number segment matching or rule traversal, resulting in low parsing efficiency and difficulty in meeting the real-time requirements of high-concurrency scenarios. Furthermore, the sending channels are mostly fixed configurations, lacking dynamic response to actual operational effects, leading to inflexible applicability of allocation strategies when rates fluctuate or channel quality changes. Summary of the Invention

[0004] To address the technical challenge of balancing efficient channel allocation and accurate channel selection in high-concurrency international bulk SMS scenarios, this invention aims to provide a method, apparatus, electronic device, and storage medium for allocating SMS sending channels, achieving efficient number parsing, flexible dynamic weight calculation, and accurate channel selection. The specific technical solution adopted is as follows: In a first aspect, embodiments of the present invention provide a method for allocating SMS sending channels, applied to high-concurrency processing of international bulk SMS messaging, the method comprising: Analyze all receiving numbers for international bulk SMS messages to obtain a set of candidate channels; Based on the cross-border complexity, channel cost indicators, and international bulk SMS task attributes of each channel in the candidate channel set, bulk SMS channel groups are selected from the candidate channel set. Based on the historical delivery data of each channel in the mass messaging channel group and the real-time predicted concurrent congestion parameters, determine the dynamic weight of each channel in the mass messaging channel group. The aliasing sampling model is configured according to dynamic weights, so that the aliasing sampling model can complete channel selection with a fixed time complexity, and maintain the selection probability matching the dynamic weights when the number of channels changes. International mass text messages are sent based on the channel selection results of the alias sampling model, and the dynamic weights are periodically adjusted based on the sending results.

[0005] In one alternative embodiment, all receiving numbers for international bulk SMS messages are parsed to obtain a set of candidate channels, including: Multiple non-overlapping numerical intervals are constructed based on the node information represented by the Trie tree. Each numerical interval corresponds to at least one candidate channel in the channel pool. The node information includes country code, international prefix code, mobile country code, and mobile network code. Based on the node information, all received numbers are parsed in parallel with their prefixes, and each received number after parallel parsing is assigned to a candidate channel in the corresponding numerical range according to the parsing result. The set of candidate channels divided by receiving numbers is defined as the candidate channel set.

[0006] In an alternative embodiment, before filtering out the bulk channel group from the candidate channel set, the method further includes: The channel load index of each candidate channel is obtained by combining the routing level and peak load index of each channel in the candidate channel set. The routing complexity of each candidate channel is obtained by using the channel load index and the envelope index, which represents the range of communication protocol adaptation, respectively. The cross-border complexity of each channel is obtained based on its routing complexity and configured operational compliance index.

[0007] In one optional embodiment, based on the cross-border complexity, channel cost index, and international bulk SMS task attributes of each channel in the candidate channel set, a bulk SMS channel group is selected from the candidate channel set, including: Based on the task attributes, cross-border complexity or channel cost indicators are prioritized for screening. The task attributes include verification attributes, notification attributes, and marketing attributes. The candidate channels are sorted sequentially according to the priority selection parameters, and sliding grouping is performed based on the sorting results. All candidate channels in each group meet the bandwidth requirements for international bulk SMS. For each sliding group, the variance and mean of another indicator data are calculated, and the sliding group corresponding to the minimum variance is determined when the data mean is within a preset lower limit range, and is then identified as the group sending channel group.

[0008] In one optional embodiment, historical delivery data includes historical delivery rate and historical delivery speed; based on the historical delivery data of each channel in the mass messaging channel group and the real-time predicted concurrent congestion parameters, the dynamic weight of each channel in the mass messaging channel group is determined, including: Based on the historical load time series data of each channel in the mass messaging channel group, predict the future carrying capacity of the corresponding channel; Based on the future carrying capacity of each channel and the number of SMS requests in transit, obtain the concurrent congestion parameters for the corresponding channel; Based on the historical delivery rate and historical delivery speed of each channel in the time series, and their respective values ​​and fluctuation amplitudes, historical delivery parameters characterizing the delivery quality of the corresponding channel in historical mass mailing tasks are obtained. The dynamic weights of each channel in the group of mass-sending channels are obtained by weighting the historical delivery parameters and concurrent congestion parameters of each channel.

[0009] In one optional embodiment, the load time-series data includes SMS submission rate, average response latency, and successful response code ratio; based on the load time-series data of each channel in the bulk messaging channel group over historical periods, the future carrying capacity of the corresponding channel is predicted, including: Smoothing and feature extraction are performed on SMS submission rate, average response latency and successful response code ratio with different time windows to obtain the stable carrying capacity of the corresponding channel. The stable carrying capacity is the channel carrying capacity corresponding to the following conditions: when the increase in SMS submission rate is greater than the first threshold, the increase in average response latency is less than the second threshold, and the decrease in successful response code ratio is less than the third threshold. Based on the stable carrying capacity of each channel and the preset confidence coefficient, the future carrying capacity of the corresponding channel is obtained.

[0010] In one optional embodiment, the dynamic weight is adjusted based on the periodic transmission result, including: The dynamic weights of the target transmission channels selected by the alias sampling model in adjacent transmission cycles are compared to obtain the weight difference of the target transmission channels. When the weight difference is greater than the difference threshold, a weight adjustment curve for the corresponding transmission channel is generated, and the dynamic weight is periodically corrected according to the weight adjustment curve.

[0011] Secondly, embodiments of the present invention also provide a device for allocating SMS sending channels, applied to high-concurrency processing of international bulk SMS messaging, the device comprising: The acquisition module is used to parse all the receiving numbers for international bulk SMS messages in order to obtain a set of candidate channels; The filtering module is used to filter out bulk messaging channel groups from the candidate channel set based on the cross-border complexity, channel cost indicators, and international bulk SMS task attributes of each channel in the candidate channel set. The determination module is used to determine the dynamic weight of each channel in the mass messaging channel group based on the historical delivery data of each channel and the real-time predicted concurrent congestion parameters. The configuration module is used to configure the alias sampling model according to the dynamic weights, so that the alias sampling model can complete the channel selection in a fixed time complexity and maintain the selection probability matching the dynamic weights when the number of channels changes. The sending module is used to send international mass text messages based on the channel selection results of the alias sampling model, and periodically adjust the dynamic weights based on the sending results.

[0012] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, the memory being coupled to the processor, the memory storing instructions that, when executed by the processor, cause the electronic device to perform the steps of any of the methods in the first aspect.

[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods in the first aspect.

[0014] The present invention has the following beneficial effects: This invention addresses the challenges of high-concurrency international bulk SMS processing. It parses all receiving numbers to obtain a candidate channel set; then, it performs multi-dimensional filtering of the candidate channel set based on cross-border complexity, channel cost indicators, and task attributes to form a bulk SMS channel group that meets the bandwidth requirements; further, it calculates the dynamic weight of each channel based on historical delivery data and predicted concurrency parameters; using an alias sampling model, channel selection is completed with fixed time complexity, ensuring that the selection probability always matches the dynamic weight, maintaining accuracy even with fluctuations in the number of channels; SMS messages are sent according to the selection results of the alias sampling model, and the sending results are used as feedback for periodic dynamic weight adjustments. This technical solution achieves high efficiency in number parsing, flexibility in weight calculation, and accuracy in channel selection, solving the technical problem of balancing channel allocation efficiency and accuracy in high-concurrency international bulk SMS scenarios. Attached Figure Description

[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart illustrating a method for allocating SMS sending channels according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the segment index structure of a Trie tree provided in an embodiment of the present invention; Figure 3 A flowchart illustrating a configuration alias sampling model provided in one embodiment of the present invention; Figure 4This is a schematic diagram of the structure of a text message sending channel allocation device provided in an embodiment of the present invention. Detailed Implementation

[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a text message sending channel allocation method, apparatus, electronic device, and storage medium proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0019] The current channel allocation strategies of SMS platforms are unsuitable for high-concurrency SMS sending tasks for several reasons, including low number parsing efficiency, inflexible channel weight adjustment, and poor adaptability of the allocation strategy. Traditional methods, based on rule matching or sequential traversal, are inefficient when dealing with complex number segments and multi-level prefixes, making it difficult to support high-concurrency international SMS services. Secondly, channel weight adjustment is inflexible: existing solutions typically use static weights or simple priority configurations, making it difficult to simultaneously consider cost, delivery quality, and timeliness, and also unable to quickly respond to dynamically changing channel performance. Furthermore, as the number of international SMS channels changes, existing allocation strategies require complex adjustments when adding or removing channels, affecting system stability and scalability. The following, in conjunction with the accompanying drawings, details a specific solution for an SMS sending channel allocation method, apparatus, electronic device, and storage medium provided by this invention.

[0020] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for allocating SMS sending channels according to an embodiment of the present invention. This method is applied to high-concurrency processing of international bulk SMS messaging and can run on an SMS platform server or computer device. The allocation method includes: S11. Analyze all receiving numbers for international bulk SMS messages to obtain a set of candidate channels.

[0021] Specifically, all recipient numbers for international bulk SMS messages can be from multiple countries. This step requires parsing the meaning of a large number of recipient numbers. To improve the parsing efficiency of massive numbers, number segment meaning parsing can be implemented based on a Trie tree and a number segment dictionary. The number segment dictionary stores fields such as partial number segments of the recipient numbers (e.g., 1205, 1205742), Alpha-2 country codes (e.g., US, CN), international prefix codes (e.g., +86, +1), Mobile Country Code (MCC), and Mobile Network Code (MNC). The Trie tree is indexed hierarchically according to the number segment prefixes of the recipient numbers. Each leaf node is associated with complete attribute information. Prefix matching enables fast parsing of target numbers. For example, after inputting a target number, the corresponding country code, mobile country code, and mobile network code can be located without a full traversal. Implementing number segment meaning parsing using a Trie tree supports dynamic expansion of number segment data. Adding a new number segment only requires insertion into the corresponding node of the Trie tree, without affecting the existing index structure, thus exhibiting good scalability.

[0022] Please see Figure 2 , Figure 2 This is a schematic diagram of the number segment index structure of a Trie tree. Taking the prefix segments of the receiving numbers 1205 and 86199 as examples, based on the root node of the Trie tree, the meaning of the number segments is analyzed. 1205 is broken down into 1, 2, 0, and 5, yielding the country code US, international prefix 1, mobile country code 310, and mobile network code 030; indicating that it needs to be sent through the US T-Mobile operator. Breaking down 1205 into 8, 6, 1, 9, and 9 yields the country code CN, international prefix 86, mobile country code 460, and mobile network code 003, indicating that SMS can be sent through China Unicom. Based on the results analyzed by the Trie tree, a channel search can be performed in the number pool of the SMS platform. Based on the search results of all receiving numbers, a set of channels can be selected.

[0023] It's important to note that after parsing the receiving number, each number may have multiple candidate channels. Operators may open multiple gateways or channels in different countries or regions, and even different operators within the same country (such as China Mobile, China Unicom, and China Telecom) may have their own direct connection channels or forwarding channels. When an SMS platform parses a receiving number, it often finds that the mass SMS message can be delivered through multiple candidate channels. For example, a China Mobile number might have a dedicated channel directly connecting to China Mobile, a backup channel via overseas relay, or even a third-party aggregation channel, thus generating multiple candidate channels for a single number. Typically, direct connection channels establish a direct connection between the SMS platform and the target operator, offering good communication quality but at a higher cost; while relay channels forward messages through intermediate operators or service providers, potentially resulting in slightly lower delivery quality but lower cost.

[0024] In high-concurrency scenarios of international bulk SMS messaging, the SMS platform must map a large number of receiving numbers to the correct country and operator attributes within a very short time, and then filter out available candidate channels accordingly. However, the lengths of numbers vary between countries, and sequential matching of each number takes a considerable amount of time. For example, traditional Trie tree-based search requires traversing each receiving number bit by bit from the root node. Taking the receiving number 1205001 as an example, it is necessary to match the candidate channels using 1, 2, 0, and 5, and each number must go through the Trie tree repeatedly. Based on this, in a specific implementation, step S11 includes sub-steps S11-1 to S11-3, which are described in detail below: S11-1. Construct multiple non-overlapping numerical intervals based on the node information represented by the Trie tree. Each numerical interval corresponds to at least one candidate channel in the channel pool. The node information includes country code, international prefix code, mobile country code, and mobile network code. The Trie tree uses a hierarchical structure to represent the prefix information of the numbers receiving bulk SMS messages. In order to perform efficient numerical matching of batch numbers, the path formed by the nodes can be mapped to a numerical interval.

[0025] S11-2. Perform parallel prefix parsing on all received numbers based on node information, and then assign each parsed number to a candidate channel within its corresponding numerical range according to the parsing results. This step maps a massive number of numbers to the numerical range constructed above. The key to parallel parsing is reducing the number of searches per number and leveraging the linear scanning advantage of batch sorting. It can be understood that when performing prefix parsing on received numbers, it is necessary to remove the plus sign and standardize the 00 prefix to achieve standardized processing of all received numbers. The standardized received numbers are then mapped to integers (or multi-byte numerical representations), and the input list is divided into several partitions by high-order bits (e.g., the first 3-6 bits). Each partition can then be processed in parallel. An independent thread can be used for each partition to avoid read / write conflicts; within the working partition, a local buffer is used to collect batches of numbers belonging to a certain candidate channel, reducing cross-thread merging overhead.

[0026] S11-3. The set of candidate channels divided by the receiving numbers is determined as the candidate channel set. This step is used to transform the mapping result into a set of candidate channels available for subsequent scheduling. Each channel carries a subset of numbers to be sent in this batch and pre-loaded channel attributes. Furthermore, assuming the numbers to be sent in bulk include 1205001, 1205002, 1205742, 1206123, and 1304567, the prefix ranges defined in the candidate channel library are: 12 points to candidate channel group A, 1205 points to candidate channel group B, 1205742 points to candidate channel group C, and 13 points to candidate channel group D. Each number only needs one numerical comparison to determine its corresponding numerical range, eliminating the need to search the Trie tree node information digit by digit. By sorting the number list, a linear scanning method can be used to match the receiving numbers with the numerical ranges, achieving a time complexity of O(N+I) for batch receiving number matching. Converting the Trie tree node information into a non-overlapping range directory, combined with number sorting, enables batch linear scanning searches, significantly reducing the computational overhead of prefix matching for large-scale international SMS bulk sending.

[0027] At this point, the parsing of all received numbers has been completed, and the candidate channel set has been obtained. Proceed to step S12.

[0028] S12. Based on the cross-border complexity, channel cost index, and international bulk SMS task attributes of each channel in the candidate channel set, filter out the bulk SMS channel group from the candidate channel set.

[0029] Specifically, cross-border complexity quantifies the routing difficulty of candidate channels for sending SMS messages across borders; channel cost quantifies the cost of sending cross-border SMS messages through the corresponding candidate channels, which can be represented based on the unit price of each SMS message; task attributes characterize the business type of this bulk SMS, such as verification SMS, notification SMS, or marketing SMS, and can also take into account indicators such as budget constraints, delivery priority, and time windows. For example, some international bulk SMS messages may be instant notification SMS messages, requiring more reliable delivery quality. The required cross-border complexity and channel cost indicators can be determined based on the task attributes of international bulk SMS messages, and all candidate channels in the candidate channel set can be further filtered to derive a bulk SMS channel group based on the filtering results.

[0030] Cross-border complexity can be represented as a numerical score, for example, with a value range of 0-100. A higher value indicates greater complexity, lower reliability, and lower compliance in actual use; a lower value indicates a shorter path, better protocol compatibility, and higher compliance in cross-border transmission. Cross-border complexity is an indicator obtained by weighting routing complexity and compliance factors.

[0031] For example, cross-border complexity is calculated based on three steps: The first step is to calculate the channel load index for each candidate channel by combining the routing level and peak capacity index of each channel in the candidate channel set. During cross-border SMS transmission, each candidate channel traverses several routing nodes, such as international gateways, regional forwarding servers, and operator access points. The routing level reflects the number of forwarding layers a message needs to pass through from the source to the target user; more layers mean greater latency, packet loss risk, and the risk of intermediate node failures. Furthermore, the peak capacity index characterizes the maximum throughput that the channel can stably handle in historical observations, i.e., the peak number of SMS submission requests that can be processed per unit time. Combining these two factors, the channel load index can be obtained using formulas or logical weights. For example, the channel load index can be calculated by configuring corresponding weights based on the actual values ​​of the routing level and peak capacity index. If a channel has a high routing level but also a high peak capacity, it may remain stable under high concurrency. Conversely, if a channel has few layers but insufficient capacity, its load index will be low. The channel load index quantifies the stability of each channel under different load conditions.

[0032] The second step involves obtaining the routing complexity of each candidate channel based on its channel load index and envelope index, which characterizes the range of communication protocol compatibility. Beyond the channel load index, protocol-level compatibility needs further consideration. Since international SMS sending channels typically need to support SMPP, CMPP, HTTP API, or more customized proprietary protocols, and different protocols may have version differences, inconsistent parameter formats, or encoding differences, SMS messages require conversion and adaptation when crossing gateways. The envelope index is used to characterize the range of communication protocols supported by a candidate channel and its adaptability. If a channel supports a wide range of protocols and can adapt to multiple protocols, a lower envelope index indicates good compatibility; conversely, a higher envelope index indicates a higher adaptation cost. Combining the channel load index and envelope index yields the routing complexity. For example, a channel with a good load index may still have a high overall routing complexity due to complex protocol conversion if its envelope index is high. Routing complexity reflects the overall stability and compatibility of the channel at the technical transmission level.

[0033] The third step is to obtain the cross-border complexity of each channel based on its routing complexity and configured operational compliance index. International SMS often involves multiple countries and regions, and these countries have different regulatory policies, content filtering rules, blacklist mechanisms, and mandatory real-name registration systems. The operational compliance index is used to characterize the compliance risk level of a channel. This index is typically derived by weighting indicators such as historical violation interception rate, compliance certification level, and blacklist trigger ratio; it can also be based on the configuration of business personnel. The lower the compliance index, the higher the probability of the channel passing and the lower the compliance risk; the higher the compliance index, the greater the risk of the channel being intercepted or blocked. The cross-border complexity of each candidate channel is obtained by comprehensively calculating the routing complexity and operational compliance index.

[0034] It is understandable that when calculating cross-border complexity, step-by-step calculation can be performed based on the weighted method mentioned above, or calculation can be performed using normalized parameters and nonlinear formulas. For example, the channel load index of each candidate channel can be calculated based on the routing level and peak carrying capacity index, denoted as L; the envelope index of each candidate channel can be denoted as E. The channel load index L and the envelope index E are normalized respectively. The larger the envelope index E, the worse the envelope range of the candidate channel's pass / fail protocol. The routing complexity R can be obtained using the formula: R=1-exp(-k(L×E)). In this formula, when the product of the channel load index and the envelope index is small, the equation is approximately linear; conversely, as the product increases, it rapidly approaches 1, where exp() is the exponential function; k is the nonlinear sensitivity, k>0, which can be set based on calibration experiments, for example, set to 3. Furthermore, a compliance factor is introduced on the basis of routing complexity. The operational compliance index of each candidate channel is denoted as C, which can be based on the formula: B i =1-(1-R)×(1-C), calculate the cross-border complexity B for each candidate channel. i Cross-border complexity B i The value of is in the range [0,1], where i is a natural number greater than 1, representing the index of the candidate channel. Cross-border complexity is used to prioritize each candidate channel, thereby quickly eliminating unstable or high-risk channels from a large number of candidate channels.

[0035] For example, step S12 includes sub-steps S12-1 to S12-3, which are described in detail below: S12-1. Prioritize cross-border complexity or channel cost indicators based on task attributes. Task attributes include verification, notification, and marketing attributes. When the task attribute is verification, it indicates the mass SMS messages may be login verification codes, requiring a focus on delivery speed and stability; therefore, cross-border complexity is the primary consideration. When the task attribute is notification, such as order status reminder SMS notifications, stability and cost must be balanced, typically requiring a compromise between cross-border complexity and cost. Cross-border complexity or channel cost indicators can be prioritized based on the notification attribute's priority. For marketing SMS messages, emphasis is placed on mass distribution scale and cost control, making cost indicators a higher priority. This differentiated selection allows channel selection targets for different business scenarios to better align with actual needs.

[0036] S12-2. The candidate channels in the set are sorted sequentially according to the priority selection parameters, and sliding grouping is performed based on the sorting results. All candidate channels in each group meet the bandwidth requirements for international bulk SMS messaging. After determining the priority selection parameters, all candidate channels can be sorted from best to worst according to the priority selection parameters, and then sliding grouping is performed. For example, if the candidate channel sorting results are 1–10, [1,2,3] is selected as one group, and [2,3,4] is selected as another group, and so on, sliding grouping continues until all candidate channels are covered. Each group must meet the bandwidth requirement, that is, the sum of the concurrent carrying capacity of each group of candidate channels is greater than the bandwidth requirement of the bulk SMS task. It can be understood that the sliding grouping method used in this embodiment of the invention ensures that the selection process not only considers the merits of individual channels but also balances stability and resource utilization through combination.

[0037] S12-3. Calculate the variance and mean of another indicator for each sliding group, and determine the sliding group corresponding to the minimum variance when the data mean is within a preset lower limit range. Within each sliding group, calculate the mean and variance of non-priority indicators. For example, if the priority screening parameter is the channel cost indicator, the other indicator is cross-border complexity, calculated using the variance and mean calculation formulas respectively. Variance measures the consistency of candidate channels within the mass messaging channel group. The smaller the variance, the smaller the differences in non-priority indicators among the channels in that group, and the more stable the overall performance.

[0038] The data mean can be determined based on the number of sliding groups. For example, if there are 20 sliding groups, the sliding group ranked 5th can be set as the preset lower limit. Of course, the data mean can also be configured freely. For example, the channel cost index can be set to be less than or equal to 70% of the highest cost. Under the premise of meeting the lower limit of the mean, the group with the smallest variance is selected as the bulk sending channel group, thereby ensuring that international SMS bulk sending meets both bandwidth requirements and cost and stability requirements.

[0039] At this point, the group of mass-sending channels has been selected from the candidate channel set, and we proceed to step S13.

[0040] S13. Determine the dynamic weight of each channel in the group based on the historical delivery data of each channel in the group and the real-time predicted concurrent congestion parameters.

[0041] Specifically, historical delivery data is used to characterize the historical delivery performance of the corresponding candidate channel, and may include delivery rate, packet loss rate, etc. Concurrency congestion parameters are used to characterize the predicted concurrency congestion of the corresponding candidate channel in high-concurrency tasks; these can be congestion probability or congestion delay time. A weight prediction model can be constructed based on the corresponding changes between historical delivery data, concurrency congestion parameters, and dynamic weights. This could be a neural network model or other mathematical models. Inputting the historical delivery data and concurrency congestion parameters into this model will yield the dynamic weights of each channel in the group of mass delivery channels.

[0042] For example, historical delivery data includes historical delivery rate and historical delivery speed; step S13 includes sub-steps S13-1 to S13-4, which are described in detail below: S13-1. Based on the historical load time-series data of each channel in the bulk messaging channel group, predict the future capacity of the corresponding channel. The load time-series data is used to characterize the load of candidate channels in the time series, and may include SMS submission rate, average response latency, etc. A predictive model can be built to implement real-time prediction of future capacity.

[0043] For example, when load time-series data includes SMS submission rate, average response latency, and successful response code ratio, smoothing and feature extraction are performed on these metrics using time windows of different lengths to obtain the stable carrying capacity of the corresponding channel. The SMS submission rate determines the degree of matching between the service's sending volume and the channel's processing rate; the average response latency reflects the response processing efficiency of the candidate channel; excessive latency indicates that the candidate channel's sending volume is close to saturation; and the successful response code ratio characterizes the validity of the final receipt after SMS sending, used to determine whether the channel is stably available.

[0044] Smoothing the data using time windows of varying lengths can eliminate occasional outliers and extract data change characteristics, such as growth slope and fluctuation amplitude. When the SMS submission rate increases beyond the first threshold, if the increase in average response latency is still less than the second threshold and the decrease in the successful response code ratio is still less than the third threshold, it indicates that the channel can continue to handle a higher load. The processing capacity at this point is the stable carrying capacity of the candidate channel. Combined with a preset confidence coefficient, the carrying capacity for a future period is predicted. The confidence coefficient can be configured based on actual conditions, and the future carrying capacity of the corresponding channel is obtained by multiplying the stable carrying capacity and the confidence coefficient.

[0045] S13-2. Based on the future capacity of each channel and the number of SMS requests in transit, obtain the concurrent congestion parameters for the corresponding channel. The number of requests currently being processed is the number of requests in transit. If this number is close to or even exceeds the capacity, concurrent congestion will still occur. The concurrent congestion parameters can be derived from the comparison between the future capacity and the number of requests in transit. If the number of requests in transit is much less than the future capacity, the congestion risk of the candidate channel is low; if the number of requests in transit is close to or even exceeds the future capacity, it indicates that the congestion risk of the candidate channel is high. The concurrent congestion parameters provide real-time traffic awareness reference for channel scheduling, preventing individual candidate channels from being blocked due to sudden high concurrency. This effectively improves the fault tolerance capability of the SMS platform to sudden traffic surges.

[0046] S13-3. Based on the historical delivery rate and historical delivery speed of each channel in the time series, and their respective values ​​and fluctuations, historical delivery parameters characterizing the delivery quality of the corresponding channel in historical mass mailing tasks are obtained. The historical delivery rate characterizes the proportion of SMS messages ultimately received by the target user terminal, directly reflecting the effectiveness of the channel; the historical delivery speed represents the average delivery time, reflecting the timeliness of completing the mass mailing task. Historical delivery parameters can be derived by comprehensively analyzing the mean and fluctuations of the historical delivery rate and historical delivery speed in the time series. For example, candidate channels with stable high delivery rates and low fluctuation speeds will obtain higher historical delivery parameters; while candidate channels with large fluctuations in delivery rates or inconsistent speeds will obtain lower parameter values.

[0047] S13-4. A weighted calculation is performed based on the historical delivery parameters and concurrent congestion parameters of each channel to obtain the dynamic weight of each channel in the mass mailing channel group. The historical delivery parameters and concurrent congestion parameters represent long-term channel quality and immediate channel load, respectively. It can be understood that the weight configuration of the weighted calculation can be flexibly adjusted according to the task type. For example, for verification tasks, there is a greater emphasis on delivery speed and stability; for marketing tasks, there may be more focus on channel cost. The calculated dynamic weight represents the traffic share that each candidate channel should bear in the current mass mailing task.

[0048] At this point, the dynamic weights of each channel in the group messaging channel have been determined based on the above scheme, and we proceed to step S14.

[0049] S14. Configure the aliasing sampling model according to the dynamic weights so that the aliasing sampling model can complete the channel selection with a fixed time complexity, and maintain the selection probability matching the dynamic weights when the number of channels changes.

[0050] Specifically, the alias sampling model adopts a discrete distribution sampling method. By constructing a probability table and an alias table in the preprocessing stage, the arbitrarily complex discrete probability distribution is transformed into a process combining equal probability sampling and a single binomial judgment, thus completing the sampling in O(1) time complexity. Therefore, regardless of the number of elements in the distribution, the time for a single sampling is always fixed and will not increase with the number of elements. Therefore, alias sampling is particularly suitable for high-concurrency scenarios with a large number of SMS channels and frequent changes in dynamic weights. In the embodiments of the present invention, by introducing dynamic weights, the real-time performance and cost control of each international SMS channel are mapped to dynamic weights, and the alias sampling model is configured with the obtained dynamic weights. The alias sampling model will ensure that even if the number of channels changes (added or removed) during the construction process, the selection probability of each channel still matches its corresponding dynamic weight, thereby avoiding the selection imbalance problem caused by fluctuations in the number of channels. Meanwhile, since the complexity of alias sampling is fixed at runtime, it can quickly complete channel selection in high-concurrency SMS mass sending tasks, ensuring that the system will not incur additional computational overhead due to the large number of channels or dynamic changes in weights. Therefore, it can efficiently and accurately select the sending channel corresponding to each receiving number in high-concurrency scenarios of international SMS.

[0051] It should be noted that after configuring the alias sampling model based on dynamic weights, the alias sampling model can allocate channels to each channel in the mass messaging channel group with corresponding probabilities. For example, if there are three sending channels in the mass messaging channel group, denoted as channels a1, a2, and a3, and the channel probabilities determined by the dynamic weights are 0.34, 0.36, and 0.3, the alias sampling model can allocate channels based on this probability distribution, balancing the accurate selection of channels under high concurrency with the maintenance of cooperative relationships with channel providers.

[0052] Please see Figure 3 , Figure 3 This is a flowchart for configuring the alias sampling model. Configuring the alias sampling model includes sub-steps S14-1 to S14-6, which are described in detail below: S14-1, Normalized Weight Calculation. The probability distribution of each channel is calculated based on the dynamic weights and then normalized so that the sum of all probabilities equals 1. For example, if there are channels a1, a2, and a3 with dynamic weights of 2, 3, and 5 respectively, the calculated channel probabilities are b1 = 0.2, b3 = 0.3, and b3 = 0.5. This ensures that the selection probability of each channel in subsequent sampling processes perfectly matches the dynamic weights, while eliminating bias caused by different weight scales.

[0053] S14-2. Initialize the storage structure. Based on the normalized probability, initialize two storage arrays: prob[] and alias[], which are used to store the slot probability value and the spare channel index, respectively. The slot is the corresponding position in the sampling table of the alias sampling model. This sub-step prepares for subsequent fast sampling, so that each channel has a clear slot allocation.

[0054] S14-3. Divide the channels into large and small sets. Compare the scaled probability of all channels with the average probability. If the scaled probability is greater than 1, the channel is placed in the large set; otherwise, it is placed in the small set. For example, for channels a1, a2, and a3, the average probability is 1 / 3 ≈ 0.333. Channel a1 has a probability of 0.2, which is less than the average, so it enters the low-probability queue; channel a2 has a probability of 0.3, so it enters the low-probability queue; and channel a3 has a probability of 0.5, so it enters the high-probability queue. This process divides the channels into two categories, which facilitates the subsequent establishment of a balance between channels with insufficient and excessive probabilities, ensuring a consistent final probability distribution.

[0055] S14-4, Balanced Filling. Take one channel slot from the smaller set and one channel slot from the larger set sequentially. Set the storage array `prob[]` containing the extracted channels to the current scaling probability, and map the remaining portion to the storage array `alias[]` as a spare. For example, channels a1 and a3 form a slot, with channel a1 occupying 0.2 and the remaining 0.133 being filled by channel a3. This gradually offsets the probability differences until the probabilities of all channels are fully allocated, ensuring the sum equals 1.

[0056] S14-5. Optimize channel pairing. When the remaining channels in the set can no longer be paired, set the prob value of these channels to 1 and point the alias to itself, indicating that its probability is entirely borne by itself. This step ensures the integrity of the table structure and prevents unallocated or empty slots.

[0057] S14-6. Constant-time sampling. During the operation phase, a slot is randomly selected during sampling, and a uniform random number is generated and compared with the prob of the slot. If it is less than the prob, the channel is selected directly; otherwise, the channel pointed to by the alias is selected. The entire process only takes O(1) time to complete the channel selection. At the same time, when the number of channels changes or the dynamic weight is updated, the probability is kept consistent with the dynamic weight.

[0058] S15. Send international mass text messages based on the channel selection results of the alias sampling model, and periodically adjust the dynamic weights based on the sending results.

[0059] Specifically, based on the channel selection results of the alias sampling model, the international SMS messages to be sent are allocated to various target channels, and the actual sending operation is completed, thereby ensuring balanced traffic distribution and rapid response under high concurrency conditions. After sending is completed, the actual performance of each channel needs to be evaluated based on indicators such as delivery rate, response latency, and error return codes in the current period. By comparing the dynamic weights of adjacent periods, the weight difference is calculated to correct the dynamic weights, and the selection probability of each channel in the mass sending channel group is reconfigured.

[0060] In high-concurrency scenarios of international bulk SMS messaging, after the alias sampling model selects channels based on dynamic weights, the actual sending and receiving of SMS messages can be affected by network fluctuations, cross-border transmission delays, and changes in target operator policies. After completing the bulk SMS task, the actual performance of the channels (such as delivery rate, response latency, and throughput) is backtested and compared with the dynamic weights in the sampling model. For example, the dynamic weights are periodically adjusted based on the sending results, including: comparing the dynamic weights of the target sending channels selected by the alias sampling model in adjacent sending periods to obtain the weight difference of the target sending channels; recording the actual performance data of the target channels selected by the alias sampling model in each sending period and generating the dynamic weight of that channel in the current period. Then, the difference is calculated with the weight of the previous period to obtain the weight difference. The weight difference characterizes the deviation between prediction and reality. If the deviation is small, it indicates that the channel performance is stable and no correction is needed; if the deviation is large, it indicates that the channel performance has changed and appropriate correction is required.

[0061] When the weight difference exceeds a threshold, a weight adjustment curve for the corresponding transmission channel is generated, and the dynamic weights are periodically adjusted based on this curve. It should be noted that the curvature of the weight adjustment curve can be set based on the experience of technical personnel; specific limitations and details are not provided here, as long as it ensures smooth channel selection adjustments. Through periodic adjustments, the channel weights can be smoothly adjusted, ensuring that the selection probability of the aliasing sampling model remains consistent with the actual channel performance. This avoids over-adjustment caused by short-term anomalies while guaranteeing accurate channel selection over long-term trends.

[0062] Based on the same technical concept as the allocation method, embodiments of the present invention also provide an allocation device for SMS sending channels, applied to high-concurrency processing of international bulk SMS messaging. Please refer to... Figure 4 , Figure 4This is a schematic diagram of the distribution device, which includes an acquisition module 1, a filtering module 2, a determination module 3, a configuration module 4, and a sending module 5.

[0063] Module 1 is used to parse all the receiving numbers for international bulk SMS messages in order to obtain a set of candidate channels.

[0064] The filtering module 2 is used to filter out the bulk messaging channel group from the candidate channel set based on the cross-border complexity, channel cost index and international bulk SMS task attributes of each channel in the candidate channel set.

[0065] The determination module 3 is used to determine the dynamic weight of each channel in the group based on the historical delivery data of each channel in the group and the real-time predicted concurrent congestion parameters.

[0066] Configuration module 4 is used to configure the alias sampling model according to the dynamic weights, so that the alias sampling model can complete the channel selection with a fixed time complexity, and maintain the selection probability matching the dynamic weights when the number of channels changes.

[0067] The sending module 5 is used to send international mass text messages based on the channel selection results of the alias sampling model, and periodically adjust the dynamic weights based on the sending results.

[0068] Based on the same technical concept as the allocation method, embodiments of the present invention also provide an electronic device, including a processor and a memory, the memory being coupled to the processor, the memory storing instructions, which, when executed by the processor, cause the electronic device to perform the steps of any of the allocation methods.

[0069] Based on the same technical concept as the allocation method, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the allocation methods.

[0070] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0071] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A method of allocating a short message transmission path, characterized by, The method for high-concurrency processing of international bulk SMS messaging includes: Analyze all receiving numbers for international bulk SMS messages to obtain a set of candidate channels; Based on the cross-border complexity, channel cost index, and task attributes of each channel in the candidate channel set, a group of mass texting channels is selected from the candidate channel set. Based on the historical delivery data of each channel in the mass messaging channel group and the real-time predicted concurrent congestion parameters, the dynamic weight of each channel in the mass messaging channel group is determined. The alias sampling model is configured according to the dynamic weights, so that the alias sampling model can complete the channel selection with a fixed time complexity, and maintain the selection probability matching the dynamic weights when the number of channels changes. The international mass text messages are sent based on the channel selection results of the alias sampling model, and the dynamic weights are periodically adjusted based on the sending results.

2. The method of claim 1, wherein, The process involves parsing all receiving numbers for international bulk SMS messages to obtain a set of candidate channels, including: Multiple non-overlapping numerical intervals are constructed based on the node information represented by the Trie tree. Each numerical interval corresponds to at least one candidate channel in the channel pool. The node information includes country code, international prefix code, mobile country code, and mobile network code. Based on the node information, all received numbers are parsed in parallel with their prefixes, and each received number after parallel parsing is assigned to a candidate channel in the corresponding numerical range according to the parsing result. The set of candidate channels divided by receiving numbers is defined as the candidate channel set.

3. The method of claim 1, wherein, Before filtering out the mass-sending channel group from the candidate channel set, the method further includes: The channel load index of each candidate channel is obtained by combining the routing level and peak load index of each channel in the candidate channel set. The routing complexity of each candidate channel is obtained by using the channel load index and the envelope index, which represents the range of communication protocol adaptation, respectively. The cross-border complexity of each channel is obtained based on its routing complexity and configured operational compliance index.

4. The method of claim 1, wherein, The step of selecting a bulk messaging channel group from the candidate channel set based on the cross-border complexity, channel cost index, and task attributes of each channel in the candidate channel set includes: Based on the task attributes, the cross-border complexity or the channel cost indicator is determined as the priority screening parameter, wherein the task attributes include verification attributes, notification attributes, and marketing attributes; The candidate channels in the candidate channel set are sorted sequentially according to the priority screening parameters, and sliding grouping is performed based on the sorting results. All candidate channels in each group meet the bandwidth of the international bulk SMS sending channel. For each sliding group, the variance and mean of another indicator data are calculated, and the sliding group corresponding to the minimum variance is determined when the data mean is within a preset lower limit range, and is then identified as the group of mass communication channels.

5. The method of claim 1, wherein, The historical delivery data includes historical delivery rate and historical delivery speed; determining the dynamic weight of each channel in the mass messaging channel group based on the historical delivery data of each channel and the real-time predicted concurrent congestion parameters includes: Based on the load time series data of each channel in the group of mass communication channels during historical periods, predict the future carrying capacity of the corresponding channel; Based on the future carrying capacity of each channel and the number of SMS requests in transit, obtain the concurrent congestion parameters for the corresponding channel; Based on the historical delivery rate and historical delivery speed of each channel in the time series, and their respective values ​​and fluctuation amplitudes, historical delivery parameters characterizing the delivery quality of the corresponding channel in historical mass mailing tasks are obtained. The dynamic weight of each channel in the group of mass-sending channels is obtained by weighting the historical delivery parameters and concurrent congestion parameters of each channel.

6. The method of claim 5, wherein, The load time-series data includes SMS submission rate, average response latency, and successful response code ratio; the prediction of the future carrying capacity of the corresponding channel based on the load time-series data of each channel in the bulk messaging channel group over historical periods includes: The SMS submission rate, average response latency, and successful response code ratio are smoothed and feature extracted using time windows of different lengths to obtain the stable carrying capacity of the corresponding channel. The stable carrying capacity is the channel carrying capacity corresponding to the following conditions: when the increase in SMS submission rate is greater than the first threshold, the increase in average response latency is less than the second threshold, and the decrease in successful response code ratio is less than the third threshold. Based on the stable carrying capacity of each channel and the preset confidence coefficient, the future carrying capacity of the corresponding channel is obtained.

7. The method for allocating SMS sending channels according to claim 1, characterized in that, The dynamic weight is adjusted based on the periodicity of the transmission results, including: The dynamic weights of the target transmission channels selected by the alias sampling model in adjacent transmission cycles are compared to obtain the weight difference of the target transmission channels. When the weight difference is greater than the difference threshold, a weight adjustment curve for the corresponding transmission channel is generated, and the dynamic weight is periodically corrected according to the weight adjustment curve.

8. A device for allocating SMS sending channels, characterized in that, The device, used for high-concurrency processing of international bulk SMS messaging, includes: The acquisition module is used to parse all the receiving numbers for international bulk SMS messages in order to obtain a set of candidate channels; The filtering module is used to filter out the bulk messaging channel group from the candidate channel set based on the cross-border complexity, channel cost index and task attributes of each channel in the candidate channel set. The determination module is used to determine the dynamic weight of each channel in the group of mass messaging channels based on the historical delivery data of each channel and the real-time predicted concurrent congestion parameters. The configuration module is used to configure the alias sampling model according to the dynamic weights, so that the alias sampling model can complete the channel selection with a fixed time complexity, and maintain the selection probability matching the dynamic weights when the number of channels changes. The sending module is used to send the international mass text messages according to the channel selection results of the alias sampling model, and periodically adjust the dynamic weights based on the sending results.

9. An electronic device, characterized in that, The device includes a processor and a memory, the memory being coupled to the processor, the memory storing instructions that, when executed by the processor, cause the electronic device to perform the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.