Short message sending control method and device, readable storage medium and equipment

By using a ring storage area structure and O(1) time complexity for rate limiting in the SMS gateway system, the accuracy and efficiency problems of existing rate control methods in high throughput and low latency scenarios are solved, achieving efficient and accurate rate control and improved stability.

CN122069485APending Publication Date: 2026-05-19JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-02-11
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing SMPP rate control methods are difficult to meet the needs of modern high-throughput, low-latency SMS gateways for efficient and accurate rate control. Traditional methods are prone to sudden traffic at the time window switching boundary. The token bucket algorithm has high computational overhead in high-concurrency scenarios and is difficult to adapt to different user strategies. The multi-time-slice sliding window counting method has insufficient control accuracy and high memory overhead.

Method used

A circular storage area structure is adopted, which consists of M memory blocks to store the timestamps of the most recent M sent short messages. The time difference between the current timestamp and the earliest timestamp is obtained. If it is greater than or equal to the preset time window, the current short message is allowed to be sent and the timestamp is updated. This achieves O(1) time complexity for flow limiting judgment and fixed-size memory design.

Benefits of technology

It significantly improves processing efficiency in high-concurrency scenarios, ensures that the amount of data sent within any consecutive time window does not exceed the limit, reduces memory management overhead, improves system resource utilization efficiency and stability, supports flexible traffic scheduling, and enhances business availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122069485A_ABST
    Figure CN122069485A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a short message sending control method, a short message sending control device, a computer readable storage medium and electronic equipment.The short message sending control method comprises the steps that a preset short message sending rate limiting strategy is acquired, the short message sending rate limiting strategy is used for defining the maximum number M of short messages allowed to be sent in a preset time window; initializing an annular storage area based on the maximum short message number M, wherein the annular storage area is composed of M memory blocks; when a short message sending request is received, obtaining a time difference between the current timestamp and the earliest timestamp recorded in the annular storage area; if the time difference is larger than or equal to the preset time window, the current short message is allowed to be sent, and the current timestamp is written into the target memory block occupied by the earliest timestamp. According to the method, the memory overhead and the processing delay can be remarkably reduced while the condition that the sending amount in any continuous time window does not exceed M strictly can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a short message sending control method, a short message sending control device, a computer-readable storage medium, and an electronic device. Background Technology

[0002] In the current SMPP (Short Message Peer-to-Peer) SMS gateway system, rate control is a key technology to ensure system stability, prevent resource overload, and achieve fair scheduling among multiple users.

[0003] Traditional SMPP rate control methods mainly employ simple counter-based rate limiting mechanisms. However, this approach struggles to meet the demands of modern high-throughput, low-latency SMS gateways for efficient and precise rate control.

[0004] Therefore, there is an urgent need in this field to develop a new method and apparatus for controlling the sending of short messages.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure. Summary of the Invention

[0006] The purpose of this disclosure is to provide a short message sending control method, a short message sending control device, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least a certain extent, the technical problem that makes it difficult to meet the needs of modern high-throughput, low-latency SMS gateways for efficient and accurate rate control due to limitations in related technologies.

[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0008] According to a first aspect of this disclosure, a method for controlling the sending of short messages is provided, comprising: Obtain a preset short message sending rate limiting policy, wherein the short message sending rate limiting policy is used to define the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; A circular storage area is initialized based on the maximum number of short messages M. The circular storage area consists of M memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. When a short message sending request is received, the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area is obtained; If the time difference is greater than or equal to the preset time window, then sending the current short message is allowed, and the current timestamp is written into the target memory block occupied by the earliest timestamp.

[0009] In an exemplary embodiment of this disclosure, the M memory blocks are arranged consecutively in physical memory; The initialization of a ring-shaped storage area based on the maximum number of short messages M includes: Allocate M consecutive memory blocks to form the circular storage area; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

[0010] In an exemplary embodiment of this disclosure, the M memory blocks are not distributed contiguously in physical memory; The initialization of a ring-shaped storage area based on the maximum number of short messages M includes: Allocate M non-contiguous memory blocks to form the circular storage area; A preset logical traversal mapping relationship is established so that the M memory blocks logically form a circular sequence with the beginning and end connected; the logical traversal mapping relationship is used to determine the next memory block for each of the memory blocks; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

[0011] In an exemplary embodiment of this disclosure, the earliest timestamp recorded in the circular storage area is read in the following manner: Read the timestamp stored in the target memory block currently pointed to by the head pointer.

[0012] In an exemplary embodiment of this disclosure, after writing the current timestamp into the target memory block occupied by the earliest timestamp, the method further includes: Update the head pointer to point to the successor memory block in the circular storage area.

[0013] In an exemplary embodiment of this disclosure, when the M memory blocks are arranged contiguously in physical memory, updating the head pointer to point to the subsequent memory block in the circular storage area includes: Based on the continuous arrangement characteristics of the memory blocks, determine the successor memory block of the target memory block; Update the head pointer to point to the successor memory block.

[0014] In an exemplary embodiment of this disclosure, when the M memory blocks are not contiguously distributed in physical memory, updating the head pointer to point to the subsequent memory block in the circular storage area includes: The target memory block is queried according to a preset logical traversal mapping relationship to determine its successor memory block; Update the head pointer to point to the successor memory block.

