Multi-channel SMS gateway intelligent distribution control system and method

By generating standardized state semantic vectors through the state acquisition module and semantic parsing module, and combining them with the matching decision module to execute control actions, the problem of heterogeneous and ambiguous status codes in multi-channel SMS gateway systems has been solved. This has enabled automatic blocking of invalid numbers and rapid isolation of faulty channels, thereby improving SMS delivery rate and system stability.

CN122054089BActive Publication Date: 2026-06-30SIMBA NETWORK TECH (NANJING) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SIMBA NETWORK TECH (NANJING) CO LTD
Filing Date
2026-04-17
Publication Date
2026-06-30

Smart Images

  • Figure CN122054089B_ABST
    Figure CN122054089B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of gateway management, and particularly relates to an intelligent distribution management system and method for multi-channel SMS gateways. It includes a status acquisition module, a semantic parsing module, and a matching decision module. The status acquisition module receives receipt messages from M heterogeneous SMS gateways, locates the original status code field, and extracts key symbol strings containing return code values. The semantic parsing module, based on a gateway-corresponding mapping rule base, determines the logical distance between the return code value and the auxiliary symbol string, generating a standardized status semantic vector. The matching decision module matches the vector with a standard semantic template library and executes corresponding management actions based on the actual sending result type. This invention achieves unified parsing of heterogeneous gateway status codes, eliminating the need for hard-coding adaptation to new gateways, accurately triggering end-to-end management, and improving SMS delivery rate and system stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gateway management, and particularly relates to a multi-channel SMS gateway intelligent distribution management system and method. Background Technology

[0002] In existing multi-channel SMS gateway integration solutions, the SMS sending process typically involves a series of execution steps, including channel selection, request encapsulation, gateway submission, status code reception, result parsing, and database entry. These steps together constitute a complete SMS delivery and tracking sequence. The effectiveness of the scheduling and data parsing of this sequence directly affects the accurate assessment of SMS reach and the stability of system operation. Currently, this type of process is usually implemented using hard-coding, with the integration logic and status code processing mechanism of each gateway highly coupled to the core business module. Due to the lack of a unified standard for the status codes returned by different gateways, their meanings exhibit significant heterogeneity, ambiguity, and vagueness. The system often needs to write separate status parsing code for each type of gateway, resulting in scattered parsing logic, redundant development, and difficulty in unified management. This is particularly true for gateways from different operators, third-party service providers, and regions. Especially when it is necessary to distinguish between subdivided states such as "gateway rejection," "operator rate limiting," "user blacklist," and "terminal interception," as well as complex scenarios such as identifying "false success," existing methods lack standardized status semantic abstraction and dynamic parsing capabilities, making it impossible to flexibly adapt to new gateways or adjust status mapping rules through configuration. Furthermore, with the increasing number of access gateways and frequent changes in operator policies, the meaning of status codes often needs to be dynamically updated. Hard-coded parsing methods struggle to adapt to these changes without code modification and redeployment, leading to high maintenance costs, slow response times, and the potential for new errors to be introduced through modifications. Simultaneously, the lack of a unified, standardized status code abstraction layer and a full-link status tracing mechanism makes it difficult to monitor the actual execution results of each stage in real time when multiple channels send messages in parallel. This hinders fault location, and the intelligent distribution model's training and decision-making based on distorted status data results in incorrect channel quality assessments and failed distribution decisions. Therefore, achieving unified parsing, semantic mapping, and configurable management of heterogeneous gateway status codes through standardization, and building a reliable full-link tracing and intelligent distribution mechanism on this basis, has become a key issue for improving SMS reach and ensuring system stability. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention proposes a multi-channel SMS gateway intelligent distribution and control system and method, including a status acquisition module, a semantic parsing module, and a matching decision module. The status acquisition module receives receipt messages from M heterogeneous SMS gateways, locates the original status code field, and extracts key symbol strings containing return code values. The semantic parsing module, based on a gateway-corresponding mapping rule base, determines the logical distance between the return code value and the auxiliary symbol string, generating a standardized status semantic vector. The matching decision module matches the vector with a standard semantic template library and executes corresponding control actions based on the actual sending result type. This invention achieves unified parsing of heterogeneous gateway status codes, eliminating the need for hard-coding adaptation to new gateways, accurately triggering end-to-end control, and improving SMS delivery rate and system stability.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] A multi-channel SMS gateway intelligent distribution management system, including:

[0006] The status acquisition module receives receipt messages from M heterogeneous SMS gateways. The receipt messages carry original status codes and gateway identifiers. The module identifies the field positions of the original status codes in the receipt messages and extracts key symbol strings corresponding to the field positions. The key symbol strings contain return code values.

[0007] The semantic parsing module is used to obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of the adjacent field based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance.

[0008] The matching decision module is used to match the standardized state semantic vector with a preset standard semantic template library, and execute the corresponding control action according to the actual sending result type obtained from the matching.

[0009] Specifically, the logical distance is used to characterize the semantic level correlation between the return code value and the auxiliary symbol string, which includes the sub-status code returned by the gateway, the operator code, and the interception identifier field; the standardized state semantic vector consists of a header identifier defining the state semantic category and a list of logical distances following the header, which includes gateway rejection, operator rate limiting, user blacklist, terminal interception, and pseudo-success; the standard semantic template library pre-stores standardized semantic templates corresponding to various types of real sending results.

[0010] Specifically, the control measures include:

[0011] When the matching result is a user blacklist or terminal interception type, the corresponding user identifier will be synchronized to the global blacklist database to block invalid delivery within a preset time period in the future;

[0012] When the matching result is a gateway rejection or operator traffic restriction, the real-time availability status of the corresponding SMS gateway channel will be marked as abnormal, and the traffic circuit breaker and automatic switching mechanism will be triggered.

[0013] When the matching result is a pseudo-success, the quality score of the corresponding SMS gateway channel is deducted, and the corresponding data is recorded in the training dataset of the intelligent distribution model.

[0014] Specifically, identifying the position of the original status code in a preset field within the gateway receipt message includes:

[0015] The corresponding structure description file is retrieved based on the gateway identifier. The structure description file predefines the format type, field naming rules, and candidate location path set for the status code field of the gateway's receipt message.

[0016] The received receipt message is matched with the structure description file to identify the format type of the receipt message and parse the message body structure.

[0017] In the message body structure, the candidate location path set is traversed level by level to locate the field position of the original status code in the message body structure. The field position includes one or more of the following: the level of the field, the field name, and the index offset of the field in the array structure.

[0018] Based on the field location obtained from the positioning, the corresponding original data fragment is extracted. The original data fragment is then cleaned and encoded to extract the key symbol string.

[0019] Specifically, the message body structure is traversed level by level according to the candidate location path set, including:

[0020] Obtain the message body structure and the candidate location path set. The candidate location path set contains one or more candidate location paths sorted by priority. Each candidate location path consists of path nodes arranged in sequence. The path nodes include node type identifiers for distinguishing node types and node matching conditions for matching nodes. The node types include object nodes, array nodes, and field nodes. The node matching conditions include one or more of node names, array indices, and field names.

[0021] According to the priority order of each candidate positioning path, the current candidate positioning path is matched with the message body structure level by level: starting from the first path node of the current candidate positioning path, the matching and positioning are performed at the corresponding level of the message body structure according to the node type identifier and node matching conditions. After successful positioning, the next level path node is entered, and the matching continues within the range of already positioned nodes until all path nodes of the current candidate positioning path are successfully positioned. The final positioned node position is determined as the field position of the original status code.

[0022] If any node in the current candidate location path fails to match the location, switch to the next candidate location path and re-execute the step-by-step matching until the location is successful or all candidate location paths fail to match.

[0023] When all candidate location paths fail to match, an error alarm is triggered and a "not located" flag is output.

[0024] Specifically, determining the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base includes:

[0025] Based on the status code mapping rule base corresponding to the gateway identifier, extract the predefined whitelist of valid auxiliary fields, the field hierarchy weight table, and the binding verification rules; wherein, the whitelist of valid auxiliary fields is a set of auxiliary field names that can be used to determine logical distance under the corresponding gateway, the field hierarchy weight table predefines the weight values ​​of auxiliary fields relative to different levels of the node where the return code is located, and the binding verification rules predefine a unique binding identifier field between the auxiliary symbol string and the return code value;

[0026] The node containing the return code value is identified as the core node. Centered on the core node, all fields are traversed within a preset adjacent level range. Only the field values ​​corresponding to fields whose names belong to the whitelist of valid auxiliary fields are identified as valid auxiliary symbol strings. If no valid auxiliary symbol string is found after traversal, a default logical distance value of 0 is directly generated to complete this logical distance determination.

[0027] Specifically, determining the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base further includes:

[0028] For each valid auxiliary symbol string, obtain the level difference between the node containing its corresponding field and the core node, match the weight value of the corresponding level according to the field level weight table, and calculate the initial logical distance between the valid auxiliary symbol string and the return code value based on the level difference and the weight value. The formula for calculating the initial logical distance is: Initial logical distance = level difference × (1 - weight value).

[0029] According to the binding verification rules, the binding relationship between the valid auxiliary symbol string and the return code value is verified: the unique binding identifier value of the node where the field corresponding to the valid auxiliary symbol string is located, and the unique binding identifier value of the core node are extracted, and it is determined whether the two identifier values ​​are consistent; if they are consistent, the initial logical distance of the valid auxiliary symbol string is determined as the final logical distance; if they are inconsistent, the valid auxiliary symbol string is removed and not included in the logical distance calculation.

[0030] Summarize the final logical distances corresponding to all valid auxiliary symbol strings that pass the binding verification to form a logical distance list.

[0031] Specifically, generating a standardized state semantic vector includes:

[0032] Based on the status code mapping rule base corresponding to the gateway identifier, a predefined semantic category mapping table, fixed vector dimension parameters, vector padding values, vector truncation rules, and rule base version identifier are extracted. The semantic category mapping table predefines a one-to-one correspondence between return code values ​​and predefined semantic categories. The fixed vector dimension parameters are positive integers greater than or equal to 2, consisting of a header identifier dimension and a logical distance dimension, with the header identifier dimension fixed at 1. The vector padding values ​​are predefined fixed values. The vector truncation rule retains elements at the logical distance dimension before the ordered logical distance list when the length of the ordered logical distance list is greater than the logical distance dimension.

