CN112887919B - Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment - Google Patents

Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment Download PDF

Info

Publication number
CN112887919B
CN112887919B CN202110065525.3A CN202110065525A CN112887919B CN 112887919 B CN112887919 B CN 112887919B CN 202110065525 A CN202110065525 A CN 202110065525A CN 112887919 B CN112887919 B CN 112887919B
Authority
CN
China
Prior art keywords
short message
channel
message sending
sending task
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
CN202110065525.3A
Other languages
Chinese (zh)
Other versions
CN112887919A (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.)
Zhejiang Baiying Technology Co Ltd
Original Assignee
Zhejiang Baiying 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 Zhejiang Baiying Technology Co Ltd filed Critical Zhejiang Baiying Technology Co Ltd
Priority to CN202110065525.3A priority Critical patent/CN112887919B/en
Publication of CN112887919A publication Critical patent/CN112887919A/en
Application granted granted Critical
Publication of CN112887919B publication Critical patent/CN112887919B/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a short message sending method for multi-channel short message cluster scheduling, which comprises the following steps: acquiring short message data to be sent, wherein the short message data to be sent comprises a plurality of short message sending tasks; randomly distributing each short message sending task into a database of short message services in a short message cluster, wherein the short message cluster comprises a plurality of short message services which are mutually isolated; the short message service acquires the short message sending task from the database every other preset time period and adds the short message sending task into a short message sending queue; and selecting a short message channel in a short message template according to the weight to execute the short message sending task.