[0015] In an exemplary embodiment of this disclosure, the method further includes: If the time difference is less than the preset time window, the current short message is prohibited from being sent, and the current timestamp is not written to the circular storage area.

[0016] In an exemplary embodiment of this disclosure, after prohibiting the sending of the current short message, the method further includes: Calculate the earliest possible transmission time, where the earliest possible transmission time is the earliest timestamp plus the preset time window; The current short message is added to the delayed scheduling queue and sent when the earliest sendable time is reached.

[0017] According to a second aspect of this disclosure, a short message sending control device is provided, comprising: The strategy acquisition module is used to acquire a preset short message sending rate limiting strategy, wherein the short message sending rate limiting strategy is used to define the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; An initialization module is used to initialize a circular storage area based on the maximum number of short messages M. The circular storage area consists of M consecutive memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. The time difference acquisition module is used to acquire the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area when a short message sending request is received. The sending control module is configured to allow the sending of the current short message if the time difference is greater than or equal to the preset time window, and to write the current timestamp into the target memory block occupied by the earliest timestamp.

[0018] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the short message sending control method described in the first aspect above.

[0019] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the short message sending control method described in the first aspect by executing the executable instructions.

[0020] As can be seen from the above technical solutions, the SMS sending control method, SMS sending control device, computer-readable storage medium, and electronic device in the exemplary embodiments of this disclosure have at least the following advantages and positive effects: In some embodiments of this disclosure, a preset short message sending rate limiting strategy is obtained. This strategy defines the maximum number of short messages M allowed to be sent within a preset time window. A circular storage area is initialized based on the maximum number of short messages M. When a short message sending request is received, the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area is obtained. If the time difference is greater than or equal to the preset time window, the current short message is allowed to be sent, and the current timestamp is written to the target memory block occupied by the earliest timestamp. On the one hand, the rate limiting judgment only requires one memory read and one time comparison. Compared to M, the time complexity is always O(1), which is not affected by M and significantly improves the processing efficiency in high-concurrency scenarios. Furthermore, since the window boundary is dynamically calculated at the current moment and directly compared with the actual sending timestamp, it ensures that the amount of transmission within any consecutive time window does not exceed M, effectively avoiding the control failure of the fixed time slice mechanism at the window boundary. On the other hand, the ring storage area adopts a fixed size design and realizes data update by overwriting the oldest timestamp. It does not require dynamic memory allocation or data migration, and has the advantages of constant memory usage and no runtime memory management overhead, which significantly improves the system resource utilization efficiency and long-term operation stability.

[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0023] Figure 1 A flowchart illustrating the short message sending control method in an embodiment of this disclosure is shown. Figure 2 This diagram illustrates the deployment architecture of the short message rate limiting control module in the SMPP communication link according to an embodiment of this disclosure. Figure 3 This diagram illustrates the system interaction flow of the multi-level rate limiting mechanism in a typical SMS delivery scenario according to an embodiment of this disclosure. Figure 4This illustration shows a flowchart of how to initialize a ring-shaped storage area based on the maximum number of short messages M when M memory blocks are arranged consecutively in physical memory, according to an embodiment of this disclosure. Figure 5 This diagram illustrates the logical storage structure of the ring-shaped storage area in an embodiment of this disclosure. Figure 6 This diagram illustrates the actual storage layout of the ring-shaped storage area in physical memory according to an embodiment of this disclosure. Figure 7 This illustration shows a flowchart of how to initialize a ring-shaped storage area based on the maximum number of short messages M when M memory blocks are not distributed contiguously in physical memory, according to an embodiment of this disclosure. Figure 8 This diagram illustrates the timestamp distribution and transmission decision within a sliding window in an embodiment of this disclosure. Figure 9 This diagram illustrates the timestamp distribution of the circular storage area before the insertion operation in an embodiment of this disclosure. Figure 10 This diagram illustrates the timestamp distribution of the circular storage area after an insertion operation in an embodiment of this disclosure. Figure 11 This diagram illustrates the structure of a short message sending control device in an exemplary embodiment of this disclosure. Figure 12 A schematic diagram of the structure of an electronic device in an exemplary embodiment of this disclosure is shown. Detailed Implementation

[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0025] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.

[0026] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0027] In current SMPP SMS gateway systems, rate control is a key technology for ensuring stable system operation, preventing resource overload, and achieving fair scheduling among multiple users. With the increasing demand for high-concurrency, low-latency services, traditional rate control mechanisms have shown significant shortcomings in terms of accuracy, efficiency, and resource utilization.

[0028] In existing technologies, the following solutions are generally adopted: The first approach is a rate-limiting mechanism based on a fixed time window counter. This involves maintaining a sending counter within a preset time window (e.g., 1 second). When a short message sending request is received, it checks if the current counter value exceeds a threshold. If not, sending is allowed and the counter is incremented. However, this approach is prone to sudden traffic spikes at the time window switching boundaries, making it impossible to guarantee that the sending rate within any consecutive time window will not exceed the limit, resulting in inaccurate rate control.

