CN111343590B - Short message sending system with high concurrency and high stability - Google Patents

Short message sending system with high concurrency and high stability Download PDF

Info

Publication number
CN111343590B
CN111343590B CN201911401469.5A CN201911401469A CN111343590B CN 111343590 B CN111343590 B CN 111343590B CN 201911401469 A CN201911401469 A CN 201911401469A CN 111343590 B CN111343590 B CN 111343590B
Authority
CN
China
Prior art keywords
short message
task
module
message sending
sending
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911401469.5A
Other languages
Chinese (zh)
Other versions
CN111343590A (en
Inventor
沈君君
李文静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Jiyi Technology Co.,Ltd.
Original Assignee
Suzhou Easy To Sell Information Technology Co ltd
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 Suzhou Easy To Sell Information Technology Co ltd filed Critical Suzhou Easy To Sell Information Technology Co ltd
Priority to CN201911401469.5A priority Critical patent/CN111343590B/en
Publication of CN111343590A publication Critical patent/CN111343590A/en
Application granted granted Critical
Publication of CN111343590B publication Critical patent/CN111343590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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]

Abstract

The invention discloses a short message sending system with high concurrency and high stability, which comprises: a platform configuration module: the display rule is used for setting a user page; a parameter configuration module: the number grouping module is used for providing number processing logic for the number source module and providing number grouping processing logic for the number group module; a number source module: acquiring a customer number and carrying out number regular verification; number group module: grouping the checked numbers; a dialoging module: the system is used for storing the conversation content edited by the user in advance; a task sending module: selecting required speech content from the speech module for each group of target number groups to form a short message sending task; and then the short message sending task is delivered to different operators through the unified access entry module to send the short message. The invention can realize flexible butt joint with a plurality of third-party short message companies, and can send short messages in groups at different time periods, thereby realizing a short message marketing platform with high concurrency, high stability and high timeliness.

Description