[0033] Based on the return code value, the corresponding predefined semantic category is obtained from the semantic category mapping table, and the predefined semantic category is converted into a predefined numerical header identifier; wherein, the predefined numerical header identifier is: gateway rejection class = 1, operator rate limiting class = 2, user blacklist class = 3, terminal interception class = 4, pseudo success class = 5.

[0034] Based on the logical distance dimension in the fixed vector dimension parameter, perform padding or truncation operations on the ordered logical distance list: if the list length is less than the logical distance dimension, add vector padding values ​​to the end of the list until the list length is equal to the logical distance dimension; if the list length is greater than the logical distance dimension, retain the elements up to the logical distance dimension according to the vector truncation rules.

[0035] Specifically, generating standardized state semantic vectors also includes:

[0036] The numerical header identifier is used as the first element, and the processed logical distance sub-vector is concatenated to generate the initial standardized state semantic vector.

[0037] The validity of the initial standardized state semantic vector is validated, specifically as follows:

[0038] Verify whether the first element belongs to a predefined set of numeric header identifiers;

[0039] Check whether all elements in the logical distance subvector are within a predefined reasonable value range, which is greater than or equal to -1 and less than or equal to 10.

[0040] If both checks pass, the initial standardized state semantic vector is determined as the final standardized state semantic vector, and the rule base version identifier is bound to it.

[0041] If any check fails, a vector generation anomaly alarm is triggered, and the return code value, ordered logical distance list, corresponding gateway identifier, and rule base version identifier are stored in the self-learning dataset.

[0042] A multi-channel SMS gateway intelligent distribution management method includes:

[0043] Receive raw status codes from M heterogeneous SMS gateways, identify the preset field positions of the raw status codes in the gateway receipt messages, and extract the key symbol strings corresponding to the preset field positions;

[0044] Obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of the adjacent field based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance.

[0045] The standardized state semantic vector is matched with a preset standard semantic template library, and the corresponding control action is executed according to the actual sending result type obtained from the match.

[0046] Compared with the prior art, the beneficial effects of the present invention are:

[0047] This invention solves the problem of inconsistent response formats among heterogeneous gateways by using a status code location and extraction scheme based on gateway identifier retrieval structure description files. This achieves hard-coded adaptation without requiring the development of separate parsing logic for new gateways, significantly reducing system maintenance costs and iteration cycles. Through logical distance determination of return codes and auxiliary symbol strings, and the design of standardized status semantic vector generation, it addresses the industry pain point of heterogeneous and ambiguous status code semantics among different gateways, enabling accurate classification of SMS sending results and avoiding channel quality assessment distortion caused by false successes and misjudgments of interception types. Combined with hierarchical management and control measures, it achieves a closed-loop end-to-end system with automatic blocking of invalid numbers, millisecond-level circuit breaker switching for faulty channels, and self-iterative intelligent distribution models. This effectively reduces invalid sending, improves the stability and delivery rate of high-priority SMS messages, and continuously adapts to changes in gateway rules through a self-learning mechanism, ensuring the long-term reliability of the system. Attached Figure Description

[0048] Figure 1This is a flowchart of the multi-channel SMS gateway intelligent distribution and management system of the present invention;

[0049] Figure 2 This is a flowchart illustrating the process of identifying the location of the original status code in the gateway receipt message according to the present invention.

[0050] Figure 3 This is a flowchart of the intelligent distribution and management method for multi-channel SMS gateways according to the present invention. Detailed Implementation

[0051] Example 1

[0052] Please see Figure 1 One embodiment of the present invention provides a multi-channel SMS gateway intelligent distribution and management system, comprising:

[0053] The status acquisition module receives receipt messages from M heterogeneous SMS gateways. Each receipt message carries an original status code and a gateway identifier. The module identifies the field position of the original status code in the receipt message and extracts a key symbol string corresponding to that field position. This key symbol string contains the return code value. In this embodiment, "M" represents the total number of heterogeneous SMS gateways, and its value is a positive integer greater than or equal to 1. The specific value is dynamically determined based on the number of SMS gateways accessed in the actual business scenario, without requiring hard-coding modifications to the core parsing logic. The system supports flexible expansion of M through a configuration-based management approach. When a new gateway is added, only the corresponding structure description file and status code mapping rule base need to be supplemented to seamlessly integrate it into the multi-channel intelligent distribution management system, demonstrating the high adaptability and scalability of this invention for heterogeneous gateways.

[0054] The semantic parsing module is used to obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance. The logical distance is used to characterize the semantic correlation between the return code value and the auxiliary symbol string. The auxiliary symbol string includes, but is not limited to, the sub-status code returned by the gateway, the operator code, and the interception identifier field. The standardized status semantic vector consists of a header identifier defining the status semantic category and a list of logical distances following the header. The semantic categories include gateway rejection, operator rate limiting, user blacklist, terminal interception, and pseudo-success. The standard semantic template library pre-stores standardized semantic templates corresponding to various real sending results. It should be further noted that the status code mapping rule base in this embodiment is constructed as follows: for each gateway identifier, a structured configuration file is pre-defined, which includes a whitelist of effective auxiliary fields, a field hierarchy weight table, binding verification rules, a semantic category mapping table, fixed vector dimension parameters, vector padding values, vector truncation rules, and a rule base version identifier. The effective auxiliary field whitelist limits the set of auxiliary field names that can participate in logical distance determination under the corresponding gateway. The field hierarchy weight table defines the weight values ​​of different level nodes relative to the core node where the return code is located. The binding verification rule specifies the identifier field used to uniquely bind the auxiliary symbol string and the return code value. The semantic category mapping table establishes a one-to-one correspondence between the return code value and predefined semantic categories such as gateway rejection, operator rate limiting, user blacklist, terminal interception, and pseudo-success. The fixed vector dimension parameter consists of the header identifier dimension and the logical distance dimension. The vector padding value and vector truncation rule are used to standardize the dimension alignment of the state semantic vector. The state code mapping rule library is obtained by the semantic parsing module dynamically retrieving the state code mapping rule library corresponding to the gateway identifier from the preset rule library storage center based on the gateway identifier carried in the received receipt message, and completing the determination of the logical distance between the return code value and the auxiliary symbol string and the generation of the standardized state semantic vector based on the rule library. At the same time, the state code mapping rule library supports version iteration updates after manual review through self-learning datasets to achieve flexible adaptation to new gateways or changes in existing gateway rules.

[0055] The matching decision module is used to match the standardized state semantic vector with a preset standard semantic template library, and execute corresponding control actions based on the actual sending result type obtained from the matching, specifically including:

[0056] For example, in this embodiment, the matching decision module receives the standardized state semantic vector [3, 0, 0.2, 1.0] output by the semantic parsing module, matches it with the standard semantic template library corresponding to the gateway identifier "ALIYUN_SMS_GATEWAY_V2", and obtains that the actual sending result type is user blacklist class, and then executes the corresponding user's blacklist synchronization control action.

[0057] When the matching result is a user blacklist or terminal interception type, the corresponding user identifier is synchronized to the global blacklist database to block invalid SMS messages within a preset time period. In this embodiment of the invention, the preset time period is a fixed duration parameter, such as 7 days, predefined by the system administrator in the configuration file of the global blacklist database, and can be adjusted differently according to business type or user level through the configuration management interface. This duration parameter is independent of the gateway identifier and status code mapping rule library and is stored in the form of a system-predefined global constant. It can be dynamically changed without modifying the core control logic, thereby realizing flexible blocking control of invalid SMS messages. For example, if the matching result is a user blacklist type and the corresponding user identifier is mobile phone number 138XXXX1234, and the system predefined blocking time period is 7 days, the system will automatically synchronize the mobile phone number to the global blacklist database. Within the next 7 days, all SMS message sending tasks pointing to this mobile phone number will be directly blocked by the system to avoid invalid SMS messages occupying channel resources.

[0058] When the matching result is a gateway rejection or carrier rate limiting type, the real-time availability status of the corresponding SMS gateway channel is marked as abnormal, and the traffic circuit breaker and automatic switching mechanism is triggered, specifically including:

[0059] Step 1: Trigger condition determination. When any of the following preset trigger conditions are met, the flow circuit breaker and automatic switching mechanism will be activated:

[0060] Condition 1: The matching result output by the matching decision module is either gateway rejection or operator rate limiting.

[0061] Condition 2: The quality score of the corresponding SMS gateway channel remains below a preset quality score threshold for N consecutive preset time windows; where N is a positive integer greater than or equal to 2. In this embodiment, the preset time window, preset quality score threshold, and number of consecutive windows N are all fixed parameters predefined by the system. Their specific values ​​can be statically configured or dynamically adjusted according to the channel quality sensitivity and circuit breaker response requirements of the actual business scenario. As an example and not a limitation, the system can predefine N=3, the preset time window as 5 minutes, and the preset quality score threshold as 80 points. When the matching result output by the matching decision module belongs to the operator... When rate limiting is applied, if condition 1 of the preset trigger conditions is met, the system will immediately activate the traffic circuit breaker and automatic switching mechanism. Furthermore, even if no matching result for rate limiting from the operator is received, if the quality score of a certain SMS gateway channel (e.g., Alibaba Cloud SMS Gateway V2 Channel 1) is 75, 72, and 70 points respectively in three consecutive preset time windows (each window lasting 5 minutes), and all of them are continuously lower than the preset quality score threshold of 80 points, then condition 2 of the preset trigger conditions will also be met, and the system will also trigger the traffic circuit breaker and automatic switching mechanism. This will enable redundant judgment and rapid isolation of channel anomalies, ensuring the stability of the entire distribution chain.

[0062] Step 2: Fault isolation processing. The real-time availability status of the SMS gateway channel corresponding to the triggering condition is marked as abnormal or circuit breaker status. The channel is dynamically removed from the current set of optimal available channels and new SMS delivery tasks are prohibited from being assigned to the channel. For example, the system marks the real-time availability status of Alibaba Cloud SMS Gateway V2 channel 1 as circuit breaker status and dynamically removes it from the current set of optimal channel candidates containing 4 available channels. All subsequent new SMS delivery tasks will not be assigned to this channel.

