WO2023103419A1 - 基于消息队列的5g消息批量发送方法、装置及电子设备 - Google Patents

基于消息队列的5g消息批量发送方法、装置及电子设备 Download PDF

Info

Publication number
WO2023103419A1
WO2023103419A1 PCT/CN2022/109616 CN2022109616W WO2023103419A1 WO 2023103419 A1 WO2023103419 A1 WO 2023103419A1 CN 2022109616 W CN2022109616 W CN 2022109616W WO 2023103419 A1 WO2023103419 A1 WO 2023103419A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile phone
message
phone numbers
message queue
batches
Prior art date
Application number
PCT/CN2022/109616
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 WO2023103419A1 publication Critical patent/WO2023103419A1/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

Definitions

  • the present invention relates to the field of communication technology, in particular to a message queue-based 5G message batch sending method, device and electronic equipment.
  • 5G news has started the trial commercial process.
  • 5G messages are expected to replace industry text messages, and the annual volume of 5G messages sent can reach hundreds of billions of orders.
  • 5G messages when only one or a small number of 5G messages are sent, they can be sent directly from the sender to the receiver, but when sending in batches, if the method of sending directly to the receiver is still used, more CPU will be consumed resources, and occupy more memory space, resulting in reduced system performance, thereby reducing the sending rate of 5G messages.
  • the main purpose of the present invention is to provide a method and device for sending 5G messages in batches based on message queues. By adding a message queue between the message sender and the message receiver, the high throughput, message buffering, and asynchronous processing of the message queue are used.
  • the first aspect of the present invention provides a method for sending batches of 5G messages based on message queues, including:
  • the files imported by the receiving user include:
  • the Excel file includes files with suffixes of xlsx and xls
  • the text file includes files with suffixes of csv and txt.
  • the extracting the mobile phone numbers in the file, and sending the mobile phone numbers to the message queue in batches includes:
  • the extracted mobile phone numbers are evenly distributed to multiple message queues.
  • storing and distributing the mobile phone number through the message queue includes:
  • Message buffering is performed through multiple message queues, and the mobile phone numbers are distributed.
  • the receiving the mobile phone number in the message queue includes:
  • multiple service nodes obtain the mobile phone number in parallel through multiple message queues
  • the mobile phone numbers in the multiple message queues are cleared.
  • said plurality of service nodes obtaining mobile phone numbers in parallel through a plurality of message queues includes:
  • Each service node receives the mobile phone number sent by one or more message queues
  • Each service node simultaneously receives mobile phone numbers sent by multiple message queues.
  • the batch sending of 5G messages to the mobile phone number includes:
  • the convenience service information is sent to the mobile phone numbers in batches according to the priority identification of the mobile phone numbers.
  • a second aspect of the present invention provides a message queue-based 5G message batch sending device, including:
  • the import file processing module is used to receive the file imported by the user, wherein the file includes a mobile phone number;
  • the import file processing module is also used to extract the mobile phone number in the file, and send the mobile phone number to the message queue in batches;
  • a message queue module configured to store and distribute the mobile phone number through the message queue
  • a 5G message sending module configured to receive mobile phone numbers in the message queue, and send 5G messages to the mobile phone numbers in batches.
  • a third aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the message queue-based 5G system provided by any one of the first aspect. Method for sending messages in batches.
  • a fourth aspect of the present invention provides an electronic device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor.
  • a computer program executed by a processor the computer program is executed by the at least one processor, so that the at least one processor executes the message queue-based 5G message batch sending method provided by any one of the first aspect.
  • the file imported by the user is received, wherein the file contains mobile phone numbers; the mobile phone numbers in the file are extracted, and the mobile phone numbers are divided into batches Send to the message queue once; store and distribute the mobile phone number through the message queue; receive the mobile phone number in the message queue, and send 5G messages to the mobile phone number in batches.
  • the invention adds a message queue between the message sender and the message receiver, uses the message queue to store and distribute mobile phone numbers, can send 5G messages in batches, solves the problem of reducing the sending rate when sending 5G messages in batches in the prior art, and guarantees While the imported batches of mobile phone numbers are quickly processed, the sending rate of 5G messages is increased.
  • FIG. 1 is a schematic flow diagram of a method for sending batches of 5G messages based on message queues provided by an embodiment of the present invention
  • FIG. 2 is an architecture diagram of a message queue-based 5G message batch sending device provided by an embodiment of the present invention
  • FIG. 3 is a block diagram of a device for batch sending 5G messages based on message queues provided by an embodiment of the present invention
  • FIG. 4 is an application schematic diagram of a device for sending batches of 5G messages based on a message queue provided by an embodiment of the present invention
  • Fig. 5 is a block diagram of an electronic device provided by an embodiment of the present invention.
  • the orientations or positional relationships indicated by “vertical”, “horizontal”, “horizontal”, and “longitudinal” are based on the orientations or positional relationships shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not intended to limit that the indicated device, element or component must have a specific orientation, or be constructed and operated in a specific orientation.
  • the terms “mounted”, “disposed”, “provided”, “connected”, “connected”, “socketed” should be interpreted broadly. For example, it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediary; internal connectivity. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention according to specific situations.
  • an embodiment of the present invention provides a method for sending 5G messages in batches based on a message queue, as shown in FIG. 1 , the method includes the following steps S101 to S104:
  • Step S101 receiving a file imported by the user, wherein the file includes a mobile phone number
  • Fig. 2 is an architecture diagram of a 5G message batch sending device based on a message queue provided by an embodiment of the present invention.
  • the device of the embodiment of the present invention includes an imported file processing module, a message queue module, and a 5G message sending module, and the data transmission relationship between each module It is: the imported file processing module sends data to the message queue module, and the message queue module sends data to the 5G message sending module.
  • the imported file processing module can process the file imported by the user, extract a large number of mobile phone numbers contained in the file, and send them to the message queue module in batches.
  • receiving the file imported by the user in the step S101 includes:
  • the Excel file includes files with suffixes of xlsx and xls
  • the text file includes files with suffixes of csv and txt.
  • the imported file processing module may include an Excel file processing unit and a text file processing unit, which respectively receive the Excel file and the text file imported by the user.
  • Step S102 extracting the mobile phone numbers in the file, and sending the mobile phone numbers to the message queue in batches;
  • the step S102 includes:
  • the Excel file processing unit is used to process files with suffixes of xlsx and xls
  • the text file processing unit is used to process files with suffixes of csv and txt;
  • the mobile phone numbers in the file are extracted in batches; the mobile phone numbers in the file are pre-configured with a priority identification, which is used to indicate the priority of different mobile phone numbers, and the mobile phone numbers of different priorities are in the Extract from different batches, and various file processing units read a batch of mobile phone numbers with the same priority from the file each time, for example, for 100 mobile phone numbers configured with the same priority identifier, the file processing units are ranked from high to low in priority
  • the mobile phone numbers are extracted in batches from the file in the following order; through the priority identification of the mobile phone numbers, the different priorities of the mobile phone numbers can be identified, so that the mobile phone numbers with high priority can be reached as soon as possible when sending 5G information in batches in the future.
  • the extracted mobile phone numbers are evenly distributed to multiple message queues. Determine the number of mobile phone numbers and the number of message queues, and automatically and evenly distribute the messages sent by message producers (import file processing modules) to multiple message queues to support message consumers (5G message Sending module) consumes messages from multiple message queues at the same time, improving the throughput of messages.
  • Step S103 storing and distributing the mobile phone number through the message queue
  • the step S103 includes:
  • Message buffering is performed through multiple message queues, and the mobile phone numbers are distributed.
  • the mobile phone number is first stored in multiple message queues according to the priority level, instead of directly processing all mobile phone numbers through the service node.
  • the message queue as a buffer, the pressure on the service node is greatly reduced.
  • Step S104 Receive the mobile phone numbers in the message queue, and send 5G messages to the mobile numbers in batches.
  • receiving the mobile phone number in the message queue in step S104 includes:
  • multiple service nodes listening to the message queue, when listening to the mobile phone number stored in the message queue, multiple service nodes obtain the mobile phone number in parallel through multiple message queues; multiple service nodes monitor multiple message queues, when listening to any message queue stored When there is a mobile phone number, obtain the mobile phone number in parallel to improve the message processing rate;
  • the mobile phone numbers in the multiple message queues are cleared.
  • the service node obtains the mobile phone number, it deletes the mobile phone number stored in the message queue.
  • the multiple message queues of the message queue module enable the message consumer (5G message sending module) to realize distributed deployment, multi-node parallel processing, give full play to the high concurrency advantages of the distributed system, and greatly improve the message processing rate.
  • the plurality of service nodes obtaining mobile phone numbers in parallel through a plurality of message queues includes:
  • Each service node receives the mobile phone number sent by one or more message queues
  • Each service node simultaneously receives mobile phone numbers sent by multiple message queues.
  • the 5G message sending module deploys multiple service nodes in a distributed manner. Each service node consumes messages from one or more message queues of the message queue module, obtains mobile phone numbers from them, and sends 5G messages to these mobile phone numbers.
  • sending 5G messages in batches to the mobile phone numbers in step S104 includes:
  • the convenience service information is sent to the mobile phone numbers in batches according to the priority identification of the mobile phone numbers.
  • the priority identification of mobile phone numbers different priorities of mobile phone numbers can be identified, and mobile phone numbers with high priority can be reached as soon as possible when sending 5G messages in batches; and the message queue module has the characteristics of high throughput and low delay, so , the imported file processing module can quickly process a large number of mobile phone numbers, and the 5G messages sent in batches can be member marketing information, weather warning information, or convenience service information, which is very efficient in scenarios such as membership marketing, weather warning, and convenience service push. convenient.
  • the present invention utilizes the characteristics of high throughput, message buffering, and asynchronous processing of message queues, while ensuring fast processing of a large number of imported mobile phone numbers, and giving full play to the high concurrency advantages of a distributed system, greatly improving the sending rate of 5G messages.
  • the present invention utilizes the characteristics of high throughput, message buffering, and asynchronous processing of message queues, while ensuring fast processing of a large number of imported mobile phone numbers, and giving full play to the high concurrency advantages of a distributed system, greatly improving the sending rate of 5G messages.
  • the invention utilizes the message queue to store and distribute mobile phone numbers, can send 5G messages in batches, and solves the problem of reducing the sending rate when sending 5G messages in batches in the prior art;
  • the embodiment of the present invention also provides a message queue-based 5G message batch sending device for implementing the message queue-based 5G message batch sending method, as shown in FIG. 3 , the device includes:
  • Import file processing module 31 be used to receive the file that user imports, and wherein, described file comprises mobile phone number;
  • the import file processing module 31 is also used to extract the mobile phone number in the file, and send the mobile phone number to the message queue in batches;
  • a message queue module 32 configured to store and distribute the mobile phone number through the message queue
  • the 5G message sending module 33 is configured to receive the mobile phone numbers in the message queue, and send 5G messages to the mobile phone numbers in batches.
  • Fig. 4 is a schematic diagram of the application of the 5G message batch sending device based on the message queue provided by the embodiment of the present invention.
  • the message queue-based 5G message batch sending device has two roles participating in the interaction, namely the message sender and the message receiver;
  • the message sender first writes the mobile phone number of the message receiver into the file, and then imports the file through the interactive interface or interface provided by the device to realize the mass sending of 5G messages; the message receiver receives the 5G data sent by the device through the mobile terminal. information.
  • the device provided by the present invention utilizes the characteristics of high throughput, low delay, and high concurrency of the message queue, and in the scenario of sending 5G messages in batches, it not only simplifies the operation of the user, but also improves the speed of sending 5G messages.
  • An embodiment of the present invention also provides an electronic device.
  • the electronic device includes one or more processors 51 and a memory 52 , and one processor 51 is taken as an example in FIG. 5 .
  • the controller may also include: an input device 53 and an output device 54 .
  • the processor 51 , the memory 52 , the input device 53 and the output device 54 may be connected through a bus or in other ways. In FIG. 5 , connection through a bus is taken as an example.
  • the processor 51 can be a central processing unit (Central Processing Unit, referred to as CPU), and the processor 51 can also be other general processors, digital signal processors (Digital Signal Processor, referred to as DSP), application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, referred to as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various chips , the general purpose processor can be a microprocessor or any conventional processor.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the general purpose processor can be a microprocessor or any conventional processor.
  • the memory 52 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the control method in the embodiment of the present invention.
  • the processor 51 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 52, that is, implements the message queue-based 5G message batch sending method of the above method embodiment.
  • the memory 52 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function; the data storage area may store data created according to use of a processing device operated by a server, and the like.
  • the memory 52 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • the memory 52 may optionally include memory located remotely relative to the processor 51, and these remote memories may be connected to a network connection device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 53 can receive input numbers or character information, and generate key signal input related to user settings and function control of the processing device of the server.
  • the output device 54 may include a display device such as a display screen.
  • One or more modules are stored in memory 52, and when executed by one or more processors 51, perform the method shown in FIG. 1 .
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a flash memory (Flash Memory, referred to as FM), hard disk (Hard Disk Drive, referred to as HDD) or solid-state drive (Solid-State Drive, referred to as SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
  • ROM Read-Only Memory
  • RAM random access memory
  • FM Flash Memory
  • HDD Hard Disk Drive
  • SSD solid-state drive

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种基于消息队列的5G消息批量发送方法、装置及电子设备,其中方法包括:接收用户导入的文件,其中,所述文件包含手机号码;提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;通过所述消息队列存储并分发所述手机号码;接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。本发明利用消息队列存储并分发手机号码,可以批量发送5G消息,解决了现有技术中批量发送5G消息时降低发送速率的问题,在保证导入的批量手机号码快速处理的同时,提高5G消息的发送速率。

Description

基于消息队列的5G消息批量发送方法、装置及电子设备 技术领域
本发明涉及通信技术领域,具体涉及一种基于消息队列的5G消息批量发送方法、装置及电子设备。
背景技术
随着三大运营商携手发布5G消息白皮书,5G消息启动了试商用进程。未来,5G消息有望取代行业短信,每年5G消息的发送量可达千亿数量级。相关技术中,当只发送一条或少量几条5G消息时,可以从发送方直接发送至接收方,而当批量发送时,如果依然采用直接发送至接收方的方式,就需要消耗更多的CPU资源,并且占用更多的内存空间,从而导致降低系统性能,进而降低5G消息的发送速率。
针对现有技术中批量发送5G消息时降低发送速率的问题,目前尚未提出有效的解决方案。
发明内容
本发明的主要目的在于提供一种基于消息队列的5G消息批量发送方法及装置,通过在消息发送方和消息接收方之间增加消息队列,利用消息队列的高吞吐量、消息缓冲、异步处理的特点,以解决现有技术中批量发送5G消息时降低发送速率的问题。
为了实现上述目的,本发明的第一方面提供了一种基于消息队列的5G消息批量发送方法,包括:
接收用户导入的文件,其中,所述文件包含手机号码;
提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
通过所述消息队列存储并分发所述手机号码;
接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
可选地,所述接收用户导入的文件包括:
接收用户导入的Excel文件和文本文件;
其中,所述Excel文件包含后缀名为xlsx和xls的文件,所述文本文件包含后缀名为csv和txt的文件。
可选地,所述提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列,包括:
分别处理不同格式的文件;
根据所述手机号码的优先级标识,分批次提取所述文件中的手机号码;
根据所述手机号码和所述消息队列的个数,将提取出的手机号码均匀地分发到多个消息队列。
可选地,所述通过所述消息队列存储并分发所述手机号码包括:
利用多个消息队列,按照手机号码的优先级标识存储所述手机号码;
通过多个消息队列进行消息缓冲,并分发所述手机号码。
可选地,所述接收所述消息队列中的手机号码包括:
分布式部署多个服务节点;
监听消息队列,当监听到所述消息队列中存储有手机号码时,多个服务节点通过多个消息队列并行获取手机号码;
在多个服务节点通过多个消息队列并行获取手机号码后,清除多个消息队列中的所述手机号码。
进一步地,所述多个服务节点通过多个消息队列并行获取手机号码包括:
每个服务节点接收一个或多个消息队列发送的手机号码;
各个服务节点同时接收多个消息队列发送的手机号码。
可选地,所述向所述手机号码批量发送5G消息包括:
按照手机号码的优先级标识向所述手机号码批量发送会员营销信息;
按照手机号码的优先级标识向所述手机号码批量发送气象预警信息;
按照手机号码的优先级标识向所述手机号码批量发送便民服务信息。
本发明的第二方面提供了一种基于消息队列的5G消息批量发送装置,包括:
导入文件处理模块,用于接收用户导入的文件,其中,所述文件包含手机号码;
所述导入文件处理模块,还用于提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
消息队列模块,用于通过所述消息队列存储并分发所述手机号码;
5G消息发送模块,用于接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
本发明的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使计算机执行第一方面任意一项提供的基于消息队列的5G消息批量发送方法。
本发明的第四方面提供了一种电子设备,所述电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器执行第一方面任意一项提供的基于消息队列的5G消息批量发送方法。
在本发明实施例提供的基于消息队列的5G消息批量发送方法中,接收用户导入的文件,其中,所述文件包含手机号码;提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;通过所述消息队列存储并分发所述手机号码;接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。本发明在消息发送方和消息接收方之间增加消息队列,利用消息队列存储并分发手机号码,可以批量发送5G消息,解决了现有技术中批量发送5G消息时降低发送速率的问题,在保证导入的批量手机号码快速处理的同时,提高5G消息的发送速率。
附图说明
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的基于消息队列的5G消息批量发送方法流程示意图;
图2为本发明实施例提供的基于消息队列的5G消息批量发送装置架构图;
图3为本发明实施例提供的基于消息队列的5G消息批量发送装置框图;
图4为本发明实施例提供的基于消息队列的5G消息批量发送装置的应用示意图;
图5为本发明实施例提供的电子设备框图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本发明中,术语“上”、“下”、“左”、“右”、“前”、“后”、“顶”、“底”、 “内”、“外”、“中”、“竖直”、“水平”、“横向”、“纵向”等指示的方位或位置关系为基于附图所示的方位或位置关系。这些术语主要是为了更好地描述本发明及其实施例,并非用于限定所指示的装置、元件或组成部分必须具有特定方位,或以特定方位进行构造和操作。
并且,上述部分术语除了可以用于表示方位或位置关系以外,还可能用于表示其他含义,例如术语“上”在某些情况下也可能用于表示某种依附关系或连接关系。对于本领域普通技术人员而言,可以根据具体情况理解这些术语在本发明中的具体含义。
此外,术语“安装”、“设置”、“设有”、“连接”、“相连”、“套接”应做广义理解。例如,可以是固定连接,可拆卸连接,或整体式构造;可以是机械连接,或电连接;可以是直接相连,或者是通过中间媒介间接相连,又或者是两个装置、元件或组成部分之间内部的连通。对于本领域普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。
需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。
当只发送一条或少量几条5G消息时,可以从发送方直接发送至接收方,而当批量发送时,如果依然采用直接发送至接收方的方式,就需要消耗更多的CPU资源,并且占用更多的内存空间,从而导致降低系统性能,进而降低5G消息的发送速率。针对现有技术中批量发送5G消息时降低发送速率的问题,目前尚未提出有效的解决方案。
为了解决上述问题,本发明实施例提供了一种基于消息队列的5G消息批量发送方法,如图1所示,该方法包括如下的步骤S101至步骤S104:
步骤S101:接收用户导入的文件,其中,所述文件包含手机号码;
图2为本发明实施例提供的基于消息队列的5G消息批量发送装置架构图,本发明实施例的装置包括导入文件处理模块、消息队列模块、5G消息发送模块,各模块之间的数据传输关系为:导入文件处理模块向消息队列模块发送数据,消息队列模块向5G消息发送模块发送数据。
其中,导入文件处理模块可以处理用户导入的文件,将文件中包含的海量手机号码提取出来,分批次发送到消息队列模块中。
具体的,所述步骤S101中接收用户导入的文件包括:
接收用户导入的Excel文件和文本文件;
其中,所述Excel文件包含后缀名为xlsx和xls的文件,所述文本文件包含后缀名为csv和txt的文件。
导入文件处理模块可以包括Excel文件处理单元和文本文件处理单元,分别接收用户导入的Excel文件和文本文件。
步骤S102:提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
具体的,所述步骤S102包括:
分别处理不同格式的文件;Excel文件处理单元用于处理后缀名为xlsx和xls的文件,文本文件处理单元用于处理后缀名为csv和txt的文件;
根据所述手机号码的优先级标识,分批次提取所述文件中的手机号码;文件中的手机号码预先配置优先级标识,用于表示不同手机号码的优先级,不同优先级的手机号码在不同批次中提取,各种文件处理单元每次从文件中读取一批相同优先级的手机号码,例如配置有同一优先级标识的100个手机号码,文件处理单元按照优先级从高到低的顺序从文件中分批次提取手机号码;通过手机号码的优先级标识,可以识别出手机号码的不同优先级,以备后续批量发送5G信息时尽早触达优先级高的手机号码。
根据所述手机号码和所述消息队列的个数,将提取出的手机号码均匀地分发到多个消息队列。分别确定手机号码的个数和消息队列的个数,将消息的生产者(导入文件处理模块)发来的消息,自动地均匀分发到多个消息队列中,以支持消息的消费者(5G消息发送模块)从多个消息队列中同时消费消息,提升消息的吞吐量。
步骤S103:通过所述消息队列存储并分发所述手机号码;
具体的,所述步骤S103包括:
利用多个消息队列,按照手机号码的优先级标识存储所述手机号码;
通过多个消息队列进行消息缓冲,并分发所述手机号码。
手机号码先按照优先级的高低存入多个消息队列,而不是直接通过服务节点处理全部的手机号码,通过将消息队列作为缓冲,极大地减少了服务节点的压力。
步骤S104:接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
具体的,所述步骤S104中接收所述消息队列中的手机号码包括:
分布式部署多个服务节点;
监听消息队列,当监听到所述消息队列中存储有手机号码时,多个服务节点通过多个消息队列并行获取手机号码;多个服务节点监听多个消息队列,当监听到任意消息队列中存储有手机号码时,并行获取手机号码,提高消息处理速率;
在多个服务节点通过多个消息队列并行获取手机号码后,清除多个消息队列中的所述手机号码。为减少缓存,进一步提高消息处理的速率,在服务节点获取到手机号码后,则对消息队列中存储的该手机号码进行消除。
消息队列模块的多个消息队列,使得消息的消费者(5G消息发送模块)可以实现分布式部署,多节点并行处理,充分发挥分布式系统的高并发优势,极大提高了消息处理速率。
其中,所述多个服务节点通过多个消息队列并行获取手机号码包括:
每个服务节点接收一个或多个消息队列发送的手机号码;
各个服务节点同时接收多个消息队列发送的手机号码。
5G消息发送模块分布式部署多个服务节点,每个服务节点从消息队列模块的一个或多个消息队列中消费消息,从中获取手机号码,并向这些手机号码发送5G消息。
具体的,所述步骤S104中向所述手机号码批量发送5G消息包括:
按照手机号码的优先级标识向所述手机号码批量发送会员营销信息;
按照手机号码的优先级标识向所述手机号码批量发送气象预警信息;
按照手机号码的优先级标识向所述手机号码批量发送便民服务信息。通过手机号码的优先级标识,可以识别出手机号码的不同优先级,在批量发送5G消息时尽早触达优先级高的手机号码;并且,消息队列模块具有高吞吐量、低延迟的特点,因此,导入文件处理模块可以快速处理完大批量手机号,批量发送的5G消息可以是会员营销信息、气象预警信息或便民服务信息,这在会员营销、气象预警、便民服务推送等场景中非常高效、便捷。
本发明利用消息队列的高吞吐量、消息缓冲、异步处理的特点,在保证导入的大批量手机号快速处理的同时,充分发挥分布式系统的高并发优势,大大提高5G消息的发送速率。
本发明利用消息队列的高吞吐量、消息缓冲、异步处理的特点,在保证导入的大批量手机号快速处理的同时,充分发挥分布式系统的高并发优势,大大提高5G消息的发送速率。
从以上的描述中,可以看出,本发明实现了如下技术效果:
本发明利用消息队列存储并分发手机号码,可以批量发送5G消息,解决了现有技术中批量发送5G消息时降低发送速率的问题;
利用消息队列的高吞吐量、消息缓冲、异步处理的特点,在保证导入的大批量手机号快速处理的同时,充分发挥分布式系统的高并发优势,大大提高5G消息的发送速率;
利用消息队列的高吞吐量、低延迟、高并发的特点,在大批量发送5G消息的场景下,既简化了用户的操作,也提高了5G消息发送的速度。
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本发明实施例还提供了一种用于实施上述基于消息队列的5G消息批量发送方法的基于消息队列的5G消息批量发送装置,如图3所示,该装置包括:
导入文件处理模块31,用于接收用户导入的文件,其中,所述文件包含手 机号码;
所述导入文件处理模块31,还用于提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
消息队列模块32,用于通过所述消息队列存储并分发所述手机号码;
5G消息发送模块33,用于接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
图4为本发明实施例提供的基于消息队列的5G消息批量发送装置的应用示意图,基于消息队列的5G消息大批量发送装置由两种角色参与交互,分别是消息发送方与消息接收方;
消息发送方先将消息接收方的手机号写入文件中,然后通过本装置所提供的交互界面或者接口导入文件,实现5G消息的大批量发送;消息接收方通过手机终端接收本装置发送的5G消息。
本发明提供的装置利用消息队列的高吞吐量、低延迟、高并发的特点,在大批量发送5G消息的场景下,既简化了用户的操作,也提高了5G消息发送的速度。
本发明实施例还提供了一种电子设备,如图5所示,该电子设备包括一个或多个处理器51以及存储器52,图5中以一个处理器51为例。
该控制器还可以包括:输入装置53和输出装置54。
处理器51、存储器52、输入装置53和输出装置54可以通过总线或者其他方式连接,图5中以通过总线连接为例。
处理器51可以为中央处理器(Central Processing Unit,简称为CPU),处理器51还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,简称为DSP)、专用集成电路(Application Specific Integrated Circuit,简称为ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称为FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合,通用处理器可以是微处理器或者任何常规的处理器。
存储器52作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本发明实施例中的控制方法对应的程序指令/模块。处理器51通过运行存储在存储器52中的非暂态软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的基于消息队列的5G消息批量发送方法。
存储器52可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据服务器操作的处理装置的使用所创建的数据等。此外,存储器52可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器52可选包括相对于处理器51远程设置的存储器,这些远程存储器可以通过网络连接至网络连接装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置53可接收输入的数字或字符信息,以及产生与服务器的处理装置的用户设置以及功能控制有关的键信号输入。输出装置54可包括显示屏等显示设备。
一个或者多个模块存储在存储器52中,当被一个或者多个处理器51执行时,执行如图1所示的方法。
本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成的,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各电机控制方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,简称为ROM)、随机存储记忆体(Random Access Memory,简称为RAM)、快闪存储器(Flash Memory,简称为FM)、硬盘(Hard Disk Drive,简称为HDD)或固态硬盘(Solid-State Drive,简称为SSD)等;存储介质还可以包括上述种类的存储器的组合。
虽然结合附图描述了本发明的实施方式,但是本领域技术人员可以在不脱 离本发明的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。