[0029] The second approach uses a token bucket algorithm, where the system adds tokens to the bucket at a fixed rate. Each SMS message sent consumes one token, and requests are rejected or delayed when the bucket is empty. However, this approach requires frequent manipulation of the token state in high-concurrency scenarios and is difficult to dynamically adapt to different users' rate strategies. Furthermore, its tolerance for sudden traffic surges depends on the bucket capacity configuration, making parameter tuning complex and potentially leading to resource waste or excessive restrictions.

[0030] The third approach uses a multi-time-slice sliding window counting method, dividing the time into several fixed-size time slices, recording the transmission volume within each slice, and determining whether the limit has been exceeded by accumulating the data from the most recent few time slices. However, the control accuracy of this approach is limited by the granularity of the time slices; if the time slices are too large, the control is coarse, while if they are too small, the memory and computational overhead increases dramatically. In addition, statistical deviations still exist at the time slice boundaries, making it difficult to achieve true sliding window rate limiting.

[0031] In summary, existing rate control schemes generally suffer from insufficient time accuracy, high computational or memory overhead, and difficulty in balancing high throughput and low latency, thus failing to meet the requirements of modern SMPP SMS gateways for efficient, accurate, and scalable rate control.

[0032] In the embodiments of this disclosure, a short message sending control method is first provided, which at least to some extent overcomes the shortcomings of related technologies that make it difficult to meet the needs of modern high-throughput, low-latency SMS gateways for efficient and accurate rate control.

[0033] Figure 1 The diagram shows a flowchart of a short message sending control method in an embodiment of this disclosure. The execution subject of the short message sending control method can be a short message rate limiter or a short message rate limiting module.

[0034] refer to Figure 1 A short message sending control method according to an embodiment of the present disclosure includes the following steps: Step S110: Obtain the preset short message sending rate limiting policy. The short message sending rate limiting policy is used to define the maximum number of short messages M that are allowed to be sent within a preset time window, where M is a positive integer. Step S120: Initialize a circular storage area based on the maximum number of short messages M. The circular storage area consists of M memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. Step S130: When a short message sending request is received, obtain the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area; Step S140: If the time difference is greater than or equal to the preset time window, then the current short message is allowed to be sent, and the current timestamp is written to the target memory block occupied by the earliest timestamp.

[0035] exist Figure 1In the technical solution provided by the embodiment shown, a preset short message sending rate limiting strategy is obtained. The short message sending rate limiting strategy is used to define the maximum number of short messages M allowed to be sent within a preset time window. A ring storage area is initialized based on the maximum number of short messages M. When a short message sending request is received, the time difference between the current timestamp and the earliest timestamp recorded in the ring storage area is obtained. If the time difference is greater than or equal to the preset time window, the current short message is allowed to be sent, and the current timestamp is written to the target memory block occupied by the earliest timestamp. On the one hand, the rate limiting judgment only requires one memory read and one time comparison, and the time complexity is always O(1), which is not affected by M, significantly improving the processing efficiency in high-concurrency scenarios. Furthermore, since the window boundary is dynamically calculated by the current moment and directly compared with the actual sending timestamp, it ensures that the sending amount in any consecutive time window strictly does not exceed M, effectively avoiding the control failure of the fixed time slice mechanism at the window boundary. On the other hand, the ring storage area adopts a fixed size design and realizes data update by overwriting the oldest timestamp. There is no need for dynamic memory allocation or data migration. It has the advantages of constant memory occupation and no runtime memory management overhead, which significantly improves the system resource utilization efficiency and long-term operation stability.

[0036] The following are Figure 1 The specific implementation process of each step in the process will be explained in detail: Before step S110, first combine Figure 2 and Figure 3 The architecture of the SMPP SMS gateway system based on the rate limiting module in this disclosure is described.

[0037] Figure 2 This diagram illustrates the deployment architecture of the short message rate limiting control module in an SMPP communication link according to an embodiment of this disclosure. Figure 2 As shown, this architecture illustrates a communication link established between an external SMS entity (such as a mobile terminal or server application) and the SMS service center via a TCP (Transmission Control Protocol) connection. The rate-limiting module, as the core component, is deployed on this communication link, responsible for monitoring and regulating the rate at which SMS messages are sent to the SMS service center. When an SMS sending request arrives, the rate-limiting module determines whether to allow the request based on pre-defined rules. If the request meets the requirements, the message is forwarded to the SMS service center; otherwise, it is rejected or delayed accordingly. Furthermore, all response information returned from the SMS service center also needs to be processed by the rate-limiting module to ensure the stability and security of the entire communication process.

[0038] Figure 3 This diagram illustrates the system interaction flow of the multi-level rate limiting mechanism in a typical SMS delivery scenario, as shown in the embodiments of this disclosure. Specifically, Figure 3 This section details how, in a typical retail or logistics business scenario, SMS messages travel from the upstream business system through multiple SMS gateways (labeled SMS gateways 0 to n), message queues, and sending clients (labeled sending clients 0 to m), ultimately reaching the operator (e.g., operators A and B) and the end user (e.g., end user). and This involves a complete process. In this process, the rate limiter not only exists on each SMS gateway but is also integrated into the sending client, forming a multi-layered rate limiting system. This design ensures that even during peak business periods, service interruptions due to overload can be effectively avoided, while also supporting flexible adjustments to sending strategies to meet different business needs.