Short message sending system with high concurrency and high stability
Technical Field
The invention belongs to the technical field of network communication, and particularly relates to a short message sending system architecture with high concurrency and high stability.
Background
At present, short message marketing has a wide application scenario: registration verification, holiday blessing, product promotion, and the like. In these applications, some need to be sent in real time in large volumes to ensure the content is effective, and some need to be sent periodically and in fixed points to meet the preferences of the receiving user. Aiming at the contents needing real-time mass sending, such as payment verification codes during ticket robbing peak, a short message sending platform needs to be capable of stably supporting high-concurrency short message task processing and efficiently completing the sending of short messages.
However, the existing short message batch sending method cannot simultaneously satisfy stable high concurrency and high efficiency sending. For example, chinese patent CN 106102027B based on MapReduce batch submission of short messages can support large-scale short message concurrence, but its sending cycle is long, and its real-time performance is poor, and in other concurrent sending methods, because the deletion operation after the addition and completion of the short message sending task locks the mutual exclusion of the information table, the sending concurrence degree of short messages is low, and the processing efficiency is low.
Disclosure of Invention
The purpose of the invention is as follows: in view of the above-mentioned deficiencies of the prior art, the present invention aims to provide a short message sending system with high concurrency and high stability, which can realize automatic grouping and short message content analysis of target mobile phone users, allow grouping timing processing, support high-efficiency and stable sending of millions of short messages, and meet the requirements of applications on real-time performance and scale.
The invention content is as follows: in order to achieve the technical effects, the invention provides the following technical scheme:
a short message sending system with high concurrency and high stability comprises: the system comprises a number source module, a number group module, a dialect module, a task sending module, a uniform access entrance module, a platform configuration module and a parameter configuration module; wherein the content of the first and second substances,
the platform configuration module is used for setting display rules of a user page;
the parameter configuration module is used for providing number processing logic for the number source module and providing number grouping processing logic for the number group module;
the number source module acquires a customer number, performs number regular check according to the number processing logic provided by the parameter configuration module, and provides the processed customer number to the number group module after the check is passed;
the number group module receives the client number sent by the number source module, performs number grouping according to the number grouping processing logic provided by the parameter configuration module, and uploads a grouped target number group to the sending task module;
the speech module is used for storing speech contents edited by a user in advance;
the sending task module selects the required voice content from the voice module for each group of target number groups to form a short message sending task; and then the short message sending task is delivered to different operators through the unified access entry module to send the short message.
Further, the respective numbers in the target number group are configured with the same or different techniques.
Further, the content of the parameter configuration module configuration includes: the method comprises the following steps of mobile phone number regular rules, mobile phone number group separators, short message content separators, sending task waiting timeout time, socket default sending times per second, socket heartbeat detection frequency and socket connection retry times.
Further, the number grouping mode of the number group module includes: sequential grouping, random grouping, manual grouping, grouping can be added, modified or deleted.
Further, the sending task module can also create short message sending time, and an operator sends the short message at the specified time after receiving the short message sending task.
Further, before the sending task module delivers the short message sending task to different operators through the unified access entry module, the sending task module further executes the following steps:
1) establishing a waiting queue, a running queue and a finishing queue;
2) establishing a main running task thread, a waiting task thread, a delay task thread, a task ending thread and an asynchronous processing thread; the asynchronous processing thread is responsible for providing a callback interface for the outside, searching the processor according to different short message channels, calling back an execution result of a short message sending task, and recording the execution result in batch;
3) establishing a sending record table, recording short message sending tasks in the sending record table, adding all the short message sending tasks in the sending record table into a waiting queue, carrying out real-time monitoring by a waiting task thread, and moving the short message sending tasks into an operating queue from the waiting queue after the sending time of the short message sending tasks is reached;
4) before starting to send the short message, firstly loading all short message channels into a channel memory; running a task thread to acquire a task sending channel from a channel memory, matching a short message sending processor, starting task sending after successful matching, and recording a concurrent semaphore and a synchronous response result; if the short message sending task is not matched with the corresponding processor, the short message sending task is ended in advance, and the short message sending task is moved into an ending queue from the running queue;
5) when the step 4) is carried out, the delay task thread monitors the short message sending task in operation in real time, if the running time of the short message sending task is expired, the short message sending task is actively interrupted, and the short message sending task is moved into an ending queue from the running queue; if the number of the sent numbers is matched with the number of the numbers which need to be sent actually and the short message sending task is not overtime, normally ending the short message sending task and adding the short message sending task into an ending queue;
6) and the task ending thread monitors the ending queue in real time, and when the short message sending task exists in the ending queue, the corresponding short message sending task is ended and the result that the short message sending task is not finished is recorded.
Has the advantages that: compared with the prior art, the invention has the following technical effects:
the scheme of the invention utilizes queue and multithreading technology, so that the platform can support sending of millions of short messages, has high concurrency, quick timeliness and high stability, and simultaneously meets the requirements of users on real-time and large-scale short message concurrency. Meanwhile, the invention can flexibly and efficiently connect a plurality of third-party short message companies, and ensure the sending speed and the sending efficiency of the short messages.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention;
FIG. 2 is a physical schematic of the system of the present invention;
FIG. 3 is a business flow diagram of the present invention;
FIG. 4 is a flow chart of data processing according to the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments. It is to be understood that the present invention may be embodied in various forms, and that there is no intention to limit the invention to the specific embodiments illustrated, but on the contrary, the intention is to cover some exemplary and non-limiting embodiments shown in the attached drawings and described below.
Fig. 1 shows an exemplary system architecture of a short message sending system with high concurrency and high stability, which includes a service part and a channel part. The service part comprises a number source module, a number group module, a dialectical module, a sending task module, a unified interface module, a platform configuration module and a parameter configuration module, and the channel part comprises service interface channels of service operators, such as service interface channels provided by mobile, Unicom and telecom.
The platform configuration module is used for setting display rules of a user page;
the parameter configuration module is used for providing number processing logic for the number source module and providing number grouping processing logic for the number group module;
the number source module acquires a customer number, performs number regular check according to the number processing logic provided by the parameter configuration module, and provides the processed customer number to the number group module after the check is passed;
the number group module receives the client number sent by the number source module, performs number grouping according to the number grouping processing logic provided by the parameter configuration module, and uploads a grouped target number group to the sending task module;
the speech module is used for storing speech contents edited by a user in advance;
the sending task module selects the required voice content from the voice module for each group of target number groups to form a short message sending task; and then the short message sending task is delivered to different operators through the unified access entry module to send the short message.
In one or more embodiments of the short message sending system with high concurrency and high stability, the respective numbers in the target number group are configured with the same or different technologies.
In one or more embodiments of the short message sending system with high concurrency and high stability related to the present invention, the content configured by the parameter configuration module includes: the method comprises the following steps of mobile phone number regular rules, mobile phone number group separators, short message content separators, sending task waiting timeout time, socket default sending times per second, socket heartbeat detection frequency and socket connection retry times.
In one or more embodiments of the short message sending system with high concurrency and high stability related to the present invention, the number grouping mode of the number group module includes: sequential grouping, random grouping, manual grouping, grouping can be added, modified or deleted.
In one or more embodiments of the short message sending system with high concurrency and high stability related to the present invention, the sending task module may further create a short message sending time, and an operator sends a short message at a designated time after receiving the short message sending task.
In one or more embodiments of the short message sending system with high concurrency and high stability related to the present invention, before the sending task module delivers the short message sending task to different operators through the unified access entry module, the sending task module further performs the following steps:
1) establishing a waiting queue, a running queue and a finishing queue;
2) establishing a main running task thread, a waiting task thread, a delay task thread, a task ending thread and an asynchronous processing thread; the asynchronous processing thread is responsible for providing a callback interface for the outside, searching the processor according to different short message channels, calling back an execution result of a short message sending task, and recording the execution result in batch;
3) establishing a sending record table, recording short message sending tasks in the sending record table, adding all the short message sending tasks in the sending record table into a waiting queue, carrying out real-time monitoring by a waiting task thread, and moving the short message sending tasks into an operating queue from the waiting queue after the sending time of the short message sending tasks is reached;
4) before starting to send the short message, firstly loading all short message channels into a channel memory; running a task thread to acquire a task sending channel from a channel memory, matching a short message sending processor, starting task sending after successful matching, and recording a concurrent semaphore and a synchronous response result; if the short message sending task is not matched with the corresponding processor, the short message sending task is ended in advance, and the short message sending task is moved into an ending queue from the running queue;
5) when the step 4) is carried out, the delay task thread monitors the short message sending task in operation in real time, if the running time of the short message sending task is expired, the short message sending task is actively interrupted, and the short message sending task is moved into an ending queue from the running queue; if the number of the sent numbers is matched with the number of the numbers which need to be sent actually and the short message sending task is not overtime, normally ending the short message sending task and adding the short message sending task into an ending queue;
6) and the task ending thread monitors the ending queue in real time, and when the short message sending task exists in the ending queue, the corresponding short message sending task is ended and the result that the short message sending task is not finished is recorded.
The following describes a specific working method of the short message sending system with high concurrency and high stability according to the above embodiments with reference to fig. 2, fig. 3, and fig. 4.
Referring to fig. 2, a user creates a short message sending task on a platform, wherein a number source type and a number group can be created, and a number source is imported. When a short message sending task is started or newly added, selecting a corresponding number source, a short message channel, establishing and selecting a proper conversation, setting sending time if timing sending is needed, and establishing the task successfully after submission is confirmed.
Specifically, the process of creating a number group is shown in fig. 3, where a user first fills in new number group information, such as a number group name and a remark, then selects a category to which the number group belongs, and if no suitable category exists currently, the user can newly create and select the number group, selects a number source to be imported after the basic information selection is completed, and then selects a grouping mode: if the sequential grouping or the random grouping is selected, the number required is directly filled, the number group module automatically performs the grouping, and if the manual grouping is selected, the user is required to actively input the number required to be added into the grouping.
The creation and selection of the dialect are the same as the number group, and the user can generate a short message sending task after selecting the number group, a short message channel to be adopted and the content of the dialect.
When the short message sending task is processed, high concurrency is realized by utilizing the queue and multiple threads, specifically, the queue comprises a waiting queue, a running queue and an ending queue, and the threads comprise a main running task thread, a waiting task thread, a delayed task thread, an ending task thread and an asynchronous processing thread. Fig. 4 shows the working steps of each queue and task thread in the whole short message sending task execution process. After the short message sending task is established, firstly, the number source is analyzed, and the number source analysis rule carries out the separation processing of the number source according to the number group separators in the parameter configuration. Then, the method parses the phone operation, processes short chains and special fields contained in the phone operation, and adds the parsed number source and the phone operation into the sending record table.
All short message sending tasks to be sent are recorded in the sending record table, and the short message sending tasks comprise five states: wait, run, success, failure, interrupt. Initially, the tasks in the sending log table are in a waiting state.
And comparing the sending time of the short message sending task in the sending record table, adding the short message sending task which does not reach the sending time into the waiting queue, carrying out real-time monitoring by the waiting task thread, adding the short message sending task into the running queue after the task sending time is reached, changing the state of the short message sending task into running, and enabling the running task thread to be responsible for processing the short message sending task.
When the project is started, all the short message channels are pre-loaded into the channel memory, the task thread is operated to acquire the task sending channel from the channel memory, the task sending channel is matched with the short message sending processor, the short message sending is started, the quantity of the concurrent signals is recorded, and the synchronous response result is recorded. And if the matching is not carried out to the corresponding processor, the sending task is ended in advance.
And the delay task thread monitors the short message sending task in real time, if the running time of the short message sending task is expired, the short message sending task is actively interrupted, the state of the short message sending task is changed into interruption, and the interruption is added into an ending queue.
And if the number of the sent numbers is matched with the number of the numbers which need to be sent actually and the sending task is not overtime, normally ending the short message sending task and adding the short message sending task into an ending queue.
And the task ending thread monitors the ending queue in real time, and when the task in the ending queue is detected, the task is ended and the result of sending the task is recorded.
The asynchronous processing thread is responsible for providing a callback interface for the outside, searching the processor according to different short message channels, and calling back the short message sending result to be processed and recorded in batch.
It is to be understood that the features listed above for the different embodiments may be combined with each other to form further embodiments within the scope of the invention, where technically feasible. Furthermore, the particular examples and embodiments of the invention described are non-limiting, and various modifications may be made in the structure, steps, and sequence set forth above without departing from the scope of the invention.
The above-described embodiments, particularly any "preferred" embodiments, are possible examples of implementations, and are presented merely for a clear understanding of the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing substantially from the spirit and principles of the technology described herein, and such variations and modifications are to be considered within the scope of the invention.