[0063] Step 3: Channel reassessment and task reassignment. The system's built-in distribution controller reassesses the real-time quality scores of the remaining available channels. These real-time quality scores are calculated by integrating three predefined dimensions: SMS delivery rate, delivery latency, and cost weight. SMS tasks originally planned for distribution to channels in abnormal or circuit-broken states are automatically reassigned to one or more healthy alternative channels according to a predefined optimal matching strategy. The specific configuration of one or more healthy alternative channels in this embodiment can be determined by those skilled in the art based on the actual scenario.

[0064] For example, the remaining available channels are Alibaba Cloud Channel 2, Tencent Cloud Channel 1, and Huawei Cloud Channel 1. The distribution controller recalculates the real-time quality scores of the three channels, which are 92, 88, and 85 respectively. The 2,000 verification code SMS tasks originally planned to be assigned to Alibaba Cloud Channel 1 are automatically and fully reassigned to Alibaba Cloud Channel 2, which has the highest real-time quality score, for delivery, according to the optimal matching strategy of "high-priority business is matched with the channel with the highest arrival rate".

[0065] Step 4: Update the distribution model. Synchronously update the channel weight parameters of the system's built-in intelligent distribution model, and reset the weight of channels in abnormal or circuit breaker states to 0 to ensure that subsequent SMS traffic will no longer be allocated to that channel. For example, the original weight of Alibaba Cloud channel 1 in the intelligent distribution model was 0.35. The system synchronously resets the weight of this channel to 0, and at the same time, redistributes the weights of the remaining three healthy channels proportionally to ensure that subsequent SMS traffic will no longer enter the circuit breaker channel. In this embodiment of the invention, the intelligent distribution model is used to dynamically evaluate the quality of channels of a multi-channel SMS gateway and make optimal distribution decisions. Its core function is to automatically select the optimal channel for each SMS message to be sent based on parameters such as historical sending results, real-time quality scores, and cost weights, thereby improving the overall SMS delivery rate and system stability. Specifically, in this embodiment, the intelligent distribution model uses a gradient boosting decision tree algorithm as a supervised learning framework. This supervised learning framework constructs multiple decision trees using ensemble learning, optimizing the prediction accuracy of the channel quality score by fitting the residuals of the previous tree round by round. The model's input feature vector consists of the header identifier and logical distance sub-vector from the standardized state semantic vector, the gateway identifier, the SMS service type, the sending timestamp, and... The model's historical quality score is used to output the expected quality score and corresponding preference probability of the target channel in the next time window. The training process includes: using pseudo-success events recorded by the matching decision module and their standardized state semantic vectors, channel identifiers, SMS service types, and delivery times as negative samples, and normal delivery events as positive samples, to construct a weighted training dataset; using a logarithmic loss function as the optimization objective, setting the maximum tree depth to 5 to 8, the learning rate to 0.05 to 0.1, and the subsampling ratio to 0.8, and determining the optimal number of iteration rounds through five-fold cross-validation, so that the model can effectively identify pseudo-success feature patterns, automatically reduce the quality score and distribution weight of inferior channels, thereby achieving adaptive reinforcement learning and continuous iterative optimization of the intelligent distribution strategy.

[0066] Step 5: Process Timeliness Control. The entire process from Steps 1 to 4 above requires no manual intervention, and the total execution time is controlled within a predefined time threshold, completing fault isolation and traffic rebalancing. For example, the system's predefined millisecond-level time threshold is 100 milliseconds. In this case, the total execution time from trigger condition determination to completion of traffic rebalancing was 42 milliseconds, with no manual intervention throughout, achieving rapid fault isolation and seamless traffic switching. In this embodiment of the invention, the predefined millisecond-level time threshold is used to constrain the total execution time of the entire process from trigger condition determination to completion of fault isolation and traffic rebalancing. Its value is pre-statically configured by the system administrator based on the business's sensitivity to SMS delivery delay and the average acknowledgment processing delay of each heterogeneous gateway. As an example and not a limitation, it can be set to 100 milliseconds. This threshold is uniformly managed through the system's built-in configuration center and supports differentiated adjustments based on gateway channel level or business priority to ensure that fault switching of high-priority SMS channels can be completed within the user-perceptible delay range, thereby ensuring the real-time performance of end-to-end control and the stability of system operation.

[0067] When the matching result is a pseudo-success event, the quality score of the corresponding SMS gateway channel is deducted, and the corresponding data is recorded in the training dataset of the intelligent distribution model. For example, in this embodiment of the invention, the rule for deducting the quality score is as follows: for each SMS gateway channel, an initial quality score and a fixed deduction value corresponding to a pseudo-success event are preset. When the matching result output by the matching decision module is a pseudo-success event, the system subtracts the fixed deduction value from the current channel's real-time quality score to obtain an updated quality score. The updated quality score is then used for the quality evaluation of subsequent channels and the weights of the intelligent distribution model. Update: As an example and not a limitation, the fixed deduction value can be preset to 5 points. If the current quality score of the channel is 90 points, it will be deducted to 85 points after a pseudo-success event is triggered. At the same time, the quality score deduction rule further includes a minimum quality score threshold. When the quality score after deduction is lower than the minimum threshold, the system will mark the corresponding channel as a poor channel and reduce its distribution priority until the channel does not trigger a pseudo-success event again within a subsequent preset time window and the normal delivery rate recovers to above the preset threshold. Then, its quality score will be gradually restored with a preset bonus step size, thereby forming a closed-loop dynamic channel quality control mechanism.

[0068] Further explanation is needed; please refer to [link / reference]. Figure 2 This embodiment identifies the location of the original status code in a preset field within the gateway receipt message, including:

[0069] A1. Retrieve the corresponding structure description file based on the gateway identifier. The structure description file predefines the format type, field naming rules, and candidate location path set for the status code field of the gateway's receipt message.

[0070] A2. Match the received receipt message with the structure description file, identify the format type of the receipt message, and parse the message body structure.

[0071] A3. In the message body structure, the original status code is located in the field position of the message body structure by traversing the candidate location path set level by level. The field position includes one or more of the following: the level of the field, the field name, and the index offset of the field in the array structure.

[0072] It should be further explained that in this embodiment, the message body structure is traversed level by level according to the candidate location path set, including:

[0073] A301. Obtain the message body structure and the candidate location path set. The candidate location path set contains one or more candidate location paths sorted by priority. Each candidate location path consists of path nodes arranged in sequence. The path nodes include node type identifiers for distinguishing node types and node matching conditions for matching nodes. The node types include object nodes, array nodes, and field nodes. The node matching conditions include one or more of node name, array index, and field name. For example, for a receipt message from a certain SMS gateway, the parsed message body structure is a nested object in JSON format. The obtained candidate location path set contains three candidate location paths sorted by priority. The path nodes of each path correspond to a root node, a receipt result object node, and a status code field node, respectively. The node type identifiers are object node, object node, and field node, respectively. The node matching conditions are node name "root", node name "SmsSendDetailDTOs", and field name "ErrCode", respectively.

[0074] It should be further noted that, before traversing the candidate location path set level by level in the message body structure, this embodiment also includes a step for dynamically adjusting the priority of the candidate location paths, specifically including:

[0075] A3011. Retrieve the corresponding structure description file based on the gateway identifier, and extract the initial candidate location path set and the predefined adaptation rules for each candidate location path from the structure description file; wherein, the initial candidate location path set includes the path ID, path node sequence, and initial priority value for each path; the predefined adaptation rules include an applicable service type list, an applicable gateway version range, and an applicable operator code list, wherein the enumeration values ​​of the applicable service type list are limited to three categories: verification code, marketing, and notification, the applicable gateway version range consists of the minimum version number and the maximum version number, and the applicable operator code list contains a predefined three-digit string; For example, the gateway identifier is “ALIYUN_SMS_GATEWAY_V2”. The corresponding structure description file is retrieved, and the initial candidate location path set extracted contains 4 paths, corresponding to path IDs ALI_PATH_001 to ALI_PATH_004 respectively. The initial priority values ​​of each path are 100, 80, 60 and 40 respectively. Among them, the predefined adaptation rules of ALI_PATH_001 are: applicable service type list ["verification code"], applicable gateway version range ["v2.0.0", "v2.9.9"], and applicable operator code list ["100", "200", "300"].

[0076] A3012. Extract three scenario feature variables from the received receipt message: service type identifier, gateway version number, and operator code, ensuring that the format of the scenario feature variables is consistent with the format of the predefined adaptation rule; for example, from a received SMS gateway receipt message from a certain operator, extract the service type identifier as "verification code", the gateway version number as "v2.1.3", and the operator code as "100", and the format of the three variables is completely consistent with the predefined format in the structure description file.

[0077] A3013. For each candidate positioning path in the initial candidate positioning path set, perform the following three judgments in sequence, and retain only the candidate positioning paths that simultaneously meet all three judgment conditions to form a set of candidate positioning paths to be adjusted:

[0078] Judgment condition 1: Whether the current business type identifier is in the list of applicable business types for the candidate positioning path;

[0079] Judgment condition 2: Whether the current gateway version number is greater than or equal to the minimum applicable version number of the candidate location path, and less than or equal to the maximum applicable version number of the candidate location path;

[0080] Judgment condition 3: Whether the current carrier code is in the list of applicable carrier codes for the candidate location path;

[0081] For example, for the initial candidate path ALI_PATH_001, the current service type identifier "verification code" is in its applicable service type list, the current gateway version number "v2.1.3" is within its applicable version range [v2.0.0, v2.9.9], and the current operator code "100" is in its applicable operator code list. All three judgment conditions are met, and the path is retained in the set of candidate positioning paths to be adjusted. However, the applicable service type list of the initial candidate path ALI_PATH_002 is ["marketing"], which does not meet the first judgment condition, and is therefore removed.

[0082] A3014. Retrieve historical matching data from the system's built-in historical matching record library that meets the following conditions: the gateway identifier is consistent with the current gateway identifier, the service type identifier is consistent with the current service type identifier, and the candidate location path ID belongs to the path ID of the candidate location path set to be adjusted; wherein, the storage fields of the historical matching record library include gateway identifier, candidate location path ID, service type identifier, number of successful matches, total number of matches, average matching time, and timestamp of the most recent successful match, and the unit of the average matching time is milliseconds;

