WO2020000663A1 - 短信发送的方法、装置、计算机设备和存储介质 - Google Patents

短信发送的方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020000663A1
WO2020000663A1 PCT/CN2018/105202 CN2018105202W WO2020000663A1 WO 2020000663 A1 WO2020000663 A1 WO 2020000663A1 CN 2018105202 W CN2018105202 W CN 2018105202W WO 2020000663 A1 WO2020000663 A1 WO 2020000663A1
Authority
WO
WIPO (PCT)
Prior art keywords
short message
message data
cache
area
fixed
Prior art date
Application number
PCT/CN2018/105202
Other languages
English (en)
French (fr)
Inventor
张文聪
汪灿
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020000663A1 publication Critical patent/WO2020000663A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • the present application relates to a method, a device, a computer device, and a storage medium for sending a short message.
  • the inventor realized that the sending volume of the short message gateway is fixed. When a large number of short messages are simultaneously pushed to the short message gateway, due to the limited processing capacity of the short message gateway, a large number of short message sending failures will result.
  • a method, an apparatus, a computer device, and a storage medium for sending a short message are provided.
  • a method for sending a short message includes:
  • the received short message data is stored in the extended buffer area, and the short message data in the extended buffer area is sent to the short message gateway of the fixed buffer area for short message transmission.
  • a device for sending short messages includes:
  • An expansion module configured to detect that when the queue length of the short message data in the fixed cache area in the cache pool is greater than a threshold, calling the cache space of the dynamic cache area in the cache pool to expand the fixed cache area to obtain the extended cache area; One-to-one correspondence between the buffer area and the SMS gateway; and
  • a sending module is configured to store the received short message data in the extended buffer area, and send the short message data in the extended buffer area to the short message gateway of the fixed buffer area for short message transmission.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors are executed. The following steps:
  • the received short message data is stored in the extended buffer area, and the short message data in the extended buffer area is sent to the short message gateway of the fixed buffer area for short message transmission.
  • One or more non-volatile storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors execute the following steps:
  • the received short message data is stored in the extended buffer area, and the short message data in the extended buffer area is sent to the short message gateway of the fixed buffer area for short message transmission.
  • FIG. 1 is an application scenario diagram of a method for sending a short message according to one or more embodiments.
  • FIG. 2 is a schematic flowchart of a method for sending a short message according to one or more embodiments.
  • FIG. 3 is a schematic flowchart of a step of storing short message data into a fixed buffer area according to one or more embodiments.
  • FIG. 4 is a schematic flowchart of a short message data processing step in an embodiment.
  • FIG. 5 is a schematic flowchart of a method for sending a short message according to another embodiment.
  • FIG. 6 is a block diagram of an apparatus for sending a short message according to one or more embodiments.
  • FIG. 7 is a block diagram of a computer device according to one or more embodiments.
  • the method for sending a short message provided in this application can be applied to the application environment shown in FIG. 1.
  • the terminal 102 communicates with the server 104 through a network.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • the terminal 102 may communicate with the server 104 through a synchronous interface or an asynchronous interface.
  • the server 104 includes a database, and a sending table is configured in the database.
  • the pre-configured portal website is accessed through the terminal 102.
  • the portal website may be a web page.
  • the asynchronous interface sends the short message to the database of the server 104.
  • the short message data is stored in a sending table, and then the short message gateway fetches the data from the sending table.
  • the server 104 configures a fixed cache area for each short message gateway. After the short message gateway fetches the number from the sending table, it stores the obtained short message data in its corresponding fixed cache area, and then the short message gateway Send the short message data in the fixed buffer area in turn.
  • the server 104 is also configured with a dynamic buffer area.
  • the fixed buffer area can be expanded by calling a part of the dynamic buffer area through the queue length of the short message data in the fixed buffer area.
  • the fixed cache area and the dynamic cache area can be implemented with a cache pool.
  • the dynamic cache area and the fixed cache area can be implemented through the Redis database.
  • a method for sending a short message is provided.
  • the method is applied to the server in FIG. 1 as an example, and includes the following steps:
  • step 202 when the queue length of the short message data in the fixed cache area in the cache pool is detected to be greater than a threshold, the dynamic cache area cache space in the cache pool is called to expand the fixed cache area to obtain the extended cache area.
  • the cache area includes at least one dynamic cache area and multiple fixed cache areas.
  • the size of the fixed cache area is measured by the queue length. For example, if the fixed buffer area can store a maximum of 10,000 messages, the maximum queue length of the fixed buffer area is 10,000.
  • the threshold can be selected based on the maximum queue length of the cache area. Through the setting of the threshold, the SMS queue in the fixed cache area reaches a certain length to trigger the expansion.
  • the trigger mode can be to set a monitoring process in the server. The monitoring process is responsible for monitoring the queue length of each fixed cache area in real time.
  • the monitoring result is output to trigger the server to expand the fixed cache area.
  • the cache space of the dynamic cache area indicates the area where the dynamic cache area stores data, and the cache space may be a part of the dynamic cache area or the entire dynamic cache area.
  • the capacity of the fixed cache area is increased by increasing the maximum queue length of the fixed cache area to enhance the data storage capacity of the fixed cache area. Since the SMS gateway obtains SMS data from the fixed cache area, after the fixed cache area is expanded, The SMS gateway obtains data from the extended buffer area.
  • connection between the dynamic cache area and the fixed cache is established through the cache pool, so as to achieve the dynamic configuration of the maximum queue length of the fixed cache area.
  • Step 204 Store the received short message data in the extended buffer area, and send the short message data in the extended buffer area to the short message gateway of the fixed buffer area for short message transmission.
  • the extended cache area is relative to the fixed cache area.
  • the fixed cache area corresponds to the only short message gateway. That is, before the fixed cache area is not expanded, the corresponding short message gateway obtains short message data from the fixed cache area. Then, after the expansion, it is actually necessary to correspond the extended cache area with the corresponding SMS gateway of the fixed cache area, and then store the SMS data through the extended cache area, and send the SMS data in the extended cache area to the corresponding SMS gateway for SMS sending. .
  • each SMS gateway works independently, so its corresponding fixed cache area is also independent, and dynamic expansion of each fixed cache area is also performed independently.
  • SMS messages are sequentially sent to the operator through the SMS gateway.
  • the short message data is stored in a fixed cache area.
  • the dynamic cache area in the cache pool is called.
  • the fixed cache area is expanded to obtain the extended cache area, and then the received short message data is stored in the extended cache area.
  • the short message gateway corresponding to the fixed cache area also obtains the short message data from the extended cache area for short message transmission.
  • the dynamic configuration of the fixed buffer areas of multiple short message gateways can effectively prevent the failure of short message sending when sending large batches of short messages.
  • multiple SMS gateways can be configured in the server.
  • the number of SMS gateways depends on the business scenario.
  • multiple SMS can be configured for the same business scenario.
  • business scenarios can be divided into: marketing, transaction and so on. Therefore, when editing a short message on the client, different classification labels can be set for the short messages of different business scenarios, and the server can identify the classification label to determine the short message gateway corresponding to the short message.
  • the server when the server receives the short message data sent by the client, the server may perform the following processing:
  • Step 302 Store the short message data in a sending table.
  • Step 304 Identify the classification label in the sending table.
  • Step 306 Store the short message data in a corresponding fixed buffer area according to the attributes of the short message data.
  • the classification tag is used to identify the attributes of the short message data.
  • the classification tag set for the verification code type message in the client and the server can know the short message data by identifying the classification tag.
  • the attribute is a captcha class.
  • an exclusive short message gateway is configured for each attribute of the short message data, that is, the short message data is stored in the corresponding fixed buffer area through the short message attribute. Because more than one SMS gateway may be configured in each business scenario, for example, three SMS gateways are configured for verification code SMS. When the server recognizes the short message as a verification code message, you can set the assignment rule to assign the verification code message to One of the three short message gateways is in a fixed buffer area.
  • the SMS process data can be stored in the corresponding fixed buffer area from the sending table by means of task process access.
  • the task can be generated or deleted according to the task requirements.
  • a task process can be generated, and the task process is used to retrieve the short message data.
  • the same number of task processes can be activated according to the number of types of short message attributes, that is, by activating the task process, the interface of the short message gateway and the database is activated, and then the short message data is stored in the corresponding process through each task process.
  • the fixed cache area In the fixed cache area.
  • the marketing, transaction, and promotion messages when there are three types of short message data in the sending table of the database, they may be marketing, transaction, and promotion messages. Therefore, in actual processing, the marketing, transaction, and promotion messages need to be The short messages of this type are sent to their corresponding short message gateways for transmission, and their attributes are identified through the classification tags, which can activate a corresponding number of task processes.
  • multi-thread processing can be used to process each task in parallel, making the sending of short messages more efficient. The tasks of the parallel processing will not affect each other to avoid errors when writing SMS data in the fixed buffer area.
  • the task process can be configured to include two states: hibernation state and working state.
  • the SMS data is fetched from the sending table, and the system consumed at this time
  • the resources are large. In the dormant state, almost no system resources are consumed.
  • the same number of task processes are activated according to the number of attribute categories of the short message data, the same number can be changed according to the number of attribute categories.
  • the status of the task process switches from hibernation to working. Then, it means that the task process needs to be switched to the working state when it is needed, and when the task process is not needed, it only needs to be switched to the hibernation state. Therefore, through the processing of this embodiment, the consumption of system resources of the server is rationalized, which is beneficial to the optimization of the entire system.
  • the processing flow of the short message data may be shown in FIG. 4.
  • FIG. 4 there are 6 types of short message data stored in the sending table.
  • it also includes 6 short message gateways and 6 fixed caches. Zone partition.
  • the SMS data of different attributes can be arranged in an disorderly order.
  • the task process accesses, the task process stores the SMS data in the corresponding fixed buffer area by identifying the classification label of the SMS data, such as SMS 3.
  • the task process transfers the short message 3 from the sending table to the fixed buffer area partition 3 by identifying the classification label of the short message 3, and then the message gateway 3 performs the fetching and sending.
  • the queue length threshold is proportional to the maximum queue length of the fixed buffer area.
  • 90% of the maximum queue length may be selected as the queue length threshold. For example, if the maximum queue length is 10000, then the queue length threshold is 9000. It is worth noting that 90% is a relatively reasonable value obtained through actual use, and the embodiments of the present application are not limited thereto.
  • step S502 Determine whether the queue length of the short message data is greater than the queue length threshold. If yes, go to step S503; if no, go to step S505.
  • the growth rate of the queue length in the fixed buffer area can be obtained, and each growth rate can correspond to a queue size to be expanded in advance. Therefore, the size of the queue to be expanded can be obtained correspondingly according to the write rate.
  • the cache space of the dynamic cache area is called to expand the fixed cache area.
  • the embodiment of the present application by dynamically configuring the relationship between the threshold and the maximum queue length, it is possible to automatically expand the fixed buffer area. It is worth mentioning that the embodiment of the present application is not limited to this one-side configuration threshold, and the difference between the maximum queue queue and the queue length threshold is a fixed value, and the same technical effect can also be achieved.
  • the maximum queue length of the fixed buffer area is 10000, 90% of the maximum queue length is set as the queue length threshold, the processing capacity of the SMS gateway is 200 entries / minute, and the current queue length in the fixed buffer area is 8000.
  • the write rate is maintained at 400 records / minute. It is conceivable that after 5 minutes, the queue length of the SMS data in the fixed cache area will reach 9000, so the dynamic cache area needs to be called, and the growth rate is 200 records / Minutes, analyze a large amount of historical data based on daily experience or big data. After 15 minutes, the SMS data will return to stable. Then you can set the size of the queue to be expanded to 3000 and call the 3000 queue length from the dynamic cache area.
  • the problem of data overflow can be solved, thereby preventing the loss of short message data. Further, it is assumed that after 15 minutes, the short message data does not return stable, but is continuously written at 400 entries / minute. At this time, the maximum queue length It is 13000, and the dynamically set queue length threshold is 11700. Then, at 18 minutes and a half, the queue length threshold will be reached again, so you need to call some areas from the dynamic cache area again.
  • the queue length threshold can be dynamically configured, thereby avoiding the overflow of short message data.
  • the working principle of the dynamic cache area is as follows: When the dynamic cache area is not called, it is in a pending state. In the pending state, it can receive call instructions.
  • the dynamic cache area receives the area after the call, and In the calling state, when the fixed cache area needs to call the dynamic cache area, a call instruction is generated to realize the expansion of the fixed cache area.
  • the expansion of the fixed cache area can be performed.
  • the dynamic cache area can be called by all fixed cache areas. Once the area in the dynamic cache area is called, it will not be called by other fixed cache areas, but will become the cache space of its calling fixed cache area. Under the condition, the fixed buffer area returns the part of the dynamic buffer area to be called. So far, the calling area will be in the state to be called again.
  • a corresponding monitoring subroutine may be set in the server to monitor the sending speed of short messages of each short message gateway.
  • the abnormal sending speed of short messages may be caused by a hardware or software failure of the short message gateway.
  • the corresponding operation and maintenance personnel can be notified for maintenance, but some faults are temporary, such as network fluctuations. Network fluctuations will affect the speed at which the SMS gateway sends text messages, and the illusion of large quantities of data may appear.
  • the area of the dynamic cache area is called to expand the fixed cache area. In essence, network fluctuations are short-lived.
  • the short message data queue length in the fixed buffer area reaches the queue length threshold due to network fluctuations, it can be considered that the congestion is temporary, and it is only necessary to stop storing short message data in the fixed buffer area. Further, Since the short message data can be stored in the fixed buffer area in the form of a task process, it is only necessary to switch the task process corresponding to the faulty network gateway to a sleep state.
  • a device for sending a short message which includes: an extension module 602 and a sending module 604, where:
  • An expansion module 602 configured to detect that when the queue length of the short message data in the fixed cache area in the cache pool is greater than a threshold, calling the cache space of the dynamic cache area in the cache pool to expand the fixed cache area to obtain the extended cache area; There is a one-to-one correspondence between the fixed buffer area and the SMS gateway.
  • the sending module 604 is configured to store the received short message data in the extended buffer area, and send the short message data in the extended buffer area to the short message gateway of the fixed buffer area for short message transmission.
  • the above-mentioned expansion module and sending module can be set in the server of FIG. 1, and the functions of the above-mentioned modules can be implemented through multiple hardware modules and computer-readable instructions. Specifically, through the cooperation of the foregoing modules, Realize the dynamic configuration of the maximum queue length of the fixed buffer area, so as to reduce the loss of SMS data when processing large batches of SMS.
  • the sending module 604 is further configured to identify a classification tag of the short message data, and the classification tag is used to identify the attributes of the short message data; the attribute corresponds to the short message gateway; and the short message data is stored in the short message according to the short message data attribute In the extended buffer area corresponding to the gateway.
  • the sending module 604 is further configured to activate the same number of task processes according to the number of attribute categories of the short message data, and store the short message data into the short message through parallel processing of each of the task processes.
  • the gateway corresponds to the short message gateway; wherein each task process processes short message data corresponding to one attribute.
  • the sending module 604 is further configured to switch the status of the same number of task processes from the sleep state to the work state according to the number of the attribute categories, and the statuses of the task processes include a work state and a sleep state. .
  • the expansion module 602 is configured to determine that a dynamic cache area needs to be called when the queue length of the short message data is greater than a threshold value; the threshold value is proportional to the maximum queue length of the fixed cache area; When the dynamic buffer area is called, the write rate of the current short message data stored in the fixed buffer area is obtained, and the size of the queue to be expanded is obtained according to the write rate; the dynamic buffer area is called according to the size of the queue to be expanded.
  • the cache space expands the fixed cache area.
  • the expansion module 504 is further configured to query an area in the dynamic cache area that is in a pending state, and according to the size of the queue to be expanded, call the cache space of the area in the pending state to fix the area.
  • the buffer area is expanded.
  • it further includes: a monitoring module for monitoring the sending speed of short messages of each short message gateway, and detecting the length of the short message data queue in the fixed buffer area corresponding to the short message gateway when determining that the sending of the short message is abnormal due to network fluctuation Whether the preset queue length threshold is reached; if yes, stop storing short message data in a fixed buffer area corresponding to the short message gateway.
  • a monitoring module for monitoring the sending speed of short messages of each short message gateway, and detecting the length of the short message data queue in the fixed buffer area corresponding to the short message gateway when determining that the sending of the short message is abnormal due to network fluctuation Whether the preset queue length threshold is reached; if yes, stop storing short message data in a fixed buffer area corresponding to the short message gateway.
  • Each module in the above short message sending device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the hardware in or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 7.
  • the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in a non-volatile storage medium.
  • the internal memory is also provided with a fixed cache area and a dynamic cache area. On the other hand, the same can be achieved through an external memory. effect.
  • the computer equipment database is provided with a short message sending table, and the sending table is used to store the received short message data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection or interface on the one hand, and is also used to connect to a short message gateway to send short message data to the short message gateway.
  • the computer-readable instructions are executed by a processor to implement a method for sending a short message.
  • FIG. 7 is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer equipment to which the scheme of the present application is applied.
  • the specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the steps of the method for sending a short message provided in any embodiment of the present application are implemented.
  • One or more non-volatile storage media storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement the short message provided in any one of the embodiments of the present application The steps of the method of sending.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种短信发送的方法,包括:检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对固定缓存区进行扩容,得到拓展缓存区,固定缓存区与短信网关一一对应,将接收的短信数据存入拓展缓存区,并将拓展缓存区中的短信数据发送至固定缓存区的短信网关,进行短信发送。