Claims (5)

1. A short message sending system with high concurrency and high stability is characterized by comprising: the system comprises a number source module, a number group module, a dialect module, a task sending module, a uniform access entrance module, a platform configuration module and a parameter configuration module; wherein the content of the first and second substances,
the platform configuration module is used for setting display rules of a user page;
the parameter configuration module is used for providing number processing logic for the number source module and providing number grouping processing logic for the number group module;
the number source module acquires a customer number, performs number regular check according to the number processing logic provided by the parameter configuration module, and provides the processed customer number to the number group module after the check is passed;
the number group module receives the client number sent by the number source module, performs number grouping according to the number grouping processing logic provided by the parameter configuration module, and uploads a grouped target number group to the sending task module;
the speech module is used for storing speech contents edited by a user in advance;
the task sending module executes the following steps: 1) selecting required speech content from the speech module for each group of target number groups to form a short message sending task; 2) establishing a waiting queue, a running queue and a finishing queue; 3) establishing a main running task thread, a waiting task thread, a delay task thread, a task ending thread and an asynchronous processing thread; the asynchronous processing thread is responsible for providing a callback interface for the outside, searching the processor according to different short message channels, calling back an execution result of a short message sending task, and recording the execution result in batch; 4) establishing a sending record table, recording short message sending tasks in the sending record table, adding all the short message sending tasks in the sending record table into a waiting queue, carrying out real-time monitoring by a waiting task thread, and moving the short message sending tasks into an operating queue from the waiting queue after the sending time of the short message sending tasks is reached; 5) before starting to send the short message, firstly loading all short message channels into a channel memory; running a task thread to acquire a task sending channel from a channel memory, matching a short message sending processor, starting task sending after successful matching, and recording a concurrent semaphore and a synchronous response result; if the short message sending task is not matched with the corresponding processor, the short message sending task is ended in advance, and the short message sending task is moved into an ending queue from the running queue; 6) while the step 5) is carried out, the delay task thread monitors the short message sending task in operation in real time, if the running time of the short message sending task is expired, the short message sending task is actively interrupted, and the short message sending task is moved into an ending queue from the running queue; if the number of the sent numbers is matched with the number of the numbers which need to be sent actually and the short message sending task is not overtime, normally ending the short message sending task and adding the short message sending task into an ending queue; 7) the task ending thread monitors the ending queue in real time, and when the short message sending task exists in the ending queue, the corresponding short message sending task is ended and the result that the short message sending task is not finished is recorded; 8) and delivering the short message sending task to different operators through the unified access entry module to send the short message.
2. The system of claim 1, wherein the respective numbers in the target set are configured with the same or different techniques.
3. The system of claim 1, wherein the parameter configuration module configures the short message sending system with high concurrency and high stability, and comprises: the method comprises the following steps of mobile phone number regular rules, mobile phone number group separators, short message content separators, sending task waiting timeout time, socket default sending times per second, socket heartbeat detection frequency and socket connection retry times.
4. The system of claim 1, wherein the number grouping module performs number grouping in a manner comprising: sequential grouping, random grouping, manual grouping, grouping can be added, modified or deleted.
5. The system as claimed in claim 1, wherein the task module further creates a sending time of the short message, and the operator sends the short message at a designated time after receiving the task.
CN201911401469.5A 2019-12-31 2019-12-31 Short message sending system with high concurrency and high stability Active CN111343590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911401469.5A CN111343590B (en) 2019-12-31 2019-12-31 Short message sending system with high concurrency and high stability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911401469.5A CN111343590B (en) 2019-12-31 2019-12-31 Short message sending system with high concurrency and high stability