Claims (10)

  1. 一种基于消息队列的5G消息批量发送方法,其特征在于,包括:
    接收用户导入的文件,其中,所述文件包含手机号码;
    提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
    通过所述消息队列存储并分发所述手机号码;
    接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
  2. 根据权利要求1所述的方法,其特征在于,所述接收用户导入的文件包括:
    接收用户导入的Excel文件和文本文件;
    其中,所述Excel文件包含后缀名为xlsx和xls的文件,所述文本文件包含后缀名为csv和txt的文件。
  3. 根据权利要求1所述的方法,其特征在于,所述提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列,包括:
    分别处理不同格式的文件;
    根据所述手机号码的优先级标识,分批次提取所述文件中的手机号码;
    根据所述手机号码和所述消息队列的个数,将提取出的手机号码均匀地分发到多个消息队列。
  4. 根据权利要求1所述的方法,其特征在于,所述通过所述消息队列存储并分发所述手机号码包括:
    利用多个消息队列,按照手机号码的优先级标识存储所述手机号码;
    通过多个消息队列进行消息缓冲,并分发所述手机号码。
  5. 根据权利要求1所述的方法,其特征在于,所述接收所述消息队列中的手机号码包括:
    分布式部署多个服务节点;监听消息队列,当监听到所述消息队列中存储有手机号码时,多个服务节点通过多个消息队列并行获取手机号码;
    在多个服务节点通过多个消息队列并行获取手机号码后,清除多个消息队列中的所述手机号码。
  6. 根据权利要求5所述的方法,其特征在于,所述多个服务节点通过多个 消息队列并行获取手机号码包括:
    每个服务节点接收一个或多个消息队列发送的手机号码;
    各个服务节点同时接收多个消息队列发送的手机号码。
  7. 根据权利要求1所述的方法,其特征在于,所述向所述手机号码批量发送5G消息包括:
    按照手机号码的优先级标识向所述手机号码批量发送会员营销信息;
    按照手机号码的优先级标识向所述手机号码批量发送气象预警信息;
    按照手机号码的优先级标识向所述手机号码批量发送便民服务信息。
  8. 一种基于消息队列的5G消息批量发送装置,其特征在于,包括:
    导入文件处理模块,用于接收用户导入的文件,其中,所述文件包含手机号码;
    所述导入文件处理模块,还用于提取所述文件中的手机号码,并将所述手机号码分批次发送到消息队列;
    消息队列模块,用于通过所述消息队列存储并分发所述手机号码;
    5G消息发送模块,用于接收所述消息队列中的手机号码,并向所述手机号码批量发送5G消息。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使计算机执行权利要求1-7任意一项所述的基于消息队列的5G消息批量发送方法。
  10. 一种电子设备,其特征在于,所述电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器执行权利要求1-7任意一项所述的基于消息队列的5G消息批量发送方法。