[0083] If a candidate location path to be adjusted has no corresponding historical matching data, then default historical matching data will be generated for it: the number of successful matches is 0, the total number of matches is 0, the average matching time is 1000 milliseconds, and the timestamp of the most recent successful match is the current timestamp minus the number of seconds corresponding to 30 days.

[0084] For example, historical data with gateway identifier "ALIYUN_SMS_GATEWAY_V2", service type identifier "verification code", and path ID belonging to the set to be adjusted is retrieved from the historical matching record database. The historical data of ALI_PATH_001 is as follows: 1286 successful matches, 1300 total matches, 12 milliseconds average matching time, and the timestamp of the most recent successful match is the number of seconds corresponding to 2 hours before the current timestamp. For ALI_PATH_004, which has no historical data, default historical matching data is generated: 0 successful matches, 0 total matches, 1000 milliseconds average matching time, and the timestamp of the most recent successful match is the number of seconds corresponding to the current timestamp minus 30 days.

[0085] A3015. For each candidate location path to be adjusted, calculate a comprehensive score based on its historical matching data. The formula for calculating the comprehensive score is as follows:

[0086] Overall score = Match success rate × First weight - Average match time × Second weight + Recent success time decay coefficient × Third weight;

[0087] The matching success rate is calculated as the number of successful matches divided by the total number of matches. If the total number of matches is 0, the matching success rate is 0.5. The first weight is 0.6, the second weight is 0.3, and the third weight is 0.1, all of which are predefined fixed values. The specific values ​​are set as follows: based on the system's historical experience with candidate location path matching efficiency and business priorities, the matching success rate is determined as the most important evaluation indicator, assigned the highest weight of 0.6; the average matching time is determined as a secondary evaluation indicator, assigned a middle weight of 0.3; and the most recent success time decay coefficient is determined as an auxiliary evaluation indicator, assigned the lowest weight of 0.1. This ensures that the comprehensive score prioritizes the historical accuracy of path matching while considering matching efficiency and timeliness. Once predefined, these weight values ​​can be statically managed through the system configuration center and dynamically fine-tuned during operation and maintenance based on actual matching results, thereby continuously optimizing the priority ranking of candidate location paths.

[0088] The most recent successful time decay coefficient is 1 - (current timestamp - timestamp of the most recent successful match) / (30 × 24 × 3600). If the calculation result is less than 0, then the most recent successful time decay coefficient is 0.

[0089] For example, for ALI_PATH_001, the average matching time is first normalized by 0-1. After normalization, the average matching time = 12 / 1000 = 0.012; the matching success rate = 1286 / 1300 ≈ 0.989, and the recent success time decay coefficient ≈ 1 - (7200) / (2592000) ≈ 0.997; substituting into the formula, the comprehensive score is calculated as 0.989 × 0.6 - 0.012 × 0.3 + 0.997 × 0.1 ≈ 0.6895. For ALI_PATH_004, which has no historical data, the matching success rate is 0.5, the normalized average matching time is 1, the recent success time decay coefficient is 0, and the comprehensive score is 0.5 × 0.6 - 1 × 0.3 + 0 × 0.1 = 0. The 0-1 normalization of the average matching time adopts the minimum-maximum normalization method in the prior art.

[0090] A3016. For the candidate positioning paths in the set of candidate positioning paths to be adjusted, sort them from high to low according to their comprehensive scores. The sorted order is the adjusted priority order. If two candidate positioning paths have the same comprehensive score, the candidate positioning path with the higher initial priority value is sorted first. For example, the set of candidate positioning paths to be adjusted includes three paths: ALI_PATH_001, ALI_PATH_003, and ALI_PATH_004. The calculated comprehensive scores are 0.6895, 0.5214, and 0, respectively. The sorted order according to the comprehensive scores from high to low is ALI_PATH_001, ALI_PATH_003, and ALI_PATH_004, which is the adjusted priority order. If ALI_PATH_003 and ALI_PATH_004 have the same comprehensive score, and the initial priority value of ALI_PATH_003 (60) is higher than that of ALI_PATH_004 (40), then ALI_PATH_003 is sorted first.

[0091] A3017. The sorted set of candidate location paths to be adjusted is output as the final candidate location path set, which is used for subsequent operations in the message body structure to traverse the candidate location path set level by level. For example, the sorted set of candidate location paths is output as [ALI_PATH_001, ALI_PATH_003, ALI_PATH_004]. Subsequently, according to this priority order, a level-by-level traversal matching operation will be performed in the parsed SMS receipt message body structure of a certain operator.

[0092] A302. According to the priority order of each candidate positioning path, the current candidate positioning path is matched with the message body structure level by level: starting from the first path node of the current candidate positioning path, matching and positioning are performed at the corresponding level of the message body structure according to the node type identifier and node matching conditions. After successful positioning, the next level path node is entered, and matching continues within the range of already positioned nodes, until all path nodes of the current candidate positioning path are successfully positioned. The final positioned node position is determined as the field position of the original status code; for example, for the highest priority ALI_PATH_001, starting from the first path node, the first path The node type is identified as an object node, and the node matching condition is the node name "root". The node is successfully matched and located at the root level of the message body structure. Moving to the next level path node, the node type is identified as an object node, and the node matching condition is the node name "SmsSendDetailDTOs". The node is successfully matched and located within the already located root node. Moving to the next level path node, the node type is identified as a field node, and the node matching condition is the field name "ErrCode". The node is successfully matched and located. All path nodes are located. The finally located "ErrCode" field position is the field position of the original status code.

[0093] It should be further explained that, in this embodiment, during the step-by-step matching and positioning process according to the candidate positioning path and the message body structure, when the node type identifier of the current path node is an array node, the array node dynamic matching and positioning step is executed, specifically including:

[0094] A3021. Obtain the node matching conditions of the current path node, and the array data of the current node range obtained after matching and locating the previous level node; wherein, the node matching conditions of the array node include the node name, array element matching rules, and fallback index value, the array element matching rules include a predefined element identifier field name and a target element matching value, the node name and fallback index value are consistent with the predefined content of the structure description file corresponding to the gateway identifier, and the element identifier field name and target element matching value are bound to the fixed features of the corresponding gateway receipt message array structure; for example, the current path node is an array node in the Tencent Cloud SMS gateway receipt path, the node matching conditions are: node name "send_status_set", array element matching rules are element identifier field name "phone_number", target element matching value "138XXXX1234", and fallback index value 0; the array data of the current node range obtained after matching the previous level node is the array corresponding to the "send_status_set" field in the Tencent Cloud receipt, and the array contains multiple SMS sending status elements corresponding to mobile phone numbers.

[0095] A3022. Perform validity checks on the acquired array data to determine whether the array data is in array format and whether the number of array elements is greater than 0. If the check fails, the current candidate location path matching fails, and the process switches to the next candidate location path in the candidate location path set to re-execute step-by-step matching. If the check passes, proceed to the next step. For example, if the acquired "send_status_set" array data is in JSON array format and has 3 array elements, the validity check passes, and the process proceeds to the next step of traversal matching. If the acquired array data is null, not in array format, or has 0 array elements, the check fails, the current candidate location path matching fails, and the process switches to the next candidate path.

[0096] A3023. Traverse all array elements in the array data and perform a matching check on each array element: determine whether the array element contains the field corresponding to the element identifier field name, and whether the field value of the field matches the target element's matching value; if the check passes, mark the array element as a candidate matching element; for example, traverse the 3 elements of the "send_status_set" array. The "phone_number" field value of the first element is "135XXXX6789", which does not match the target matching value; the "phone_number" field value of the second element is "138XXXX1234", which matches the target matching value, and this element is marked as a candidate matching element; the "phone_number" field value of the third element is "139XXXX4321", which does not match the target matching value, and finally one candidate matching element is obtained.

[0097] A3024. Count all candidate matching elements obtained through iteration:

[0098] If the number of candidate matching elements is 1, then the candidate matching element is determined as the target array element, the matching and positioning of the current array node is completed, the range of the target array element is used as the matching range of the next level path node, and the matching and positioning process of the next level path node is entered.

[0099] If the number of candidate matching elements is greater than 1, the candidate matching element with the highest order of sorting will be determined as the target array element according to the original sorting order of the array elements, thus completing the matching and positioning of the current array node and entering the matching and positioning process of the next level path node.

[0100] If the number of candidate matching elements is 0, proceed to the fallback matching step;

[0101] A3025, Last-Choice Matching Step: Determine whether a last-choice index value is preset in the node matching conditions, and whether the last-choice index value is less than the total number of elements in the current array data; if the determination result is yes, then the array element corresponding to the last-choice index value in the array data is determined as the target array element, completing the matching and positioning of the current array node, and entering the matching and positioning process of the next level path node; if the determination result is no, then it is determined that the current candidate positioning path matching and positioning has failed, and switching to the next candidate positioning path in the candidate positioning path set to re-execute the step-by-step matching. For example, the number of candidate matching elements is 0, the current node matching conditions preset a last-choice index value of 0, and 0 is less than the total number of elements in the current array of 3, therefore the element corresponding to index 0 in the array is determined as the target array element, completing the matching and positioning of the current array node; if no last-choice index value is preset, or the last-choice index value 5 is greater than or equal to the total number of array elements of 3, then it is determined that the current candidate positioning path matching has failed, and switching to the next candidate positioning path.

[0102] A303. If any node of the current candidate location path fails to match the location, the system switches to the next candidate location path and re-executes the step-by-step matching until the location is successful or all candidate location paths fail to match. For example, if the current ALI_PATH_001 path fails to match the location at an array node, the system automatically switches to the next highest priority ALI_PATH_003 path and re-executes the step-by-step matching operation starting from the first path node until the path is successfully located or all candidate location paths fail to match.

[0103] A304. When all candidate location paths fail to match, an exception alarm is triggered and a "not located" flag is output. For example, if the three paths ALI_PATH_001, ALI_PATH_003, and ALI_PATH_004 in the candidate location path set all fail to match and locate, the system immediately triggers a location exception alarm in the status code field, outputs the "not located" flag "FIELD_NOT_FOUND" to the log system, and records the corresponding gateway identifier and receipt message content.

