Methods, systems, media and equipment for intelligent SMS distribution and security management
By using a three-level buffer queue and token bucket algorithm for flow control, combined with Nginx reverse proxy and master-slave redundancy design, the message congestion and security deficiencies of traditional SMS distribution systems are solved, achieving efficient and reliable SMS distribution and security management.
Patent Information
- Application Number
- CN202611241001.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-17
AI Technical Summary
Traditional SMS distribution systems are prone to message congestion, sending delays, and uneven channel load in high-concurrency scenarios, and their security is insufficient, with single points of failure easily leading to business interruption.
A three-level buffer queue model and token bucket algorithm are used for traffic control. Combined with Nginx reverse proxy server and master-slave redundancy design, dynamic channel selection and end-to-end encrypted authentication are achieved to build a security-in-depth protection system.
It improves message delivery efficiency and system availability, prevents channel blocking, ensures stable delivery under high concurrency and a system availability rate of 99.9%, and enhances security and scalability.
Smart Images

Figure CN123123828A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear power plant network security and message scheduling technology, and more specifically, to a method, system, medium, and device for intelligent SMS distribution and security management. Background Technology
[0002] Traditional SMS distribution systems generally adopt a simple access-distribution two-layer architecture, relying on fixed routing rules to forward SMS messages to operator channels. They only configure basic main channels and lack a dynamic intelligent scheduling mechanism based on real-time load, queue backlog, and channel health. They mostly use static queue queuing to handle concurrent traffic, which can easily lead to message congestion, sending delays, and uneven channel load in high-concurrency scenarios.
[0003] Furthermore, existing SMS platform security solutions mostly employ single-point protection, and identity authentication largely relies on a single account and password verification. Many similar systems lack sufficient hardware and link redundancy, performing only simple device backups without implementing dual-channel link redundancy. Single-point failures can easily cause service interruptions, resulting in insufficient overall system availability and fault tolerance. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method, system, medium and device for intelligent SMS distribution and security management, which addresses the problems existing in the prior art.
[0005] The technical solution adopted by this invention to solve its technical problem is: to construct a method for intelligent SMS distribution and security management, comprising the following steps: Step S10: Receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, format the messages of the verified external SMS sending requests, generate internal messages to be sent, and write them into the access queue. Step S20: Extract the message to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the message to be sent into the distribution queue partition corresponding to the optimal channel. Step S30: Messages to be sent are cached by channel partition through the distribution queue, and the actual sending rate is controlled by the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel; Step S40: Extract the message to be sent from the channel queue, encapsulate it according to the operator protocol, and send it to the operator gateway through the primary and backup channels.
[0006] In the SMS intelligent distribution and security management method of the present invention, step S10, which involves authenticating the identity and verifying the parameters of the external SMS sending request, includes: For external SMS sending requests sent by individual users, unified identity verification is performed through the 4A trusted authentication system; For external SMS sending requests sent by system users, authentication is performed through the HMAC-SHA256 hash signature authentication mechanism. Each user is assigned a unique access key and encryption key. The interface request integrates request parameters, timestamp, and random verification code to complete the encryption signature. The server verifies the signature validity and timestamp validity. For external SMS sending requests sent through high-risk interfaces, authentication is performed using an additional IP whitelist.
[0007] In the SMS intelligent distribution and security management method described in this invention, in step S10, the Nginx reverse proxy server runs in a primary-backup mode, and when the primary node fails, the backup node takes over the service within seconds. The Nginx reverse proxy server intelligently routes external SMS sending requests based on their type, including: Web requests sent by individual users are forwarded to the web server cluster; API requests sent by system users are forwarded to the gateway server cluster.
[0008] The SMS intelligent distribution and security management method described in this invention further includes the following steps: The network area is divided into a user access area, a core service area, and a security access area; each area is isolated from the other by a firewall access control list and an Nginx reverse proxy, and all external SMS sending requests are forwarded through the Nginx reverse proxy server. Encrypted transmission is performed using TLS 1.2 or later. Set a 24-hour sending limit for a single mobile number, and establish a four-level traffic threshold control system (daily, weekly, monthly, and yearly) based on the caller's IP address and system identity. Temporarily block external SMS sending requests that exceed the limit.
[0009] In the SMS intelligent distribution and security management method described in this invention, the access queue first caches a large number of SMS messages, then distributes them at a uniform rate according to the backend capacity, and resends the backlog of messages during idle periods. The distribution queue is partitioned according to the operator channel, and the scheduling layer routes the message to the corresponding channel's distribution queue partition based on the target operator of the message to be sent; The channel queue is bound to each operator one-to-one, and the token bucket algorithm is used to control the actual transmission rate of the channel. The message passes through the access queue, the distribution queue partition, and the channel queue in sequence.
[0010] The present invention also provides an intelligent SMS distribution and security management system, comprising: The access layer module is used to receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, and after formatting the messages of the verified external SMS sending requests, generate internal messages to be sent and write them to the access queue. The scheduling layer module is used to extract messages to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the messages to be sent into the distribution queue partition corresponding to the optimal channel. The distribution layer module is used to cache messages to be sent by channel partitioning through the distribution queue, and to control the actual sending rate by using the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel. The channel layer module is used to extract messages to be sent from the channel queue, encapsulate them according to the operator's protocol, and send them to the operator's gateway through the primary and backup channels.
[0011] The SMS intelligent distribution and security management system of the present invention also includes: The network protection module is used to divide the network area into a user access zone, a core service zone, and a secure access zone. Each zone is isolated from the others by a firewall access control list and an Nginx reverse proxy. All external SMS sending requests are forwarded through the Nginx reverse proxy server. The transmission encryption module is used for encrypted transmission using TLS 1.2 and above protocols. The identity authentication module is used to authenticate and verify the identities of individual users and system users; The application control module is used to perform message content inspection and log management.
[0012] In the SMS intelligent distribution and security management system of the present invention, the user access area includes: an intranet access unit, a 4A trusted authentication system, and a system user access unit; The intranet access unit is used to receive external SMS sending requests from individual users; The system user access unit is used to receive external SMS sending requests sent by system users; The 4A Trusted Authentication System is used to perform unified identity verification for external SMS sending requests sent by individual users; The core service area includes: Nginx reverse proxy server, web server cluster, gateway server cluster, and database; The Nginx reverse proxy server runs in a master-slave mode. When the master node fails, the backup node takes over the service within seconds. Web server clusters are used to perform page interactions and business logic orchestration; The gateway server cluster is used to perform operator protocol adaptation, channel scheduling, and SMS sending and receiving. The database consists of a primary database and a standby database. The primary database handles all write operations, while the standby database executes query requests.
[0013] The present invention also provides a storage medium storing a computer program adapted for loading by a processor to execute the steps of the above-described method for intelligent SMS distribution and security management.
[0014] The present invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the steps of the above-mentioned SMS intelligent distribution and security management method by calling the computer program stored in the memory.
[0015] The method, system, medium, and device for intelligent SMS distribution and security management of the present invention have the following beneficial effects: The present invention dynamically selects the optimal channel for message distribution by evaluating the real-time health of each channel, avoiding the problems of uneven channel load and message congestion caused by traditional static routing, and significantly improving message delivery efficiency under high concurrency; The present invention adopts a three-level structure of access queue, distribution queue, and channel queue combined with the token bucket algorithm to effectively smooth peaks and valleys, prevent sudden traffic surges from impacting operator channels, avoid channel blocking due to overclocking, and ensure balanced delivery of an average of 7 million SMS messages per month.
[0016] Furthermore, this invention enhances security through layered reinforcement, from network isolation and transmission encryption to identity authentication and application control, providing a defense-in-depth approach. It employs Nginx primary / backup, server cluster load balancing, database primary / backup, and dual-channel primary / backup to achieve end-to-end redundancy, enabling automatic switching within seconds in case of single-point failure, resulting in a system availability rate of over 99.9%. It also adopts a layered and decoupled issuance architecture comprising the access layer, scheduling layer, distribution layer, and channel layer, allowing for independent expansion and maintenance of each layer, thereby improving the system's scalability and maintainability. Attached Figure Description
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of the architecture of the SMS intelligent distribution and security management system provided by the present invention; Figure 2 This is a schematic diagram of the layered decoupled distribution architecture and multi-level queue buffer provided by the present invention; Figure 3 This is a flowchart illustrating the intelligent SMS distribution and security management method provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] refer to Figure 1 , Figure 1 The diagram shows the overall architecture of the SMS intelligent distribution and security management system provided in this embodiment of the invention.
[0020] like Figure 1 As shown, the SMS intelligent distribution and security management system is a group-based SMS intelligent distribution and security management system. It is divided into three areas in terms of network topology: user access area, core service area and security access area. Strict access control between areas is carried out through firewall policies.
[0021] The user access area includes: an intranet access unit, a 4A trusted authentication system, and a system user access unit. The intranet access unit receives external SMS sending requests from individual users; the system user access unit receives external SMS sending requests from system users; and the 4A trusted authentication system performs unified authentication for external SMS sending requests from individual users. Specifically, the user access area mainly has two types of access entities: individual users and system users. Individual users access the web portal through the intranet access unit (e.g., intranet computers), while system users access third-party business systems through the system user access unit (e.g., WebService or HTTP interface). All external SMS sending requests must be forwarded through an Nginx reverse proxy server before reaching the backend service; the user end and the backend service do not directly access each other. Individual users are forced to complete unified authentication through the 4A trusted authentication system to achieve single sign-on and behavior auditing. Each business system, as a system user, initiates SMS requests through a WebService or HTTP interface. Both types of users use the HTTPS protocol to communicate with the backend, ensuring data encryption on the access side.
[0022] The core service area includes: an Nginx reverse proxy server, a web server cluster, a gateway server cluster, and a database. The Nginx reverse proxy server operates in a master-slave configuration; when the master node fails, the backup node takes over the service within seconds. The web server cluster is used to perform page interaction and business logic orchestration. The gateway server cluster is used to perform carrier protocol adaptation, channel scheduling, and SMS sending and receiving. The database includes a master database and a backup database; the master database handles all write operations, and the backup database executes query requests.
[0023] Specifically, the core service area is mainly used to deploy the core processing components of the SMS platform, including: an Nginx reverse proxy server, a web server cluster, a gateway server cluster, and a database layer. The Nginx reverse proxy server operates in a master-slave configuration, using Keepalived for virtual IP migration. In case of a master node failure, the backup node takes over within seconds, ensuring the continuity of the web portal and API services. Externally, TLS 1.2 or higher is uniformly and enforced for encrypted transmission, effectively preventing man-in-the-middle attacks and data eavesdropping risks. Simultaneously, the Nginx reverse proxy server intelligently routes requests based on request type: web requests from individual users are forwarded to the web server cluster, while API requests from system users are forwarded to the gateway server cluster, avoiding unnecessary protocol conversion overhead. The web server cluster and gateway cluster each consist of two nodes forming a load balancing group. The web server cluster is responsible for page interaction and business logic orchestration, while the gateway server cluster handles carrier protocol adaptation, channel scheduling, and SMS sending and receiving tasks. The database adopts a master-slave architecture, where the master database (primary database) handles all write operations, and the backup database (standby database) handles query requests, achieving read-write separation.
[0024] The secure access zone serves as a buffer between the SMS platform and the operator, comprising a firewall and two dedicated channels (primary and backup). The firewall is deployed within the channel layer, located between the gateway cluster (core service area) and the primary / backup dedicated line (secure access zone), opening only dedicated ports for the gateway cluster and establishing an IP whitelist. All SMS traffic entering and leaving the core service area must pass through the firewall for filtering. Both the gateway server cluster and the firewall, and the firewall and the primary service channel, are bidirectional full-duplex links, which in turn connect to the operator's SMS gateway. This design ensures that downlink SMS sending and uplink mobile phone replies are transmitted back along the same physical channel and are under constant firewall policy monitoring, eliminating the possibility of unauthorized bypass access. The secure access zone entry point also incorporates an intrusion prevention system that analyzes traffic characteristics in real time and blocks attacks such as port scanning and vulnerability probing.
[0025] In practical applications, mobile phone users can reply directly after receiving an SMS message. The reply message travels through the operator's gateway, secure access zone channel, and firewall to the gateway server cluster. The gateway server pushes the reply to the web cluster based on the message type, and then the web cluster displays it to the individual user via the 4A authentication node. For system users, the gateway directly pushes the reply content to the business system through a pre-configured callback interface, forming a complete two-way message loop.
[0026] The core bottleneck to SMS delivery efficiency lies in the speed matching between the gateway layer and the operator's channel. For example... Figure 2As shown, this invention divides the SMS distribution process into four independent logical functional layers: the access layer module, the scheduling layer module, the distribution layer module, and the channel layer module. These are deployed on physical nodes in the core service area and the secure access area, and their mapping relationship is shown in Table 1. Each layer is asynchronously decoupled through message queues.
[0027] Table 1 The access layer module is used to receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, and after formatting the messages of the verified external SMS sending requests, generate internal messages to be sent and write them to the access queue.
[0028] Specifically, the access layer module consists of an Nginx reverse proxy server and a web server cluster. After receiving an external SMS sending request, the Nginx reverse proxy server uses the web server cluster or gateway server cluster to perform authentication, parameter validation, and message formatting. Parameter validation checks the validity of fields in the request; message formatting converts the validated raw request into an internal information structure, extracting fields such as phone number, content, and sender to generate an internal message to be sent, which is then written to the access queue. External requests (Web requests / API requests) and internal messages to be sent follow a sequential order: external requests are received first, validated, and formatted, then the internal message to be sent is generated and entered into the queue.
[0029] The scheduling layer module is used to extract messages to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the messages to be sent into the distribution queue partition corresponding to the optimal channel.
[0030] Specifically, the intelligent scheduler is deployed as a logical component and runs on the gateway server cluster in the core service area. After retrieving messages to be sent from the access queue, the intelligent scheduler first determines the range of available channels based on the target operator of the message. Then, it dynamically selects the optimal channel based on the real-time health of each channel and places the message into the distribution queue partition corresponding to that channel. If the primary channel is normal, the message enters the distribution queue partition corresponding to the primary channel; if the primary channel is abnormal but the backup channel is normal, the scheduler uses the channel configuration corresponding to the backup channel, and the message enters the distribution queue partition corresponding to the backup channel.
[0031] The distribution layer module is used to cache messages to be sent by channel partitioning through the distribution queue, and to control the actual sending rate by using the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel.
[0032] Specifically, the distribution layer module includes a distribution queue partitioned by channel and a channel queue using the token bucket algorithm, deployed in the core service area. The distribution queue temporarily stores messages by channel partition, and the channel queue is bound one-to-one to each operator channel, using the token bucket algorithm to control the actual sending rate of that channel. Messages first enter the distribution queue (temporarily stored by channel partition), and then go to the corresponding channel queue (for controlled sending), with a specific order. The access queue, distribution queue, and channel queue are themselves concrete instances of message queues. Each layer's upstream is only responsible for writing, and the downstream is only responsible for pulling, achieving asynchronous decoupling. This distribution layer module can rely on independent message middleware or share physical resources with the gateway to achieve precise traffic control, i.e., peak shaving and rate limiting.
[0033] The channel layer module is used to extract messages to be sent from the channel queue, encapsulate them according to the operator's protocol, and send them to the operator's gateway through the primary and backup channels.
[0034] Specifically, the channel layer module consists of a gateway server cluster, a firewall, and primary / backup channels, deployed across the core service area and the secure access area. It is responsible for encapsulating messages according to the operator's protocol and sending them to the operator's gateway through the channel. Specifically, the gateway server cluster retrieves messages from the channel queue, encapsulates them according to the operator's protocol, filters them through the firewall, and sends them to the operator's gateway through the primary / backup channels. The operator's gateway is the node on the operator's side responsible for receiving requests from the SMS platform; it is a different entity from the channel (link).
[0035] Furthermore, in this invention, to address the high-concurrency SMS sending demand of 7 million messages per month and 230,000 messages per day, a three-level buffer model is constructed to achieve traffic shaping. This three-level buffer model consists of the aforementioned access queue, distribution queue, and channel queue.
[0036] Level 1: Access Queue. The access queue acts as a global buffer. When a large number of SMS messages arrive, they are first cached in the message queue and then sent out at a uniform rate according to the backend's capacity. Backlogged messages are resent during idle periods to smooth out peak traffic and protect backend services from being overwhelmed by sudden surges in traffic.
[0037] Level 2: Distribution Queue. The distribution queue is partitioned according to the operator channel. The scheduling layer routes the message to the corresponding distribution queue partition for temporary storage based on the target operator of the message.
[0038] Level 3: Channel Queue. The channel queue is bound one-to-one to each operator channel, using a token bucket algorithm to control the actual transmission rate of that channel. The token bucket generates tokens at a constant rate; each message transmission consumes one token. When tokens are insufficient, messages wait in the queue, thus controlling the transmission rate within the operator's allowed capacity (e.g., 200 messages / second), preventing channel blocking due to triggering the operator's frequency throttling policy caused by excessively fast transmission.
[0039] The layers are asynchronously decoupled through message queues: the access layer writes a message to the access queue and then returns; the scheduling layer pulls the message from the queue and writes it to the distribution queue partition; and the channel layer retrieves the message from the channel queue and sends it. The upstream layer returns after writing, and the downstream layer pulls messages as needed. Each layer can be independently expanded and horizontally scaled.
[0040] Furthermore, by constructing a deep security protection system consisting of a network protection layer, a transmission encryption layer, an identity authentication layer, and an application control layer, this invention achieves network isolation, end-to-end high-level encryption, interface signature authentication, and refined permission control, effectively improving the platform's anti-attack capability, data transmission security, and access control rigor.
[0041] The network protection module (network protection layer) is used to divide the network area into a user access area, a core service area, and a secure access area. Each area is isolated from the others by a firewall access control list and an Nginx reverse proxy. All external SMS sending requests are forwarded through the Nginx reverse proxy server.
[0042] Specifically, the platform adopts a partitioned network architecture design to achieve basic boundary security protection. The system divides the network area into a user access zone, a core service zone, and a secure access zone, avoiding the risk of unauthorized cross-regional access through physical and logical isolation. Isolation between the user access zone and the core service zone is achieved through an Nginx reverse proxy, without relying on independent firewall devices. A firewall ACL access control list is deployed between the core service zone and the secure access zone, opening access only to dedicated gateway service clusters and building an IP whitelist to allow only compliant ISP gateway addresses to access backend services, blocking all abnormal access requests from unknown source addresses. Simultaneously, an intrusion prevention system is installed at the entry point of the secure access zone to analyze network traffic characteristics in real time, proactively identifying and blocking attacks such as port scanning, vulnerability probing, and malicious intrusion, building a solid first line of defense at the network boundary. All front-end user (including individual users and system users) access traffic is proxied by Nginx before reaching the backend services, completely isolating the direct access path between the user end and the backend business servers, avoiding the intrusion risk caused by exposed ports.
[0043] The transmission encryption module (transmission encryption layer) is used for encrypted transmission using TLS 1.2 and above protocols.
[0044] End-to-end encryption is the core measure to ensure data transmission security. The transmission encryption module mandates the use of TLS 1.2 and above, disabling SSLv3, TLS 1.0, and TLS 1.1 protocols with known vulnerabilities. The system prioritizes high-security encryption suites, employing AES-256-GCM symmetric encryption. This encryption mode features forward security, ensuring that even if the system's long-term key is leaked, all previously transmitted communication data cannot be reverse-engineered, effectively protecting historical data security. All external system interfaces, including WebServices and HTTP interfaces, are restricted to HTTPS encrypted channels for data exchange.
[0045] TLS is used for external access links from the user access zone to the Nginx reverse proxy server in the core service zone. The Nginx reverse proxy server is responsible for the TLS handshake, certificate verification, and encryption / decryption termination. Backend services only process the decrypted plaintext business data, effectively reducing the computational load on the backend servers while ensuring transmission security. It should be noted that the identity verification during the TLS handshake phase refers to the verification of the server certificate's validity (ensuring the certificate is issued by a trusted CA), which is different from the 4A user authentication at the identity authentication layer. The system also has an automatic certificate rotation mechanism to periodically update server certificates, mitigating security risks such as expired or misused certificates from multiple sources.
[0046] The identity authentication module (identity authentication layer) is used to authenticate and verify the identities of individual users and system users.
[0047] The identity authentication module is deployed at the access layer. For individual users, unified authentication is performed through the 4A trusted authentication system (Authentication / Authorization / Accounting / Audit). When users access the web portal from their intranet computers, integrated authentication is automatically completed, eliminating the need to repeatedly enter passwords. This improves operational convenience and eliminates weak passwords and account sharing issues, achieving passwordless single sign-on. After successful authentication, fine-grained permissions are assigned based on user color. Ordinary users can only send a limited number and type of SMS messages, while administrators can configure channels and monitor the system. For system users (third-party system interface users), authentication is performed through the HMAC-SHA256 hash signature authentication mechanism. Each access system is independently assigned a unique access key and encryption key. Interface requests must integrate request parameters, timestamps, and random verification codes to complete an encrypted signature. After receiving the request, the access layer first verifies the signature validity and the request timestamp validity, accurately resisting common interface attacks such as parameter tampering and request replay. For high-risk interfaces such as bulk SMS sending and data querying, an additional caller IP whitelist binding mechanism is added to further compress the system attack surface.
[0048] The application control module (application control layer) is used to perform message content inspection and log management. The core of the application control module focuses on business security risks such as SMS fraud and the spread of illegal content, and is deployed on the web server cluster and gateway server cluster in the access layer.
[0049] In terms of traffic risk control, a multi-dimensional, tiered frequency restriction strategy is set: a maximum of 200 SMS messages can be sent to a single mobile number within 24 hours. At the same time, combined with the caller's IP address and system identity, a four-level traffic threshold control system is established for daily, weekly, monthly, and yearly traffic. If the limit is exceeded, a temporary blocking strategy is automatically executed to prevent malicious SMS resource grabbing.
[0050] In terms of content risk control: The intelligent sensitive word detection engine is deployed at the access layer to perform a full scan and screening of all text messages to be sent, and automatically block malicious links, fraudulent language, illegal remarks and other inappropriate content.
[0051] Blacklist / whitelist: Checks whether the sender's identity or the target number is in the blacklist or whitelist at the access layer.
[0052] Log Retention: The built-in log management module runs on the web server and gateway server, collecting operation behaviors and sending records in real time. It fully retains all user operation records and SMS sending logs, enabling full traceability and auditability of business behavior, and providing complete data support for subsequent security investigations, risk tracing, and compliance verification.
[0053] refer to Figure 3 , Figure 3 The specific process of the SMS intelligent distribution and security management method provided by the present invention is shown.
[0054] like Figure 3 As shown, this method for intelligent SMS distribution and security management includes the following steps: Step S10: Receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, format the messages of the verified external SMS sending requests, generate internal messages to be sent, and write them into the access queue.
[0055] In step S10, the authentication and parameter verification of external SMS sending requests include: for external SMS sending requests sent by individual users, unified identity verification is performed through the 4A trusted authentication system; for external SMS sending requests sent by system users, authentication is performed through the HMAC-SHA256 hash signature authentication mechanism, and a unique access key and encryption key are independently assigned to each accessing system. The interface request integrates request parameters, timestamp, and random verification code to complete the encrypted signature, and the server verifies the legality of the signature and the validity of the timestamp; for external SMS sending requests sent through high-risk interfaces, authentication is performed through an additional IP whitelist.
[0056] In step S10, the Nginx reverse proxy server operates in a primary / backup mode. When the primary node fails, the backup node takes over the service within seconds. The Nginx reverse proxy server performs intelligent traffic routing based on the type of external SMS sending requests, including forwarding Web requests sent by individual users to the Web server cluster and forwarding API requests sent by system users to the gateway server cluster.
[0057] Step S20: Extract the message to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the message to be sent into the distribution queue partition corresponding to the optimal channel.
[0058] The efficient and stable distribution of SMS messages relies not only on sufficient channel resources and bandwidth capacity to support basic transmission capabilities, but also on a refined and intelligent traffic scheduling mechanism as a core guarantee. To address issues such as message delivery delays and sending failures caused by operator SMS channel failures and overload, this platform has constructed a comprehensive dynamic perception and intelligent scheduling system for channel health. This system enables seamless business migration in abnormal scenarios, ensuring platform business continuity. Specifically, it establishes a quantitative health assessment model for each operator's dedicated communication channel, abandoning the single-indicator judgment method and achieving quantitative assessment through multi-dimensional fusion of real-time channel operating parameters. These multi-dimensional fusion of real-time channel operating parameters include: SMS real-time delivery success rate: Reflects the delivery quality of the channel; a higher success rate indicates a healthier channel. Average interface response latency: reflects the channel response speed; the lower the latency, the healthier the channel. Total message queue backlog: Reflects the degree of channel congestion; the less backlog, the healthier the channel. Channel load occupancy: Reflects the utilization of channel resources; the lower the load, the healthier the channel.
[0059] By monitoring the above core indicators and then using a weighted algorithm to dynamically calculate the health score of each channel across the four dimensions, abnormal conditions such as channel failures, congestion, and link interruptions can be accurately identified, providing data support for traffic scheduling.
[0060] Supported by a multi-channel redundant deployment architecture, the system possesses fault-tolerant scheduling capabilities for rapid switching between primary and backup channels. Under normal operating conditions, all SMS distribution services are carried by default through the primary channel, ensuring transmission efficiency and stability. When the health assessment model detects that the primary channel is unavailable due to link failure, service interruption, or operational anomalies, the intelligent scheduling layer can instantly trigger an emergency alarm and automatically and rapidly switch services to the backup channel, achieving fully automatic migration of service traffic and quickly switching all pending transmission services to the backup channel.
[0061] The primary / backup switching mechanism has a response speed of up to the second level (no more than 10 seconds), does not interrupt the upper-layer business process, is completely transparent to the upstream application business, completely avoids the business stagnation problem caused by single-channel failure, and greatly improves the fault tolerance, risk resistance and overall operational reliability of the SMS distribution system, thus providing a solid technical guarantee for the continuous and stable transmission of massive amounts of SMS messages.
[0062] To evaluate the actual operating efficiency of the system, Table 2 lists the key performance indicators of the system under this architecture.
[0063] Table 2 As can be seen from the above indicators, through the synergistic effect of primary and backup redundancy deployment, multi-level buffer queues, and intelligent scheduling mechanisms, the platform can ensure high availability and efficient distribution of SMS messages at a scale of 7 million messages per month, meeting the diverse SMS sending needs within the group.
[0064] Step S30: Cache messages to be sent by channel partitioning through the distribution queue, and control the actual sending rate using the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel.
[0065] Step S40: Extract the message to be sent from the channel queue, encapsulate it according to the operator protocol, and send it to the operator gateway through the primary and backup channels.
[0066] Furthermore, this invention not only supports downlink SMS sending, but also enables a two-way message loop for uplink mobile phone replies, as detailed below: Mobile users can reply directly after receiving an SMS message. The reply message travels through the operator's gateway, secure access zone channel, and firewall to the gateway server cluster. The gateway server pushes the reply to the web cluster based on the message type, and then the web cluster displays it to the individual user via the 4A authentication node. For system users, the gateway directly pushes the reply content to the corresponding business system through a pre-configured callback interface, forming a complete two-way message loop.
[0067] Downlink SMS sending and uplink mobile phone reply are transmitted back along the same physical channel. The gateway server cluster and the firewall, as well as the firewall and the primary and backup channels, are all bidirectional full-duplex links.
[0068] Compared with traditional solutions, the present invention has the following advantages: This invention uses dynamic channel health perception and weighted algorithms to evaluate the success rate of sending messages, response latency, queue backlog and load occupancy of each channel in real time, and dynamically selects the optimal channel to distribute messages. This avoids the uneven channel load and message congestion caused by traditional static routing, and significantly improves message delivery efficiency in high-concurrency scenarios.
[0069] This invention effectively smooths out traffic spikes and fills valleys by setting up a three-level buffer model of access queue, distribution queue, and channel queue, combined with the token bucket algorithm. This prevents sudden traffic surges from impacting operator channels, avoids channel blocking due to overclocking, and ensures the stable delivery of an average of 7 million SMS messages per month.
[0070] This invention solves the problems of fixed routing, insufficient throughput, and high distribution latency in traditional systems by dividing the platform into a four-layer decoupled architecture consisting of an access layer, a scheduling layer, a distribution layer, and a channel layer, combined with multi-level queue buffering and channel load-aware intelligent scheduling. At the same time, the use of full-component primary and backup redundancy and dual-channel link deployment further enhances the overall fault tolerance and business continuity of the system.
[0071] In addition to solving the problems in the prior art, this invention constructs a deep security protection system consisting of a network protection layer, a transmission encryption layer, an identity authentication layer, and an application control layer. This system achieves network isolation, end-to-end high-level encryption, interface signature authentication, and refined permission control, effectively improving the platform's anti-attack capability, data transmission security, and access control rigor.
[0072] This invention addresses business risks such as SMS fraud, malicious spamming, and the spread of illegal content by setting multi-level sending frequency thresholds, filtering sensitive words, and retaining full operation logs, thereby further enhancing the platform's compliance audit capabilities and business risk control level.
[0073] This invention integrates the enterprise's 4A unified authentication system to enable passwordless single sign-on for internal users, which simplifies the usage process while ensuring account security, and further improves system usability, ease of operation and maintenance, and management standardization.
[0074] This invention achieves end-to-end redundancy through Nginx primary / backup, server cluster load balancing, database primary / backup and dual-channel primary / backup, with automatic switching within seconds in case of single point of failure, and system availability exceeding 99.9%.
[0075] Furthermore, an electronic device of the present invention includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the SMS intelligent distribution and security management method as described above. Specifically, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, when the computer program is downloaded, installed, and executed by an electronic device, it performs the functions defined in the methods of the embodiments of the present invention. The electronic device of the present invention can be a terminal such as a laptop, desktop computer, tablet computer, or smartphone, or it can be a server.
[0076] Furthermore, one type of storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the SMS intelligent distribution and security management method described above. Specifically, it should be noted that the storage medium described above in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein it carries computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0077] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0078] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0079] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0080] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0081] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They do not limit the scope of protection of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A method for intelligent SMS distribution and security management, characterized in that, Includes the following steps: step S10: Receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, format the messages of the verified external SMS sending requests, generate internal messages to be sent, and write them into the access queue. Step S20: Extract the message to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the message to be sent into the distribution queue partition corresponding to the optimal channel. Step S30: Messages to be sent are cached by channel partition through the distribution queue, and the actual sending rate is controlled by the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel; Step S40: Extract the message to be sent from the channel queue, encapsulate it according to the operator protocol, and send it to the operator gateway through the primary and backup channels.
2. The SMS intelligent distribution and security management method according to claim 1, characterized in that, In step S10, the authentication and parameter verification of the external SMS sending request includes: For external SMS sending requests sent by individual users, unified identity verification is performed through the 4A trusted authentication system; For external SMS sending requests sent by system users, authentication is performed through the HMAC-SHA256 hash signature authentication mechanism. Each user is assigned a unique access key and encryption key. The interface request integrates request parameters, timestamp, and random verification code to complete the encryption signature. The server verifies the signature validity and timestamp validity. For external SMS sending requests sent through high-risk interfaces, authentication is performed using an additional IP whitelist.
3. The method for intelligent SMS distribution and security management according to claim 1, characterized in that, In step S10, the Nginx reverse proxy server runs in a primary / backup mode. When the primary node fails, the backup node takes over the service within seconds. The Nginx reverse proxy server intelligently routes external SMS sending requests based on their type, including: Web requests sent by individual users are forwarded to the web server cluster; API requests sent by system users are forwarded to the gateway server cluster.
4. The method for intelligent SMS distribution and security management according to claim 1, characterized in that, The method also includes the following steps: The network area is divided into a user access area, a core service area, and a security access area; each area is isolated from the other by a firewall access control list and an Nginx reverse proxy, and all external SMS sending requests are forwarded through the Nginx reverse proxy server. Encrypted transmission is performed using TLS 1.2 or later. Set a 24-hour sending limit for a single mobile number, and establish a four-level traffic threshold control system (daily, weekly, monthly, and yearly) based on the caller's IP address and system identity. Temporarily block external SMS sending requests that exceed the limit.
5. The method for intelligent SMS distribution and security management according to claim 1, characterized in that, The access queue will first cache a large number of SMS messages and then send them out at a uniform rate according to the backend's capacity, and resend the backlog of messages during idle periods. The distribution queue is partitioned according to the operator channel, and the scheduling layer routes the message to the corresponding channel's distribution queue partition based on the target operator of the message to be sent; The channel queue is bound to each operator one-to-one, and the token bucket algorithm is used to control the actual transmission rate of the channel. The message passes through the access queue, the distribution queue partition, and the channel queue in sequence.
6. A smart SMS distribution and security management system, characterized in that, include: The access layer module is used to receive external SMS sending requests through the Nginx reverse proxy server, perform identity authentication and parameter verification on the external SMS sending requests, and after formatting the messages of the verified external SMS sending requests, generate internal messages to be sent and write them to the access queue. The scheduling layer module is used to extract messages to be sent from the access queue, dynamically select the optimal channel based on the determined range of available channels and the real-time health of each channel, and put the messages to be sent into the distribution queue partition corresponding to the optimal channel. The distribution layer module is used to cache messages to be sent by channel partitioning through the distribution queue, and to control the actual sending rate by using the token bucket algorithm through the channel queue that is bound one-to-one with each operator channel. The channel layer module is used to extract messages to be sent from the channel queue, encapsulate them according to the operator's protocol, and send them to the operator's gateway through the primary and backup channels.
7. The SMS intelligent distribution and security management system according to claim 6, characterized in that, Also includes: The network protection module is used to divide the network area into a user access zone, a core service zone, and a secure access zone. Each zone is isolated from the others by a firewall access control list and an Nginx reverse proxy. All external SMS sending requests are forwarded through the Nginx reverse proxy server. The transmission encryption module is used for encrypted transmission using TLS 1.2 and above protocols. The identity authentication module is used to authenticate and verify the identities of individual users and system users; The application control module is used to perform message content inspection and log management.
8. The SMS intelligent distribution and security management system according to claim 7, characterized in that, The user access area includes: intranet access unit, 4A trusted authentication system, and system user access unit; The intranet access unit is used to receive external SMS sending requests from individual users; The system user access unit is used to receive external SMS sending requests sent by system users; The 4A Trusted Authentication System is used to perform unified identity verification for external SMS sending requests sent by individual users; The core service area includes: Nginx reverse proxy server, web server cluster, gateway server cluster, and database; The Nginx reverse proxy server runs in a master-slave mode. When the master node fails, the backup node takes over the service within seconds. Web server clusters are used to perform page interactions and business logic orchestration; The gateway server cluster is used to perform operator protocol adaptation, channel scheduling, and SMS sending and receiving. The database consists of a primary database and a standby database. The primary database handles all write operations, while the standby database executes query requests.
9. A storage medium, characterized in that, The storage medium stores a computer program adapted for loading by a processor to perform the steps of the SMS intelligent distribution and security management method as described in any one of claims 1 to 5.
10. An electronic device, characterized in that, It includes a memory and a processor. The memory stores a computer program, and the processor executes the steps of the SMS intelligent distribution and security management method as described in any one of claims 1 to 5 by calling the computer program stored in the memory.
