Short message flow control method, short message management platform and related equipment
By performing fine-grained flow control based on the SMS type and business characteristics in the SMS management platform, the problem of unsatisfactory SMS traffic control in the existing technology is solved, and more efficient SMS traffic management and system stability are achieved.
Patent Information
- Application Number
- CN202410148768.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-27
- Filing Date
- 2024-01-31
- Publication Date
- 2025-03-28
AI Technical Summary
The existing SMS traffic control method is not ideal in flow control, and it cannot effectively avoid system crashes caused by SMS traffic exceeding the system load.
By flow control based on the SMS type in the SMS request in the SMS management platform, a more fine-grained flow control method is provided, including sharding flow control for long and mass text messages, and configuring different flow control thresholds according to business characteristics.
It improves the precision and effect of flow control, avoids system crashes caused by overloading SMS traffic, and ensures the stability of SMS management platform.
Smart Images

Figure CN119729372A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202311262438.2 filed on September 27, 2023, with invention name “A method and system for SMS traffic control”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of cloud technology, and in particular to a method for controlling text message traffic, a text message management platform, and related equipment. Background Art
[0003] Enterprises can use SMS cloud services to send SMS messages to users individually or in groups, such as verification code SMS messages, notification SMS messages, and promotional SMS messages, to improve SMS sending efficiency. Furthermore, SMS cloud services can control the flow of SMS messages to prevent SMS traffic from exceeding the system load and causing system crashes.
[0004] In the related art, the enterprise side deploys a client, and the enterprise sends a text message request to the SMS cloud service through the client, and the SMS request carries the relevant information of the SMS to be sent. When the SMS cloud service recognizes the SMS request from the client through the application programming interface (API), it applies for a token from a pre-configured token bucket. If the current number of tokens applied for is 0, it stops sending the SMS carried by the SMS request, thereby realizing SMS flow control. However, the flow control effect of this flow control method is not ideal. Summary of the invention
[0005] The embodiment of the present application provides a method for controlling SMS traffic, a SMS management platform and related devices, which can perform traffic control based on the SMS type of the SMS in the SMS request, and provide a more fine-grained traffic control method, thereby improving the traffic control effect. The technical solution is as follows:
[0006] In a first aspect, a method for controlling SMS traffic is provided. The method is applied to an SMS management platform. The SMS management platform is used to send SMS messages to a receiving end according to an acquired SMS request.
[0007] In the method, a text message request input by a user is obtained, the text message request includes at least one text message; based on the text message request, the text message type of the at least one text message is determined; based on the text message type of the at least one text message and a flow control threshold, a flow control result is determined, the flow control threshold is used to indicate the total amount of text messages currently allowed to be sent to the receiving end, and the flow control result is used to indicate the text messages to be sent to the receiving end in the at least one text message; based on the flow control result, the text messages to be sent are sent to the receiving end.
[0008] In the method provided in the embodiment of the present application, when the SMS management platform receives the SMS request input by the user, it determines the SMS type of at least one SMS included in the SMS request, and then determines the flow control result according to the SMS type of at least one SMS and the flow control threshold. In other words, the embodiment of the present application provides a method for flow control based on the SMS type of the SMS itself. Compared with the simple API-level flow control, the method provided in the embodiment of the present application can improve the sophistication of flow control, thereby improving the flow control effect.
[0009] Based on the method provided in the first aspect, in a possible implementation, at least one SMS includes a first SMS of a long SMS type, the long SMS is an SMS whose total bytes exceed a reference value, and the flow control threshold is used to indicate the total number of SMS currently allowed to be sent to the receiving end. In this scenario, the implementation method for determining the flow control result according to the SMS type and the flow control threshold of at least one SMS can be: obtaining the total number of SMS fragments of the first SMS; determining the flow control result according to the total number of SMS fragments of the first SMS and the flow control threshold.
[0010] For long text messages, since the text message management platform sends long text messages to the operator network in sequence according to the text message fragments, when the text message management platform controls the flow of the first text message, if it performs flow control according to the total number of text message fragments of the first text message, the accuracy of flow control can be improved.
[0011] Based on the method provided in the first aspect, in a possible implementation manner, the SMS request carries the total number of SMS fragments of the first SMS.
[0012] In some scenarios, when sending a long SMS, the client on the enterprise side can first split the long SMS into segments, and then send a SMS request carrying one SMS segment to the SMS management platform each time. Each SMS request sent carries long SMS indication information and segment number information. The segment number information indicates which SMS segment the current SMS segment is of the long SMS, and carries the total number of SMS segments in the first or each SMS request sent. In this scenario, if the SMS request carries the first SMS segment of the first SMS, the SMS request also carries the long SMS indication information and the total number of SMS segments of the first SMS.
[0013] Based on the method provided in the first aspect, in a possible implementation manner, in response to the total number of bytes of the first text message exceeding a reference value, the first text message is divided into a plurality of text message segments.
[0014] In other scenarios, when sending a long SMS, the client on the enterprise side does not fragment the long SMS, but directly carries the entire content of the long SMS in the SMS request and sends it to the SMS management platform. In this scenario, when the SMS management platform parses the first SMS carried in the SMS request, it can determine whether the first SMS is a long SMS based on the total number of bytes of the first SMS, and if it is determined that the first SMS is a long SMS, it will fragment the first SMS.
[0015] Based on the method provided in the first aspect, in a possible implementation, at least one text message includes a second text message of a group text message type, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end. In this scenario, the implementation method for determining the flow control result according to the text message type and the flow control threshold of at least one text message can be: obtaining the total number of recipients of the second text message; and determining the flow control result according to the total number of recipients of the second text message and the flow control threshold.
[0016] For group SMS, since the SMS management platform sends SMS in sequence according to the recipients of the group SMS, when the SMS management platform controls the flow of the second SMS, if it performs flow control according to the total number of recipients of the second SMS, the accuracy of flow control can be improved.
[0017] Based on the method provided in the first aspect, in one possible implementation, before determining the flow control result according to the SMS type and flow control threshold of at least one SMS, the service characteristics of at least one SMS can also be determined according to the SMS request; and the flow control threshold can be determined according to the service characteristics of at least one SMS.
[0018] In an embodiment of the present application, different flow control thresholds can be configured in advance according to the service characteristics of the text messages, thereby achieving separate flow control for text messages of different services, thereby improving the precision of the flow control and further improving the flow control effect.
[0019] Based on the method provided in the first aspect, in one possible implementation, the service characteristics include the user type of the sender of the corresponding text message and / or the function type of the corresponding text message, the user type is used to indicate the priority of the corresponding user, and the function type is used to indicate the priority of the corresponding text message.
[0020] By configuring the flow control threshold according to the user type and / or function type of the SMS, it is possible to separate flow control according to the user type and / or function type of the SMS, thereby ensuring the communication of high-priority users or high-priority SMS.
[0021] Based on the method provided in the first aspect, in one possible implementation, before determining the service characteristics of at least one text message according to the text message request, at least one text message is authenticated; after the at least one text message is authenticated, an operation of determining the service characteristics of at least one text message according to the text message request is executed.
[0022] Since the relevant data of the sender of the SMS may be involved when the SMS is controlled based on business characteristics, and the relevant data of the sender has security risks, completing authentication before the flow control based on business characteristics can improve the security of the SMS.
[0023] Based on the method provided in the first aspect, in a possible implementation, the flow control threshold includes a first flow control threshold and a second flow control threshold, the first flow control threshold is greater than the second flow control threshold, and the second flow control threshold is used to indicate the flow control threshold when the SMS management platform is overloaded. In this scenario, the implementation method of determining the flow control result according to the SMS type of at least one SMS and the flow control threshold can be: when the system overload is detected, the flow control result is determined according to the SMS type of at least one SMS and the second flow control threshold.
[0024] Through the above method, the flow control threshold can be lowered when the system is overloaded, thereby ensuring the stability of the SMS management platform.
[0025] Based on the method provided in the first aspect, in a possible implementation, the flow control threshold includes a self-preservation flow control threshold, and the self-preservation flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing self-preservation flow control.
[0026] In an embodiment of the present application, the SMS management platform can perform flow control based on the SMS type when performing self-protection flow control to improve the flow control effect during self-protection flow control.
[0027] Based on the method provided in the first aspect, in a possible implementation manner, the SMS request is an SMS request based on a long link protocol, and the self-protection flow control threshold is a flow control threshold of a link that transmits the SMS request.
[0028] By configuring the flow control threshold for the long link, you can implement self-preservation flow control on the link.
[0029] Based on the method provided in the first aspect, in one possible implementation, the flow control threshold includes a cluster flow control threshold, and the cluster flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing cluster flow control. The SMS management platform performs different cluster flow controls for different SMS protocols, and the SMS management platform shares the cluster flow control threshold when performing different cluster flow controls.
[0030] In the embodiment of the present application, the SMS management platform can perform flow control based on the SMS type when performing cluster flow control to improve the flow control effect during cluster flow control. And all cluster flow controls share the same flow control threshold to achieve flow control at the global level.
[0031] Based on the method provided in the first aspect, in a possible implementation, before obtaining the SMS request input by the user, link layer data can also be received, the link layer data carrying the SMS request; the total size of the link layer data is determined; if it is determined based on the total size of the link layer data that the Transmission Control Protocol TCP buffer pool can cache the link layer data, the link layer data is cached in the TCP buffer pool.
[0032] Since the size of the link layer data can be determined without parsing the SMS request, the above method can be used to control the SMS flow directly at the link layer before the SMS flow is controlled based on the SMS type, so as to avoid the SMS management platform crashing due to massive SMS exceeding the load of the downstream nodes in the SMS management platform.
[0033] In a second aspect, a method for controlling SMS traffic is provided, which is applied to an SMS management platform. In the method, link layer data is received, the link layer data carries a SMS request input by a user; the total size of the link layer data is determined; if it is determined based on the total size of the link layer data that a transmission control protocol TCP buffer pool can cache the link layer data, the link layer data is cached in the TCP buffer pool.
[0034] Since the size of link layer data can be determined without parsing SMS requests, the SMS traffic can be controlled at the link layer through the above method to avoid massive SMS exceeding the load of downstream nodes in the SMS management platform and causing the SMS management platform to crash.
[0035] In a third aspect, a short message management platform is provided, which has the function of implementing the short message flow control method in the first aspect. The short message management platform includes at least one module, which is used to implement the short message flow control method provided in the first aspect.
[0036] In a fourth aspect, a short message management platform is provided, which has the function of implementing the short message flow control method in the second aspect. The short message management platform includes at least one module, which is used to implement the short message flow control method provided in the second aspect.
[0037] In a fifth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the SMS traffic control method provided in the first or second aspect above.
[0038] In a sixth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the SMS traffic control method provided in the first aspect or the second aspect.
[0039] In a seventh aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the SMS traffic control method provided in the first aspect or the second aspect.
[0040] The technical effects obtained by the corresponding technical means in the above-mentioned third to seventh aspects are similar to the technical effects of the first and second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a schematic diagram of a scenario of sending text messages through a text message cloud service provided by an embodiment of the present application;
[0042] Figure 2 It is a schematic diagram of the architecture of a short message management platform provided in an embodiment of the present application;
[0043] Figure 3 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0044] Figure 4 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0045] Figure 5 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0046] Figure 6 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0047] Figure 7 This is a schematic diagram of an architecture in which Redis uniformly manages the token buckets of each flow control node, provided in an embodiment of the present application;
[0048] Figure 8 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0049] Fig. 9 It is a schematic diagram of the architecture of another SMS management platform provided in an embodiment of the present application;
[0050] Fig.10 This is a flow chart of a method for controlling SMS traffic provided by an embodiment of the present application;
[0051] Fig.11This is a schematic diagram of a SMS flow control process for a long SMS scenario provided by an embodiment of the present application;
[0052] Fig.12 This is another SMS traffic control flow diagram provided by an embodiment of the present application;
[0053] Fig.13 It is a schematic diagram of a flow process of performing flow control through a flow control group provided in an embodiment of the present application;
[0054] Fig.14 It is a schematic diagram of lowering the initial flow control threshold corresponding to the comprehensive service identifier provided in an embodiment of the present application;
[0055] Fig.15 It is a flow chart of a TCP buffer node flow control SMS provided in an embodiment of the present application;
[0056] Fig.16 It is a flow diagram of another TCP buffer node flow control SMS provided in an embodiment of the present application;
[0057] Fig.17 It is a structural diagram of a short message management platform provided in an embodiment of the present application;
[0058] Fig.18 It is a structural diagram of another SMS management platform provided in an embodiment of the present application;
[0059] Fig.19 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0060] Fig. 20 It is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application;
[0061] Fig.21 It is a schematic diagram of the architecture of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0063] Before explaining the embodiments of the present application, the technical terms involved in the embodiments of the present application are first introduced.
[0064] SMS cloud service: a cloud service that provides single and group SMS for enterprises or individuals.
[0065] SMS management platform: a cloud platform used to provide SMS cloud services. The SMS management platform can also be called an SMS cloud platform, an SMS cloud service platform, or a cloud management platform, etc.
[0066] CMPP: The full name is China Mobile peer to peer protocol, which is the Internet SMS gateway interface protocol of China Mobile Communications.
[0067] SMPP: The full name is short message peer-to-peer protocol, which is an open international industry standard protocol.
[0068] Token: This is called a token in flow control technology. A business request, such as a text message request, can only continue to be processed after obtaining a valid token.
[0069] Figure 1 Schematic diagram of a scenario of sending SMS via SMS cloud service provided by an embodiment of the present application. Figure 1 As shown, the enterprise side is deployed with a client, and the enterprise can send a text message request to the SMS cloud service through the client. After the SMS cloud service processes the text message request, it sends the text message to be sent to the operator network through the supplier gateway, and then the operator network sends the text message to users such as user 1 and user 2. Among them, the supplier gateway is optional, that is, the SMS cloud service can directly send the text message to be sent to the operator network.
[0070] exist Figure 1 In the scenario shown, when the SMS cloud service receives a large number of SMS requests, if the traffic of the SMS requests exceeds the amount that the SMS cloud service can carry, it is easy to cause the SMS cloud service system to crash, thereby affecting the normal SMS sending of the enterprise. Based on this, the SMS cloud service performs flow control on the received SMS requests to ensure system stability.
[0071] In some scenarios, when the SMS cloud service recognizes a SMS request from a client through the application programming interface (API), it directly applies for a token from a pre-configured token bucket. If the current number of tokens applied for is 0, it stops sending the SMS carried in the SMS request, thereby implementing SMS flow control. Since flow control is performed directly when the SMS request is recognized through the API, this flow control method is also called API-level flow control. However, this flow control method is too rough, resulting in unsatisfactory flow control effects.
[0072] Based on this, an embodiment of the present application provides a method for SMS flow control. In the method provided in the embodiment of the present application, when the SMS management platform receives the SMS request input by the user, it determines the SMS type of at least one SMS included in the SMS request, and then determines the flow control result according to the SMS type of at least one SMS and the flow control threshold. In other words, the embodiment of the present application provides a method for flow control based on the SMS type of the SMS itself. Compared with the simple API-level flow control, the method provided in the embodiment of the present application can improve the sophistication of flow control, thereby improving the flow control effect.
[0073] The following is an explanation of the SMS management platform, SMS traffic control method and related products provided in the embodiments of the present application.
[0074] Figure 2 Schematic diagram of the architecture of a short message management platform provided in the embodiment of the present application. Figure 2 As shown, the SMS management platform 00 includes at least one flow control node 10 and at least one service processing node 20. Figure 1 A flow control node 10 and a service processing node 20 are used as an example for description. The embodiment of the present application does not limit the number of flow control nodes 10 and service processing nodes 20.
[0075] Among them, the SMS management platform 00 is used to send SMS to the receiving end according to the obtained SMS request. For example, for any flow control node 10, the flow control node 10 is used to receive the SMS request from the client, and the SMS request is input by the user on the client. The flow control node 10 is also used to parse the SMS type of the SMS to be sent from the SMS request, and then perform flow control on the SMS according to the flow control threshold corresponding to the flow control node 10 and the SMS type of the SMS. When the flow control result indicates that the SMS is allowed to be sent, the flow control node 10 sends the SMS to the business processing node 20. The business processing node 20 is used to perform business processing on the SMS, such as converting the SMS to different protocols to adapt to different operator networks, and sending the processed SMS to the operator network, and then the operator network sends the SMS to the receiving end of the SMS.
[0076] The SMS request may be, for example, an SMS request based on a hypertext transfer protocol (HTTP), an SMS request based on a China Mobile peer to peer protocol (CMPP), or an SMS request based on a short message peer-to-peer protocol (SMPP). For the convenience of subsequent description, an SMS request based on HTTP is referred to as an HTTP SMS request, an SMS request based on CMPP is referred to as a CMPP SMS request, and an SMS request based on SMPP is referred to as an SMPP SMS request.
[0077] The SMS request in the embodiments of the present application is not limited to the SMS request of the above three protocols, and can be an SMS request based on any protocol, which will not be illustrated one by one here.
[0078] In addition, the flow control threshold corresponding to the flow control node 10 can be used to indicate the total amount of text messages currently allowed to be sent by the flow control node 10 to the receiving end, which can be the total number or total size, etc.
[0079] In the embodiment of the present application, different flow control nodes 10 can be used to perform flow control of various dimensions on the SMS in the SMS management platform, and the flow control thresholds corresponding to different flow control nodes 10 are related to the functions of the corresponding flow control nodes 10. The following are examples of different flow control nodes 10.
[0080] In some embodiments, Figure 3 As shown, at least one flow control node 10 includes at least one service flow control node 101. Figure 3 In the example of a service flow control node 101, the number of service flow control nodes is not limited in the embodiment of the present application. Each service flow control node 101 in at least one service flow control node 101 is configured with multiple comprehensive service identifiers, each of which is used to indicate a type of service feature, and each of the multiple comprehensive service identifiers corresponds to a flow control threshold.
[0081] In an embodiment of the present application, multiple comprehensive service identifiers can be set in advance according to the service characteristics of the text messages, and different flow control thresholds can be configured for these multiple comprehensive service identifiers, thereby achieving separate flow control for text messages of different services, thereby improving the precision of flow control and further improving the flow control effect.
[0082] In other words, the service flow control node 101 not only considers the SMS type but also the service characteristics of the SMS during flow control. In the embodiment of the present application, the SMS type may include, for example, long SMS or group SMS, etc. Service characteristics may be understood as characteristics related to the service carried by the SMS, and the service characteristics may include, for example, the function type of the SMS and / or the user type of the SMS. The function type of the SMS specifically refers to the function implemented by the SMS, and the user type of the SMS specifically refers to the user type of the sender of the SMS. For example, the user type is used to indicate the priority of the corresponding user, and the function type is used to indicate the priority of the corresponding SMS. For example, the function types include notification SMS, promotion SMS, and verification code SMS, and the user types include high priority users, medium priority users, and low priority users, etc.
[0083] like Figure 3 As shown, when the service flow control node 101 in the flow control node 10 receives a text message request, after parsing the text message type and service characteristics of the text message from the text message request, it first selects a target comprehensive service identifier from multiple comprehensive service identifiers based on the service characteristics of the text message, and determines the flow control threshold corresponding to the target comprehensive service identifier; then determines the flow control result based on the text message type of the text message and the flow control threshold corresponding to the target comprehensive service identifier.
[0084] Among them, the specific functions of the service flow control node 101 are described in detail in the subsequent method embodiments and will not be expanded here.
[0085] In other embodiments, Figure 4 As shown, the SMS management platform 00 also includes at least one authentication node 30, Figure 4 In the example, an authentication node 30 is used for explanation, and the embodiment of the present application does not limit the number of authentication nodes 30. The authentication node 30 is used to authenticate the SMS before the service flow control node 101 performs flow control on the SMS. Since the service flow control node 101 may involve the relevant data of the sender of the SMS when the SMS is flow controlled, and the relevant data of the sender has security risks, the authentication is completed before the service flow control node 101 performs flow control, which can improve the security of the service flow control node 101.
[0086] In other embodiments, Figure 5 As shown, at least one flow control node 10 includes at least one self-protection flow control node 102, Figure 5In the embodiment, a self-preservation flow control node 102 is used as an example for explanation, and the embodiment of the present application does not limit the number of self-preservation flow control nodes 102. Among them, each self-preservation flow control node 102 in at least one self-preservation flow control node 102 corresponds to a flow control threshold, and the flow control threshold corresponding to each self-preservation flow control node 102 can be understood as the flow control threshold of the self-preservation flow control node 102 system. For example, if the self-preservation flow control node 102 is deployed on a server, the flow control threshold corresponding to the self-preservation flow control node 102 can be understood as the upper limit of the SMS processing allowed by the current performance of the server.
[0087] like Figure 5 As shown, when the self-preservation flow control node 102 in the flow control node 10 receives a text message request, after parsing the text message type of the text message from the text message request, it determines the flow control result based on the text message type of the text message and its own corresponding flow control threshold.
[0088] in, Figure 5 The self-protection flow control node 102 in the embodiment can be an HTTP self-protection flow control node or a long link self-protection flow control node. The HTTP self-protection flow control node can be understood as a self-protection flow control node that processes HTTP SMS requests. The long link self-protection flow control node can include a CMPP self-protection flow control node or an SMPP self-protection flow control node. The CMPP self-protection flow control node can be understood as a self-protection flow control node that processes CMPP SMS requests. The SMPP self-protection flow control node can be understood as a self-protection flow control node that processes SMPP SMS requests.
[0089] The specific functions of the self-preservation flow control node 102 will be described in detail in the subsequent method embodiments and will not be expanded here.
[0090] In other embodiments, Figure 6 As shown, at least one flow control node 10 includes at least one cluster flow control node 103, Figure 6 In the description, a cluster flow control node 103 is taken as an example, and the embodiment of the present application does not limit the number of cluster flow control nodes 103. Each cluster flow control node 103 in at least one cluster flow control node 103 corresponds to at least one SMS protocol, and each cluster flow control node 103 in at least one cluster flow control node 103 manages multiple processes, which are used to process SMS requests based on the SMS protocol corresponding to the corresponding cluster flow control node.
[0091] For example, at least one cluster flow control node 103 includes at least one HTTP cluster flow control node and at least one CMPP / SMPP cluster flow control node. The multiple processes managed by each HTTP cluster flow control node are used to receive and process HTTP SMS requests, and the multiple processes managed by each CMPP / SMPP cluster flow control node are used to receive and process CMPP SMS requests and SMPP SMS requests.
[0092] For another example, at least one cluster flow control node 103 includes at least one HTTP cluster flow control node, at least one CMPP cluster flow control node, and at least one SMPP cluster flow control node. The multiple processes managed by each CMPP cluster flow control node are used to receive and process CMPP SMS requests, and the multiple processes managed by each SMPP cluster flow control node are used to receive and process SMPP SMS requests.
[0093] In this scenario, for example, at least one cluster flow control node 103 shares the same flow control threshold to achieve global flow control of SMS messages. Figure 6 As shown, when any cluster flow control node 103 in the flow control node 10 receives a text message request, after parsing the text message type of the text message from the text message request, determines the flow control result based on the text message type of the text message and the flow control threshold for the global cluster flow control node.
[0094] Optionally, at least one cluster flow control node 103 may also correspond to a flow control threshold respectively. In this case, the flow control threshold corresponding to each cluster flow control node 103 indicates the flow control threshold of multiple processes managed by the cluster flow control node 103.
[0095] The specific functions of the cluster flow control node 103 will be described in detail in the subsequent method embodiments and will not be expanded here.
[0096] It should be noted that in the SMS management platform provided in the embodiment of the present application, at least one flow control node 10 may include one or more of a business flow control node 101, a self-protection flow control node 102, and a cluster flow control node 103. In other words, at least one flow control node 10 may include a business flow control node 101 but not other flow control nodes, or include a self-protection flow control node 102 but not other flow control nodes, or include a cluster flow control node but not other flow control nodes. It may also include a business flow control node 101 and a self-protection flow control node 102 at the same time, or include a business flow control node 101 and a cluster flow control node 103 at the same time, or include a self-protection flow control node 102 and a cluster flow control node 103 at the same time. It may also include a business flow control node 101, a self-protection flow control node 102, and a cluster flow control node 103 at the same time.
[0097] Among them, in the scenario where at least one flow control node 10 includes a service flow control node 101, and also includes a self-protection flow control node 102 and / or a cluster flow control node 103, the authentication node 30 can be set after the self-protection flow control node 102 and / or the cluster flow control node 103, but before the service flow control node 101. In other words, the self-protection flow control node 102 and / or the cluster flow control node 103 first performs flow control on the SMS, then the authentication node 30 authenticates the SMS, and finally the service flow control node 101 continues to perform flow control on the SMS.
[0098] Since the authentication process of the authentication node 30 takes some time, the SMS is first flow controlled by the self-protection flow control node 102 and / or the cluster flow control node 103 to avoid system crash caused by massive SMS requests.
[0099] In addition, the flow control threshold corresponding to any of the above flow control nodes can be implemented by a token bucket algorithm. For example, a token bucket can be configured for the flow control node when the system is initialized. The total number of tokens in the token bucket indicates the initial flow control threshold. Tokens are subsequently added to the token bucket at a constant rate. If a text message request needs to be processed, a token must be obtained from the token bucket first. When there is no token available in the token bucket, the text message request is rejected. Therefore, the number of remaining tokens in the token bucket indicates the flow control threshold used when determining the flow control result.
[0100] Optionally, the flow control threshold corresponding to any flow control node can also be implemented in other ways, such as through the leaky bucket algorithm, which will not be illustrated one by one here. The principle of the leaky bucket algorithm is: when a text message request is received, the text message request is first added to the leaky bucket, and the leaky bucket discharges water at a fixed speed, that is, processes the text message request. When the water is added too quickly (that is, the text message request is added too quickly), it will overflow directly, that is, reject the text message request. The leaky bucket algorithm can forcibly limit the transmission rate of text message requests in the text message management platform.
[0101] In the scenario where the flow control threshold corresponding to the flow control node is implemented by means of a token bucket, a data management node can be used to uniformly manage the token buckets of each flow control node. The data management node can be implemented by Redis, which is an open source, memory-based storage system that supports multiple data structures. Optionally, the token management node can also be implemented by other types of storage systems, which will not be illustrated one by one here.
[0102] Figure 7 This is a schematic diagram of an architecture provided by an embodiment of the present application in which Redis manages the token buckets of each flow control node in a unified manner. Figure 7As shown, CMPP client, SMPP client and HTTP client are three types of clients deployed on the enterprise side, among which, CMPP client is used to send CMPP SMS request to the SMS management platform, SMPP client is used to send SMPP SMS request to the SMS management platform, and HTTP client is used to send HTTP SMS request to the SMS management platform.
[0103] The SMS management platform includes CMPP cluster flow control nodes, SMPP cluster flow control nodes and HTTP cluster flow control nodes. Among them, the CMPP cluster flow control node is used to perform flow control on the SMS in the CMPP SMS request from the CMPP client, the SMPP cluster flow control node is used to perform flow control on the SMS in the SMPP SMS request from the SMPP client, and the HTPP cluster flow control node is used to perform flow control on the SMS in the HTPP SMS request from the HTPP client. And Redis configures a global token bucket for the CMPP cluster flow control node, the SMPP cluster flow control node and the HTTP cluster flow control node. In other words, the CMPP cluster flow control node, the SMPP cluster flow control node and the HTTP cluster flow control node share a global token bucket, that is, the three correspond to the same flow control threshold.
[0104] When any of the CMPP cluster flow control nodes, SMPP cluster flow control nodes and HTTP cluster flow control nodes receives a text message request from the corresponding client, the cluster flow control node sends a token request to Redis. In response to the token request, Redis applies for a token from the remaining tokens in the global token bucket (that is, the flow control threshold) and returns the applied token to the cluster flow control node.
[0105] In other embodiments, Figure 8 As shown, the SMS management platform 00 also includes a transmission control protocol (TCP) buffer node 40, which is configured with a TCP buffer pool. The TCP buffer node is used to perform flow control on SMS requests at the link layer before at least one flow control node 10 performs flow control, thereby avoiding system crashes at the link layer.
[0106] Optionally, in the embodiment of the present application, the SMS management platform 00 may also include a TCP buffer node 40 instead of a flow control node 10. In this scenario, the TCP buffer node may perform flow control on the SMS request at the link layer.
[0107] In addition, the TCP buffer node 40 may only perform flow control on CMPP SMS requests and SMPP SMS requests. Optionally, the TCP buffer node may also perform flow control on CMPP SMS requests, SMPP SMS requests, and HTTP SMS requests, etc., which is not limited in the embodiment of the present application.
[0108] In addition, since the link layer data is usually binary data, the TCP buffer node can also be called a binary buffer node, and the TCP buffer pool can also be called a binary buffer pool accordingly.
[0109] The specific functions of the TCP buffer node 40 will be described in detail in the subsequent method embodiments and will not be expanded here.
[0110] Below Fig. 9 Take as an example the SMS management platform provided by this application example. It should be noted that Fig. 9 The SMS management platform shown is Figure 2-Figure 8 The SMS management platform 00 shown is an example of an illustration and does not constitute a Figure 2-Figure 8 Limitations of the SMS management platform shown.
[0111] like Fig. 9 As shown, the SMS management platform 00 includes an HTTP component for HTTP SMS requests, a CMPP / SMPP component for CMPP or SMPP SMS requests, a service flow control node 101 for all SMS requests, a service processing node 20, and Redis for managing token buckets.
[0112] The HTTP component for HTTP SMS request includes a self-protection flow control node 102, a cluster flow control node 103 and an authentication node 30, and these HTTP components are used to perform flow control on the SMS in the HTTP SMS request. The CMPP / SMPP component for CMPP or SMPP SMS request includes a TCP buffer node 40, a self-protection flow control node 102 and a cluster flow control node 103, and these CMPP / SMPP components are used to perform flow control on the SMS in the CMPP or SMPP SMS request.
[0113] For any flow control node, such as the self-protection flow control node 102 or the cluster flow node 103 or the business flow control node 101, when the flow control node receives the SMS request and parses the SMS type, it can apply for the corresponding token from Redis based on the SMS type, and Redis returns the number of distributed tokens to the flow control node based on the number of remaining tokens in the token bucket corresponding to the flow control node (that is, the flow control threshold). If the number of tokens received by the flow control node is 0, it indicates that the SMS needs to be flow controlled at present, such as temporarily not processing or discarding the SMS request, and returning the corresponding processing result to the upstream node. If the number of tokens received by the flow control node is greater than 0, it can continue to forward the SMS request to the downstream node to send the SMS to the receiving end.
[0114] For ease of understanding, Fig. 9 The functions of each node are described in Table 1 below.
[0115] Table 1
[0116]
[0117] exist Fig. 9 In the SMS management platform shown, the token bucket for each self-protection flow control node may not be deployed in Redis, but may be deployed on the corresponding self-protection flow control node, so that the related operations of token deduction can be completed by the corresponding self-protection flow control node itself, thereby improving the flow control efficiency.
[0118] In addition, after any flow control node processes the SMS in the SMS request based on the method provided in the embodiment of the present application, when sending the SMS request to the downstream node, the SMS request sent to the downstream node may be a message of the same protocol as the received SMS request, or may be a message of a different protocol, and the embodiment of the present application does not limit this.
[0119] for example, Fig. 9 The SMS request received by the self-protection flow control node 102 in the HTTP component and the SMS request sent to the downstream node are both HTTP SMS requests. Fig. 9 The SMS request received by the self-protection flow control node 102 in the CMPP / SMPP component is a CMPP SMS request or an SMPP SMS request, and the SMS request sent to the downstream node can be an HTTP SMS request.
[0120] It should be noted that Fig. 9 The TCP buffer node in is used to perform link layer flow control for CMPP or SMPP SMS requests. Optionally, in the embodiment of the present application, a TCP buffer node may also be configured for HTTP SMS requests, or a TCP buffer node may be configured for HTTP SMS requests, CMPP and SMPP SMS requests at the same time, which will not be described one by one in this example.
[0121] in addition, Fig. 9 The service flow control node 101 is used to uniformly perform service flow control on HTTP SMS requests, CMPP and SMPP SMS requests. Optionally, a service flow control node 101 may be configured for each HTTP SMS request, CMPP SMS request or SMPP SMS request, which will not be described one by one here.
[0122] Figures 2 to 9 Any node in the can be understood as a microservice or process, which can be deployed in a container, a virtual machine or a physical machine. The embodiment of the present application is to implement Figures 2 to 9 The hardware architecture of the SMS management platform shown is not limited. In addition, the name corresponding to any node can also be renamed according to actual needs, and no examples are given here.
[0123] in addition, Figure 2-Figure 9 The SMS management platform shown can be deployed on the SMS cloud service, and the SMS cloud service performs flow control on the SMS in the network. Optionally, the SMS management platform can also be deployed on the server on the enterprise side, and the server on the enterprise side performs flow control on the SMS within the enterprise based on the SMS management platform. Optionally, some nodes can also be deployed on the SMS cloud service, and some nodes can be deployed on the server on the enterprise side, which is not limited in the embodiments of the present application.
[0124] The method for sending text messages provided in the embodiment of the present application is explained in detail below.
[0125] Fig.10 is a flow chart of a method for sending text messages provided in an embodiment of the present application. The method is applied to Figure 2-Figure 9 The SMS management platform shown in Figure 1 is shown in Figure 1. Fig.10 As shown, the method includes the following steps.
[0126] Step 1001: Obtain a text message request input by a user, where the text message request includes at least one text message.
[0127] based on Figure 2-9 As shown in the SMS management platform, any flow control node can execute steps 1001 to 1004, and the following description will be given by taking the execution subject as the first flow control node as an example. For example, the first flow control node can be a business flow control node, a self-protection flow control node, or a cluster flow control node.
[0128] The SMS request may be any SMS request received by the first flow control node. Obtaining the SMS request input by the user may be understood as: the user inputs the SMS request on the client, the client sends the SMS request to the SMS management platform, and then each flow control node in the SMS management platform performs flow control processing on the SMS in the SMS request.
[0129] Step 1002: Determine the SMS type of at least one SMS message according to the SMS request.
[0130] In an embodiment of the present application, after the first flow control node receives a text message request through an API, it first parses at least one text message from the text message request, and then determines the text message type of the at least one text message, so as to implement the text message type-based flow control provided in an embodiment of the present application.
[0131] The implementation method of the first flow control node parsing at least one SMS from the SMS request is related to the protocol adopted by the SMS request. For example, the SMS request is an HTTP SMS request, and the first flow control node performs HTTP parsing on the SMS request to obtain the specific content carried in the SMS request. For another example, the SMS request is a CMPP SMS request, and the first flow control node performs CMPP parsing on the SMS request to obtain the specific content carried in the SMS request. For another example, the SMS request is an SMPP SMS request, and the first flow control node performs SMPP parsing on the SMS request to obtain the specific content carried in the SMS request.
[0132] In the embodiment of the present application, the SMS type may include, for example, a long SMS or a group SMS.
[0133] In some embodiments, when sending a text message request, the client on the enterprise side carries a long text message identifier or a group text message identifier in certain fields of the text message request, and indicates whether the text message carried by the text message request is a long text message through the long text message identifier, and indicates whether the text message carried by the text message request is a group text message through the group text message identifier. In this scenario, the first flow control node can parse out whether the text message type of at least one text message includes a long text message or a group text message through these fields.
[0134] In other embodiments, when the client of the enterprise sends a text message request, it does not carry a long text message identifier or a group text message identifier in certain fields of the text message request. In this scenario, the first flow control node can determine whether the at least one text message is a long text message based on the total number of bytes of the at least one text message, or determine whether the at least one text message is a group text message based on the total number of recipients of the at least one text message, which will not be described in detail here.
[0135] Step 1003: Determine a flow control result based on the SMS type and flow control threshold of at least one SMS, where the flow control threshold is used to indicate the total amount of SMS currently allowed to be sent to the receiving end, and the flow control result is used to indicate the SMS to be sent to the receiving end in at least one SMS.
[0136] Since the SMS management platform consumes more resources, such as network resources or computing resources, when processing long SMS and group SMS, which can easily cause system crashes, in an embodiment of the present application, the first flow control node performs precise flow control on these two types of SMS based on the SMS type.
[0137] The first case: the at least one text message includes a first text message of a long text message type, that is, the first text message is a long text message.
[0138] In some embodiments, the SMS type includes a long SMS, which is an SMS whose total number of bytes exceeds a reference value, and the flow control threshold is used to indicate the total number of SMS currently allowed to be sent to the receiving end. In this scenario, step 1003 may be implemented as follows: the first flow control node obtains the total number of SMS fragments of the first SMS; the first flow control node determines the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold.
[0139] For long text messages, since the text message management platform sends long text messages to the operator network in sequence according to text message fragments, the first flow control node can improve the accuracy of flow control if it performs flow control according to the total number of text message fragments of the first text message.
[0140] The reference value is a preset value. For example, the reference value is 70. When the total number of bytes of a text message exceeds 70, the text message can be called a long text message.
[0141] For example, the first flow control node determines the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold value, and the flow control result is to allow the first SMS to be sent, and the total number of SMS fragments is subtracted from the flow control threshold value to obtain an updated flow control threshold value, so as to perform flow control on other received SMS messages based on the updated flow control threshold value. Correspondingly, if the total number of SMS fragments of the first SMS is greater than the total number of SMS messages currently allowed to be sent, the flow control result is to prohibit the sending of the first SMS.
[0142] For example, the flow control threshold is 10. Assuming the total number of SMS fragments of the first SMS is 5, since the total number of SMS fragments is less than the flow control threshold, the flow control result is to allow the first SMS to be sent to the downstream node, and the flow control threshold is updated to: 10-5=5.
[0143] For another example, the flow control threshold is 4, and it is assumed that the total number of SMS fragments of the first SMS is 5. Since the total number of SMS fragments is greater than the flow control threshold, the flow control result is that sending the first SMS to the downstream node is prohibited.
[0144] As another example, the first flow control node determines the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold value by multiplying the total number of SMS fragments of the first SMS by the conversion coefficient to obtain the converted total number of SMS fragments, where the conversion coefficient is a pre-set value less than 1. If the converted total number of SMS fragments is less than or equal to the flow control threshold value, the flow control result is to allow the first SMS to be sent, and the flow control threshold value is subtracted from the converted total number of SMS fragments to obtain an updated flow control threshold value, so as to facilitate subsequent flow control of other received SMS based on the updated flow control threshold value. Accordingly, if the converted total number of SMS fragments is greater than the flow control threshold value, the flow control result is to prohibit the sending of the first SMS.
[0145] For example, the flow control threshold is 10, assuming that the total number of SMS fragments of the first SMS is 5, and the conversion coefficient is 0.8, then the total number of SMS fragments after conversion is 5×0.8=4. Since the total number of SMS fragments after conversion is less than the flow control threshold, the flow control result is to allow the first SMS to be sent to the downstream node, and the flow control threshold is updated to: 10-4=6.
[0146] The above two implementation methods are used to illustrate how to determine the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold. The embodiment of the present application does not limit the specific operation of determining the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold, and will not be illustrated one by one here.
[0147] In addition, the long message segmentation operation (ie, the operation of dividing the long message into multiple message segments) can be implemented by the client of the enterprise side or by the message management platform. Step 1003 is described in detail below in two scenarios.
[0148] Scenario 1: The fragmentation operation of long text messages is implemented by the enterprise client.
[0149] For example, when sending a long SMS, the client on the enterprise side can first split the long SMS into segments, and then send a SMS request carrying one SMS segment to the SMS management platform each time. Each SMS request sent carries long SMS indication information and segment number information. The segment number information indicates which SMS segment the currently carried SMS segment is of the long SMS, and carries the total number of SMS segments in the first or each SMS request sent. In this scenario, if the SMS request carries the first SMS segment of the first SMS, the SMS request also carries the long SMS indication information and the total number of SMS segments of the first SMS.
[0150] It should be noted that in the scenario of client fragmentation, since the first flow control node determines the flow control result based on the total number of SMS fragments of the first SMS, the first flow control node can execute step 1003 when the first SMS fragment is received, and not execute step 1003 when a non-first SMS fragment is received, that is, no flow control is performed.
[0151] In other words, in response to the SMS fragment carried by the SMS request being the first SMS fragment of the first SMS, the first flow control node performs an operation of determining a flow control result according to the total number of SMS fragments of the first SMS and the flow control threshold. When the first SMS fragment of the first SMS is received, flow control is performed based on the total number of all SMS fragments, which can avoid the user receiving only part of the SMS fragments due to a system crash.
[0152] It should be noted that, when the first flow control node receives a non-first SMS fragment of the first SMS, although step 1003 is not executed, it still needs to obtain the flow control result determined when the first SMS fragment is received, and directly determine whether to continue sending the received non-first SMS fragment based on the flow control result.
[0153] Therefore, after receiving the first SMS fragment of the first SMS, the first flow control node determines the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold, and also stores the flow control result so that when a non-first SMS fragment of the first SMS is received subsequently, the flow control result can be directly queried.
[0154] Optionally, in an embodiment of the present application, the first flow control node may also perform an operation of determining a flow control result according to the total number of SMS fragments of the first SMS and the flow control threshold when receiving the last SMS fragment of the first SMS, and directly send the corresponding SMS fragments when receiving other SMS fragments of the first SMS.
[0155] Scenario 2: The fragmentation operation of long text messages is implemented by the text message management platform.
[0156] In scenario 2, when sending a long SMS, the client on the enterprise side does not fragment the long SMS, but directly carries the entire content of the long SMS in the SMS request and sends it to the SMS management platform. In this scenario, when the flow control node in the SMS management platform parses the first SMS carried in the SMS request, it can determine whether the first SMS is a long SMS based on the total number of bytes of the first SMS, and if it is determined that the first SMS is a long SMS, it will fragment the first SMS.
[0157] Based on this, in step 1004, in response to the total number of bytes of the first SMS exceeding the reference value, the first flow control node divides the first SMS into multiple SMS fragments, and performs an operation to determine the flow control result based on the total number of SMS fragments of the first SMS and the flow control threshold.
[0158] In addition, based on Figure 2-Figure 9 It can be seen from the SMS management platform shown that the SMS management platform can include different types of flow control nodes. In the scenario where the SMS management platform fragments long SMS, in order to avoid the need for different types of flow control nodes to perform sharding, one of the flow control nodes can store the total number of SMS fragments of the first SMS on the SMS management platform after fragmenting the first SMS, such as in a data management node such as Redis, so that other flow control nodes can obtain the total number of SMS fragments of the first SMS from the data management node.
[0159] Based on this, in the scenario where the SMS management platform fragments the long SMS, in other embodiments, the first flow control node obtains the total number of SMS fragments of the first SMS by: in response to the total number of bytes of the first SMS exceeding the reference value, the first flow control node obtains the total number of SMS fragments of the first SMS from the data management node of the SMS management platform. If the total number of SMS fragments of the first SMS is not obtained, the first flow control node divides the first SMS into multiple SMS fragments, obtains the total number of SMS fragments of the first SMS, and stores the total number of SMS fragments of the first SMS in the data management node.
[0160] In addition, when storing the total number of SMS fragments and the flow control results of the first SMS, the above-mentioned first flow control node can also establish a mapping relationship between the SMS identifier of the first SMS and the total number of SMS fragments, and / or a mapping relationship between the SMS identifier of the first SMS and the flow control result, and store the mapping relationship, so that other subsequent flow control nodes can quickly query the total number of SMS fragments based on the SMS identifier of the first SMS, or can quickly query the flow control result of the first SMS based on the SMS identifier of the first SMS.
[0161] It should be noted that the above process of storing the mapping relationship is also applicable to the aforementioned scenario 1, and will not be described in detail here.
[0162] The SMS identifier of the first SMS is used to uniquely identify the first SMS, and the SMS identifiers of different SMS segments of the first SMS are the same SMS identifier. In the embodiment of the present application, the SMS identifier of the first SMS can be determined by a variety of mechanisms, as illustrated below.
[0163] In some embodiments, when sending a long text message, the client on the enterprise side may carry a text message identifier in certain fields of the text message request.
[0164] For example, if the SMS request is a CMPP SMS request, the CMPP SMS request illustratively includes the fields shown in Table 2 below.
[0165] Table 2
[0166]
[0167] In the scenario shown in Table 2, the SMS identifier of the first SMS may be carried by Msg_Id.
[0168] For another example, if the SMS request is an SMPP SMS request, the SMPP SMS request illustratively includes the fields shown in Table 3 below.
[0169] Table 3
[0170] Field Name describe sar_msg_ref_num Message reference numbers of consecutive short messages. sar_total_sgments Identifies the total number of SMS fragments in a continuous short message. sar_sgment_seqnum Identifies the sequence number of the SMS fragments in a continuous short message.
[0171] In the scenario shown in Table 3, the SMS identifier of the first SMS may be carried by sar_msg_ref_num.
[0172] In addition, for the HTTP SMS request, the client on the enterprise side may add a field in the header field of the HTTP SMS request to carry the SMS identifier of the first SMS.
[0173] In other embodiments, when sending a long SMS, the client of the enterprise side may not carry the SMS identifier in certain fields of the SMS request. In this scenario, the SMS management platform needs to generate a SMS identifier for the long SMS to store the total number of SMS fragments or flow control results of the long SMS.
[0174] For example, the first flow control node can generate a text message identifier based on the sender number, the receiver number and the text message content of the first text message. For example, the combination of (sender number or hash value of sender number) + (receiver number or hash value of recipient number) + (text message content or hash value of text message content) can be used as the text message identifier. Or (sender number or hash value of sender number) + (receiver number or hash value of recipient number) + (text message content or hash value of text message content) can be pieced together according to a certain algorithm to generate a final hash value as the text message identifier.
[0175] It should be noted that the embodiment of the present application can generate the SMS identifier of the first SMS through a variety of mechanisms, and the embodiment of the present application does not limit this. It only needs to be possible for the generated SMS identifier to uniquely identify the first SMS.
[0176] In addition, in the scenario where the SMS ID of the first SMS is generated by the SMS management platform, a validity period can also be configured for the generated SMS ID. When the validity period expires, the SMS ID of the first SMS can be deleted to reduce the probability of the SMS IDs of different SMS being the same.
[0177] In the scenario where the first flow control node generates the SMS identifier of the first SMS, the first flow control node may also add a field in the header field of the SMS request subsequently sent to the downstream node to carry the SMS identifier of the first SMS, so that the downstream node can look up the total number of SMS fragments of the first SMS based on the SMS identifier.
[0178] In addition, the total number of SMS fragments and the flow control result of the first SMS can be stored in a data management node such as Redis. Based on this, the following key design can be performed on Redis to quickly query the total number of SMS fragments and / or flow control results of a long SMS from Redis:
[0179] fc:longsms:{protocol}:{uniqueid}:lock records whether the current long SMS is locked by other microservice nodes;
[0180] fc:longsms:{protocol}:{uniqueid}:count records the total number of SMS fragments of the current long SMS;
[0181] fc:longsms:{protocol}:{uniqueid}:result records the flow control result of the current long SMS.
[0182] Among them: {protocol}: identifies the protocol type. {uniqueid} is used to uniquely identify a long message, that is, the message ID. The value is the same for different long message fragments.
[0183] Below Fig.11 Take the example to illustrate the SMS flow control process in the long SMS scenario.
[0184] like Fig.11 As shown, the SMS management platform includes a cluster flow control node, a business flow control node, a business processing node, and Redis. When the client on the enterprise side sends a first SMS of a long SMS type, if the SMS request is an HTTP SMS request, the entire SMS content of the first SMS is carried in the HTTP SMS request and sent to the cluster flow control node; if the SMS request is a CMPP or SMPP SMS request, the entire SMS content of the first SMS is divided into multiple SMS fragments and the multiple SMS fragments are respectively carried in multiple CMPP or SMPP SMS requests and sent to the cluster flow control node.
[0185] If the cluster flow control node receives an HTTP SMS request, it divides the first SMS in the HTTP SMS request into multiple SMS fragments according to the rules to obtain the total number of SMS fragments. If the cluster flow control node receives a CMPP or SMPP SMS request carrying the first SMS fragment, it directly obtains the total number of SMS fragments from the SMS request. The cluster flow control node sends a token application request to Redis, which carries the total number of SMS fragments and the SMS identifier of the long SMS. After receiving the token application request, Redis deducts the total number of SMS fragments from the remaining token number of the token bucket corresponding to the cluster flow control node at one time. If the remaining number of tokens (that is, the flow control threshold) is greater than or equal to the total number of SMS fragments, the flow control result is returned to indicate that the first SMS is allowed to be sent. The flow control result can be, for example, the number of allocated tokens (equal to the total number of SMS fragments). If the remaining number of tokens is less than the total number of SMS fragments, the flow control result is returned to indicate that the first SMS is prohibited from being sent. The flow control result can be, for example, the number of allocated tokens is 0 or an error code, which is used to indicate that the first SMS is currently prohibited from being sent. When obtaining the flow control result, Redis can store the mapping relationship between the SMS identifier of the long SMS, the flow control result of the cluster flow control node on the first SMS, and the total number of SMS fragments included in the long SMS.
[0186] After the cluster flow control node receives the flow control result returned by Redis, if the flow control result indicates that the first SMS is currently allowed to be sent, the subsequent process can be continued, such as continuing to send the SMS request carrying the first SMS to the downstream business flow control node. When receiving the SMS request, the business flow control node continues to send a token application request to Redis, and the token application request carries the SMS identifier of the long SMS. After Redis receives the token application request, Redis obtains the total number of SMS fragments corresponding to the SMS identifier from the stored mapping relationship based on the SMS identifier, and deducts the total number of SMS fragments from the remaining number of tokens in the token bucket corresponding to the business flow control node at one time. If the remaining number of tokens (that is, the flow control threshold) is greater than or equal to the total number of SMS fragments, the flow control result is returned to indicate that the first SMS is allowed to be sent. The flow control result can be, for example, the number of allocated tokens (equal to the total number of SMS fragments). After receiving the flow control result, the business flow control node can send the SMS request carrying the first SMS to the business processing node because the flow control result indicates that the first SMS is allowed to be sent, and the business processing node performs business processing on the first SMS. If the number of remaining tokens is less than the total number of SMS fragments, the flow control result is returned to indicate that sending the first SMS is prohibited. After receiving the flow control result, the service flow control node stops sending the first SMS to the downstream node.
[0187] Accordingly, if the cluster flow control node receives a CMPP or SMPP SMS request that carries a non-first SMS fragment of the first SMS, it directly obtains the flow control result for the first SMS from Redis. If the token result for the first SMS is successfully obtained, it indicates that the first SMS has been flow controlled according to the total number of SMS fragments of the first SMS before the current time. At this time, there is no need to repeatedly flow control the first SMS, that is, repeatedly deduct the token. And if the obtained flow control result indicates that the first SMS is allowed to be sent, the cluster flow control node can continue the subsequent process, which will not be repeated here.
[0188] The second situation: the at least one text message includes a second text message whose text message type is a group text message, that is, the second text message is a group text message.
[0189] In some embodiments, the SMS type includes group SMS, and the flow control threshold is used to indicate the total number of SMS currently allowed to be sent to the receiving end. In this scenario, step 1003 may be implemented as follows: the first flow control node obtains the total number of recipients of the second SMS; the first flow control node determines the flow control result based on the total number of recipients of the second SMS and the flow control threshold.
[0190] For group SMS, since the SMS management platform sends SMS in sequence according to the recipients of the group SMS, when the SMS management platform controls the flow of the second SMS, if it performs flow control according to the total number of recipients of the second SMS, the accuracy of flow control can be improved.
[0191] The implementation method of the first flow control node determining the flow control result based on the total number of recipients of the second short message and the flow control threshold can be: if the total number of recipients of the second short message is less than or equal to the flow control threshold, the flow control result is to allow the second short message to be sent, and the total number of recipients is subtracted from the flow control threshold to obtain an updated flow control threshold, so as to subsequently perform flow control on other received short messages based on the updated flow control threshold. Correspondingly, if the total number of recipients is greater than the flow control threshold, the flow control result is to prohibit the sending of the second short message.
[0192] For example, the flow control threshold is 10. Assuming the total number of recipients of the second SMS is 5, since the total number of recipients is less than the flow control threshold, the flow control result is to allow the second SMS to be sent to the downstream node, and the flow control threshold is updated to: 10-5=5.
[0193] For another example, the flow control threshold is 4, and assuming that the total number of recipients of the second SMS is 5, since the total number of recipients is greater than the flow control threshold, the flow control result is to prohibit sending the second SMS downstream.
[0194] For example, in a scenario where the flow control threshold is implemented through a token bucket, for group text messages, a text message sent contains N recipient numbers, so the number of tokens deducted by Redis for the group text message is N, which ensures that either all text messages to all recipient numbers are successfully sent or all are discarded. Since the business processing node in the SMS management platform sends one text message according to one recipient number, the flow control node deducts the corresponding number of tokens for all recipient numbers at one time, avoiding the situation where the flow control node sends a second text message based on the flow control result, but the system performance of the subsequent business processing node cannot successfully process the second text message.
[0195] Optionally, the first flow control node can determine the flow control result based on the total number of recipients of the second text message and the flow control threshold by multiplying the total number of recipients of the second text message by the conversion coefficient to obtain the converted total number of recipients, where the conversion coefficient is a preset value less than 1. If the converted total number of recipients is less than or equal to the flow control threshold, the flow control result is to allow the second text message to be sent, and the flow control threshold is subtracted from the converted total number of recipients to obtain an updated flow control threshold, so as to facilitate subsequent flow control of other received text messages based on the updated flow control threshold. Correspondingly, if the converted total number of recipients is greater than the flow control threshold, the flow control result is to prohibit the sending of the second text message.
[0196] Among them, the conversion coefficient in this scenario and the conversion coefficient in the aforementioned long text message scenario are two independent conversion coefficients, and there is no correlation between the two.
[0197] The above two implementation methods are used to illustrate how to determine the flow control result based on the total number of recipients of the second SMS and the flow control threshold. The embodiments of the present application do not limit the specific operations of determining the flow control result based on the total number of recipients of the second SMS and the flow control threshold, and will not be illustrated one by one here.
[0198] The above uses long SMS and group SMS as examples to illustrate how to determine the flow control result based on the SMS type. Optionally, when the SMS type includes other attributes that can intuitively indicate the amount of traffic required to send SMS, the flow control result can also be determined by referring to the above implementation method, and no further examples are given here.
[0199] Step 1004: Send the short message to be sent to the receiving end according to the flow control result.
[0200] For example, for the first SMS of the aforementioned SMS type long SMS, in response to the flow control result indicating that the first SMS is allowed to be sent, the first flow control node sends the first SMS to the target service processing node among the at least one service processing node, and then the target service processing node sends the SMS to be sent to the receiving end. Correspondingly, in response to the flow control result indicating that the first SMS is prohibited from being sent, the first flow control node does not send the first SMS to the target service processing node.
[0201] Among them, the first flow control node sending the first SMS to the target business processing node in at least one business processing node can be understood as: the first flow control node is a business flow control node, and in this case, the first flow control node directly sends the first SMS to the target business processing node. Optionally, the first flow control node is a self-protection flow control node or a cluster flow control node, and in this case, the first flow control node continues to send the first SMS to the downstream flow control node, so as to send the first SMS to the target business processing node after the flow control of the downstream flow control node.
[0202] In addition, based on Figure 2-Figure 8 As can be seen from the system shown, the SMS management platform may include a service processing node, and the target service processing node in this scenario is the service processing node. Optionally, the SMS management platform may include multiple service processing nodes, and the target service processing node in this scenario is a service processing node directly or indirectly connected to the first flow control node.
[0203] based on Figure 2-Figure 8 It can be seen from the system shown that the first flow control node can be a business flow control node, a self-protection flow control node, or a cluster flow control node.
[0204] When the first flow control node is one of at least one self-preservation flow control node, the flow control threshold in step 1003 refers to the current flow control threshold of the first flow control node itself, that is, the flow control threshold includes the self-preservation flow control threshold, and the self-preservation flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing self-preservation flow control.
[0205] In an embodiment of the present application, the SMS management platform can perform flow control based on the SMS type when performing self-protection flow control to improve the flow control effect during self-protection flow control.
[0206] For example, the SMS request is a message based on a long link protocol, such as a CMPP SMS request or an SMPP SMS request or other long link protocol SMS request, then the flow control threshold is the link where the first flow control node is located, that is, the flow control threshold of the link that transmits the SMS request.
[0207] By configuring the flow control threshold for the long link, you can implement self-preservation flow control on the link.
[0208] In the embodiment of the present application, for a long link such as CMPP or SMPP, the operator can assign a flow control threshold to the long link when the long link is created, and then flow control can be performed on SMS based on the flow control threshold. For example, the operator can configure the flow control threshold according to the needs of the user who creates the long link, such as user priority.
[0209] When the first flow control node is one of at least one cluster flow control node, the flow control threshold in step 1003 refers to the flow control threshold corresponding to the global state of at least one cluster flow control node, that is, all cluster flow control nodes share the same flow control threshold to achieve flow control at the global level. In other words, the flow control threshold includes the cluster flow control threshold, which is used to indicate the flow control threshold used by the SMS management platform when performing cluster flow control. The SMS management platform performs different cluster flow controls for different SMS protocols, and the SMS management platform shares the cluster flow control threshold when performing different cluster flow controls.
[0210] In an embodiment of the present application, the SMS management platform can perform flow control based on the SMS type when performing cluster flow control to improve the flow control effect during cluster flow control.
[0211] When the first flow control node is one of at least one service flow control node, the flow control threshold in step 1003 refers to a flow control threshold that matches the service characteristics of at least one short message. The implementation of the flow control threshold that matches the service characteristics of at least one short message is described in detail in subsequent embodiments and will not be expanded here.
[0212] In addition, in the above-mentioned scenario of self-protection flow control or cluster flow control or business flow control, the flow control threshold used by the first flow control node may include a first flow control threshold and a second flow control threshold, the first flow control threshold is greater than the second flow control threshold, and the second flow control threshold is used to indicate the flow control threshold when the SMS management platform is overloaded. In this scenario, in step 1003, the implementation method of determining the flow control result according to the SMS type of at least one SMS and the flow control threshold can be: when the system is detected to be overloaded, the flow control result is determined according to the SMS type of at least one SMS and the second flow control threshold. Correspondingly, when it is detected that the system is not overloaded, the flow control result is determined according to the SMS type of at least one SMS and the first flow control threshold.
[0213] Through the above method, it is possible to lower the flow control threshold when the system is overloaded, thereby ensuring the stability of the SMS management platform.
[0214] It should be noted that in the above-mentioned scenarios such as self-preservation flow control, cluster flow control, and business flow control, the first flow control threshold and the second flow control threshold in different scenarios are independent of each other. In other words, there is no necessary connection between the first flow control threshold and the second flow control threshold used in self-preservation flow control, the first flow control threshold and the second flow control threshold used in cluster flow control, and the first flow control threshold and the second flow control threshold used in business flow control. The embodiments of the present application do not limit the way in which users configure the first flow control threshold and the second flow control threshold in different scenarios.
[0215] Below Fig.12 Take the example to explain the functions of the business flow control node in detail.
[0216] Fig.12 This is another SMS traffic control flow diagram provided by the embodiment of the present application. Fig.12 As shown, the method includes the following steps.
[0217] Step 1201: Obtain a text message request input by a user, where the text message request includes at least one text message.
[0218] Step 1202: Determine the SMS type and service characteristics of at least one SMS message according to the SMS request.
[0219] The implementation of step 1201 to step 1202 can refer to Fig.10 Steps 1001 to 1002 in the embodiment are not described in detail here.
[0220] Among them, for any SMS, the service characteristics of the SMS may include characteristics related to the service carried by the SMS. In some embodiments, the service characteristics may include the user type of the sender of the SMS and / or the function type of the SMS, so as to perform different flow control on different types of senders and / or SMS with different functions through the service flow control node, thereby further improving the flow control effect.
[0221] For example, the user type includes the priority type of the corresponding user, including high priority users, medium priority users, and low priority users. The function type may include promotional SMS, notification SMS, and verification code SMS, etc. Among them, the priority of the verification code SMS is higher than the priority of the notification SMS, and the priority of the notification SMS is higher than the priority of the promotional SMS.
[0222] Step 1203: Determine a flow control threshold according to a service feature of at least one short message.
[0223] In an embodiment of the present application, for each text message, a flow control threshold that matches the business characteristics of the text message can be selected based on the business characteristics of the text message, and then the text message can be flow controlled based on the determined flow control threshold, thereby achieving hierarchical flow control for text messages of different services.
[0224] In some embodiments, for any text message in at least one text message, such as the third text message, the implementation method of determining the flow control threshold based on the service characteristics of the third text message can be: selecting a target comprehensive service identifier corresponding to the third text message from multiple comprehensive service identifiers based on the service characteristics of the third text message, each of the multiple comprehensive service identifiers corresponds to a flow control threshold, and using the flow control threshold corresponding to the target comprehensive identifier as the flow control threshold determined in step 1203.
[0225] For example, the service characteristics of the SMS include the user type of the sender of the SMS and / or the function type of the SMS. In this scenario, the implementation method of selecting the target integrated service identifier corresponding to the third SMS from multiple integrated service identifiers according to the service characteristics of the third SMS may be: the first flow control node selects the target integrated service identifier from multiple integrated service identifiers based on the user type of the sender of the third SMS and / or the function type of the third SMS.
[0226] By configuring the comprehensive service identifier by user type and / or function type, flow control can be separated according to the user type and / or function type of the SMS, thereby ensuring the communication of high-priority users or high-priority SMS.
[0227] For example, four integrated services are pre-set according to user priority and SMS functions, namely, marketing SMS for low-priority users, marketing SMS for high-priority users, verification code SMS for low-priority users, and verification code SMS for high-priority users. The priorities of these four integrated services are increased in sequence. When the system is initialized, four flow control thresholds are configured for the integrated service identifiers of these four integrated services.
[0228] When the service flow control node receives any SMS request, it selects a target comprehensive service identifier that matches the SMS from the four comprehensive service identifiers based on the user priority of the sender of the SMS carried in the SMS request and the functional type of the SMS, and determines the flow control result according to the flow control threshold corresponding to the matching target comprehensive service identifier.
[0229] It should be noted that the user type of the sender and / or the function type of the SMS are examples of dividing the integrated services. In the embodiment of the present application, more types of integrated services can be set according to the service characteristics of the SMS, such as different integrated services can be set only according to the function type, or different integrated services can be set only according to the user type. Examples are not given one by one here.
[0230] Optionally, in the embodiment of the present application, the flow control threshold may be directly configured according to the service characteristics, rather than dividing the comprehensive services according to the service characteristics and then configuring the flow control threshold according to the comprehensive services. For example, after obtaining the service characteristics of the SMS, the first flow control node may calculate the service characteristics through a preset algorithm and directly obtain the flow control threshold matching the service characteristics. This will not be described in detail here.
[0231] Step 1204: Determine a flow control result according to the SMS type of at least one SMS and a flow control threshold.
[0232] For each SMS in at least one SMS, such as the third SMS, the implementation method of determining the flow control result based on the SMS type of at least one SMS and the flow control threshold can be: determining whether to allow the third SMS to be sent based on the flow control threshold that matches the business characteristics of the third SMS and the SMS type of the third SMS.
[0233] The implementation method of determining whether to allow the third SMS to be sent according to the flow control threshold matching the service characteristics of the third SMS and the SMS type of the third SMS can refer to Fig.10 Step 1003 in the embodiment will not be described in detail here.
[0234] Step 1205: Send the short message to be sent to the receiving end according to the flow control result.
[0235] The implementation of step 1205 can refer to Fig.10 Step 1004 in the embodiment will not be described in detail here.
[0236] It should be noted that Fig.12 The serial numbers of the steps do not represent the execution order of the steps. When applying the embodiments of the present application, the execution order of the steps can be adjusted according to the scenario, and will not be illustrated one by one here.
[0237] Fig.13 FIG. 1 is a flow chart of a flow control method based on service characteristics provided in an embodiment of the present application. Fig.13 As shown, the service flow control node is configured with four integrated service identifiers, which can also be called four flow control groups. The four integrated service identifiers are integrated service 1, integrated service 2, integrated service 3 and integrated service 4. The service features corresponding to integrated service 1 include V0 and verification code SMS, V0 represents low-priority users, the service features corresponding to integrated service 2 include V0 and marketing SMS, the service features corresponding to integrated service 3 include V1 and verification code SMS, V1 represents high-priority users, and the service features corresponding to integrated service 4 include V1 and marketing SMS. Fig.13As shown, through the flow control of the business flow control node, only SMS messages matching integrated business 4 (ie, the sender priority is V1, and the function type is verification code SMS) are allowed to be sent to downstream nodes such as business processing nodes.
[0238] In addition, each of the multiple integrated service identifiers corresponds to a priority. In this scenario, when a system overload is detected, the flow control threshold of at least one of the multiple integrated service identifiers may be lowered in order of priority from low to high.
[0239] In this way, the communication of SMS messages corresponding to the integrated service identifiers with high priority can be guaranteed first, thereby improving the flow control effect.
[0240] After adjusting the flow control threshold in the above manner, when the system is overloaded, for example, for the first integrated service identifier and the second integrated service identifier among multiple integrated service identifiers, the priority of the first integrated service identifier is greater than the priority of the second integrated service identifier, and the flow control threshold corresponding to the first integrated service identifier is greater than the flow control threshold corresponding to the second integrated service identifier.
[0241] Among them, detecting a system overload can be understood as: detecting an overload of the processor, memory or disk, etc. of the system itself. Optionally, detecting a system overload can also be understood as: detecting an overload of the processor, memory or disk, etc. of a downstream node. Optionally, detecting a system overload can also be understood as: detecting an overload of the entire system of the SMS management platform.
[0242] Among them, the first flow control node detects that its processor, memory or disk is overloaded. This can be achieved by obtaining the usage rate of its own processor, memory, disk and other hardware, which is not described in detail here.
[0243] In addition, the first flow control node detects that the system where the downstream node is located is overloaded, and the implementation method can be: when the downstream node detects that its own processor or memory is overloaded, it can send an overload signal to the upstream node. In this scenario, the upstream node can determine that the system of the downstream node is overloaded through the overload signal from the downstream node. Optionally, when the downstream node detects that the current flow control threshold corresponding to itself is small, it indicates that the current system where it is located is about to be overloaded, and it can send a flow control signal to the upstream node. In this scenario, the upstream node can determine that the system of the downstream node is overloaded through the flow control signal from the downstream node.
[0244] In addition, the implementation method for the first flow control node to detect that the entire SMS management platform is overloaded can be: the first flow control node obtains the SMS receipt rate and / or the SMS sending error rate, and determines whether the SMS management platform is overloaded based on the SMS receipt rate and / or the SMS sending error rate.
[0245] Among them, the SMS receipt rate can be understood as: the ratio of all SMS sent to the operator network to the receipts returned by the operator network, and the SMS sending error rate can be understood as: the ratio of all SMS sent that failed to be successfully sent to the user. The first flow control node can obtain the SMS receipt rate and the SMS sending rate from the service processing node, which will not be described in detail here.
[0246] Optionally, the service processing node may also determine whether the SMS management platform is overloaded based on the SMS receipt rate and / or the SMS sending error code rate, and when it is determined that the SMS management platform is overloaded, send a back pressure signal to the upstream first flow control node. When the first flow control node receives the back pressure signal, it may determine that the SMS management platform is currently in an overloaded state.
[0247] In addition, the implementation method of lowering the flow control threshold of at least one of the multiple integrated service identifiers in order of priority from low to high can be: when the system overload is detected, the flow control threshold corresponding to the first-ranked (that is, the lowest priority) integrated service identifier is first lowered; after the lowering, if the system overload is still detected, the flow control threshold corresponding to the second-ranked (that is, the lowest priority) integrated service identifier is lowered until the system is not overloaded.
[0248] The above-mentioned lowering of the flow control threshold corresponding to the integrated service identifier may be lowered according to a reference step size, or may be lowered to a preset specification. The embodiment of the present application does not limit the manner of lowering the flow control threshold.
[0249] Fig.14 Schematic diagram of lowering the flow control threshold corresponding to the integrated service identifier provided in an embodiment of the present application. Fig.14 In the , two specifications for flow control thresholds are pre-configured, namely, the system specification and the guaranteed minimum specification, where the system specification is greater than the guaranteed minimum specification, and the priority of integrated service 1 is lower than that of integrated service 2. When the system overload is detected for the first time, the flow control threshold of integrated service 1 is first reduced to the system specification, and when the system overload is detected again, the flow control threshold of integrated service 2 is first reduced to the system specification. If the system overload is still detected later, the flow control threshold of integrated service 1 can be reduced to the guaranteed minimum specification.
[0250] For example, the system specification is 5000 SMS messages per second, and the minimum specification is 1000 SMS messages per second. When the system is detected to be overloaded, the flow control threshold of integrated service 1 is discarded to (that is, lowered to) the system specification; when the system is still detected to be overloaded, the flow control threshold of integrated service 2 is lowered to the system specification; if the system continues to be overloaded, the flow control threshold of integrated service 1 is discarded to the minimum specification; if the system continues to be overloaded, the flow control threshold of integrated service 2 is discarded to the minimum specification.
[0251] pass Fig.13 The function of the service flow control node shown in the figure, when the traffic is at a peak, the SMS management platform can perform graded flow control according to different integrated services, and give priority to the SMS traffic of integrated services with high priority. For example, the SMS management platform can also perform graded flow control according to user priority, and give priority to the SMS traffic of senders with high priority. For another example, the SMS management platform can also perform graded flow control according to the function type of the SMS, give priority to the verification code SMS with high priority, and temporarily slow down and not process the promotional SMS with low priority.
[0252] In addition, based on Figure 2-Figure 8 It can be seen from the system shown that the SMS management platform also includes at least one authentication node. For ease of explanation, the SMS request received by the service flow control node is referred to as the first SMS request. In this scenario, before the service flow control node receives the first SMS request, the first authentication node receives the second SMS request, the second SMS request includes at least one SMS, and the first authentication node is one of the at least one authentication node; the first authentication node parses at least one SMS from the second SMS request; after the first authentication node authenticates at least one SMS, it sends the first SMS request to the first service flow control node.
[0253] That is, before the service flow control node controls the SMS flow, the SMS is first authenticated by the authentication node to improve system reliability.
[0254] In addition, based on Figure 2-Figure 8 As can be seen from the SMS management platform shown, the SMS management platform can also include a TCP buffer node. Fig.15 Take TCP buffer node as an example to explain the function of TCP buffer node.
[0255] Fig.15 1 is a flow chart of a TCP buffer node flow control SMS provided in an embodiment of the present application. Fig.15 As shown, the method includes the following steps.
[0256] Step 1501: The TCP buffer node receives link layer data, and the link layer data carries a text message request.
[0257] Step 1502: The TCP buffer node determines the total size of the link layer data.
[0258] In some embodiments, the TCP buffer node determines the total size of the link layer data in the following manner: the TCP buffer node receives a flow control instruction from a second flow control node in at least one flow control node; and the TCP buffer node performs an operation of determining the total size of the link layer data in response to the flow control instruction. The second flow control node is any flow control node in the SMS management platform.
[0259] That is, in the embodiment of the present application, the TCP buffer node may execute step 1502 only when it receives a flow control instruction from a downstream flow control node to implement flow control of the link layer data.
[0260] Optionally, when the SMS management platform does not include a flow control node, the TCP buffer node may execute step 1502 only upon receiving a flow control instruction from a downstream service processing node to implement flow control of link layer data.
[0261] Optionally, the TCP buffer node may also determine whether to execute step 1502 according to whether its own CPU, memory, hard disk, etc. are overloaded. For example, when the TCP buffer node detects that its own CPU, memory, hard disk, etc. are overloaded, step 1502 is executed to implement flow control of link layer data. When the TCP buffer node does not detect that its own CPU, memory, hard disk, etc. are overloaded, step 1502 is not executed.
[0262] Optionally, the TCP buffer node may also directly execute step 1502 when receiving link layer data, without determining whether a flow control instruction is received from a downstream node or whether its own CPU, memory, hard disk, etc. are overloaded.
[0263] Step 1503: If it is determined based on the total size of the link layer data that the TCP buffer pool is able to buffer the link layer data, the TCP buffer node buffers the link layer data in the TCP buffer pool.
[0264] Through step 1503, the TCP buffer node can cache the SMS request and then send it to the downstream flow control node.
[0265] Accordingly, if the TCP buffer pool is determined to be unable to buffer the link layer data based on the total size of the link layer data, the TCP buffer node discards the link layer data, that is, does not send the SMS request to the downstream flow control node, thereby implementing flow control of SMS at the link layer.
[0266] The implementation of determining whether the TCP buffer pool can cache the link layer data based on the total size of the link layer data may be: if the total size of the link layer data does not exceed the remaining capacity of the TCP buffer pool, then determining that the TCP buffer pool can cache the link layer data. Correspondingly, if the total size of the link layer data exceeds the remaining capacity of the TCP buffer pool, then determining that the TCP buffer pool cannot cache the link layer data.
[0267] Since the size of the link layer data can be determined without parsing the SMS request, the TCP buffer node can be used to control the SMS flow directly at the link layer before the flow control node parses the SMS request, so as to avoid the SMS management platform crashing due to massive SMS exceeding the load of the downstream nodes in the SMS management platform.
[0268] In addition, in the embodiment of the present application, when the system is detected to be overloaded, the TCP buffer node can also reduce the capacity of the TCP buffer pool. By reducing the capacity of the TCP buffer pool, the flow of SMS messages can be further limited at the link layer to avoid the accumulation of massive SMS messages at subsequent flow control nodes or service processing nodes.
[0269] The implementation method of TCP buffer node detecting system overload can be referred to Fig.12 The implementation manner in which the service flow control node detects system overload in the embodiment will not be described in detail here.
[0270] In addition, in a scenario where the SMS management platform does not include a flow control node, in step 1503, if it is determined based on the total size of the link layer data that the TCP buffer pool can cache the link layer data, the TCP buffer node caches the link layer data in the TCP buffer pool to carry the SMS in the SMS request and send it to other downstream nodes, such as a business processing node.
[0271] Fig.16 This is another flow diagram of TCP buffer node flow control SMS provided by the embodiment of the present application. Fig.16 As shown, a TCP buffer node is deployed on a virtual machine, a container, or a physical machine, and a CMPP client sends a CMPP SMS request to the TCP buffer node.
[0272] When the underlying operating system of the TCP buffer node receives the link layer data carrying the CMPP SMS request, it first determines whether the TCP buffer pool can cache the link layer data based on the current remaining capacity of the TCP buffer pool. If the TCP buffer pool can cache the link layer data, the link layer data is cached in the TCP buffer pool, and the operating system subsequently performs a TCP access read operation and a CMPP protocol parsing operation to parse the CMPP SMS request from the link layer data and send the CMPP SMS request to the downstream node.
[0273] Accordingly, if the TCP buffer pool cannot buffer the link layer data, the TCP buffer node directly discards the link layer data.
[0274] Since CMPP SMS requests are binary messages, the TCP buffer node itself consumes performance to parse CMPP SMS requests. In the scenario where the SMS management platform receives a very large amount of SMS traffic, if flow control is performed after the CMPP SMS request is parsed, it may be too late. The process of parsing massive SMS requests may cause the system to crash. Therefore, flow control is performed by the TCP buffer pool on the TCP buffer node, so that the SMS management platform can perform self-protection in advance at the link layer when it suddenly receives a large amount of SMS traffic, thereby preventing the SMS management platform from crashing.
[0275] In addition, when the downstream node cannot process the text messages, for example, when the current flow control threshold of the downstream flow control node is small, the downstream node can send a back pressure signal to the TCP buffer node. When the TCP buffer node receives the back pressure signal, it starts the TCP buffer pool to perform flow control on the link layer data.
[0276] Optionally, when the TCP buffer node detects that its own system is overloaded, for example, when the operating system detects that the CPU or memory is insufficient when performing a CMPP protocol parsing operation, the TCP buffer pool is started to perform flow control on the link layer data.
[0277] In addition, when the TCP buffer node starts the TCP buffer pool flow control, if it still receives the back pressure signal from the downstream node, the TCP buffer node can also reduce the size of the TCP buffer pool to further limit the SMS traffic flowing into the downstream node. Correspondingly, if it does not receive the back pressure signal from the downstream node for a long period of time, the TCP buffer node can also gradually increase the size of the TCP buffer pool to avoid the SMS traffic being too small.
[0278] It should be noted that Fig.16 The process shown may control the flow of CMPP heartbeat messages between the CMPP client and the TCP buffer node, causing the CMPP client to be disconnected, that is, disconnected from the TCP buffer node. At this time, the CMPP client will reconnect to other nodes, which can also alleviate the flow control caused by the current TCP buffer node due to system overload.
[0279] The following is an explanation of the relevant devices and equipment provided in the embodiments of the present application.
[0280] The embodiment of the present application also provides a short message management platform, which is used to send short messages to a receiving end according to the acquired short message request; Fig.17 As shown, the short message management platform 1700 includes:
[0281] The acquisition module 1701 is used to obtain a text message request input by a user, where the text message request includes at least one text message. Fig.10Step 1001 in the illustrated embodiment.
[0282] The first determination module 1702 is used to determine the SMS type of at least one SMS message according to the SMS request; for specific implementation methods, refer to Fig.10 Step 1002 in the illustrated embodiment.
[0283] The second determination module 1703 is used to determine the flow control result according to the SMS type and flow control threshold of at least one SMS, the flow control threshold is used to indicate the total amount of SMS currently allowed to be sent to the receiving end, and the flow control result is used to indicate the SMS to be sent to the receiving end in at least one SMS; for specific implementation methods, refer to Fig.10 Step 1003 in the illustrated embodiment.
[0284] The sending module 1704 is used to send the short message to be sent to the receiving end according to the flow control result. Fig.10 Step 1004 in the illustrated embodiment.
[0285] Optionally, the at least one text message includes a first text message of a long text message type, the long text message being a text message of which the total number of bytes exceeds a reference value, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end;
[0286] The second determination module 1703 is used to: obtain the total number of SMS fragments of the first SMS; and determine the flow control result according to the total number of SMS fragments of the first SMS and the flow control threshold.
[0287] Optionally, the SMS request carries the total number of SMS segments of the first SMS.
[0288] Optionally, the SMS management platform further includes: a division module, configured to divide the first SMS into a plurality of SMS segments in response to the total number of bytes of the first SMS exceeding a reference value.
[0289] Optionally, at least one text message includes a second text message of group text message type, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end; the second determination module 1703 is used to: obtain the total number of recipients of the second text message; determine the flow control result based on the total number of recipients of the second text message and the flow control threshold.
[0290] Optionally, the SMS management platform further includes: a third determination module, used to determine the service characteristics of at least one SMS according to the SMS request; and a fourth determination module, used to determine the flow control threshold according to the service characteristics of at least one SMS.
[0291] Optionally, the service feature includes a user type of the sender of the corresponding text message and / or a function type of the corresponding text message, the user type is used to indicate the priority of the corresponding user, and the function type is used to indicate the priority of the corresponding text message.
[0292] Optionally, the SMS management platform further includes: an authentication module for authenticating at least one SMS; and a first determination module for determining the SMS type of at least one SMS according to an SMS request after at least one SMS is authenticated.
[0293] Optionally, the flow control threshold includes a first flow control threshold and a second flow control threshold, the first flow control threshold is greater than the second flow control threshold, and the second flow control threshold is used to indicate the flow control threshold when the SMS management platform is overloaded; the second determination module is used for 1703: when the system overload is detected, the flow control result is determined according to the SMS type of at least one SMS and the second flow control threshold.
[0294] Optionally, the flow control threshold includes a self-preservation flow control threshold, and the self-preservation flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing self-preservation flow control.
[0295] Optionally, the SMS request is an SMS request based on a long link protocol, and the self-protection flow control threshold is a flow control threshold of a link for transmitting the SMS request.
[0296] Optionally, the flow control threshold includes a cluster flow control threshold, which is used to indicate the flow control threshold used by the SMS management platform when performing cluster flow control. The SMS management platform performs different cluster flow controls for different SMS protocols, and the SMS management platform shares the cluster flow control threshold when performing different cluster flow controls.
[0297] Optionally, the SMS management platform also includes: a receiving module for receiving link layer data, the link layer data carrying an SMS request; a fifth determination module for determining the total size of the link layer data; and a cache module for caching the link layer data in the TCP buffer pool if it is determined based on the total size of the link layer data that the Transmission Control Protocol TCP buffer pool can cache the link layer data.
[0298] In summary, when the SMS management platform receives the SMS request input by the user, it determines the SMS type of at least one SMS included in the SMS request, and then determines the flow control result according to the SMS type of at least one SMS and the flow control threshold. In other words, the embodiment of the present application provides a method for flow control based on the SMS type of the SMS itself. Compared with the simple API-level flow control, the method provided by the embodiment of the present application can improve the sophistication of flow control, thereby improving the flow control effect.
[0299] In addition, the embodiment of the present application also provides another SMS management platform, which is used to send SMS to the receiving end according to the obtained SMS request; Fig.18 As shown, the short message management platform 1800 includes:
[0300] Receiving module 1801 is used to receive link layer data, which carries the SMS request input by the user; for specific implementation, refer to Fig.15 Step 1501 in the illustrated embodiment.
[0301] The fifth determining module 1802 is used to determine the total size of the link layer data; for specific implementation, refer to Fig.15 Step 1502 in the illustrated embodiment.
[0302] The cache module 1803 is used to cache the link layer data in the TCP buffer pool if it is determined based on the total size of the link layer data that the TCP buffer pool can cache the link layer data. Fig.15 Step 1503 in the illustrated embodiment.
[0303] In summary, since the size of the link layer data can be determined without parsing the SMS request, the above method can be used to control the SMS flow directly at the link layer before the SMS flow control is performed based on the SMS type, so as to avoid the SMS management platform crashing due to massive SMS exceeding the load of the downstream nodes in the SMS management platform.
[0304] Among them, the acquisition module 1701, the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802 and the cache module 1803 can all be implemented by software, or can be implemented by hardware. Exemplarily, the implementation of the acquisition module 1701 is described below by taking the acquisition module 1701 as an example. Similarly, the implementation of the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802 and the cache module 1803 can refer to the acquisition module 1701.
[0305] As an example of a software functional unit, the acquisition module 1701 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the acquisition module 1701 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region may include multiple AZs.
[0306] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0307] As an example of a hardware functional unit, the acquisition module 1701 may include at least one computing device, such as a server, etc. Alternatively, the acquisition module 1701 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0308] The multiple computing devices included in the acquisition module 1701 can be distributed in the same region or in different regions. The multiple computing devices included in the acquisition module 1701 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the acquisition module 1701 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0309] It should be noted that, in other embodiments, the acquisition module 1701 can be used to execute any step in the SMS flow control method, the first determination module 1702 can be used to execute any step in the SMS flow control method, the second determination module 1703 can be used to execute any step in the SMS flow control method, the sending module 1704 can be used to execute any step in the SMS flow control method, the receiving module 1801 can be used to execute any step in the SMS flow control method, the fifth determination module 1802 can be used to execute any step in the SMS flow control method, and the cache module 1803 can be used to execute any step in the SMS flow control method. The steps that the acquisition module 1701, the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802 and the cache module 1803 are responsible for implementing can be specified as needed. The full functions of the SMS management platform can be realized by respectively implementing different steps in the SMS flow control method through the acquisition module 1701, the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802 and the cache module 1803.
[0310] The present application embodiment also provides a computing device 1900. Fig.19 As shown, computing device 1900 includes: bus 1902, processor 1904, memory 1906 and communication interface 1908. Processor 1904, memory 1906 and communication interface 1908 communicate through bus 1902. Computing device 1900 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 1900.
[0311] The bus 1902 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.19 The bus 1902 may include a path for transmitting information between various components of the computing device 1900 (eg, the memory 1906, the processor 1904, and the communication interface 1908).
[0312] The processor 1904 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0313] The memory 1906 may include a volatile memory, such as a random access memory (RAM). The processor 1904 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0314] The memory 1906 stores executable program codes, and the processor 1904 executes the executable program codes to respectively implement the functions of the aforementioned acquisition module 1701, the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802, and the cache module 1803, thereby implementing the SMS flow control method. That is, the memory 1906 stores instructions for executing the SMS flow control method.
[0315] Alternatively, the memory 1906 stores executable codes, and the processor 1904 executes the executable codes to respectively implement the functions of the aforementioned SMS management platform, thereby implementing the SMS flow control method. That is, the memory 1906 stores instructions for executing the SMS flow control method.
[0316] The communication interface 1908 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1900 and other devices or communication networks.
[0317] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0318] like Fig. 20As shown, the computing device cluster includes at least one computing device 1900. The memory 1906 in one or more computing devices 1900 in the computing device cluster may store the same instructions for executing the SMS traffic control method.
[0319] In some possible implementations, the memory 1906 of one or more computing devices 1900 in the computing device cluster may also store some instructions for executing the SMS flow control method. In other words, the combination of one or more computing devices 1900 may jointly execute the instructions for executing the SMS flow control method.
[0320] It should be noted that the memory 1906 in different computing devices 1900 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the SMS management platform. That is, the instructions stored in the memory 1906 in different computing devices 1900 can implement the functions of one or more modules of the acquisition module 1701, the first determination module 1702, the second determination module 1703, the sending module 1704, the receiving module 1801, the fifth determination module 1802 and the cache module 1803.
[0321] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.21 A possible implementation is shown. Fig.21 As shown, two computing devices 1900A and 1900B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1906 in the computing device 1900A stores instructions for executing the functions of the acquisition module 1701, the first determination module 1702, the second determination module 1703, and the sending module 1704. At the same time, the memory 1906 in the computing device 1900B stores instructions for executing the functions of the receiving module 1801, the fifth determination module 1802, and the cache module 1803.
[0322] Fig.21 The connection method between the computing device clusters shown can be that considering that the SMS flow control method provided in the present application performs flow control at different stages of SMS transmission, and a large amount of calculation is required in the background, it is considered that the functions implemented by the acquisition module 1701, the first determination module 1702, the second determination module 1703, and the sending module 1704 are executed by the computing device 1900A, and the functions implemented by the receiving module 1801, the fifth determination module 1802 and the cache module 1803 are executed by the computing device 1900B.
[0323] It should be understood that Fig.21The functionality of the computing device 1900A shown in FIG. 1 may also be implemented by multiple computing devices 1900. Similarly, the functionality of the computing device 1900B may also be implemented by multiple computing devices 1900.
[0324] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the SMS flow control method.
[0325] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the SMS flow control method.
[0326] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling SMS traffic, characterized in that: The method is applied to a short message management platform, and the short message management platform is used to send a short message to a receiving end according to an acquired short message request; The method comprises: Obtaining a text message request input by a user, wherein the text message request includes at least one text message; Determining a text message type of the at least one text message according to the text message request; Determine a flow control result according to the SMS type and the flow control threshold of the at least one SMS, wherein the flow control threshold is used to indicate the total amount of SMS currently allowed to be sent to the receiving end, and the flow control result is used to indicate the SMS to be sent to the receiving end in the at least one SMS; According to the flow control result, the short message to be sent is sent to the receiving end.
2. The method according to claim 1, characterized in that The at least one text message includes a first text message of a long text message type, the long text message is a text message whose total number of bytes exceeds a reference value, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end; The determining the flow control result according to the SMS type and the flow control threshold of the at least one SMS includes: Obtain the total number of SMS fragments of the first SMS; The flow control result is determined according to the total number of SMS fragments of the first SMS and the flow control threshold.
3. The method according to claim 2, characterized in that The SMS request carries the total number of SMS fragments of the first SMS.
4. The method according to claim 2, characterized in that The method further comprises: In response to the total number of bytes of the first text message exceeding the reference value, the first text message is divided into a plurality of text message segments.
5. The method according to any one of claims 1 to 4, characterized in that: The at least one text message includes a second text message of a group text message type, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end; The determining the flow control result according to the SMS type and the flow control threshold of the at least one SMS includes: Obtaining the total number of recipients of the second short message; The flow control result is determined according to the total number of recipients of the second short message and the flow control threshold.
6. The method according to any one of claims 1 to 5, characterized in that: Before determining the flow control result according to the SMS type and the flow control threshold of the at least one SMS, the method further includes: Determining, according to the SMS request, a service feature of the at least one SMS; The flow control threshold is determined according to the service characteristics of the at least one short message.
7. The method according to claim 6, characterized in that The service characteristics include the user type of the sender of the corresponding short message and / or the function type of the corresponding short message, the user type is used to indicate the priority of the corresponding user, and the function type is used to indicate the priority of the corresponding short message.
8. The method according to claim 6 or 7, characterized in that Before determining the service feature of the at least one text message according to the text message request, the method further includes: authenticating the at least one text message; After the at least one text message is authenticated, an operation of determining a service feature of the at least one text message is performed according to the text message request.
9. The method according to any one of claims 1 to 8, characterized in that: The flow control threshold includes a first flow control threshold and a second flow control threshold, the first flow control threshold is greater than the second flow control threshold, and the second flow control threshold is used to indicate the flow control threshold when the SMS management platform is overloaded; The determining the flow control result according to the SMS type and the flow control threshold of the at least one SMS includes: When a system overload is detected, the flow control result is determined according to the SMS type of the at least one SMS and the second flow control threshold.
10. The method according to any one of claims 1 to 9, characterized in that: The flow control threshold includes a self-preservation flow control threshold, and the self-preservation flow control threshold is used to indicate the flow control threshold used by the short message management platform when performing self-preservation flow control.
11. The method according to claim 10, characterized in that The SMS request is an SMS request based on a long link protocol, and the self-protection flow control threshold is a flow control threshold of a link that transmits the SMS request.
12. The method according to any one of claims 1 to 11, characterized in that: The flow control threshold includes a cluster flow control threshold, and the cluster flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing cluster flow control. The SMS management platform performs different cluster flow controls for different SMS protocols, and the SMS management platform shares the cluster flow control threshold when performing different cluster flow controls.
13. The method according to any one of claims 1 to 12, characterized in that: Before obtaining the SMS request input by the user, the method further includes: Receiving link layer data, wherein the link layer data carries the SMS request; Determining the total size of the link layer data; If it is determined based on the total size of the link layer data that a transmission control protocol TCP buffer pool is able to buffer the link layer data, the link layer data is buffered in the TCP buffer pool.
14. A method for controlling SMS traffic, characterized in that: The method is applied to a short message management platform; the method comprises: Receiving link layer data, wherein the link layer data carries a text message request input by a user; Determining the total size of the link layer data; If it is determined based on the total size of the link layer data that a transmission control protocol TCP buffer pool is able to buffer the link layer data, the link layer data is buffered in the TCP buffer pool.
15. A short message management platform, characterized in that: The SMS management platform is used to send SMS messages to the receiving end according to the acquired SMS request; The SMS management platform includes: An acquisition module, used to acquire a text message request input by a user, wherein the text message request includes at least one text message; A first determining module, configured to determine a text message type of the at least one text message according to the text message request; A second determination module is used to determine a flow control result according to the SMS type and the flow control threshold of the at least one SMS, wherein the flow control threshold is used to indicate the total amount of SMS currently allowed to be sent to the receiving end, and the flow control result is used to indicate the SMS to be sent to the receiving end in the at least one SMS; A sending module is used to send the short message to be sent to the receiving end according to the flow control result.
16. The short message management platform according to claim 15, characterized in that: The at least one text message includes a first text message of a long text message type, the long text message is a text message whose total number of bytes exceeds a reference value, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end; The second determining module is used to: Obtain the total number of SMS fragments of the first SMS; The flow control result is determined according to the total number of SMS fragments of the first SMS and the flow control threshold.
17. The short message management platform according to claim 16, characterized in that: The SMS request carries the total number of SMS fragments of the first SMS.
18. The short message management platform according to claim 16, characterized in that: The SMS management platform also includes: The division module is used for dividing the first message into a plurality of message segments in response to the total number of bytes of the first message exceeding the reference value.
19. The short message management platform according to any one of claims 15 to 18, characterized in that: The at least one text message includes a second text message of a group text message type, and the flow control threshold is used to indicate the total number of text messages currently allowed to be sent to the receiving end; The second determining module is used for: Obtaining the total number of recipients of the second short message; The flow control result is determined according to the total number of recipients of the second short message and the flow control threshold.
20. The short message management platform according to any one of claims 15 to 19, characterized in that: The SMS management platform also includes: A third determination module, configured to determine a service feature of the at least one text message according to the text message request; The fourth determination module is used to determine the flow control threshold according to the service characteristics of the at least one short message.
21. The short message management platform according to claim 20, characterized in that: The service characteristics include the user type of the sender of the corresponding short message and / or the function type of the corresponding short message, the user type is used to indicate the priority of the corresponding user, and the function type is used to indicate the priority of the corresponding short message.
22. The short message management platform according to claim 20 or 21, characterized in that: The SMS management platform also includes: An authentication module, used for authenticating the at least one text message; The first determination module is used to perform an operation of determining the service characteristics of the at least one text message according to the text message request after the at least one text message is authenticated.
23. The short message management platform according to any one of claims 15 to 22, characterized in that: The flow control threshold includes a first flow control threshold and a second flow control threshold, the first flow control threshold is greater than the second flow control threshold, and the second flow control threshold is used to indicate the flow control threshold when the SMS management platform is overloaded; The second determining module is used for: When a system overload is detected, the flow control result is determined according to the SMS type of the at least one SMS and the second flow control threshold.
24. The short message management platform according to any one of claims 15 to 23, characterized in that: The flow control threshold includes a self-preservation flow control threshold, and the self-preservation flow control threshold is used to indicate the flow control threshold used by the short message management platform when performing self-preservation flow control.
25. The short message management platform according to claim 24, characterized in that: The SMS request is an SMS request based on a long link protocol, and the self-protection flow control threshold is a flow control threshold of a link that transmits the SMS request.
26. The short message management platform according to any one of claims 15 to 25, characterized in that: The flow control threshold includes a cluster flow control threshold, and the cluster flow control threshold is used to indicate the flow control threshold used by the SMS management platform when performing cluster flow control. The SMS management platform performs different cluster flow controls for different SMS protocols, and the SMS management platform shares the cluster flow control threshold when performing different cluster flow controls.
27. The short message management platform according to any one of claims 15 to 26, characterized in that: The SMS management platform also includes: A receiving module, used for receiving link layer data, wherein the link layer data carries the SMS request; A fifth determining module, used to determine the total size of the link layer data; The cache module is used to cache the link layer data in a transmission control protocol TCP buffer pool if it is determined based on the total size of the link layer data that the TCP buffer pool can cache the link layer data.
28. A short message management platform, characterized in that: The SMS management platform includes: A receiving module, used to receive link layer data, wherein the link layer data carries a text message request input by a user; A fifth determining module, used to determine the total size of the link layer data; The cache module is used to cache the link layer data in a transmission control protocol TCP buffer pool if it is determined based on the total size of the link layer data that the TCP buffer pool can cache the link layer data.
29. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1-14.
30. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 14.
31. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 14.