[0039] The above system architecture provides the basic operating environment for the implementation of this disclosure, enabling the proposed short message sending control method to be executed efficiently and reliably in actual communication systems.

[0040] Next, refer to Figure 1 In step S110, a preset short message sending rate limiting strategy is obtained.

[0041] In this step, a preset SMS sending rate limiting policy can be obtained. This policy defines the maximum number of SMS messages M allowed to be sent within a preset time window, where M is a positive integer. For example, the policy can be configured as "maximum of 100 SMS messages per second," meaning the time window is 1 second and M=100. This policy can be pre-configured by the system administrator or dynamically issued based on service type, user level, etc., and loaded by the rate limiting module as the basis for subsequent rate control.

[0042] In step S120, a ring-shaped storage area is initialized based on the maximum number of short messages M.

[0043] In this step, a circular storage area can be initialized based on the maximum number of short messages M mentioned above. The circular storage area can consist of M memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages.

[0044] In one exemplary implementation, the M memory blocks described above can be arranged contiguously in physical memory. (See reference...) Figure 4 , Figure 4 This embodiment of the present disclosure illustrates how to initialize a circular storage area based on the maximum number of short messages M when M memory blocks are arranged contiguously in physical memory, including steps S401-S403: In step S401, M consecutive memory blocks are allocated to form a circular storage area.

[0045] In this step, a block of size M can be requested from the operating system based on the maximum number of short messages M defined by the preset rate limiting policy. A contiguous physical memory region of L bytes, where L is the storage length required for a single timestamp (e.g., 8 bytes for a 64-bit timestamp). This contiguous memory region is logically divided into M memory blocks of equal length, each used to store the sending timestamp of a short message. Using a contiguous memory layout fully utilizes CPU cache locality, improves the efficiency of subsequent read and write operations, and simplifies address calculation logic.

[0046] In step S402, a head pointer is maintained and initialized to point to the starting position of the circular storage area.

[0047] In this step, a head pointer can be created to identify the location of the oldest (i.e., earliest) valid timestamp in the current circular memory area. During the initialization phase, since no short message sending records have been set, the head pointer is set to point to the starting address of the first memory block in the circular memory area (for example, if the allocated memory starting address is 0x00600000, then the initial value of the head pointer is 0x00600000). This pointer will move forward in a circular manner after each successful short message sending and timestamp update, thereby implementing first-in-first-out (FIFO) sliding window management.

[0048] In step S403, the contents of each memory block are initialized with an invalid timestamp marker to indicate that a valid transmission timestamp has not yet been written.

[0049] In this step, all M memory blocks can be traversed, and their contents uniformly filled with a predefined "invalid timestamp flag" (e.g., an all-zero value 0x0000000000000000 or a reserved special value such as -1). This flag is used to distinguish between valid timestamps and unused slots during subsequent rate determination, avoiding misjudgments caused by reading uninitialized memory. This initialization operation ensures that the circular storage area is in a deterministic and consistent state before its first use, providing a reliable foundation for subsequent accurate sliding window rate limiting.

[0050] After initializing the circular storage area in step S403 above, this disclosure constructs an efficient data structure that can be used to accurately record SMS sending timestamps. To more intuitively understand the organization of this structure, the following... Figure 5 and Figure 6 Please provide an explanation.

[0051] refer to Figure 5 , Figure 5 A schematic diagram of the logical storage structure of the ring-shaped storage area in an embodiment of this disclosure is shown. For example... Figure 5As shown, this circular storage area logically represents a linear sequence of multiple memory blocks, each storing the precise sending time information of a short message. The diagram uses three memory blocks as an example, recording the sending times (e.g., 2006.01.02T15:16:05.0, 2006.01.02T15:16:05.1, etc.) for short messages with IDs 1136214965000, 1136214965100, and 1136214965200. This logical view demonstrates the characteristic of timestamps being arranged sequentially by sending time, facilitating subsequent location of the earliest timestamp using the head pointer and determining whether sending a new message is permitted.

[0052] refer to Figure 6 , Figure 6 This diagram illustrates the actual storage layout of the ring-shaped storage area in physical memory according to an embodiment of this disclosure. Figure 6 As shown, this circular storage area is implemented in physical memory as a contiguous address space. Each memory block is aligned to 8 bytes (64 bits) and stored sequentially at starting addresses 0x00600000, 0x00600008, and 0x00600010. Each memory block stores a 64-bit timestamp (e.g., example value 1136214965000), the specific encoding of which can be configured to millisecond-level or higher precision timestamps according to the system clock accuracy requirements. Furthermore, the diagram illustrates the initial states of the head and tail pointers: the head pointer points to the address of the first valid timestamp (0x00600000), and the tail pointer points to the last location to be written (0x00600010). Together, they maintain the read / write boundaries of the circular buffer, supporting efficient circular write and read operations.

[0053] Through the above descriptions at both the logical and physical levels, it is clear that the logically ordered time series is efficiently implemented physically through contiguous memory blocks and pointer mechanisms. This design not only ensures accurate storage and fast access to timestamps but also significantly reduces memory management overhead and improves system performance in high-concurrency scenarios.