PCT/CN2022/109616 2021-12-09 2022-08-02 基于消息队列的5g消息批量发送方法、装置及电子设备 WO2023103419A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111500213.7A CN114390451A (zh) 2021-12-09 2021-12-09 基于消息队列的5g消息批量发送方法、装置及电子设备
CN202111500213.7 2021-12-09

Publications (1)

Publication Number Publication Date
WO2023103419A1 true WO2023103419A1 (zh) 2023-06-15

Family

ID=81195115

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/109616 WO2023103419A1 (zh) 2021-12-09 2022-08-02 基于消息队列的5g消息批量发送方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN114390451A (zh)
WO (1) WO2023103419A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117938787A (zh) * 2024-03-25 2024-04-26 中国人民解放军国防科技大学 一种消息批量传输的仿真系统及其实现方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114390451A (zh) * 2021-12-09 2022-04-22 上海帜讯信息技术股份有限公司 基于消息队列的5g消息批量发送方法、装置及电子设备
CN114599002B (zh) * 2022-05-09 2022-07-26 广东省气象公共服务中心(广东气象影视宣传中心) 一种基于5g消息的日常天气个性化服务自动推送方法
CN116384956B (zh) * 2023-06-05 2023-08-15 天津金城银行股份有限公司 一种消息批量发送方法、装置、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379814A1 (en) * 2013-06-21 2014-12-25 Parlant Technology, Inc. System and method for optimized message creation and delivery
CN105263128A (zh) * 2015-11-27 2016-01-20 北京奇虎科技有限公司 一种批量发送短信的方法和装置
CN111131368A (zh) * 2018-11-01 2020-05-08 中国移动通信集团浙江有限公司 消息推送方法和装置
CN111147355A (zh) * 2019-12-25 2020-05-12 北京五八信息技术有限公司 消息发送方法、装置、电子设备及存储介质
CN113011969A (zh) * 2021-03-31 2021-06-22 建信金融科技有限责任公司 基于5g消息的银行业务处理方法、装置、介质及电子设备
CN114390451A (zh) * 2021-12-09 2022-04-22 上海帜讯信息技术股份有限公司 基于消息队列的5g消息批量发送方法、装置及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108737292A (zh) * 2018-04-18 2018-11-02 千寻位置网络有限公司 一种批量消息的发送方法及系统、服务器
CN108924041A (zh) * 2018-08-03 2018-11-30 北京捷易迅信息技术有限公司 一种即时通讯中消息高效可靠发送方法
CN110311974A (zh) * 2019-06-28 2019-10-08 东北大学 一种基于异步消息的云存储服务方法
CN111212390B (zh) * 2019-12-23 2022-08-26 北京健康之家科技有限公司 消息队列的处理方法、装置及设备
CN112559154B (zh) * 2020-12-23 2024-05-24 平安银行股份有限公司 消息发送量增长的优化方法、系统、设备及可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379814A1 (en) * 2013-06-21 2014-12-25 Parlant Technology, Inc. System and method for optimized message creation and delivery
CN105263128A (zh) * 2015-11-27 2016-01-20 北京奇虎科技有限公司 一种批量发送短信的方法和装置
CN111131368A (zh) * 2018-11-01 2020-05-08 中国移动通信集团浙江有限公司 消息推送方法和装置
CN111147355A (zh) * 2019-12-25 2020-05-12 北京五八信息技术有限公司 消息发送方法、装置、电子设备及存储介质
CN113011969A (zh) * 2021-03-31 2021-06-22 建信金融科技有限责任公司 基于5g消息的银行业务处理方法、装置、介质及电子设备
CN114390451A (zh) * 2021-12-09 2022-04-22 上海帜讯信息技术股份有限公司 基于消息队列的5g消息批量发送方法、装置及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117938787A (zh) * 2024-03-25 2024-04-26 中国人民解放军国防科技大学 一种消息批量传输的仿真系统及其实现方法