[0104] A4. Extract the corresponding original data fragment based on the field location obtained from the positioning, perform format cleaning and encoding conversion on the original data fragment, and extract the key symbol string, specifically including:

[0105] A401. Perform encoding normalization processing on the original data fragment, converting the non-UTF-8 encoded original data fragment into UTF-8 encoded format, and simultaneously performing standardized replacement on full-width characters, escape characters, and invisible control characters to obtain a standardized text fragment; for example, the extracted original data fragment is a GBK encoded full-width string "ERR:20003", which is first converted into UTF-8 encoded format, and then the full-width characters and colon escape characters are standardized to obtain the standardized text fragment "ERR:20003".

[0106] A402. Based on the structure description file corresponding to the gateway identifier, retrieve a predefined set of code value matching regular expressions, and perform matching on the standardized text fragments in order of priority of the regular expressions to extract candidate return code values; for example, based on the gateway identifier "ALIYUN_SMS_GATEWAY_V2", retrieve the predefined set of code value matching regular expressions, the regular expression with the highest priority is "ERR:([a-zA-Z0-9_.]+)", use this regular expression to perform matching on the standardized text fragment "ERR:isv.MOBILE_NUMBER_ILLEGAL" to extract the candidate return code value "isv.MOBILE_NUMBER_ILLEGAL".

[0107] A403. Perform format validation on the candidate return code value to determine whether the candidate return code value conforms to the code value format rules predefined by the gateway. If it conforms, the candidate return code value is determined as a valid return code value. If it does not conform, switch to the next regular expression and re-execute the matching extraction until a valid return code value is obtained or all regular expressions fail to match. For example, the code value format rules predefined by the gateway are "starting with isv. and containing only letters, numbers, underscores and English periods". The extracted candidate return code value "isv.MOBILE_NUMBER_ILLEGAL" conforms to the format rules and is determined as a valid return code value. If the candidate return code value does not conform to the format rules, switch to the second highest priority regular expression "([0-9]{5})" and re-execute the matching extraction.

[0108] A404. When all regular expressions fail to match, a code value anomaly alarm is triggered. Simultaneously, the original data fragment and its corresponding gateway identifier are stored in a self-learning dataset to update the code value matching regular expression set. Further, in this embodiment, the self-learning dataset is used to collect abnormal original data fragments and their corresponding gateway identifiers in regular expression matching failure scenarios, serving as a data source for subsequent manual review and iterative updates of the regular expression set. The self-learning dataset is constructed as follows: when all predefined code value matching regular expressions in the status acquisition module fail to match the current standardized text fragment, the system automatically triggers a code value extraction anomaly alarm and stores the failed original data fragment and its corresponding gateway identifier in a key-value pair structure in a preset database. It also records the failure timestamp and the format type of the gateway receipt message. The self-learning dataset supports periodic export and manual review. Reviewers add or modify regular expressions based on the actual returned code value format in the original data fragment. The updated regular expression set is redeployed to the corresponding gateway structure description file after version management, thereby achieving adaptive evolution of code value matching rules and continuously reducing the failure rate of matching new format status codes. For example, if all regular expressions in the regular expression set of this embodiment fail to match, the system immediately triggers a code value extraction exception alarm, and at the same time stores the original data fragment "ERR:NEW_CODE_10086" and the corresponding gateway identifier "ALIYUN_SMS_GATEWAY_V2" into the self-learning dataset for subsequent manual review and updating of the code value matching regular expression set.

[0109] A405. Using the valid return code value as the core element, generate a key symbol string. For example, using the valid return code value "isv.MOBILE_NUMBER_ILLEGAL" as the core element, the generated key symbol string is "isv.MOBILE_NUMBER_ILLEGAL", which is used in the standardized state semantic vector generation process of the subsequent semantic parsing module.

[0110] This embodiment addresses the core pain points of inconsistent message formats in heterogeneous SMS gateways, dynamically changing nested status code fields, poor adaptability of fixed location paths, low accuracy in status code extraction, and high coupling with business logic. This invention achieves hard-coded adaptation of different gateway message formats through a structure description file retrieval mechanism based on gateway identifiers, eliminating the need to develop separate parsing logic for new gateways and significantly reducing system iteration and maintenance costs. Through dynamic priority adjustment of candidate location paths, combined with pre-screening based on business scenarios, gateway versions, and operator characteristics, and a comprehensive scoring and ranking based on historical matching data, the invention effectively improves the location matching efficiency and success rate of status code fields, avoiding... It avoids the problems of missed detections and inefficiency in fixed priority path matching; through the dynamic matching and fallback positioning mechanism of array nodes, it solves the industry problem of the complete failure of fixed index positioning under dynamic array structure, and realizes the accurate positioning of status code fields under complex nested receipt structure; combined with multi-step encoding normalization, regular expression matching verification and self-learning iterative code value extraction logic, it ensures the accuracy of key symbol string extraction in heterogeneous scenarios, and provides reliable basic data support for subsequent standardized parsing of status semantics and precise control decisions from the root. At the same time, through the self-learning mechanism, it continuously adapts to the dynamic changes of gateway rules, further improving the system's overall operational stability and long-term adaptability.

[0111] It should be further explained that this embodiment determines the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base, specifically including:

[0112] B1. Based on the status code mapping rule base corresponding to the gateway identifier, extract the predefined effective auxiliary field whitelist, field hierarchy weight table, and binding verification rules. For example, in this embodiment of the invention, the effective auxiliary field whitelist, field hierarchy weight table, and binding verification rules are set as follows: The effective auxiliary field whitelist is determined statistically based on the field naming convention of the corresponding gateway receipt message and the auxiliary fields actually involved in semantic judgment in historical status code samples. A set of field names that can help distinguish the actual sending result of the return code under this gateway is manually predefined. For example, for the gateway identifier "ALIYUN_SMS_GATEWAY_V2", the whitelist is set to ["sub_code", "operator_id", "intercept_flag", "biz_type"]; the field hierarchy weight table is based on the field node... Compared to the preset weight value of the semantic association tightness of the core node of the return code, the closest association at the same level is assigned the highest weight of 1.0, followed by the parent level 1 and child level 1 with weights of 0.8 and 0.7 respectively, and the parent level 2 and child level 2 with weights of 0.5 and 0.3 respectively, to quantify the contribution of auxiliary symbol strings at different levels to the semantics of the return code. The binding verification rule selects the field in the receipt message that can uniquely identify a sending record or the association relationship within the same array element as the unique binding identifier field, and defines the matching range of the binding identifier. For example, the unique binding identifier field is set to "sms_serial_no", and the matching range of the binding identifier is within the current array element. At the same time, the adjacent level traversal parameters are set to a maximum upward traversal level of 2 and a maximum downward traversal level of 2, thereby ensuring the accurate binding of auxiliary symbol strings to the corresponding return code values ​​in scenarios with multiple nested receipt records or array structures.

[0113] B2. Locate the node containing the return code value as the core node. Using this core node as the center, traverse all fields within a preset adjacent level range. Only field values ​​whose names belong to the whitelist of valid auxiliary fields are identified as valid auxiliary symbol strings. If no valid auxiliary symbol string is found after traversal, a default logical distance value of 0 is directly generated, completing this logical distance determination. Further, in this embodiment of the invention, the preset adjacent level range is pre-configured by the system administrator based on the JSON or XML nesting structure depth of the corresponding gateway receipt message and the actual distribution characteristics of the auxiliary fields relative to the return code node. Specifically, it includes two parameters: the maximum upward traversal level and the maximum downward traversal level. The setting of this range... The principle is to ensure coverage of common levels where valid auxiliary fields related to return code semantic determination reside, while avoiding excessive traversal that could lead to interference from irrelevant fields. As an example rather than a limitation, for receipt messages with the gateway identifier "ALIYUN_SMS_GATEWAY_V2", their valid auxiliary fields are mostly distributed in the parent 1, parent 2, child 1, and child 2 layers of the return code core node. Therefore, the maximum number of upward traversal levels is set to 2, and the maximum number of downward traversal levels is set to 2. That is, taking the node where the return code is located as the core node, traversing upwards to a maximum of 2 parent nodes and downwards to a maximum of 2 child nodes, and filtering auxiliary symbol strings whose field names belong to the whitelist of valid auxiliary fields within this range, thereby achieving efficient and accurate logical distance determination.

[0114] B3. For each valid auxiliary symbol string, perform the following operation to calculate the initial logical distance:

[0115] B301. Obtain the level of the node corresponding to the field of the valid auxiliary symbol string, calculate the absolute value of the level difference between it and the base level of the core node, and use it as the basic level difference; if the node and the core node belong to the same array element, the basic level difference is not converted; if the node is in the parent level of the array to which the core node belongs, the basic level difference is reduced by 0.5.

[0116] B302. Based on the basic level difference, match the corresponding level weight value from the field level weight table, and verify whether the weight value is within the range of 0-1. If it exceeds the range, take the default weight value of 0.5.

[0117] B303. Calculate the initial logical distance according to the formula: Initial logical distance = base level difference × (1 - weight value);

[0118] B304. For multiple valid auxiliary symbol strings corresponding to the same basic level difference, sort them in ascending order of initial logical distance, retain the initial logical distance of the first 3 valid auxiliary symbol strings, and remove redundant and duplicate values.

[0119] For example, for the valid auxiliary symbol string "isv.BLACK_LIST", the corresponding node is at the same level as the core node, the basic level difference is 0, the matching weight value is 1.0, and the initial logical distance is 0×(1-1.0)=0; for "operator_id", the corresponding node is at the parent level 1, the basic level difference is 1, the matching weight value is 0.8, and the initial logical distance is 1×(1-0.8)=0.2; for "biz_type", the corresponding node is at the parent level 2, the basic level difference is 2, the matching weight value is 0.5, and the initial logical distance is 2×(1-0.5)=1.0; there are no duplicate fields at the same level, so deduplication is not required.

[0120] B4. According to the binding verification rules, perform binding relationship verification on each valid auxiliary symbol string, specifically as follows:

[0121] B401. Based on the binding identifier matching range, the verification range is determined to be within the array elements to which the core node belongs;