[0054] In one exemplary implementation, the aforementioned M memory blocks may be non-contiguously distributed in physical memory. (See reference...) Figure 7 , Figure 7 This illustration shows a flowchart of how to initialize a ring-shaped storage area based on the maximum number of short messages M when M memory blocks are not contiguously distributed in physical memory, including steps S701-S704: In step S701, M non-contiguous memory blocks are allocated to form a circular storage area.

[0055] In this step, M independent memory blocks can be requested from the operating system based on the maximum number of short messages M defined by the preset rate limiting policy. Each memory block has a fixed size (e.g., 8 bytes, used to store a 64-bit timestamp). Due to physical memory fragmentation or system memory management policies, these memory blocks may be scattered and not adjacent to each other in the physical address space. Although the physical layout is not contiguous, they will be organized into a fully functional circular buffer through a logical mapping mechanism.

[0056] In step S702, a preset logical traversal mapping relationship is established so that the M memory blocks logically form a circular sequence with the beginning and end connected; the logical traversal mapping relationship is used to determine the next memory block for each memory block.

[0057] In this step, a logical mapping structure (such as a hash table, array index table, or linked pointers) can be constructed to explicitly record the correspondence between each memory block and its "successor" memory block. For example, an index array next_index[] of size M can be maintained, where next_index[i] = j indicates that the next logical node of the i-th memory block is the j-th memory block, and the successor of the last memory block points to the first, thus forming a logical closed loop. This mapping relationship is independent of physical addresses, allowing the memory blocks to be traversed in a fixed order even if they are physically scattered, thus achieving a circular buffer function.

[0058] In step S703, a head pointer is maintained and initialized to point to the starting position of the circular storage area.

[0059] In this step, a head pointer can be created to identify the memory block containing the earliest valid timestamp. During initialization, the head pointer is set to point to the first memory block in the logical circular sequence (e.g., the node with logical index 0, regardless of its physical address). After each successful writing of a new timestamp, this pointer will be updated to the next memory block according to the logical traversal mapping established in step S702, thereby maintaining the first-in-first-out (FIFO) characteristic of the sliding window.

[0060] In step S704, the contents of each memory block are initialized with an invalid timestamp marker to indicate that a valid transmission timestamp has not yet been written.

[0061] In this step, all M allocated memory blocks can be traversed, and their contents uniformly set to a predefined "invalid timestamp flag" (e.g., an all-zero value 0x0000000000000000 or a reserved value -1). This flag serves as the basis for determining whether a slot has been used, avoiding misreading uninitialized data during rate control. This operation ensures that the circular storage area is in a consistent and reliable state before its first use, providing a data foundation for subsequent high-precision sliding window rate limiting.

[0062] Next, refer to Figure 1 In step S130, when a short message sending request is received, the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area is obtained.

[0063] In this step, upon receiving a short message sending request, firstly, the current system time can be obtained as the current timestamp (e.g., a 64-bit time value in milliseconds or microseconds); then, the earliest valid sending timestamp within the circular memory area can be obtained by reading the timestamp stored in the target memory block currently pointed to by the header pointer. This earliest timestamp represents the oldest successful sending record within the sliding time window.

[0064] Then, the difference between the current timestamp and the earliest timestamp can be calculated to obtain the time interval between them (i.e., the time difference). This time difference will serve as the key criterion for determining whether to allow the current short message to be sent: if the time difference is greater than or equal to the preset time window, it means that the earliest record has "slipped out" of the window, and the current sending will not cause an over-limit; otherwise, it may violate the rate limiting policy. Through this dynamic judgment mechanism based on precise time differences, strict control over sending behavior within any consecutive time window is achieved, effectively avoiding the burst traffic problem caused at the boundary by the traditional fixed window method.

[0065] In step S140, if the time difference is greater than or equal to the preset time window, the current short message is allowed to be sent, and the current timestamp is written to the target memory block occupied by the earliest timestamp.

[0066] In this step, the time difference calculated in step S130 can be used to determine whether it meets the constraints of the rate limiting strategy. When the time difference is not less than the preset time window (e.g., 1 second), it indicates that the earliest valid sending timestamp recorded in the circular storage area is outside the current sliding time window. In this case, the short message sending request does not violate the rate limit and should be allowed.

[0067] refer to Figure 8 , Figure 8This diagram illustrates the timestamp distribution and sending decision within the sliding window in this embodiment of the present disclosure. As shown, the earliest timestamp currently stored in the circular storage area is 04.43 seconds. Assuming the current system time is 05.50 seconds (not explicitly marked in the diagram, but used as the reference time for rate judgment), and the preset time window is 1 second, then the starting boundary of the current sliding window is: 05.50 - 1.00 = 04.50 seconds. Since the earliest timestamp (04.43 seconds) is less than 04.50 seconds, it indicates that the record has exceeded the current valid window range, therefore, this sending is allowed. The label "04.43 < 04.50, SMS can continue to be sent" in the diagram is a graphical representation of the above judgment logic. Correspondingly, the time difference is 05.50 - 04.43 = 1.07 seconds, which is greater than the preset time window, satisfying the execution condition of step S140.