Description

短信发送的方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2018年6月25日提交中国专利局,申请号为201810661258.4,申请名称为“短信发送的方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种短信发送的方法、装置、计算机设备和存储介质。
背景技术
随着短信发送量的增长,亟待一种能够方便大批量消息发送的平台,现在市面上出现的消息发送平台,在解决批量消息发送时,通过应用层程序从数据库中取出短信之后,直接推送给短信网关进行短信发送。
然而,发明人意识到,短信网关的发送量是固定的,在大批量短信同时推送至短信网关时,由于短信网关的处理能力有限,将会导致大量的短信发送失败。
发明内容
根据本申请公开的各种实施例,提供一种短信发送的方法、装置、计算机设备和存储介质。
一种短信发送的方法包括:
检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信 数据发送至所述固定缓存区的短信网关,进行短信发送。
一种短信发送的装置包括:
拓展模块,用于检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
发送模块,用于将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需 要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中短信发送的方法的应用场景图。
图2为根据一个或多个实施例中短信发送的方法的流程示意图。
图3为根据一个或多个实施例中将短信数据存入固定缓存区步骤的流程示意图。
图4为一个实施例中短信数据处理步骤的流程示意图。
图5为另一个实施例中短信发送的方法的流程示意图。
图6为根据一个或多个实施例中短信发送的装置的框图。
图7为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的短信发送的方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104进行通信。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
其中,终端102可以通过同步接口或异步接口与服务器104进行通讯连接。
本申请实施例中,服务器104包括有数据库,数据库中配置有发送表,通过终端102访问预先配置的门户网站,该门户网站可以是web网页,通过 在门户网站中编辑短信,然后调用同步接口或异步接口将短信发送至服务器104的数据库中,进一步的,将短信数据存储在发送表中,然后短信网关从发送表中进行取数。
本申请实施例中,服务器104为每个短信网关配置一固定缓存区,短信网关从发送表中取数之后,将取数得到的短信数据存储在其对应的固定缓存区内,然后由短信网关依次发送固定缓存区内的短信数据,另外,服务器104中还配置有以动态缓存区区域,可以通过固定缓存区中短信数据的队列长度,调用动态缓存区的部分区域进行固定缓存区的扩容。为了方便缓存区域的实现,可以将固定缓存区和动态缓存区用缓存池实现。
其中,动态缓存区和固定缓存区可以通过Redis数据库实现。
在其中一个实施例中,如图2所示,提供了一种短信发送的方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤202,检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对固定缓存区进行扩容,得到拓展缓存区。
本步骤中,固定缓存区与短信网关一一对应,即一个短信网关对应一个固定缓存区,缓存区中至少包括一个动态缓存区以及多个固定缓存区,固定缓存区的大小是用队列长度衡量,例如,固定缓存区最大可存储10000条短信,那么固定缓存区的最大队列长度为10000。另外,阈值的选择可以是根据缓存区的最大队列长度,通过阈值的设定,使固定缓存区中的短信队列到达一定长度时,触发进行扩容,触发方式可以是在服务器中设置监控进程,由监控进程负责实时监控各个固定缓存区的队列长度,当检测到一固定缓存区的队列长度达到阈值时,输出监控结果,以触发服务器对固定缓存区的扩容。还需要说明的是,动态缓存区的缓存空间表示动态缓存区存储数据的区 域,缓存空间可以是动态缓存区的一部分,也可以是动态缓存区的全部。
具体的,对固定缓存区的扩容是通过增加固定缓存区的最大队列长度,以增强固定缓存区的数据存储能力,由于短信网关是从固定缓存区中获取短信数据,在固定缓存区扩容后,短信网关从拓展缓存区获取数据。
本步骤中,通过缓存池建立动态缓存区与固定缓存的联系,以此实现固定缓存区最大队列长度的动态配置。
步骤204,将接收的短信数据存入拓展缓存区,并将拓展缓存区中的短信数据发送至固定缓存区的短信网关,进行短信发送。
本步骤中,拓展缓存区是相对固定缓存区而言的,固定缓存区对应了唯一的短信网关,也即,在固定缓存区未扩容前,对应的短信网关中从该固定缓存区获取短信数据,那么在扩容后,实际需要将拓展缓存区与该固定缓存区对应的短信网关对应,然后通过拓展缓存区存储短信数据,以及将拓展缓存区中的短信数据发送至对应的短信网关进行短信发送。
值得说明的是,各个短信网关之间工作是独立,因此其对应的固定缓存区也是独立,各个固定缓存区进行动态扩容也是独立进行。另外,根据缓存队列的先进先出原则,通过短信网关依次发送短信至运营商。
上述短信发送的方法中,短信数据被存入固定缓存区内,通过检测缓存池中固定缓存区中短信数据的队列长度,并在短信数据队列长度超过阈值时,调用缓存池中的动态缓存区的缓存空间对固定缓存区进行扩容,得到拓展缓存区,然后将接收到的短信数据存入拓展缓存区,固定缓存区对应的短信网关也从拓展缓存区获取短信数据进行短信发送。本申请实施例,通过多个短信网关的固定缓存区的动态配置,能够在大批量短信发送时有效防止短信发送失败。
在图1应用场景中,服务器中可以配置多个短信网关,一般而言,短信 网关的数量是根据业务场景而定的,另外,在应对大批量数据时,可以为同一业务场景配置多个短信网关,业务场景可以分为:营销类、交易类等。因此,在客户端编辑短信时,可以为不同业务场景的短信设置不同的分类标签,服务器通过识别分类标签,以判断短信对应的短信网关。
在其中一个实施例中,如图3所示,服务器在接收客户端发送的短信数据时,可以执行如下处理:
步骤302,将短信数据存储在发送表中。
步骤304,识别发送表中的分类标签。
步骤306,根据所述短信数据的属性,将所述短信数据存入对应的固定缓存区中。
本申请实施例中,分类标签用于标识所述短信数据的属性,例如:在客户端中为验证码类短信设置的分类标签,在服务器中,通过对分类标签的识别,可以知道该短信数据的属性为验证码类。
另外,本申请实施例中,每种属性的短信数据均配置独占的短信网关,即通过短信数据的属性,将短信数据存入其对应的固定缓存区中。由于每个业务场景下可能不止配置一个短信网关,例如,验证码短信配置有三个短信网关,在服务器识别该短信为验证码类短信时,可以通过设置分配规则,将该验证码类短信分配至三个短信网关中的一个对应的固定缓存区中。
在其中一实施例中,针对上述S306的步骤,可以通过任务进程取数的方式,将短信数据从发送表中存入对应的固定缓存区,在服务器中,可以根据任务需求生成或者删除任务进行,在需要将短信数据从数据库转存至短信网关中时,可以生成任务进程,任务进程用于短信数据的取数。具体的,可以根据短信属性的种类数目,激活相同数目的任务进程,也就是,通过激活任 务进程,以此激活短信网关与数据库连接的接口,然后通过各个任务进程并行处理将短信数据存入对应的固定缓存区中。
本申请实施例,在数据库的发送表中存在三种属性的短信数据时,具体可以是营销类、交易类以及推广类的短信,因此,在实际处理时,需要将营销类、交易类以及推广类的短信发送至其各自对应的短信网关进行发送,通过分类标签识别出其属性,可以激活对应数目的任务进程。另外,在进行大批量短信数据处理时,可以通过多线程处理的方式,使各个任务进程并行处理,使短信发送的效率更高。并行处理的各个任务进程之间不会相互影响,避免在固定缓存区中写入短信数据时出现错误。
在其中一实施例中,可以将任务进程配置为包括两种状态,分别为:休眠状态和工作状态,任务进程在工作状态时,从发送表中进行短信数据的取数,此时消耗的系统资源是较大的,在休眠状态时,几乎不消耗系统资源,在进行根据所述短信数据的属性类别的数目,激活相同数目的任务进程时,可以根据所述属性类别的数目,将相同数目的任务进程的状态从休眠状态切换为工作状态。那么,意味着需要任务进程时需要将其状态切换为工作状态,而不需要该任务进程时,只需要将其切换为休眠状态。因此,通过本实施例的处理,使服务器的系统资源的消耗处于合理化,利于整个系统的优化。
本申请实施例中,短信数据的处理流程可以如图4所示,图4中,分别存在6种属性的短信数据存储在发送表中,对应的,也包括6个短信网关和6个固定缓存区分区,在发送表中,不同属性的短信数据可以无序排列,在任务进程取数时,任务进程通过识别短信数据的分类标签将短信数据存入对应的固定缓存区中,例如短信3,任务进程通过识别短信3的分类标签,将短信3从发送表转存至固定缓存区分区3中,然后由短信网关3进行取数发 送。
在其中一个实施例中,在服务器中,将短信数据存入固定缓存区后,需要判断固定缓存区是否需要扩容,如图5所示,具体步骤如下:
S501,将当前固定缓存区中短信数据的队列长度与队列长度阈值进行对比。
其中,队列长度阈值与固定缓存区的最大队列长度成正比。
进一步的,可以选择最大队列长度的90%作为队列长度阈值,例如,最大队列长度为10000,那么队列长度阈值为9000。值得说明的是,90%是通过实际使用得出较为合理的值,本申请实施例并不限定于此。
S502,判断短信数据的队列长度是否大于队列长度阈值,若是,则跳转至步骤S503,若否,跳转至步骤S505。
S503,获取当前短信数据存入所述固定缓存区的写入速率,根据所述写入速率,得到待扩容队列大小。
本步骤中,通过获取写入速率的大小,以及短信网关的处理能力,可以得到固定缓存区中队列长度的增长速率,可以预先为每个增长速率对应一个待扩容队列大小。因此可以根据写入速率,对应得到待扩容队列大小。
S504,根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行扩容。
S505,结束。
本申请实施例中,通过动态配置阈值与最大队列长度的关系,可以实现自动对固定缓存区进行扩容。值得说说明的是,本申请实施例并不限于这一种方配置阈值,还可以通过最大队列长队与队列长度阈值的差是定值,也可以实现相同过技术效果。
在其中一个实施例中,固定缓存区的最大队列长度为10000,设置最大队列长度的90%为队列长度阈值,短信网关的处理能力为200条/分钟,固定缓存区中当前队列长度为8000,此时写入速率保持在400条/分钟,可想而知,在5分钟后,固定缓存区中短信数据的队列长度将达到9000,因此需要调用动态缓存区,此时增长速度为200条/分钟,根据日常经验或者大数据分析大量历史数据,15分钟后短信数据将会回复稳定,那么可以设置待扩容队列大小为3000,从动态缓存区中调用3000队列长度。通过上述处理,可以解决数据溢出的问题,从而防止了短信数据的丢失,进一步的,假设在15分钟后短信数据并没有回复稳定,而是持续以400条/分钟写入,此时最大队列长度为13000,动态设置的队列长度阈值为11700,那么在18分半时,将再次达到队列长度阈值,因此需要再次从动态缓存区中调用部分区域。通过上述的处理,可以动态配置队列长度阈值,从而避免短信数据的溢出。
在其中一个实施例中,动态缓存区的工作原理如下:动态缓存区在未被调用的时,处于待调用状态,待调用状态下,可以接收调用指令,动态缓存区接收调用之后的区域,将处于调用状态,在固定缓存区需要调用动态缓存区时,生成调用指令,以此实现对固定缓存区的扩容。
在本申请实施例中,通过查询动态缓存区中处于待调用状态的区域,然后根据待扩容队列大小,就可以执行固定缓存区的扩容。值得说明的是,动态缓存区可以被所有固定缓存区调用,动态缓存区中的区域一旦被调用,将不会被其他固定缓存区调用,而是成为其调用固定缓存区的缓存空间,在一定条件下,固定缓存区归还调用的动态缓存区的部分,至此,调用区域将再次处于待调用状态。
另外,作为本申请一种改进的实施例,可以通过在服务器中设置相应的 监控子程序,来监测各个短信网关的短信发送速度,短信发送速度异常可能是由于短信网关本身硬件或软件故障引起,出现这种故障时,可以通知相应的运维人员进行维护,但是有些故障是暂时的,例如网络波动,网络波动将会影响到短信网关发送短信的速度,可能出现大批量数据的假象,如不做处理,对于服务器而言,会调用动态缓存区的区域来扩充固定缓存区。实质上,网络波动是短暂的,在确定网络波动导致短信发送速度异常时,首先检测所述短信网关对应的固定缓存区中短信数据队列长度是否达到预先设置的队列长度阈值;若是,则停止向短信网关对应的固定缓存区中存入短信数据。
本申请实施例中,由于网络波动导致固定缓存区中短信数据队列长度达到队列长度阈值时,可以认为这种堵塞是暂时的,只需要停止向固定缓存区中存入短信数据即可,进一步的,由于可以通过任务进程的形式向固定缓存区中存入短信数据,因此,只需要将故障网络网关对应的任务进程切换至休眠状态即可。
应该理解的是,虽然图2、3和5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2、3和5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图6所示,提供了一种短信发送的装置,包括:拓展模块602和发送模块604,其中:
拓展模块602,用于检测缓存池中固定缓存区的短信数据的队列长度大 于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应。
发送模块604,用于将接收的短信数据存入所述拓展缓存区,并将拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
值得说明的是,上述拓展模块和发送模块可以设置在图1的服务器中,上述模块的功能可以通过多个硬件模块以及计算机可读指令实现配套实现,具体的,通过上述各个模块的协同,可以实现固定缓存区最大队列长度的动态配置,以此降低大批量短信处理时短信数据丢失的情况。
在其中一个实施例中,发送模块604还用于识别短信数据的分类标签,分类标签用于标识短信数据的属性;属性与短信网关相对应;根据短信数据的属性,将短信数据存入与短信网关对应的拓展缓存区中。
在其中一个实施例中,发送模块604还用于根据所述短信数据的属性类别的数目,激活相同数目的任务进程,通过各个所述任务进程并行处理将所述短信数据存入与所述短信网关对应的与所述短信网关中;其中,每个任务进程处理一种属性对应的短信数据。
在其中一个实施例中,发送模块604还用于根据所述属性类别的数目,将相同数目的任务进程的状态从休眠状态切换为工作状态,所述任务进程的状态包括:工作状态和休眠状态。
在其中一个实施例中,拓展模块602用于在所述短信数据的队列长度大于阈值时,确定需要调用动态缓存区;所述阈值与所述固定缓存区的最大队列长度成正比;在确定需要调用动态缓存区时,获取当前短信数据存入所述固定缓存区的写入速率,根据所述写入速率,得到待扩容队列大小;根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行 扩容。
在其中一个实施例中,拓展模块504还用于查询所述动态缓存区中处于待调用状态的区域,根据所述待扩容队列大小,调用所述待调用状态的区域的缓存空间对所述固定缓存区进行扩容。
在其中一个实施例中,还包括:监测模块,用于监控各个短信网关的短信发送速度,在确定网络波动导致短信发送速度异常时,检测所述短信网关对应的固定缓存区中短信数据队列长度是否达到预先设置的队列长度阈值;若是,则停止向所述短信网关对应的固定缓存区中存入短信数据。
关于短信发送的装置的具体限定可以参见上文中对于短信发送的方法的限定,在此不再赘述。上述短信发送的装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境,另外,内存储器还是设置固定缓存区和动态缓存区,在另一方面,可以通过外接存储器实现相同的效果。该计算机设备的数据库中设置了短信的发送表,发送表用于存储接收的短信数据。该计算机设备的网络接口一方面用于与外部的终端通过网络连接或接口通信,另一方面还用于与短信网关相连,用于将短信数据发送至短信网关。该计算机可读指令被处理器执行时以实现一种短信发送的方法。
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时实现本申请任意一个实施例中提供的短信发送的方法的步骤。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的短信发送的方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详 细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种短信发送的方法,包括:
    检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
    将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
  2. 根据权利要求1所述的短信发送的方法,其特征在于,所述将接收的短信数据存入所述拓展缓存区,包括:
    识别所述短信数据的分类标签,所述分类标签用于标识所述短信数据的属性;所述属性与短信网关相对应;及
    根据所述短信数据的属性,将所述短信数据存入与所述短信网关对应的拓展缓存区中。
  3. 根据权利要求2所述的短信发送的方法,其特征在于,所述根据所述短信数据的属性,将所述短信数据存入与所述短信网关对应的拓展缓存区中,包括:
    根据所述短信数据的属性类别的数目,激活相同数目的任务进程,通过各个所述任务进程并行处理将所述短信数据存入与所述短信网关对应的与所述短信网关中;其中,每个任务进程处理一种属性对应的短信数据。
  4. 根据权利要求3所述的短信发送的方法,其特征在于,所述任务进程的状态包括:工作状态和休眠状态;
    所述根据所述短信数据的属性类别的数目,激活相同数目的任务进程的步骤,包括:
    根据所述属性类别的数目,将相同数目的任务进程的状态从所述休眠状态切换为所述工作状态。
  5. 根据权利要求1所述的短信发送的方法,其特征在于,所述检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,包括:
    在所述短信数据的队列长度大于阈值时,确定需要调用动态缓存区;所述阈值与所述固定缓存区的最大队列长度成正比;及
    在确定需要调用动态缓存区时,获取当前短信数据存入所述固定缓存区的写入速率,根据所述写入速率,得到待扩容队列大小;根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行扩容。
  6. 根据权利要求5所述的短信发送的方法,其特征在于,所述根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行扩容,包括:
    查询所述动态缓存区中处于待调用状态的区域,根据所述待扩容队列大小,调用所述待调用状态的区域的缓存空间对所述固定缓存区进行扩容。
  7. 根据权利要求1至6任一项所述的短信发送的方法,其特征在于,所述方法还包括:
    监控各个短信网关的短信发送速度,在确定网络波动导致短信发送速度异常时,检测所述短信网关对应的固定缓存区中短信数据队列长度是否达到预先设置的队列长度阈值;若是,则停止向所述短信网关对应的固定缓存区中存入短信数据。
  8. 一种短信发送的装置,包括:
    拓展模块,用于检测缓存池中固定缓存区的短信数据的队列长度大于阈 值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
    发送模块,用于将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
  9. 根据权利要求8所述的装置,其特征在于,所述发送模块还用于识别短信数据的分类标签,分类标签用于标识短信数据的属性;属性与短信网关相对应;及
    根据短信数据的属性,将短信数据存入与短信网关对应的拓展缓存区中。
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
    将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    识别所述短信数据的分类标签,所述分类标签用于标识所述短信数据的属性;所述属性与短信网关相对应;及
    根据所述短信数据的属性,将所述短信数据存入与所述短信网关对应的拓展缓存区中。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    根据所述短信数据的属性类别的数目,激活相同数目的任务进程,通过各个所述任务进程并行处理将所述短信数据存入与所述短信网关对应的与所 述短信网关中;其中,每个任务进程处理一种属性对应的短信数据。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述任务进程的状态包括:工作状态和休眠状态;
    所述处理器执行所述计算机可读指令时还执行以下步骤:
    根据所述属性类别的数目,将相同数目的任务进程的状态从所述休眠状态切换为所述工作状态。
  14. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    在所述短信数据的队列长度大于阈值时,确定需要调用动态缓存区;所述阈值与所述固定缓存区的最大队列长度成正比;及
    在确定需要调用动态缓存区时,获取当前短信数据存入所述固定缓存区的写入速率,根据所述写入速率,得到待扩容队列大小;根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行扩容。
  15. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    查询所述动态缓存区中处于待调用状态的区域,根据所述待扩容队列大小,调用所述待调用状态的区域的缓存空间对所述固定缓存区进行扩容。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    检测缓存池中固定缓存区的短信数据的队列长度大于阈值时,调用缓存池中的动态缓存区的缓存空间对所述固定缓存区进行扩容,得到拓展缓存区;所述固定缓存区与短信网关一一对应;及
    将接收的短信数据存入所述拓展缓存区,并将所述拓展缓存区中的短信数据发送至所述固定缓存区的短信网关,进行短信发送。
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指 令被所述处理器执行时还执行以下步骤:
    识别所述短信数据的分类标签,所述分类标签用于标识所述短信数据的属性;所述属性与短信网关相对应;及
    根据所述短信数据的属性,将所述短信数据存入与所述短信网关对应的拓展缓存区中。
  18. 根据权利要求17所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    根据所述短信数据的属性类别的数目,激活相同数目的任务进程,通过各个所述任务进程并行处理将所述短信数据存入与所述短信网关对应的与所述短信网关中;其中,每个任务进程处理一种属性对应的短信数据。
  19. 根据权利要求18所述的存储介质,其特征在于,所述任务进程的状态包括:工作状态和休眠状态;
    所述计算机可读指令被所述处理器执行时还执行以下步骤:
    根据所述属性类别的数目,将相同数目的任务进程的状态从所述休眠状态切换为所述工作状态。
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    在所述短信数据的队列长度大于阈值时,确定需要调用动态缓存区;所述阈值与所述固定缓存区的最大队列长度成正比;及
    在确定需要调用动态缓存区时,获取当前短信数据存入所述固定缓存区的写入速率,根据所述写入速率,得到待扩容队列大小;根据所述待扩容队列大小,调用所述动态缓存区的缓存空间对所述固定缓存区进行扩容。