[0122] B402. Within the verification range, extract the unique binding identifier value of the core node, and the unique binding identifier value of the node where the field corresponding to the valid auxiliary symbol string is located;

[0123] B403. If neither node has a unique binding identifier value, the binding verification is deemed successful, and the initial logical distance of the valid auxiliary symbol string is determined as the final logical distance.

[0124] B404. If the unique binding identifier values ​​of two nodes are completely identical, the binding verification is deemed to have passed, and the initial logical distance of the valid auxiliary symbol string is determined as the final logical distance.

[0125] B405. If the unique binding identifier values ​​of two nodes are inconsistent, or if one of the nodes has no unique binding identifier value, the binding verification is deemed to have failed, the valid auxiliary symbol string is removed, and it is not included in the logical distance calculation.

[0126] For example, the binding verification range is within the elements of the send_status_list[1] array. The sms_serial_no value of the core node is “SMS20240520001”, and the sms_serial_no value of the nodes containing the three fields “sub_code”, “operator_id”, and “biz_type” is “SMS20240520001”. All three valid auxiliary symbol strings pass the verification, and the corresponding final logical distances are 0, 0.2, and 1.0, respectively.

[0127] B5. Summarize the final logical distances corresponding to all valid auxiliary symbol strings that pass the binding verification to form a logical distance list, which will be used for the subsequent generation of standardized state semantic vectors. For example, the basic level differences corresponding to the three final logical distances are 0, 1, and 2, respectively. After sorting them in ascending order, the generated logical distance list is [0, 0.2, 1.0]. This list will serve as a core component of the standardized state semantic vector and will be matched with sample vectors in the standard semantic template library.

[0128] This embodiment addresses the core pain points of heterogeneous SMS gateway status code semantics, lack of clear filtering rules for the effective range of auxiliary symbol strings, lack of unified hierarchical weight standards for logical distance quantization, misalignment of auxiliary symbol strings and return codes in batch receipt scenarios, and distortion of status semantic parsing due to fallback processing in undifferentiated scenarios. This invention employs a pre-screening mechanism with an effective auxiliary field whitelist to accurately identify auxiliary fields related to status semantic determination, eliminating interference from irrelevant fields at the source and ensuring the validity of the logical distance determination object. Through quantization calculation rules based on a field hierarchy weight table, a unified standard for determining the semantic correlation between auxiliary fields at different levels and return codes is clarified, solving the problems of ambiguity and uncontrollable results in logical distance determination. A unique binding identifier verification mechanism effectively avoids batch... In the scenario of quantity receipt arrays, the misalignment of the binding between auxiliary symbol strings and non-corresponding return codes ensures the accuracy of the main logical distance calculation. Simultaneously, through a comprehensive design including fallback handling for the absence of effective auxiliary fields, compliance verification of weight values, and deduplication of redundant values, it fully covers various differentiated scenarios of heterogeneous gateway receipts, avoiding the problem of interrupted parsing processes. The resulting ordered logical distance list provides accurate and unified core data support for the subsequent generation of standardized state semantic vectors, fundamentally solving the industry problem of semantic ambiguity and inability to uniformly parse different gateway status codes. This significantly improves the accuracy of SMS sending result classification, providing a reliable basis for subsequent precise control decisions. Furthermore, it eliminates the need for hard-coding to adapt the status rules of newly added gateways, effectively reducing system maintenance costs and iteration difficulty.

[0129] It should be further explained that, in this embodiment, a standardized state semantic vector is generated based on the return code value and the logical distance. The specific execution steps are as follows:

[0130] C1. Based on the status code mapping rule base corresponding to the gateway identifier, extract the predefined semantic category mapping table, fixed vector dimension parameters, vector padding values, vector truncation rules, and rule base version identifier; In this embodiment of the invention, the semantic category mapping table is defined as follows: For each gateway identifier, based on the actual business meaning of the gateway's returned code value and the historical sample annotation results, map the original status code field values ​​returned by each heterogeneous gateway to predefined semantic categories such as gateway rejection, operator rate limiting, user blacklist, terminal interception, and pseudo-success, forming a key-value pair mapping relationship. For example, for the gateway identifier "ALIYUN_SMS_GATEWAY_V2", the mapping table is defined as "isv.MOBILE_NUMBER_ILLEGAL → terminal interception, isv.BLACK_LIST → user blacklist, isp.LIMIT_EXCEEDED → operator rate limiting, gw.SERVICE_UNAVAILABLE → gateway rejection, gw.FAKE_SUCCESS → pseudo-success"; the fixed vector dimension parameters The definition method is as follows: Based on the semantic expressive power required by the standardized state semantic vector and the efficiency of subsequent matching calculations, the header identifier dimension is preset to be fixed at 1, and the logical distance dimension is set to a positive integer greater than or equal to 1. The sum of the two constitutes the fixed vector dimension parameter. For example, if the logical distance dimension is set to 3, then the fixed vector dimension parameter is 4. The definition method of the vector padding value is: a preset uniform value is used to fill in the missing positions when the length of the ordered logical distance list is insufficient for the logical distance dimension. For example, it is set to -1 to distinguish it from the range of normal logical distance values. The definition method of the vector truncation rule is: when the length of the ordered logical distance list exceeds the logical distance dimension, it is stipulated that the first logical distance dimension of elements in the list should be retained, and the excess tail elements should be discarded. For example, when the logical distance dimension is 3, the first 3 elements should be retained. The definition method of the rule base version identifier is: a unique version number is assigned to the current status code mapping rule base, which is composed of a combination of gateway identifier abbreviation, rule base type, date or incremental sequence number. For example, it is set to "ALIYUN_V2_RULES_20240520", which is used for version compatibility verification and self-learning dataset tracing.

[0131] C2. Based on the return code value, match the corresponding predefined semantic category from the semantic category mapping table, and convert the predefined semantic category into a predefined numerical header identifier; wherein, the predefined numerical header identifiers are: gateway rejection class = 1, operator rate limiting class = 2, user blacklist class = 3, terminal interception class = 4, pseudo success class = 5.

[0132] For example, the return code value is "isv.BLACK_LIST", which is matched from the semantic category mapping table to obtain the predefined semantic category as user blacklist class, and is converted into numerical header identifier 3.

[0133] C3. Obtain the ordered logical distance list output in step B5. Based on the logical distance dimension in the fixed vector dimension parameter, perform padding or truncation operations on the ordered logical distance list: if the list length is less than the logical distance dimension, add vector padding values ​​to the end of the list until the list length is equal to the logical distance dimension; if the list length is greater than the logical distance dimension, retain the elements of the first logical distance dimension according to the vector truncation rules.

[0134] For example, the ordered logical distance list output in step B5 is [0, 0.2, 1.0], with a logical distance dimension of 3. The list length is equal to the dimension, and no padding or truncation is required, resulting in the processed logical distance subvector [0, 0.2, 1.0].

[0135] C4. Using the numerical header identifier as the first element, concatenate the processed logical distance sub-vector to generate the initial standardized state semantic vector.

[0136] For example, the numerical header identifier is 3, the processed logical distance sub-vector is [0, 0.2, 1.0], and after concatenation, the initial normalized state semantic vector [3, 0, 0.2, 1.0] is generated.

[0137] C5. Perform a validity check on the initial standardized state semantic vector:

[0138] C501. Verify whether the first element belongs to the predefined set of numeric header identifiers {1, 2, 3, 4, 5}.

[0139] C502. Verify whether all elements in the logical distance sub-vector are within a predefined reasonable value range, which is greater than or equal to -1 and less than or equal to 10. For example, in this embodiment of the invention, the predefined reasonable value range is used to verify the validity of each element in the logical distance sub-vector. The setting method is as follows: Based on the logical distance calculation formula, initial logical distance = base level difference × (1 - weight value), where the minimum value of the base level difference is 0, and the maximum value is the larger of the maximum upward traversal level and the maximum downward traversal level in the preset adjacent level range. The minimum weight value is taken as the minimum weight value in the field level weight table. Therefore, the theoretical maximum value of the logical distance is calculated as the maximum base level difference. The level difference is multiplied by (1 - minimum weight value). Simultaneously, the vector padding value of -1 is considered as the padding element in the logical distance sub-vector. Therefore, the lower limit of the reasonable numerical range is set to -1, and the upper limit is set to an integer slightly larger than the theoretical maximum value to ensure coverage of all valid calculated values. As an example, not a limitation, when the maximum upward traversal level and the maximum downward traversal level are both 2 and the minimum weight value is 0.3, the theoretical maximum logical distance is 2 × (1 - 0.3) = 1.4. Therefore, the reasonable numerical range is preset to be greater than or equal to -1 and less than or equal to 10, thus accommodating both the padding value of -1 and the normal calculated values ​​from 0 to 1.4, while also reserving margin for possible subsequent rule expansions, ensuring the robustness and compatibility of validity checks.

[0140] C503. If both checks pass, the initial standardized state semantic vector is determined as the final standardized state semantic vector, and the rule base version identifier is bound to it.

[0141] C504. If any check fails, a vector generation anomaly alarm is triggered. At the same time, the return code value, the ordered logical distance list, the corresponding gateway identifier and the rule base version identifier are stored in the self-learning dataset for subsequent manual review to update the semantic category mapping table or vector parameters.

[0142] For example, the first element 3 of the initial normalized state semantic vector [3, 0, 0.2, 1.0] belongs to a predefined set, and all elements of the logical distance sub-vector are in the range of -1 to 10. Both checks pass, so it is determined to be the final normalized state semantic vector and bound to the rule base version identifier "ALIYUN_V2_RULES_20240520".