[0068] Subsequently, the current timestamp (05.50 seconds) can be written to the target memory block pointed to by the head pointer—this memory block previously stored the oldest expired timestamp. Through the overwrite operation, the circular storage area is automatically updated to include the state of the most recent M valid transmission records, thereby achieving dynamic maintenance of the sliding window within a fixed storage space. This operation involves only a single memory write, possessing constant time complexity and good atomicity, making it suitable for real-time rate control in high-concurrency, low-latency SMPP SMS gateway scenarios.

[0069] refer to Figure 9 , Figure 9 This diagram illustrates the timestamp distribution of the circular storage area before the insertion operation in this embodiment of the present disclosure. As shown, the circular structure contains M=5 timestamp nodes, recording the sending times of the five most recent short messages: 04.43 seconds, 04.61 seconds, 04.89 seconds, 05.32 seconds, and 05.45 seconds. The "beginning" pointer points to the earliest timestamp (04.43 seconds), representing the starting boundary of the current sliding window; the "end" pointer points to the latest timestamp (05.45 seconds), representing the current write position. Since only the most recent M timestamps need to be maintained, it is not necessary to traverse the entire historical record. The determination of whether to allow sending a new message is made simply by comparing the timestamp at the "beginning" position with the current time minus the preset time window. For example, if the current time is 05.50 seconds and the window is 1 second, then the window start time is 04.50 seconds. Since 04.43 < 04.50, it indicates that the earliest record has already slid out of the window, allowing continued sending.

[0070] refer to Figure 10 , Figure 10This diagram illustrates the timestamp distribution of the circular storage area after an insertion operation in this embodiment. As shown, after successfully sending a new short message (e.g., 05.50 seconds), the timestamp can be written to the original header node position (i.e., the original 04.43 seconds position), and the header pointer is moved forward to the next node (i.e., the original 04.61 seconds position). Correspondingly, the tail pointer position is also updated to the original 04.43 seconds position. At this time, the circular structure still maintains M=5 valid timestamp records, namely: 04.61 seconds, 04.89 seconds, 05.32 seconds, 05.45 seconds, and 05.50 seconds. Through this mechanism, efficient management of the most recent M sending behaviors is achieved: each insertion operation involves only one write and one pointer jump, with a time complexity of O(1), and no data movement or global scan is required, significantly improving the processing efficiency in high-concurrency scenarios.

[0071] After writing the current timestamp to the target memory block occupied by the earliest timestamp, the head pointer can be updated to point to the subsequent memory block in the circular memory area. Specifically: In an implementation where M memory blocks are arranged contiguously in physical memory, each memory block is stored sequentially adjacent to the next block with a fixed length (e.g., 8 bytes). Therefore, the successor relationship can be directly determined through address offset. The address of the successor memory block can be calculated by adding the size of a single memory block to the physical address of the current target memory block, and the head pointer can be updated to that address.

[0072] In an implementation where M memory blocks are not contiguously distributed in physical memory, the physical locations of the memory blocks are unordered. However, since a pre-defined logical traversal mapping relationship (e.g., an index table or a linked pointer structure) has been established during the initialization phase to define the next node of each memory block in the logical circular sequence, this mapping relationship can be queried based on the identifier (e.g., a logical index or pointer) of the current target memory block to obtain its logical successor memory block, and the head pointer can be updated to point to that successor memory block.

[0073] Through the aforementioned differentiated update mechanism, regardless of whether the memory layout is continuous, the head pointer can accurately point to the new earliest timestamp position in the sliding window, thereby ensuring the consistency and efficiency of the rate control logic.

[0074] It should be noted that if the above time difference is less than the preset time window, it can be determined that the current short message sending request will cause the rate to exceed the limit. Therefore, the sending of the short message is prohibited, and the current timestamp is not written to the circular storage area to avoid interfering with the accuracy of the valid historical records within the sliding window.

[0075] After prohibiting the sending of the current short message, a delayed scheduling strategy can be further implemented: First, based on the earliest timestamp recorded in the circular storage area (i.e., the timestamp pointed to by the head pointer) and a preset time window, the earliest possible sending time is calculated. Its value is: Earliest possible sending time = Earliest timestamp + Preset time window. This time point represents the earliest moment when the next short message is allowed to be sent after the current sliding window has completely "slid past" the earliest record. Then, the current short message can be added to a delayed scheduling queue, and a timed trigger mechanism can be set. When the system clock reaches the earliest possible sending time, the short message is automatically retrieved from the queue and the sending process is re-executed. This mechanism not only effectively ensures strict adherence to the rate limiting strategy but also avoids business losses caused by directly discarding messages, improving system availability and user experience.

[0076] Based on the above technical solutions, this disclosure has at least the following technical effects: First, it significantly improves the execution efficiency of rate control. By adopting a circular buffer structure and an O(1) time complexity checking algorithm, rate limiting judgment can be completed with only one memory read and one time comparison for each short message sending request, avoiding the traversal operation of historical records (O(N) complexity) in the traditional sliding window method. In high-concurrency, high-throughput SMPP gateway scenarios, this optimization greatly reduces CPU overhead and response latency, effectively supporting a message processing capacity of tens of thousands per second.