PCT/CN2018/105202 2018-06-25 2018-09-12 短信发送的方法、装置、计算机设备和存储介质 WO2020000663A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810661258.4 2018-06-25
CN201810661258.4A CN108834086B (zh) 2018-06-25 2018-06-25 短信发送的方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2020000663A1 true WO2020000663A1 (zh) 2020-01-02

Family

ID=64138284

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/105202 WO2020000663A1 (zh) 2018-06-25 2018-09-12 短信发送的方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108834086B (zh)
WO (1) WO2020000663A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111245743A (zh) * 2020-01-09 2020-06-05 浙江吉利汽车研究院有限公司 一种信息处理方法、存储介质、网关及汽车
CN115242745A (zh) * 2022-07-19 2022-10-25 南京鼎山信息科技有限公司 基于5g通信网络的短信推送系统及方法
CN115665674A (zh) * 2022-11-11 2023-01-31 上海大汉三通通信股份有限公司 一种5g消息处理方法、装置、设备及存储介质
CN115767448A (zh) * 2022-12-07 2023-03-07 京东科技信息技术有限公司 一种消息发送方法、装置、设备和存储介质
CN117041893A (zh) * 2023-10-10 2023-11-10 江西掌中无限网络科技股份有限公司 一种使用云计算技术发送国际短信的方法与系统
CN117880761A (zh) * 2024-03-12 2024-04-12 深圳市诚立业科技发展有限公司 基于大数据的短信消息智能化推送方法及系统
CN117880763A (zh) * 2024-03-13 2024-04-12 深圳市诚立业科技发展有限公司 基于多通道的短信通道监控方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474900B (zh) * 2018-12-21 2021-10-29 上海瀚银信息技术有限公司 一种短信服务系统及服务方法
CN111371704B (zh) * 2020-02-06 2024-03-15 视联动力信息技术股份有限公司 一种数据缓存方法、装置、终端设备和存储介质
CN111708495A (zh) * 2020-06-19 2020-09-25 深圳前海微众银行股份有限公司 环形队列存储方法、装置及计算设备、存储介质
CN114401258A (zh) * 2021-12-22 2022-04-26 杭州安恒信息技术股份有限公司 短信发送方法、装置、电子装置和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089006A1 (en) * 2003-10-23 2005-04-28 Lucent Technologies Inc. Method for client-based multicast message transmission
CN101159913A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 外部短消息实体短消息的流量控制系统和方法
CN102056108A (zh) * 2010-12-09 2011-05-11 北京握奇数据系统有限公司 一种缓存短消息的方法、装置及电信智能卡
CN103124400A (zh) * 2011-11-21 2013-05-29 中兴通讯股份有限公司 短信缓存方法及系统
CN108200544A (zh) * 2018-03-02 2018-06-22 北京国电通网络技术有限公司 短信下发方法和短信平台

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100480050B1 (ko) * 2002-05-24 2005-03-30 엘지전자 주식회사 이동통신 단말기의 단문 메시지 저장방법
WO2004105405A2 (en) * 2003-05-16 2004-12-02 M-Qube, Inc. Mobile messaging short code translation and routing system and method
CN101188544A (zh) * 2007-12-04 2008-05-28 浙江大学 分布式文件服务器基于缓冲区的文件传输方法
CN101957800A (zh) * 2010-06-12 2011-01-26 福建星网锐捷网络有限公司 多通道缓存分配方法及装置
WO2014056146A1 (zh) * 2012-10-09 2014-04-17 华为技术有限公司 数据推送方法,装置及系统
CN103906018B (zh) * 2012-12-26 2018-05-22 中国移动通信集团福建有限公司 一种用于发送短信的方法及装置
CN103914456A (zh) * 2012-12-31 2014-07-09 北京中交兴路信息科技有限公司 一种数据存储方法和系统
CN103150268A (zh) * 2013-03-04 2013-06-12 浪潮电子信息产业股份有限公司 一种cdp中的块级数据捕获方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089006A1 (en) * 2003-10-23 2005-04-28 Lucent Technologies Inc. Method for client-based multicast message transmission
CN101159913A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 外部短消息实体短消息的流量控制系统和方法
CN102056108A (zh) * 2010-12-09 2011-05-11 北京握奇数据系统有限公司 一种缓存短消息的方法、装置及电信智能卡
CN103124400A (zh) * 2011-11-21 2013-05-29 中兴通讯股份有限公司 短信缓存方法及系统
CN108200544A (zh) * 2018-03-02 2018-06-22 北京国电通网络技术有限公司 短信下发方法和短信平台

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111245743A (zh) * 2020-01-09 2020-06-05 浙江吉利汽车研究院有限公司 一种信息处理方法、存储介质、网关及汽车
CN111245743B (zh) * 2020-01-09 2023-09-08 浙江吉利汽车研究院有限公司 一种信息处理方法、存储介质、网关及汽车
CN115242745A (zh) * 2022-07-19 2022-10-25 南京鼎山信息科技有限公司 基于5g通信网络的短信推送系统及方法
CN115242745B (zh) * 2022-07-19 2023-08-15 南京鼎山信息科技有限公司 基于5g通信网络的短信推送系统及方法
CN115665674A (zh) * 2022-11-11 2023-01-31 上海大汉三通通信股份有限公司 一种5g消息处理方法、装置、设备及存储介质
CN115767448A (zh) * 2022-12-07 2023-03-07 京东科技信息技术有限公司 一种消息发送方法、装置、设备和存储介质
CN117041893A (zh) * 2023-10-10 2023-11-10 江西掌中无限网络科技股份有限公司 一种使用云计算技术发送国际短信的方法与系统
CN117041893B (zh) * 2023-10-10 2024-01-12 江西掌中无限网络科技股份有限公司 一种使用云计算技术发送国际短信的方法与系统
CN117880761A (zh) * 2024-03-12 2024-04-12 深圳市诚立业科技发展有限公司 基于大数据的短信消息智能化推送方法及系统
CN117880761B (zh) * 2024-03-12 2024-05-14 深圳市诚立业科技发展有限公司 基于大数据的短信消息智能化推送方法及系统
CN117880763A (zh) * 2024-03-13 2024-04-12 深圳市诚立业科技发展有限公司 基于多通道的短信通道监控方法及系统
CN117880763B (zh) * 2024-03-13 2024-05-14 深圳市诚立业科技发展有限公司 基于多通道的短信通道监控方法及系统