[0143] This embodiment addresses the core pain points of heterogeneous SMS gateway status code semantic ambiguity, the inability to uniformly abstract the data, inconsistent vector structures leading to matching failures with standard templates, lack of validity checks causing abnormal data to interfere with decision-making, and poor vector compatibility after rule base updates. This invention clarifies the unified generation rules for the core vector semantics by using semantic category mapping based on a gateway mapping rule base and a numerical header identifier design. This ensures that similar sending states from different gateways have consistent semantic identifiers, eliminating semantic ambiguity in status codes at its root. By fixing vector dimension parameters and standardizing padding and truncation rules, the structure of all output vectors is completely unified, ensuring that the generated vectors can be accurately aligned with sample vectors in the standard semantic template library, solving the problems of matching process interruption and result distortion caused by dimension mismatch. Finally, it implements full-process vector validity checks. This mechanism effectively filters out invalid vectors with semantic anomalies and numerical limits, preventing erroneous data from entering subsequent matching decision-making stages and significantly improving the accuracy of state matching. Through rule base version binding and self-learning dataset design, it solves the compatibility problem between historical vectors and the new template library after dynamic rule updates. At the same time, it can continuously iterate and optimize vector generation rules based on abnormal data. The resulting standardized state semantic vectors achieve unified and standardized abstraction of heterogeneous gateway state data, providing reliable, traceable, and highly adaptable core data support for subsequent matching decisions and end-to-end intelligent management. It completely gets rid of the industry dilemma of high coupling between state parsing logic and business in existing hard-coded solutions, which cannot flexibly adapt to new gateways. It effectively reduces system maintenance costs and iteration difficulty, and ensures the stability and accuracy of end-to-end decision-making.

[0144] It should be further explained that in this embodiment, the standardized state semantic vector is matched with a preset standard semantic template library. The specific execution steps are as follows:

[0145] D1. Based on the gateway identifier, retrieve the corresponding standard semantic template library, template library version identifier, predefined matching algorithm parameters, semantic category sensitivity threshold table, and template priority table; wherein, the standard semantic template library contains multiple standard semantic templates, each standard semantic template consisting of a numerical header identifier, a logical distance sub-vector, a corresponding real sending result type, and the template's own rule base version compatibility range; the matching algorithm parameters include the matching algorithm type (limited to weighted cosine similarity algorithm), header identifier weight value, and logical distance sub-vector weight value; the semantic category sensitivity threshold table predefines a matching success threshold corresponding to each predefined semantic category; the template priority table predefines the priority order of multiple standard semantic templates under the same semantic category; for example, in this embodiment of the invention, the header identifier weight value, logical distance sub-vector weight value, and matching success threshold corresponding to each semantic category are set as follows: the header identifier weight value and the logical distance sub-vector weight value are predefined fixed parameters. The weights of the header identifier and the logical distance sub-vector are set to be greater than the weight of the logical distance sub-vector to reflect the dominant position of the semantic category defined by the header identifier in the matching decision. As an example rather than a limitation, the header identifier weight is set to 0.8 and the logical distance sub-vector weight is set to 0.2. The matching success threshold is preset for each predefined semantic category. The value is set differently according to the importance of the sending result of the category to the system control action and the cost of misjudgment. The highest threshold of 0.9 is set for the false success category because it is difficult to identify and has a serious impact on the channel quality assessment. The medium threshold of 0.7 is set for the gateway rejection category and the operator traffic limiting category. The lower threshold of 0.6 is set for the user blacklist category and the terminal interception category. This reduces the risk of missing the common abnormal states while ensuring high confidence matching. Once the above weight values ​​and thresholds are predefined, they are fixed in the configuration parameters of the matching decision module and can be dynamically adjusted by the configuration center according to the gateway identifier or business scenario to achieve flexible control of matching accuracy.

[0146] D2. Perform version compatibility verification: Obtain the rule base version identifier bound to the final standardized state semantic vector output in step C5, and determine whether the rule base version identifier is within the rule base version compatibility range of the corresponding standard semantic template.

[0147] If one or more standard semantic templates have a rule base version compatibility range that includes the corresponding rule base version identifier, proceed to the next step; if none of the standard semantic templates have a rule base version compatibility range that includes the rule base version identifier, trigger a version incompatibility alarm, and store the final standardized state semantic vector, the corresponding gateway identifier, the rule base version identifier, and the template library version identifier into the self-learning dataset for subsequent manual review and synchronous updates of the rule base and template library.

[0148] For example, the rule base version identifier for the final standardized state semantic vector binding is "ALIYUN_V2_RULES_20240520". The rule base version compatibility range of template 1 includes this identifier, as do templates 2-5. Therefore, proceed to the next step.

[0149] D3. Perform forced alignment of vector dimensions: Obtain the dimension of the final standardized state semantic vector and the dimensions of all standard semantic templates in the standard semantic template library that have passed version compatibility verification; if the dimensions of the two are consistent, proceed to the next step; if the dimension of the final standardized state semantic vector is less than the dimension of the standard semantic template, add the vector padding value extracted by C1 to the end of the logical distance sub-vector of the final standardized state semantic vector until the dimensions are consistent; if the dimension of the final standardized state semantic vector is greater than the dimension of the standard semantic template, retain the elements of the former standard semantic template dimension of the final standardized state semantic vector according to the vector truncation rules extracted by C1.

[0150] For example, the final standardized state semantic vector has a dimension of 4, and all the standard semantic templates that pass the verification also have a dimension of 4. No alignment is required, and we can proceed directly to the next step.

[0151] D4. For each standard semantic template that passes version compatibility verification and dimension alignment, perform weighted cosine similarity calculation:

[0152] D401. Extract the numerical header identifier and logical distance sub-vector of the final standardized state semantic vector, denoted as V_head and V_dist, respectively.

[0153] D402. Extract the numerical header identifier and logical distance sub-vector of the current standard semantic template, denoted as T_head and T_dist respectively;

[0154] D403. Calculate the header identifier matching degree. If V_head and T_head are completely identical, the header identifier matching degree is 1; otherwise, it is 0.

[0155] D404. Calculate the cosine similarity between V_dist and T_dist according to the cosine similarity formula, and denote it as Sim_dist.

[0156] D405. Based on the head identifier weight value (denoted as W_head) and logical distance sub-vector weight value (denoted as W_dist) in the matching algorithm parameters, calculate the final weighted cosine similarity: Sim_total = W_head × head identifier matching degree + W_dist × Sim_dist; For example, the final standardized state semantic vector has V_head = 3 and V_dist = [0, 0.2, 1.0], and template 1 has T_head = 3 and T_dist = [0, 0.2, 1.0]; the head identifier matching degree is 1; V_dist and T_dist are completely consistent, Sim_dist = 1; W_head = 0.8 and W_dist = 0.2, therefore Sim_total = 0.8 × 1 + 0.2 × 1 = 1.0.

[0157] D5. Perform a successful matching check, specifically:

[0158] D501. Obtain the predefined semantic category corresponding to the numerical header identifier of the final standardized state semantic vector, and match the matching success threshold corresponding to that semantic category from the semantic category sensitivity threshold table, denoted as T. h ;

[0159] D502. Filter out all weighted cosine similarities Sim_total ≥ T. h The standard semantic templates are used to form a set of candidate matching templates;

[0160] D503. If the candidate matching template set is empty, proceed to the fallback handling step for full template matching failure.

[0161] D504. If the candidate matching template set contains only one standard semantic template, then the actual sending result type corresponding to that template shall be determined as the final matching result.

[0162] D505. If the candidate matching template set contains multiple standard semantic templates, the priority of each candidate template under the same semantic category is obtained from the template priority table, and the actual sending result type corresponding to the candidate template with the highest priority is selected as the final matching result. For example, the predefined semantic category corresponding to V_head=3 is "user blacklist class", and the matching result is Th=0.6. The Sim_total of template 1 is 1.0≥0.6, and the Sim_total of template 2 is 0.8≥0.6, forming a candidate matching template set. According to the template priority table, the logical distance sub-vector of template 1 is closer to V_dist and has a higher priority. Therefore, the final matching result is "user blacklist class".

[0163] D6. Fallback steps for handling full template matching failure:

[0164] D601. The type of the actual transmission result corresponding to the final standardized state semantic vector is tentatively set as "unknown state class";

[0165] D602. Trigger an unknown state alarm and simultaneously store the final standardized state semantic vector, corresponding return code value, ordered logical distance list, gateway identifier, rule base version identifier, and template base version identifier into the self-learning dataset.

[0166] D603. Regularly perform manual review of the unknown state data in the self-learning dataset, update the semantic category mapping table or standard semantic template library, and synchronously update the rule library version identifier and template library version identifier. For example, the final standardized state semantic vector is [6, 0.5, 0.8, 1.2]. After the weighted similarity calculation of all templates in the standard semantic template library corresponding to the gateway identifier "ALIYUN_SMS_GATEWAY_V2", all results are lower than the matching success threshold of the corresponding semantic category, the candidate matching template set is empty, and then the fallback process of full template matching failure is entered: First, the type of the real sending result corresponding to the vector is temporarily set as "unknown state class", and an unknown state abnormality alarm is triggered. The final standardized state semantic vector, the corresponding return code value "isv.NEW_UNDEFINED_CODE", and the ordered logical distance are then updated. The list [0.5, 0.8, 1.2], the gateway identifier "ALIYUN_SMS_GATEWAY_V2", the bound rule library version identifier "ALIYUN_V2_RULES_20240520", and the template library version identifier "ALIYUN_TEMPLATE_V2_20240501" are completely stored in the system's self-learning dataset. The system manually reviews the unknown state data in the self-learning dataset once a week according to a predefined cycle. After confirming the semantic category corresponding to the return code, the semantic category mapping table and the standard semantic template library are updated, and the rule library version identifier and the template library version identifier are updated synchronously to complete the system's adaptation iteration.