Publications (2)

Publication Number Publication Date
CN111343590A CN111343590A (en) 2020-06-26
CN111343590B true CN111343590B (en) 2021-08-06

Family

ID=71187038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911401469.5A Active CN111343590B (en) 2019-12-31 2019-12-31 Short message sending system with high concurrency and high stability

Country Status (1)

Country Link
CN (1) CN111343590B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918225B (en) * 2020-09-15 2022-03-29 北京值得买科技股份有限公司 Method for sending short message based on multiple operators
CN112783625B (en) * 2021-01-18 2023-10-24 北京思特奇信息技术股份有限公司 Emergency multitasking short message group sending system and method
CN113891263B (en) * 2021-11-12 2022-08-26 成都天府通金融服务股份有限公司 Short message service system and synchronous sending method and asynchronous sending method thereof
CN114025318A (en) * 2021-11-22 2022-02-08 上海通联金融服务有限公司 Method, storage medium and terminal for sending in batches based on credit card short message reminding

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100228748A1 (en) * 2009-02-23 2010-09-09 International Business Machines Corporation Data subset retrieval from a queued message
CN101917687B (en) * 2010-08-12 2013-04-17 中国电信股份有限公司 Message sending method and message centre
CN102761832B (en) * 2011-04-28 2015-05-27 中国移动通信集团河南有限公司 Message distribution method and device
CN103631570A (en) * 2012-08-21 2014-03-12 镇江雅迅软件有限责任公司 Form self-definition method
CN104243483A (en) * 2014-09-24 2014-12-24 海信集团有限公司 Message processing method and message processing equipment
CN106792594B (en) * 2016-12-29 2020-10-27 江西博瑞彤芸科技有限公司 Method for sending short message
US10459778B1 (en) * 2018-07-16 2019-10-29 Microsoft Technology Licensing, Llc Sending messages between threads