Also Published As

Publication number Publication date
CN108834086B (zh) 2021-05-11
CN108834086A (zh) 2018-11-16

Similar Documents

Publication Publication Date Title
WO2020000663A1 (zh) 短信发送的方法、装置、计算机设备和存储介质
CN108933993B (zh) 短信缓存队列选择方法、装置、计算机设备和存储介质
CN107729559B (zh) 数据库读写异步访问的方法、系统、设备及存储介质
US8375200B2 (en) Embedded device and file change notification method of the embedded device
US8700722B1 (en) User-aware cloud to device messaging systems and methods
CN108933994B (zh) 短信分发处理方法、装置、计算机设备和存储介质
CN105607986A (zh) 用户行为日志数据采集方法及装置
CN115277566B (zh) 数据访问的负载均衡方法、装置、计算机设备及介质
CN112650575B (zh) 资源调度方法、装置和云端服务系统
CN112612988A (zh) 页面处理方法、装置、计算机设备及存储介质
CN111949389B (zh) 基于Slurm的信息采集方法和装置、服务器、计算机可读存储介质
US10007562B2 (en) Business transaction context for call graph
US20190012087A1 (en) Method, apparatus, and system for preventing loss of memory data
CN113014608B (zh) 一种流量分发控制方法、装置、电子设备及存储介质
US9836949B2 (en) Generating recommended maintenance steps for industrial machines based on historical interaction data with a mobile application
CN112256384B (zh) 基于容器技术的服务集合处理方法、装置和计算机设备
CN113553074B (zh) 小程序分发控制方法、装置、电子设备以及存储介质
CN109560949B (zh) 一种数据处理方法及管理服务器、业务设备
CN116361106A (zh) 一种日志处理方法、装置、电子设备及存储介质
WO2019020084A1 (zh) 一种数据存储的方法和系统
CN111880945B (zh) 共享设备信息处理方法、系统、装置、计算机和存储介质
CN114168876A (zh) 页面显示方法、装置、计算机设备及计算机可读存储介质
CN104516883A (zh) 一种网页共享方法、装置及系统
CN111211924A (zh) 一种计算节点单点高可用控制方法及装置
CN110969430A (zh) 可疑用户的识别方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18924064

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18924064

Country of ref document: EP

Kind code of ref document: A1