[0077] Second, it achieves high-precision sliding window rate limiting. Based on millisecond-level timestamps and dynamically calculated relative time windows, this disclosure ensures that the number of transmissions within any consecutive time window strictly does not exceed a preset threshold M, completely avoiding the burst traffic problems caused at the boundaries of fixed time slices or natural second windows. This precise control mechanism not only meets the operator's compliance requirements for access parties but also improves the fair scheduling capability in a multi-tenant environment.

[0078] Third, it optimizes memory resource usage and simplifies management logic. The circular buffer cyclically overwrites the oldest record with a fixed size (M timestamps), eliminating the need for dynamic allocation, release, or movement of memory blocks. This ensures deterministic and predictable memory usage while avoiding memory fragmentation and GC pressure. Especially in scenarios requiring the maintenance of rate-limited states for a large number of connections or individual users, this design significantly reduces overall memory overhead.

[0079] Fourth, it possesses excellent architectural versatility and deployment flexibility. The rate limiting mechanism is not dependent on any specific network role; it can be used for proactive rate limiting when external SMS entities (such as business platforms) send messages to the SMSC, or it can be used by the SMSC to monitor the rate of access clients. Furthermore, it supports both physically contiguous and non-contiguous memory layouts, adapting to different operating systems or embedded environments' memory management strategies, thus enhancing the engineering feasibility of the technical solution.

[0080] Fifth, it supports flexible traffic scheduling to improve business availability. When rate limiting is triggered, it can be combined with a delayed scheduling queue to automatically resend temporarily stored messages at the earliest possible sending time, avoiding business failures caused by direct discarding. This mechanism ensures rate compliance while taking into account user experience and system robustness, and is suitable for critical business scenarios that are sensitive to message delivery rates (such as verification codes, logistics notifications, etc.).

[0081] This disclosure also provides a short message sending control device. Figure 11 This diagram illustrates the structure of a short message sending control device in an exemplary embodiment of this disclosure; as shown below. Figure 11 As shown, the short message sending control device 1100 may include a strategy acquisition module 1110, an initialization module 1120, a time difference acquisition module 1130, and a sending control module 1140. Wherein: The strategy acquisition module 1110 is used to acquire a preset short message sending rate limiting strategy, wherein the short message sending rate limiting strategy is used to define the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; Initialization module 1120 is used to initialize a ring storage area based on the maximum number of short messages M. The ring storage area consists of M consecutive memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. The time difference acquisition module 1130 is used to acquire the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area when a short message sending request is received; The sending control module 1140 is configured to allow the sending of the current short message if the time difference is greater than or equal to the preset time window, and to write the current timestamp into the target memory block occupied by the earliest timestamp.

[0082] In an exemplary embodiment of this disclosure, the M memory blocks are arranged consecutively in physical memory; The initialization module 1120 initializes a ring-shaped storage area based on the maximum number of short messages M, including: Allocate M consecutive memory blocks to form the circular storage area; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

[0083] In an exemplary embodiment of this disclosure, the M memory blocks are not distributed contiguously in physical memory; The initialization module 1120 initializes a ring-shaped storage area based on the maximum number of short messages M, including: Allocate M non-contiguous memory blocks to form the circular storage area; A preset logical traversal mapping relationship is established so that the M memory blocks logically form a circular sequence with the beginning and end connected; the logical traversal mapping relationship is used to determine the next memory block for each of the memory blocks; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

[0084] In an exemplary embodiment of this disclosure, the earliest timestamp recorded in the circular storage area is read in the following manner: Read the timestamp stored in the target memory block currently pointed to by the head pointer.

[0085] In an exemplary embodiment of this disclosure, after the current timestamp is written to the target memory block occupied by the earliest timestamp, the sending control module 1140 is configured to: Update the head pointer to point to the successor memory block in the circular storage area.

[0086] In an exemplary embodiment of this disclosure, when the M memory blocks are arranged consecutively in physical memory, the sending control module 1140 updates the head pointer to point to the subsequent memory block in the circular storage area, including: Based on the continuous arrangement characteristics of the memory blocks, determine the successor memory block of the target memory block; Update the head pointer to point to the successor memory block.

[0087] In an exemplary embodiment of this disclosure, when the M memory blocks are not contiguously distributed in physical memory, the sending control module 1140 updates the head pointer to point to the subsequent memory block in the circular storage area, including: The target memory block is queried according to a preset logical traversal mapping relationship to determine its successor memory block; Update the head pointer to point to the successor memory block.

[0088] In an exemplary embodiment of this disclosure, the transmission control module 1140 is configured to: If the time difference is less than the preset time window, the current short message is prohibited from being sent, and the current timestamp is not written to the circular storage area.

[0089] In an exemplary embodiment of this disclosure, after the transmission of the current short message is prohibited, the transmission control module 1140 is configured to: Calculate the earliest possible transmission time, where the earliest possible transmission time is the earliest timestamp plus the preset time window; The current short message is added to the delayed scheduling queue and sent when the earliest sendable time is reached.

[0090] The specific details of each module in the aforementioned SMS sending control device have been described in detail in the corresponding SMS sending control method, so they will not be repeated here.

[0091] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0092] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0093] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0094] This disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device.

[0095] Computer-readable storage media can be, for example—but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0096] A computer-readable storage medium can be sent, propagated, or transmitted for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0097] A computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0098] Furthermore, this disclosure also provides an electronic device capable of implementing the above-described method.