Also Published As

Publication number Publication date
CN111343590A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN111343590B (en) Short message sending system with high concurrency and high stability
US9213952B2 (en) Automatic scheduling tool
CN102404858B (en) Radio resource optimizing method, device and system
US8156499B2 (en) Methods, systems and articles of manufacture for scheduling execution of programs on computers having different operating systems
CN103346974A (en) Controlling method of service process and network device
CN101360071A (en) Method and system for multimedia resource sharing based on instant chat
CN105224396B (en) A kind of business data processing method and device
US20130054635A1 (en) Procuring communication session records
CN105827877A (en) IVR (Interactive Voice Response) platform based service processing method and IVR platform
WO2019047568A1 (en) User call processing method, apparatus, computer device, and storage medium
CN103200022B (en) A kind of data download abnormality eliminating method, equipment and system
CN104699795A (en) Method and device for pushing videos
CN106155842B (en) A kind of data migration method and device
CN102571623A (en) Method and system for transmitting information in instant messaging
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
CN109964473B (en) Voice service response method and device
CN103746904A (en) Information interaction method and device
CN112988600A (en) Service scene testing method and device, electronic equipment and storage medium
CN111274325B (en) Platform automatic test method and system
CN102045274A (en) Method and communication system for realizing information interaction based on instant messaging
CN114422467B (en) Customer service message management system and method
CN109410926A (en) Voice method for recognizing semantics and system
CN105681262A (en) Interaction message allocating method and system
EP3264352A1 (en) System and method of running an agent guide script-flow in an employee desktop web client
CN109167720B (en) Method and system for continuously playing voice message during playback

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 215000 d205-208, No. 99, Ren'ai Road, Suzhou Industrial Park, Jiangsu Province

Patentee after: Suzhou Jiyi Technology Co.,Ltd.

Address before: 215000 d205-208, No. 99, Ren'ai Road, Suzhou Industrial Park, Jiangsu Province

Patentee before: Suzhou easy to sell information technology Co.,Ltd.