Description

Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment
Technical Field
The present application relates to the field of short message sending, and in particular, to a short message sending method, system and electronic device for multi-channel short message cluster scheduling.
Background
At present, when a large-scale notification short message is issued in a high-concurrency scene in the market, the existing short message sending service needs to take a long time. And the current short message sending mainly depends on one short message service provider, and if the channel is maintained or upgraded, the short message sending function is unavailable for a period of time.
Disclosure of Invention
The application aims to provide a short message sending method, a system and electronic equipment for multi-channel short message cluster scheduling, so as to solve the technical problems that the existing short message sending service consumes too long time and is easy to break down when sending large-scale short messages in a high-concurrency scene.
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect, the present application provides a method for sending a short message in a multi-channel short message cluster scheduling, where the method includes:
acquiring short message data to be sent, wherein the short message data to be sent comprises a plurality of short message sending tasks;
randomly distributing each short message sending task into a database of short message services in a short message cluster, wherein the short message cluster comprises a plurality of short message services which are mutually isolated;
the short message service acquires the short message sending task from the database every other preset time period and adds the short message sending task into a short message sending queue;
and selecting a short message channel in a short message template according to the weight to execute the short message sending task.
In the above scheme, selecting the short message channel in the current short message template according to the weight to execute the short message sending task includes:
when the short message channel finishes the short message sending task, the weight of the short message channel is increased by one;
and acquiring the short message channel with the lowest weight for executing the short message sending task.
In the above solution, the method further comprises: and configuring all supported short message channels for the short message template.
In the scheme, after the short message channel in the short message template is selected according to the weight to execute the short message sending task, the short message sending task is marked to be completed.
In the above aspect, the method further includes: when the short message service is started, a registration thread of the short message service sends registration information to a zookeeper, the short message service creates a temporary node on the zookeeper, and the zookeeper judges whether the short message service registered on the zookeeper is on line or not based on heartbeat detection.
In the above aspect, the method further includes: and when the short message service is not on line, removing the short message service from the short message cluster.
In the above aspect, the method further includes: and when the short message service receives a closing request, distributing the short message sending task in the short message service database to any other short message service.
In the above solution, the method further comprises: and when any short message service fails to execute the short message sending task after exceeding a first time period, distributing the short message sending task corresponding to the short message service to other short message services for sending.
In a second aspect, the present application provides a short message sending system, including:
the device comprises a first acquisition unit, a second acquisition unit and a sending unit, wherein the first acquisition unit is used for acquiring short message data to be sent, and the short message data to be sent comprises a plurality of short message sending tasks;
the distribution unit is used for randomly distributing each short message sending task into a database of short message services in a short message cluster, wherein the short message cluster comprises a plurality of short message services which are mutually isolated;
the second acquisition unit is used for acquiring the short message sending task from the database every other preset time period by the short message service and adding the short message sending task into a short message sending queue;
and the execution unit is used for selecting a short message channel in the short message template according to the weight to execute the short message sending task.
In a third aspect, the present application provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions are executed by the processor to implement the short message sending method according to any one of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium, having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, where the at least one instruction, the at least one program, the set of codes, or the set of instructions is executed by a processor to implement the method for sending short messages according to any one of the above first aspects.
The beneficial effect of this application is: the application provides a short message sending method, a system and electronic equipment for multi-channel short message cluster scheduling, wherein a short message cluster of a plurality of short message services is established, the short message services in the short message cluster are scheduled to execute a short message sending task, and all short message services in the cluster are isolated from each other, so that all short message sending failures caused by downtime of a single short message sending service can be avoided.
Drawings
Fig. 1 is a schematic flowchart of a short message sending method for multi-channel short message cluster scheduling according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for selecting a short message channel in a current short message template according to a weight to execute a short message sending task according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a short message sending system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the present application are further described in detail with reference to the following specific embodiments, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, when a large-scale notification short message is issued in a high-concurrency scene in the market, the existing short message sending service needs to take a long time. And the current short message sending mainly depends on one short message service provider, and if the channel is maintained or upgraded, the short message sending function is unavailable for a period of time.
In order to solve the technical problems that the existing short message sending service consumes too long time and is easy to break down when sending large-scale short messages in a high-concurrency scene, the embodiment of the application provides a short message sending method, a system and electronic equipment for multi-channel short message cluster scheduling.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic flow chart of a short message sending method for multi-channel short message cluster scheduling according to an embodiment of the present application is shown, where the method includes:
s101, acquiring short message data to be sent;
the short message data to be sent comprises a plurality of short message sending tasks.
S102, randomly distributing each short message sending task into a database of short message service in a short message cluster;
the short message cluster comprises a plurality of short message services, and the short message services are isolated from each other.
It can be understood that after the short message data to be sent is acquired, the short message data to be sent is split into a plurality of short message sending tasks, and each short message sending task enters a database of any short message service in the short message cluster after being randomly distributed.
S103, the short message service acquires the short message sending task from the database every other preset time period and adds the short message sending task into a short message sending queue;
it is understood that the preset time period may be 30S, 60S, or other time periods, which is not limited in the embodiment of the present application.
And S104, selecting a short message channel in the short message template according to the weight to execute the short message sending task.
It is to be understood that, in one embodiment, all supported short message channels are configured for the short message template before the short message sending task is executed.
Referring to fig. 2, in an embodiment, the selecting a short message channel in the current short message template according to the weight to execute the short message sending task includes:
s201, when the short message channel finishes the short message sending task, the weight of the short message channel is increased by one;
s202, any short message channel with the lowest weight is obtained for executing the short message sending task.
In one embodiment, after selecting a short message channel in a short message template according to the weight to execute the short message sending task, the short message sending task is marked as completed.
In one embodiment, when the short message service is started, a registration thread of the short message service sends registration information to a zookeeper, the short message service creates a temporary node on the zookeeper, and the zookeeper judges whether the short message service registered on the zookeeper is online or not based on heartbeat detection.
In one embodiment, when the short message service is not on-line, the short message service is removed from the short message cluster.
In one embodiment, when the short message service receives a closing request, the short message sending task in the short message service database is distributed to any other short message service.
It can be understood that when the short message service receives the closing request, the current online short message service data is acquired in the zookeeper, and the short message sending task processed by the zookeeper is transferred to a random online short message service (except the zookeeper), so that the sending and transferring of the short message sending task data are realized.
In one embodiment, when any short message service fails to execute the short message sending task after exceeding a first time period, the short message sending task corresponding to the short message service is distributed to other short message services for sending.
It can be understood that when any short message service in the short message cluster does not execute the short message sending task beyond the first time period, the short message service is judged to be down, the short message sending tasks in the short message service are all distributed to other short message services for short message sending, and the first time period can be 30 minutes, 60 minutes and other time periods, which is not limited in the application.
Referring to fig. 3, a schematic structural diagram of a short message sending system according to an embodiment of the present application is shown, where the system includes:
a first obtaining unit 301, configured to obtain short message data to be sent, where the short message data to be sent includes multiple short message sending tasks;
an allocating unit 302, configured to randomly allocate each short message sending task into a database of short message services in a short message cluster, where the short message cluster includes a plurality of short message services, and the short message services are isolated from each other;
a second obtaining unit 303, configured to obtain, by the short message service, the short message sending task from the database every preset time period, and add the short message sending task to a short message sending queue;
and the execution unit 304 is configured to select a short message channel in the short message template according to the weight to execute the short message sending task.
Referring to fig. 4, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, which may include: at least one network interface 402, memory 403, and at least one processor 401. The various components in the electronic device are coupled together by a bus system 404. It will be appreciated that the bus system 404 is used to enable communications among the components for connection. The bus system 404 includes a power bus, a control bus, and a status signal bus in addition to a data bus, but for clarity of illustration, the various buses are labeled as bus system 404 in FIG. 4.
In some embodiments, memory 403 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 4031 and application programs 4032.
The operating system 4031 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used to implement various outgoing services and process hardware-based tasks. The application 6032 includes various applications such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method of the embodiment of the present application may be included in an application program.
In the above embodiment, the electronic device further includes: at least one instruction, at least one program, a set of codes, or a set of instructions stored in the memory 403, which are executable by the processor 401 to implement the steps of implementing any of the sms sending methods in the embodiments of the present application.
In an embodiment, the present application further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and when executed by a processor, the at least one instruction, the at least one program, the code set, or the set of instructions implements the steps of the short message sending method in any embodiment of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, and that the at least one instruction, the at least one program, the code set, or the instruction set may be stored in a non-volatile computer-readable storage medium, and when executed, the at least one instruction, the at least one program, the code set, or the instruction set may implement the steps of any of the mapping methods described in the embodiments of the present application. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can 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. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are only illustrative and not restrictive; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, which are within the protection scope of the present application.