[0099] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0100] The following reference Figure 12 To describe an electronic device 1200 according to such an embodiment of the present disclosure. Figure 12 The electronic device 1200 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0101] like Figure 12As shown, the electronic device 1200 is presented in the form of a general-purpose computing device. The components of the electronic device 1200 may include, but are not limited to: at least one processor 1210, at least one memory 1220, a bus 1230 connecting different system components (including memory 1220 and processor 1210), and a display 1240.

[0102] The memory stores program code that can be executed by the processor 1210, causing the processor 1210 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processor 1210 can perform actions such as... Figure 1 As shown: Step S110, obtain a preset short message sending rate limiting strategy, which defines the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; Step S120, initialize a circular storage area based on the maximum number of short messages M, which consists of M memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages; Step S130, when a short message sending request is received, obtain the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area; Step S140, if the time difference is greater than or equal to the preset time window, allow the sending of the current short message and write the current timestamp into the target memory block occupied by the earliest timestamp.

[0103] The memory 1220 may include a readable medium in the form of volatile storage, such as random access memory (RAM) 12201 and / or cache memory 12202, and may further include read-only memory (ROM) 12203.

[0104] The memory 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0105] Bus 1230 can represent one or more of several types of bus structures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or a local bus using any of the various bus structures.

[0106] Electronic device 1200 can also communicate with one or more external devices 1300 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1200, and / or any device that enables electronic device 1200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1250. Furthermore, electronic device 1200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1260. As shown, network adapter 1260 communicates with other modules of electronic device 1200 via bus 1230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0107] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for controlling the sending of short messages, characterized in that, include: Obtain a preset short message sending rate limiting policy, wherein the short message sending rate limiting policy is used to define the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; A circular storage area is initialized based on the maximum number of short messages M. The circular storage area consists of M memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. When a short message sending request is received, the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area is obtained; If the time difference is greater than or equal to the preset time window, then sending the current short message is allowed, and the current timestamp is written into the target memory block occupied by the earliest timestamp.

2. The method according to claim 1, characterized in that, The M memory blocks are arranged consecutively in physical memory; The initialization of a ring-shaped storage area based on the maximum number of short messages M includes: Allocate M consecutive memory blocks to form the circular storage area; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

3. The method according to claim 1, characterized in that, The M memory blocks are not distributed contiguously in physical memory; The initialization of a ring-shaped storage area based on the maximum number of short messages M includes: Allocate M non-contiguous memory blocks to form the circular storage area; A preset logical traversal mapping relationship is established so that the M memory blocks logically form a circular sequence with the beginning and end connected; the logical traversal mapping relationship is used to determine the next memory block for each of the memory blocks; Maintain a head pointer and initialize the head pointer to point to the starting position of the circular memory area; The contents of each memory block are initialized with an invalid timestamp flag to indicate that a valid send timestamp has not yet been written.

4. The method according to claim 2 or 3, characterized in that, The earliest timestamp recorded in the circular storage area is read in the following way: Read the timestamp stored in the target memory block currently pointed to by the head pointer.

5. The method according to claim 4, characterized in that, After writing the current timestamp into the target memory block occupied by the earliest timestamp, the method further includes: Update the head pointer to point to the successor memory block in the circular storage area.

6. The method according to claim 5, characterized in that, When the M memory blocks are arranged contiguously in physical memory, updating the head pointer to point to the subsequent memory block in the circular storage area includes: Based on the continuous arrangement characteristics of the memory blocks, determine the successor memory block of the target memory block; Update the head pointer to point to the successor memory block.

7. The method according to claim 5, characterized in that, When the M memory blocks are not contiguously distributed in physical memory, updating the head pointer to point to the subsequent memory block in the circular storage area includes: The target memory block is queried according to a preset logical traversal mapping relationship to determine its successor memory block; Update the head pointer to point to the successor memory block.

8. The method according to claim 1, characterized in that, The method further includes: If the time difference is less than the preset time window, the current short message is prohibited from being sent, and the current timestamp is not written to the circular storage area.

9. The method according to claim 8, characterized in that, After prohibiting the sending of the current short message, the method further includes: Calculate the earliest possible transmission time, where the earliest possible transmission time is the earliest timestamp plus the preset time window; The current short message is added to the delayed scheduling queue and sent when the earliest sendable time is reached.

10. A short message sending control device, characterized in that, include: The strategy acquisition module is used to acquire a preset short message sending rate limiting strategy, wherein the short message sending rate limiting strategy is used to define the maximum number of short messages M allowed to be sent within a preset time window, where M is a positive integer; An initialization module is used to initialize a circular storage area based on the maximum number of short messages M. The circular storage area consists of M consecutive memory blocks and is used to cyclically store the timestamps of the most recent M sent short messages. The time difference acquisition module is used to acquire the time difference between the current timestamp and the earliest timestamp recorded in the circular storage area when a short message sending request is received. The sending control module is configured to allow the sending of the current short message if the time difference is greater than or equal to the preset time window, and to write the current timestamp into the target memory block occupied by the earliest timestamp.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the short message sending control method according to any one of claims 1 to 9.

12. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the short message sending control method according to any one of claims 1 to 9 by executing the executable instructions.