Also Published As

Publication number Publication date
CN114390451A (zh) 2022-04-22

Similar Documents

Publication Publication Date Title
WO2023103419A1 (zh) 基于消息队列的5g消息批量发送方法、装置及电子设备
US11240159B2 (en) Service link selection control method and device
US20200351204A1 (en) Method, apparatus, and system for load balancing of service chain
US9621465B2 (en) Wired data-connection aggregation
CN113485822A (zh) 内存管理方法、系统、客户端、服务器及存储介质
US10152194B2 (en) Transmitting hardware-rendered graphical data
CN107193673A (zh) 一种报文处理方法及设备
CN105472291A (zh) 多处理器集群的数字硬盘录像机及其实现方法
CN110022335B (zh) 数据包发送方法、装置、服务器及计算机可读存储介质
CN111541555A (zh) 群聊优化方法及相关产品
KR20120072134A (ko) 가상 데스크톱 가속 장치 및 방법
WO2022121978A1 (zh) 直播间置顶消息确定方法、装置、设备和存储介质
EP3399725B1 (en) Multimedia stream multicasting method and device
CN104486442A (zh) 分布式存储系统的数据传输方法、装置
WO2013097234A1 (zh) 处理业务的方法和系统
WO2017129107A1 (zh) 一种图像绘制的方法、相关设备及系统
CN113783913A (zh) 一种消息推送管理方法和装置
WO2023125380A1 (zh) 一种数据管理的方法及相应装置
CN106330504B (zh) 一种实现应用的方法及业务控制器
CN113691466A (zh) 一种数据的传输方法、智能网卡、计算设备及存储介质
CN107124353B (zh) 一种消息处理的方法、装置、计算机装置及存储介质
CN114285906B (zh) 报文处理方法、装置、电子设备及存储介质
CN112770358B (zh) 基于业务数据的多速率模式数据发送控制方法及装置
US20180255157A1 (en) Network service chains using hardware logic devices in an information handling system
CN110753043B (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: 22902853

Country of ref document: EP

Kind code of ref document: A1