Claims (9)

1. A short message sending method for multi-channel short message cluster scheduling is characterized by comprising the following steps:
acquiring short message data to be sent, wherein the short message data to be sent comprises a plurality of short message sending tasks;
randomly distributing each short message sending task into a database of short message services in a short message cluster, wherein the short message cluster comprises a plurality of short message services which are mutually isolated;
the short message service acquires the short message sending task from the database every other preset time period and adds the short message sending task into a short message sending queue;
selecting a short message channel in a short message template according to the weight to execute the short message sending task, wherein the short message sending task comprises the following steps: when said
When the short message channel finishes the short message sending task, the weight of the short message channel is increased by one; and acquiring any short message channel with the lowest weight for executing the short message sending task, wherein the short message template is configured with all supported short message channels.
2. The method as claimed in claim 1, wherein the message is sent in a multi-channel message cluster scheduling manner,
and after selecting a short message channel in a short message template according to the weight to execute the short message sending task, marking the short message sending task as completed.
3. The method as claimed in claim 1, wherein the message is sent in a multi-channel message cluster scheduling manner,
the method further comprises the following steps:
when the short message service is started, a registration thread of the short message service sends registration information to a zookeeper, the short message service creates a temporary node on the zookeeper, and the zookeeper judges whether the short message service registered on the zookeeper is on line or not based on heartbeat detection.
4. The method as claimed in claim 3, wherein the message is sent in a multi-channel message cluster scheduling manner,
the method further comprises the following steps:
and when the short message service is not on line, removing the short message service from the short message cluster.
5. The method as claimed in claim 1, wherein the message is sent in a multi-channel message cluster scheduling manner,
the method further comprises the following steps:
when the short message service receives a closing request, the short message in the short message service database is sent
And distributing the sending task to any other short message service.
6. The method as claimed in claim 1, wherein the message is sent in a multi-channel message cluster scheduling manner,
the method further comprises the following steps:
and when any short message service fails to execute the short message sending task after exceeding a first time period, distributing the short message sending task corresponding to the short message service to other short message services for sending.
7. A short message sending system is characterized by comprising:
a first obtaining unit, configured to obtain short message data to be sent, where the short message data to be sent includes
A plurality of short message sending tasks;
the distribution unit is used for randomly distributing each short message sending task into a database of short message services in a short message cluster, wherein the short message cluster comprises a plurality of short message services which are mutually isolated;
the second acquisition unit is used for acquiring the short message sending task from the database every other preset time period by the short message service and adding the short message sending task into a short message sending queue;
the execution unit is used for selecting a short message channel in the short message template according to the weight to execute the short message sending task,
the method comprises the following steps: when the short message channel finishes the short message sending task, the weight of the short message channel is increased by one; and acquiring any short message channel with the lowest weight for executing the short message sending task, wherein the short message template is configured with all supported short message channels.
8. An electronic device, characterized in that the electronic device comprises a processor and a memory, the memory
At least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is executed by the processor to implement the method of sending short messages according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored therein a computer program
At least one instruction, at least one program, a set of codes, or a set of instructions, which is executable by a processor to implement the method of sending short messages according to any one of claims 1 to 6.
CN202110065525.3A 2021-01-18 2021-01-18 Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment Active CN112887919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110065525.3A CN112887919B (en) 2021-01-18 2021-01-18 Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110065525.3A CN112887919B (en) 2021-01-18 2021-01-18 Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment

Publications (2)

Publication Number Publication Date
CN112887919A CN112887919A (en) 2021-06-01
CN112887919B true CN112887919B (en) 2022-07-05

Family

ID=76049192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110065525.3A Active CN112887919B (en) 2021-01-18 2021-01-18 Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment

Country Status (1)

Country Link
CN (1) CN112887919B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7376126B1 (en) * 2002-09-06 2008-05-20 At&T Delaware Intellectual Property, Inc. Systems and methods for messaging using a broadband connection
CN106028299A (en) * 2016-06-30 2016-10-12 上海斐讯数据通信技术有限公司 Method and system for selecting short message transmitting channel
CN107371146A (en) * 2017-06-05 2017-11-21 深圳市金立通信设备有限公司 A kind of method and terminal for selecting short message channel
CN107567000A (en) * 2017-09-18 2018-01-09 广东电网有限责任公司信息中心 A kind of method and system of intelligent selection short message sending passage
CN108307331A (en) * 2018-01-17 2018-07-20 深圳市和讯华谷信息技术有限公司 Note transmission method, terminal and computer readable storage medium
CN109800204A (en) * 2018-12-27 2019-05-24 深圳云天励飞技术有限公司 Data distributing method and Related product
CN110267217A (en) * 2019-06-17 2019-09-20 浙江百应科技有限公司 A kind of note transmission method that multichannel is changeable
CN112104989A (en) * 2020-11-16 2020-12-18 深圳市珍爱云信息技术有限公司 Short message sending method and device, electronic equipment and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9883389B2 (en) * 2012-12-14 2018-01-30 Facebook, Inc. Techniques for communicating notifications to subscribers
CN106255081A (en) * 2016-10-11 2016-12-21 福建方维信息科技有限公司 A kind of note transmission method and system
CN109168135A (en) * 2018-11-09 2019-01-08 上海银赛计算机科技有限公司 Selection method, device, SMS platform and the storage medium of short message sendaisle

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7376126B1 (en) * 2002-09-06 2008-05-20 At&T Delaware Intellectual Property, Inc. Systems and methods for messaging using a broadband connection
CN106028299A (en) * 2016-06-30 2016-10-12 上海斐讯数据通信技术有限公司 Method and system for selecting short message transmitting channel
CN107371146A (en) * 2017-06-05 2017-11-21 深圳市金立通信设备有限公司 A kind of method and terminal for selecting short message channel
CN107567000A (en) * 2017-09-18 2018-01-09 广东电网有限责任公司信息中心 A kind of method and system of intelligent selection short message sending passage
CN108307331A (en) * 2018-01-17 2018-07-20 深圳市和讯华谷信息技术有限公司 Note transmission method, terminal and computer readable storage medium
CN109800204A (en) * 2018-12-27 2019-05-24 深圳云天励飞技术有限公司 Data distributing method and Related product
CN110267217A (en) * 2019-06-17 2019-09-20 浙江百应科技有限公司 A kind of note transmission method that multichannel is changeable
CN112104989A (en) * 2020-11-16 2020-12-18 深圳市珍爱云信息技术有限公司 Short message sending method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112887919A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN110659123B (en) Distributed task distribution scheduling method and device based on message
CN106775936B (en) Virtual machine management method and device
CN111092921B (en) Data acquisition method, device and storage medium
CN110912972B (en) Service processing method, system, electronic equipment and readable storage medium
CN112910723B (en) Edge terminal management method, device, equipment and storage medium
CN110704185B (en) Cluster system fragmentation timing task scheduling method and cluster system
CN110995617A (en) MQTT-based data transmission method, device, computer equipment and storage medium
CN112579622A (en) Method, device and equipment for processing service data
CN110723103B (en) Vehicle control method, vehicle control device, vehicle, computer device, and storage medium
CN112887919B (en) Short message sending method and system for multi-channel short message cluster scheduling and electronic equipment
CN108111630B (en) Zookeeper cluster system and connection method and system thereof
CN111953809B (en) Method, device, equipment and system for managing resource address
CN111314241B (en) Task scheduling method and scheduling system
CN111756800A (en) Method and system for processing burst flow
CN116567094A (en) Service information processing method based on micro service system
CN115421891A (en) Task distribution method, device, equipment and medium
CN113162796B (en) Equipment updating method, device and system
CN114172903A (en) Node capacity expansion method, device, equipment and medium of slarm scheduling system
CN110737520B (en) Method for dispatching and controlling timing task by cluster system and cluster system
CN113114856A (en) Outbound dynamic display method and device based on called home location and electronic equipment
CN115509676A (en) Container set deployment method and device
CN111556126A (en) Model management method, system, computer device and storage medium
CN115499394B (en) Message theme processing method, device, equipment and storage medium
CN111309467A (en) Task distribution method and device, electronic equipment and storage medium
CN112822792A (en) Distribution method, device, equipment and storage medium of bearing identification

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