[0167] This embodiment addresses the core pain points of existing heterogeneous SMS gateways, including the lack of a unified standard for state matching, unreasonable weight allocation of semantic core and detailed features, matching errors caused by version incompatibility between rule base and template base, the inability of fixed thresholds to adapt to the sensitivity requirements of different state types, the lack of clear judgment rules for high similarity matching results of multiple templates, matching process interruption caused by vector dimension mismatch, and high failure rate of matching in new state scenarios due to the lack of fallback and self-learning mechanisms. This embodiment avoids cross-version mismatches caused by asynchronous rule base and template base through a pre-implemented version compatibility verification mechanism, ensuring the consistency of basic matching data. It solves the matching failure problem caused by inconsistent vector structures in heterogeneous scenarios through a forced vector dimension alignment rule, ensuring the continuity and stability of the matching process. Furthermore, it clarifies the core priority of semantic category identifiers through a weighted cosine similarity matching algorithm that emphasizes semantic core weights, effectively avoiding mismatches between semantic categories with similar logical distance values, and significantly improving state matching accuracy. The system achieves high semantic accuracy through differentiated semantic category sensitivity threshold design, adapting to the judgment requirements of different sending result types. This reduces the false judgment rate of high-risk states while minimizing the missed judgment of regular abnormal states, thus realizing precise control of state classification. The system also addresses the issue of result ambiguity in scenarios with high similarity across multiple templates by prioritizing multiple matching results, ensuring a unique and accurate true sending result type output, providing a clear and reliable decision-making basis for subsequent control actions. Furthermore, the system solves the matching failure problem in scenarios with newly added gateway states through fallback handling for full template matching failures and a self-learning iteration mechanism. It can continuously optimize the template library and mapping rules based on abnormal data, ultimately achieving accurate and stable matching of standardized state semantic vectors for heterogeneous gateways. This completely overcomes the industry dilemma of ambiguous state judgment, poor adaptability, and high maintenance costs inherent in existing hard-coded solutions, providing precise decision support for intelligent distribution control across the entire chain and effectively improving the accuracy of SMS delivery control and the long-term stability of the system.

[0168] Example 2

[0169] Please see Figure 3 Another embodiment of the present invention provides a multi-channel SMS gateway intelligent distribution management method, comprising:

[0170] S1. Receive raw status codes from M heterogeneous SMS gateways, identify the preset field position of the raw status code in the gateway receipt message, and extract the key symbol string corresponding to the preset field position.

[0171] S2. Obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of the adjacent field based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance.

[0172] S3. Match the standardized state semantic vector with the preset standard semantic template library, and execute the corresponding control action according to the actual sending result type obtained from the matching.

[0173] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.

Claims

1. A multi-channel short message gateway intelligent distribution management and control system, characterized in that, include: The status acquisition module receives receipt messages from M heterogeneous SMS gateways. The receipt messages carry original status codes and gateway identifiers. The module identifies the field positions of the original status codes in the receipt messages and extracts key symbol strings corresponding to the field positions. The key symbol strings contain return code values. The semantic parsing module is used to obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of the adjacent field based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance. The matching decision module is used to match the standardized state semantic vector with a preset standard semantic template library, and execute the corresponding control action according to the actual sending result type obtained from the matching. The logical distance is used to characterize the semantic level correlation between the return code value and the auxiliary symbol string. The auxiliary symbol string includes the sub-status code returned by the gateway, the operator code, and the interception identifier field. The standardized state semantic vector consists of a header identifier that defines the state semantic category and a list of logical distances following the header. The semantic categories include gateway rejection, operator rate limiting, user blacklist, terminal interception, and pseudo-success. The standard semantic template library contains standardized semantic templates corresponding to various real sending results; The control measures include: When the matching result is a user blacklist or terminal interception type, the corresponding user identifier will be synchronized to the global blacklist database to block invalid delivery within a preset time period in the future; When the matching result is a gateway rejection or operator traffic restriction, the real-time availability status of the corresponding SMS gateway channel will be marked as abnormal, and the traffic circuit breaker and automatic switching mechanism will be triggered. When the matching result is a pseudo-success, the quality score of the corresponding SMS gateway channel is deducted, and the corresponding data is recorded in the training dataset of the intelligent distribution model.

2. The multi-channel SMS gateway intelligent distribution and management system as described in claim 1, characterized in that, Identifying the location of the original status code in a preset field within the gateway receipt message includes: The corresponding structure description file is retrieved based on the gateway identifier. The structure description file predefines the format type, field naming rules, and candidate location path set for the status code field of the gateway's receipt message. The received receipt message is matched with the structure description file to identify the format type of the receipt message and parse the message body structure. In the message body structure, the candidate location path set is traversed level by level to locate the field position of the original status code in the message body structure. The field position includes one or more of the following: the level of the field, the field name, and the index offset of the field in the array structure. Based on the field location obtained from the positioning, the corresponding original data fragment is extracted. The original data fragment is then cleaned and encoded to extract the key symbol string.

3. The multi-channel SMS gateway intelligent distribution and management system as described in claim 2, characterized in that, The message body structure is traversed level by level according to the candidate location path set, including: Obtain the message body structure and the candidate location path set. The candidate location path set contains one or more candidate location paths sorted by priority. Each candidate location path consists of path nodes arranged in sequence. The path nodes include node type identifiers for distinguishing node types and node matching conditions for matching nodes. The node types include object nodes, array nodes, and field nodes. The node matching conditions include one or more of node names, array indices, and field names. According to the priority order of each candidate positioning path, the current candidate positioning path is matched with the message body structure level by level: starting from the first path node of the current candidate positioning path, the matching and positioning are performed at the corresponding level of the message body structure according to the node type identifier and node matching conditions. After successful positioning, the next level path node is entered, and the matching continues within the range of already positioned nodes until all path nodes of the current candidate positioning path are successfully positioned. The final positioned node position is determined as the field position of the original status code. If any node in the current candidate location path fails to match the location, switch to the next candidate location path and re-execute the step-by-step matching until the location is successful or all candidate location paths fail to match. When all candidate location paths fail to match, an error alarm is triggered and a "not located" flag is output.

4. The multi-channel SMS gateway intelligent distribution and management system as described in claim 3, characterized in that, Determining the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base specifically includes: Based on the status code mapping rule base corresponding to the gateway identifier, extract the predefined whitelist of valid auxiliary fields, the field hierarchy weight table, and the binding verification rules; wherein, the whitelist of valid auxiliary fields is a set of auxiliary field names that can be used to determine logical distance under the corresponding gateway, the field hierarchy weight table predefines the weight values ​​of auxiliary fields relative to different levels of the node where the return code is located, and the binding verification rules predefine a unique binding identifier field between the auxiliary symbol string and the return code value; The node containing the return code value is identified as the core node. Centered on the core node, all fields are traversed within a preset adjacent level range. Only the field values ​​corresponding to fields whose names belong to the whitelist of valid auxiliary fields are identified as valid auxiliary symbol strings. If no valid auxiliary symbol string is found after traversal, a default logical distance value of 0 is directly generated to complete this logical distance determination.

5. The multi-channel SMS gateway intelligent distribution and management system as described in claim 4, characterized in that, Determining the logical distance between the return code value in the key symbol string and the auxiliary symbol string of adjacent fields based on the mapping rule base specifically includes: For each valid auxiliary symbol string, obtain the level difference between the node containing its corresponding field and the core node, match the weight value of the corresponding level according to the field level weight table, and calculate the initial logical distance between the valid auxiliary symbol string and the return code value based on the level difference and the weight value. The formula for calculating the initial logical distance is: Initial logical distance = level difference × (1 - weight value). According to the binding verification rules, the binding relationship between the valid auxiliary symbol string and the return code value is verified: the unique binding identifier value of the node where the field corresponding to the valid auxiliary symbol string is located, and the unique binding identifier value of the core node are extracted, and it is determined whether the two identifier values ​​are consistent; if they are consistent, the initial logical distance of the valid auxiliary symbol string is determined as the final logical distance; if they are inconsistent, the valid auxiliary symbol string is removed and not included in the logical distance calculation. Summarize the final logical distances corresponding to all valid auxiliary symbol strings that pass the binding verification to form a logical distance list.

6. The multi-channel SMS gateway intelligent distribution and management system as described in claim 5, characterized in that, The generation of the standardized state semantic vector includes: Based on the status code mapping rule base corresponding to the gateway identifier, a predefined semantic category mapping table, fixed vector dimension parameters, vector padding values, vector truncation rules, and rule base version identifier are extracted. The semantic category mapping table predefines a one-to-one correspondence between return code values ​​and predefined semantic categories. The fixed vector dimension parameters are positive integers greater than or equal to 2, consisting of a header identifier dimension and a logical distance dimension, with the header identifier dimension fixed at 1. The vector padding values ​​are predefined fixed values. The vector truncation rule retains elements at the logical distance dimension before the ordered logical distance list when the length of the ordered logical distance list is greater than the logical distance dimension. Based on the return code value, the corresponding predefined semantic category is obtained from the semantic category mapping table, and the predefined semantic category is converted into a predefined numerical header identifier; wherein, the predefined numerical header identifier is: gateway rejection class = 1, operator rate limiting class = 2, user blacklist class = 3, terminal interception class = 4, pseudo success class = 5. Based on the logical distance dimension in the fixed vector dimension parameter, perform padding or truncation operations on the ordered logical distance list: if the list length is less than the logical distance dimension, add vector padding values ​​to the end of the list until the list length is equal to the logical distance dimension; if the list length is greater than the logical distance dimension, retain the elements up to the logical distance dimension according to the vector truncation rules.

7. The multi-channel SMS gateway intelligent distribution and management system as described in claim 6, characterized in that, The generation of the standardized state semantic vector also includes: The numerical header identifier is used as the first element, and the processed logical distance sub-vector is concatenated to generate the initial standardized state semantic vector. The validity of the initial standardized state semantic vector is validated, specifically as follows: Verify whether the first element belongs to a predefined set of numeric header identifiers; Check whether all elements in the logical distance subvector are within a predefined reasonable value range, which is greater than or equal to -1 and less than or equal to 10. If both checks pass, the initial standardized state semantic vector is determined as the final standardized state semantic vector, and the rule base version identifier is bound to it. If any check fails, a vector generation anomaly alarm is triggered, and the return code value, ordered logical distance list, corresponding gateway identifier, and rule base version identifier are stored in the self-learning dataset.

8. A method for intelligent distribution and control of multi-channel SMS gateways, implemented based on the intelligent distribution and control system for multi-channel SMS gateways as described in any one of claims 1-7, characterized in that, include: Receive raw status codes from M heterogeneous SMS gateways, identify the preset field positions of the raw status codes in the gateway receipt messages, and extract the key symbol strings corresponding to the preset field positions; Obtain the corresponding status code mapping rule base according to the gateway identifier, determine the logical distance between the return code value in the key symbol string and the auxiliary symbol string of the adjacent field based on the mapping rule base, and generate a standardized status semantic vector based on the return code value and the logical distance. The standardized state semantic vector is matched with a preset standard semantic template library, and the corresponding control action is executed according to the actual sending result type obtained from the match.