CN106878197A - A management system and method for cloud platform message transmission - Google Patents
A management system and method for cloud platform message transmission Download PDFInfo
- Publication number
- CN106878197A CN106878197A CN201710096149.8A CN201710096149A CN106878197A CN 106878197 A CN106878197 A CN 106878197A CN 201710096149 A CN201710096149 A CN 201710096149A CN 106878197 A CN106878197 A CN 106878197A
- Authority
- CN
- China
- Prior art keywords
- message
- queue
- module
- message queue
- management system
- 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.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 38
- 238000000034 method Methods 0.000 title abstract description 22
- 230000000977 initiatory effect Effects 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 24
- 230000007423 decrease Effects 0.000 claims abstract description 15
- 238000007726 management method Methods 0.000 claims description 77
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 230000002688 persistence Effects 0.000 claims 2
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000002085 persistent effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008713 feedback mechanism Effects 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000000246 remedial effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种云平台消息传输的管理系统及方法,通过消息发起模块生成消息并发送上述消息;消息队列管理模块接收上述消息发起模块发送的上述消息,根据消息队列内等待发送的消息数量,相应增减上述消息队列,并将上述消息均衡分配存储至预设消息队列,发送上述消息;消息接收模块接收上述消息队列处理模块发送的上述消息。消息队列管理模块根据各个消息队列的负荷的高低,可以动态地增加或者是减少相应的消息队列,以及将当前均衡分配到消息队列中,保证消息及时地被传输至消息消费端。而将消息存储至相应地消息队列,保证消息在传输过程中不会丢失。可见,本申请有利于提高云平台下消息传输的可靠性以及高效性。
The invention discloses a management system and method for message transmission on a cloud platform. A message is generated by a message initiation module and the above message is sent; the message queue management module receives the above message sent by the above message initiation module, and according to the number of messages waiting to be sent in the message queue , correspondingly increase or decrease the above message queue, store the above message in a balanced manner in the preset message queue, and send the above message; the message receiving module receives the above message sent by the above message queue processing module. The message queue management module can dynamically increase or decrease the corresponding message queue according to the load level of each message queue, and distribute the current balance to the message queue to ensure that the message is transmitted to the message consumer in a timely manner. The message is stored in the corresponding message queue to ensure that the message will not be lost during transmission. It can be seen that the present application is conducive to improving the reliability and efficiency of message transmission under the cloud platform.
Description
技术领域technical field
本发明涉及通信管理领域,特别是涉及一种云平台消息传输的管理系统及方法。The invention relates to the field of communication management, in particular to a management system and method for cloud platform message transmission.
背景技术Background technique
随着云技术的发展进步,云平台也应运而生。而随着应用的普及和业务量的大规模增长,对云平台的消息管理提出了新的挑战。With the development and progress of cloud technology, cloud platforms have emerged as the times require. With the popularization of applications and large-scale growth of business volume, new challenges are posed to the message management of the cloud platform.
云平台下的云消息一般可以由消息发送方即消息生产端生成,并将该消息发送至消息中间件;消息中间件继而将该消息发送至指定的消息接收模块即消息消费端;消息消费端可以对所接收到的消息进行相应处理。Cloud messages under the cloud platform can generally be generated by the message sender, that is, the message producer, and send the message to the message middleware; the message middleware then sends the message to the designated message receiving module, that is, the message consumer; the message consumer The received messages can be processed accordingly.
但是,现有技术中的云平台下的消息传输的可靠性较低,即消息在传输过程中,由于网络故障以及其它原因,进而导致消息丢失。进一步地,云平台下的消息传输的性能较低,即消息从消息生产端传输至消息消费端的用时较长,进而导致消息通信的性能较低。如何提高云平台下消息通信的可靠性以及高效性是本领域亟待解决的问题。However, the reliability of message transmission under the cloud platform in the prior art is low, that is, the message is lost due to network failure and other reasons during the message transmission process. Furthermore, the performance of message transmission under the cloud platform is low, that is, it takes a long time for a message to be transmitted from a message producer to a message consumer, which in turn leads to low performance of message communication. How to improve the reliability and efficiency of message communication under the cloud platform is an urgent problem to be solved in this field.
发明内容Contents of the invention
本发明的目的是提供一种云平台消息传输的管理系统及方法,目的在于解决现有技术中云平台下消息通信的可靠性以及高效性较低的问题。The purpose of the present invention is to provide a management system and method for cloud platform message transmission, aiming to solve the problem of low reliability and high efficiency of message communication under cloud platform in the prior art.
为解决上述技术问题,本发明提供一种云平台消息传输的管理系统,该系统包括:In order to solve the above technical problems, the present invention provides a management system for cloud platform message transmission, the system includes:
消息发起模块,用于生成消息并发送所述消息;A message initiating module, configured to generate a message and send the message;
消息队列管理模块,用于接收所述消息发起模块发送的所述消息,根据消息队列内等待发送的消息数量,相应增减所述消息队列,并将所述消息均衡分配存储至预设消息队列,发送所述消息;A message queue management module, configured to receive the message sent by the message initiating module, correspondingly increase or decrease the message queue according to the number of messages waiting to be sent in the message queue, and store the balanced distribution of the messages in the preset message queue , sending the message;
消息接收模块,用于接收所述消息队列处理模块发送的所述消息。A message receiving module, configured to receive the message sent by the message queue processing module.
可选地,所述消息接收模块还包括:Optionally, the message receiving module also includes:
成功反馈单元,用于当消息处理成功时,向所述消息队列管理模块反馈成功指令,以使所述消息队列管理模块从所述消息队列中删除所述消息。A success feedback unit, configured to feed back a success instruction to the message queue management module when the message processing is successful, so that the message queue management module deletes the message from the message queue.
可选地,所述消息队列管理模块包括:Optionally, the message queue management module includes:
消息分发单元,用于根据各个相同类别的所述消息队列内等待发送的消息数量,将所述消息发送至对应的所述消息接收模块;A message distribution unit, configured to send the message to the corresponding message receiving module according to the number of messages waiting to be sent in the message queues of the same category;
其中,所述消息对应多个所述消息接收模块。Wherein, the message corresponds to a plurality of the message receiving modules.
可选地,所述消息接收模块还包括:Optionally, the message receiving module also includes:
异常反馈单元,用于当消息处理异常时,向所述消息队列管理模块反馈异常指令。The exception feedback unit is configured to feed back an exception instruction to the message queue management module when the message processing is abnormal.
可选地,所述消息队列管理模块还包括:Optionally, the message queue management module also includes:
异常分发单元,用于当接收到所述消息接收模块发送的所述异常指令时,将所述消息重新发送至不同所述消息接收模块的另一消息接收模块。An exception distribution unit, configured to resend the message to another message receiving module different from the message receiving module when receiving the exception instruction sent by the message receiving module.
可选地,所述消息发起模块还包括:Optionally, the message initiation module also includes:
消息声明单元,用于设定所述消息的接收者,并将所述消息进行持久化预设置。The message declaring unit is configured to set the receiver of the message, and perform persistent preset on the message.
可选地,所述管理系统基于高级消息队列协议。Optionally, the management system is based on the Advanced Message Queuing Protocol.
此外,本发明还提供了一种云平台消息传输的管理方法,该方法包括:In addition, the present invention also provides a management method for cloud platform message transmission, the method comprising:
消息发起模块生成消息并发送所述消息;The message initiating module generates a message and sends the message;
消息队列管理模块接收所述消息发起模块发送的所述消息,根据消息队列内等待发送的消息数量,相应增减所述消息队列,并将所述消息均衡分配存储至预设消息队列,发送所述消息;The message queue management module receives the message sent by the message initiating module, increases or decreases the message queue correspondingly according to the number of messages waiting to be sent in the message queue, stores the balanced distribution of the messages in the preset message queue, and sends the message queue said news;
消息接收模块接收所述消息队列处理模块发送的所述消息。The message receiving module receives the message sent by the message queue processing module.
可选地,还包括:Optionally, also include:
当消息处理成功时,所述消息接收模块向所述消息队列管理模块反馈成功指令;When the message processing is successful, the message receiving module feeds back a success instruction to the message queue management module;
所述消息队列管理模块根据所述成功指令,从所述消息队列中删除所述消息。The message queue management module deletes the message from the message queue according to the successful instruction.
可选地,还包括:Optionally, also include:
所述消息发送模块设定所述消息的接收者,并将所述消息进行持久化预设置。The message sending module sets the recipient of the message, and performs persistent preset setting on the message.
本发明所提供的一种云平台消息传输的管理系统及方法,通过消息发起模块生成消息并发送上述消息;消息队列管理模块接收上述消息发起模块发送的上述消息,根据消息队列内等待发送的消息数量,相应增减上述消息队列,并将上述消息均衡分配存储至预设消息队列,发送上述消息;消息接收模块接收上述消息队列处理模块发送的上述消息。消息队列管理模块根据各个消息队列的负荷的高低,可以动态地增加或者是减少相应的消息队列,以及将当前消息均衡分配存储至到消息队列中,保证消息及时地被传输至消息消费端。而将消息存储至相应地消息队列,保证消息在传输过程中不会丢失。可见,本申请有利于提高云平台下消息传输的可靠性以及高效性。A management system and method for cloud platform message transmission provided by the present invention generates a message through a message initiation module and sends the above message; the message queue management module receives the above message sent by the above message initiation module, and according to the message waiting to be sent in the message queue increase or decrease the above-mentioned message queue accordingly, and store the above-mentioned message in a balanced distribution to the preset message queue, and send the above-mentioned message; the message receiving module receives the above-mentioned message sent by the above-mentioned message queue processing module. The message queue management module can dynamically increase or decrease the corresponding message queue according to the load level of each message queue, and evenly allocate and store the current message in the message queue to ensure that the message is transmitted to the message consumer in a timely manner. The message is stored in the corresponding message queue to ensure that the message will not be lost during transmission. It can be seen that the present application is conducive to improving the reliability and efficiency of message transmission under the cloud platform.
附图说明Description of drawings
为了更清楚的说明本发明实施例或现有技术的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例所提供的云平台消息传输管理系统的结构示意框图;Fig. 1 is a schematic block diagram of the structure of the cloud platform message transmission management system provided by the embodiment of the present invention;
图2为本发明实施例所提供的云平台消息传输管理系统的一种具体实施方式的结构示意框图;Fig. 2 is a structural schematic block diagram of a specific embodiment of the cloud platform message transmission management system provided by the embodiment of the present invention;
图3为本发明实施例提供的云平台消息传输的管理方法的一种具体实施方式的流程示意图。FIG. 3 is a schematic flowchart of a specific implementation manner of a method for managing message transmission on a cloud platform provided by an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
请参见图1,图1为本发明实施例所提供的云平台消息传输管理系统的结构示意框图,该系统可以包括:Please refer to Fig. 1, Fig. 1 is a schematic block diagram of the structure of the cloud platform message transmission management system provided by the embodiment of the present invention, the system may include:
消息发起模块101,用于生成消息并发送上述消息;A message initiating module 101, configured to generate a message and send the above message;
需要说明的是,上述消息发起模块可以是指消息生产端,其可以是云平台中主动发起通信的服务端。上述消息可以是指云平台的可执行任务。It should be noted that the above-mentioned message initiating module may refer to a message producer, which may be a server in the cloud platform that actively initiates communication. The above message may refer to an executable task of the cloud platform.
为了保证消息可以正确地发送到指定的消息消费端,可以在消息发送时,对消息的接收者进行声明。而为了保证消息在一些特殊情况下(例如死机等)丢失,可以将消息进行持久化存储。In order to ensure that the message can be sent to the specified message consumer correctly, the receiver of the message can be declared when the message is sent. In order to ensure that the message is lost in some special circumstances (such as a crash, etc.), the message can be stored persistently.
故在本发明的一些实施例中,上述消息发起模块还可以包括消息声明单元,用于设定所述消息的接收者,并将所述消息进行持久化预设置。Therefore, in some embodiments of the present invention, the above-mentioned message initiation module may further include a message declaration unit, configured to set the receiver of the message, and perform persistent presets on the message.
可以理解的是,上述持久化预设置可以是指通过一些预先设置,使得上述消息可以持久化存储于消息队列管理模块中,以保证消息不会被丢失,一定程度上提高了消息传输的可靠性。It can be understood that the above-mentioned persistent presets may refer to some presets, so that the above-mentioned messages can be persistently stored in the message queue management module, so as to ensure that the messages will not be lost, and improve the reliability of message transmission to a certain extent .
消息队列管理模块102,用于接收上述消息发起模块发送的上述消息,根据消息队列内等待发送的消息数量,相应增减上述消息队列,并将上述消息均衡分配存储至预设消息队列,发送上述消息;The message queue management module 102 is configured to receive the above-mentioned message sent by the above-mentioned message initiating module, correspondingly increase or decrease the above-mentioned message queue according to the number of messages waiting to be sent in the message queue, and store the above-mentioned messages in a balanced distribution to the preset message queue, and send the above-mentioned information;
需要说明的是,上述消息队列管理模块可以是指消息中间件,例如,消息集群队里处理器。其可以接收上述消息发起模块所发送的模块,保证上述消息可以按照指定传输方式进行传输。It should be noted that the above-mentioned message queue management module may refer to message middleware, for example, a processor in a message cluster queue. It can receive the module sent by the above-mentioned message initiating module, and ensure that the above-mentioned message can be transmitted according to the specified transmission mode.
上述消息队列可以是指消息传输过程中,保存消息的容器,其具有一定的存储空间,所能存储的消息数量是有限的。The above-mentioned message queue may refer to a container for storing messages during message transmission, which has a certain storage space, and the number of messages that can be stored is limited.
上述增减消息队列可以是指创建新的消息队列,删减多余的消息队列。The above-mentioned increase or decrease of message queues may refer to creating new message queues and deleting redundant message queues.
根据上述消息队列内等待发送的消息数量,来确定是否需要增加或者是删减消息队列,即当上述消息队列内正在等待发送的消息的数量较多时,表明当前的消息队列的负荷较高,则可以相应地创建新的消息队列;而当上述消息队列内正在等待发送的消息的数量较少,此时,当有队列内的消息数量为零时,可以考虑适当地删除相应的消息队列,以降低服务器的负载。Determine whether to increase or delete the message queue according to the number of messages waiting to be sent in the above message queue, that is, when the number of messages waiting to be sent in the above message queue is large, it indicates that the load of the current message queue is high, then A new message queue can be created accordingly; and when the number of messages waiting to be sent in the above message queue is small, at this time, when the number of messages in the queue is zero, it can be considered to delete the corresponding message queue appropriately, so as to Reduce server load.
可以理解的是,上述消息发起模块可以通过调用上述消息队列管理模块的触发机制,以唤醒消息队列管理模块的守护进程,以完成两者之间的信息交互。It can be understood that the above-mentioned message initiation module can wake up the daemon process of the message queue management module by invoking the trigger mechanism of the above-mentioned message queue management module, so as to complete the information interaction between the two.
而当上述消息队列管理模块接收到上述消息后,可以对消息进行预处理,例如,利用消息路由机制,将消息发起模块和消息接收模块进行标识位的绑定。After the above-mentioned message queue management module receives the above-mentioned message, it can preprocess the message, for example, use the message routing mechanism to bind the message originating module and the message receiving module to bind the identification bit.
上述预设消息队列可以是指根据上述消息的指标,来确定上述消息对应的消息队列,例如,当上述消息的发送对象为消息消费端A时,则预设消息队列是指消息消费端1对应的消息队列。当然,上述预设消息队列也可以是指当前消息队列中等待发送的消息数量较少的队列。The above-mentioned preset message queue may refer to determining the message queue corresponding to the above-mentioned message according to the index of the above-mentioned message. message queue. Of course, the above-mentioned preset message queue may also refer to a queue with a smaller number of messages waiting to be sent in the current message queue.
而将消息均衡分配存储至消息队列可以是指根据消息队列内等待发送的消息数量,将消息分配至某个指定消息队列。例如,有消息队列1和消息队列2,消息队列1内的等待发送的消息数量比消息队列2内的少,此时,可以将消息分配存储至消息队列1。这样可以保证各个消息队列内的等待发送的消息队列的数量尽可能地均衡。The balanced allocation and storage of messages to message queues may refer to allocating messages to a specified message queue according to the number of messages waiting to be sent in the message queue. For example, there are message queue 1 and message queue 2, and the number of messages waiting to be sent in message queue 1 is less than that in message queue 2. At this time, the messages can be allocated and stored in message queue 1. This can ensure that the number of message queues waiting to be sent in each message queue is balanced as much as possible.
需要说明的是,一个消息发起端可以对应多个消息消费端,即某种类型的消息可以被多个消息消费端处理。It should be noted that one message initiator can correspond to multiple message consumers, that is, a certain type of message can be processed by multiple message consumers.
在进行预处理之后,可以调用相应地的处理程序,判断是否需要创建新的消息队列,如果不需要,则可以进行消息标识位和消息接收模块的绑定,进而进行相应的消息路由,以所接收到的消息分发至消息队列;而如果需要,则先进行消息队列的创建,然后可以进行相应的后续操作。After the preprocessing, you can call the corresponding processing program to determine whether a new message queue needs to be created. If not, you can bind the message identification bit and the message receiving module, and then perform corresponding message routing, so that The received message is distributed to the message queue; and if necessary, the message queue is created first, and then the corresponding follow-up operations can be performed.
可以理解的是,上述消息队列可以根据所存储的消息的属性来进行分组,即每一个消息队列内所存储的消息的属性可以是相同的,例如,可以将属性是输入输出的消息存储至某个或者是某几个指定的消息队列中;也可以使用别的消息队列的组别划分指标,例如,消息的发送对象,即可以将消息的发送对象相同的消息存储至某个或者是某几个消息队列中。当然,还可以利用其它的指标来为消息队列划分组别,在此不作限定。It can be understood that the above message queues can be grouped according to the attributes of the stored messages, that is, the attributes of the messages stored in each message queue can be the same, for example, messages whose attributes are input and output can be stored in a certain In one or several designated message queues; you can also use the grouping indicators of other message queues, for example, the sending object of the message, that is, you can store the messages with the same sending object in one or several in a message queue. Of course, other indicators can also be used to divide message queues into groups, which is not limited here.
对应某一个消息来说,其可以被多个消息消费端执行,例如,对应消息属性为输入输出的消息来说,其可以被消息消费端1、消息消费端2等消费端执行。而将消息队列根据划分指标的不同进行划分后,例如,根据消息的发送对象进行划分。此时,可以根据消息队列内的消息数量进行消息的均衡分发。For a certain message, it can be executed by multiple message consumers. For example, for a message whose attribute is input and output, it can be executed by consumers such as message consumer 1 and message consumer 2. After the message queue is divided according to different division indicators, for example, according to the sending object of the message. At this point, balanced distribution of messages can be performed according to the number of messages in the message queue.
故在本发明的一些实施例中,上述消息队列管理模块可以包括消息分发单元,用于根据各个相同类别的所述消息队列内等待发送的消息数量,将所述消息发送至对应的所述消息接收模块;其中,所述消息对应多个所述消息接收模块。Therefore, in some embodiments of the present invention, the above-mentioned message queue management module may include a message distribution unit, configured to send the messages to the corresponding message queues according to the number of messages waiting to be sent in the message queues of the same category. A receiving module; wherein, the message corresponds to a plurality of the message receiving modules.
需要说明的是,上述相同类别的消息队列可以是指划分指标相同的消息队列。例如,划分指标为发送对象的消息队列。根据相同划分指标内的等待发送的消息数量,可以了解到相应的消息消费端的负载情况。例如,消息b可以被消息消费端1、消息消费端2以及消息消费端3处理,消息消费端1对应消息队列1,消息消费端2对应消息队列2,消息消费端3对应消息队列3;此时,可以根据消息队列1、消息队列2以及消息队列3内的数量多少,来确定将上述消息存储至哪一个消息队列,一般可以将消息存储至等待发送的消息数量最少的消息队列中,这样,可以保证各个消息消费端之间的负载得到一定的平衡。It should be noted that the aforementioned message queues of the same category may refer to message queues with the same division index. For example, divide the metrics into message queues that send objects. According to the number of messages waiting to be sent in the same division index, the load situation of the corresponding message consumer end can be known. For example, message b can be processed by message consumer 1, message consumer 2, and message consumer 3. Message consumer 1 corresponds to message queue 1, message consumer 2 corresponds to message queue 2, and message consumer 3 corresponds to message queue 3; , you can determine which message queue to store the above message in according to the number of message queue 1, message queue 2, and message queue 3. Generally, the message can be stored in the message queue with the least number of messages waiting to be sent. In this way , which can ensure that the load among the message consumers is balanced to a certain extent.
可以理解的是,除了可以根据消息队列内的消息等待数量来实现消息的均衡发送,还可以在消息接收模块设置负载情况反馈功能,以了解到各个消息接收模块的负载情况。当然,负载均衡规则还可以有其它的实现方式,在此不作限定。It can be understood that, in addition to achieving balanced sending of messages according to the number of messages waiting in the message queue, a load status feedback function can also be set in the message receiving module to know the load status of each message receiving module. Of course, the load balancing rule may also be implemented in other manners, which are not limited here.
根据负载均衡机制进行消息的分发,可以充分利用资源,并且可以保证消息处理的效率。Distributing messages according to the load balancing mechanism can make full use of resources and ensure the efficiency of message processing.
需要说明的是,可以将上述消息发起模块和消息队列管理模块设置于同一服务器上,也可以设置于不同的服务器上。It should be noted that the above-mentioned message initiation module and message queue management module can be set on the same server, or can be set on different servers.
消息接收模块103,用于接收所述消息队列处理模块发送的所述消息。The message receiving module 103 is configured to receive the message sent by the message queue processing module.
需要说明的是,上述消息接收模块可以是指消息消费端,其可以接收上述消息队列管理模块发送的消息,并对消息进行处理,即执行相应的任务。It should be noted that the above-mentioned message receiving module may refer to a message consumer, which can receive the message sent by the above-mentioned message queue management module, and process the message, that is, perform corresponding tasks.
为了及时地向上述消息队列管理模块反馈消息的处理情况,可以在上述消息接收模块增设消息反馈功能。In order to timely feed back the processing status of the message to the message queue management module, a message feedback function may be added to the message receiving module.
在本发明的一些实施例中,上述消息接收模块还可以包括成功反馈单元,用于当消息处理成功时,向上述消息队列管理模块反馈成功指令,以使上述消息队列管理模块从上述消息队列中删除上述消息。In some embodiments of the present invention, the above-mentioned message receiving module may further include a success feedback unit, configured to feed back a success instruction to the above-mentioned message queue management module when the message processing is successful, so that the above-mentioned message queue management module retrieves from the above-mentioned message queue Delete the above message.
在消息接收模块设置消息确认机制,可以使得消息队列管理模块及时地删除以成功完成的消息,确保服务器的负载以及性能。Setting the message confirmation mechanism in the message receiving module can make the message queue management module delete the successfully completed messages in time to ensure the load and performance of the server.
相应地,还可以在上述消息接收模块增设消息处理异常时的反馈功能。Correspondingly, a feedback function when the message processing is abnormal can also be added to the above message receiving module.
在本发明的一些实施例中,上述消息接收模块还可以包括异常反馈单元,用于当消息处理异常时,向上述消息队列管理模块反馈异常指令。In some embodiments of the present invention, the message receiving module may further include an exception feedback unit, configured to feed back an exception instruction to the message queue management module when the message processing is abnormal.
设置异常反馈机制,可以使得消息队列管理模块可以及时地获取消息的处理情况,以进行相应的补救措施。Setting an exception feedback mechanism can enable the message queue management module to obtain the processing status of the message in a timely manner, so as to take corresponding remedial measures.
当消息队列管理模块接收到异常指令时,可以将重新将相应的消息发送至不同的消息消费端进行处理,以保证任务可以及时完成。When the message queue management module receives an abnormal instruction, it can resend the corresponding message to a different message consumer for processing, so as to ensure that the task can be completed in time.
故在本发明的一些实施例中,上述消息队列管理模块还可以包括异常分发单元,用于当接收到所述消息接收模块发送的所述异常指令时,将所述消息重新发送至不同所述消息接收模块的另一消息接收模块。Therefore, in some embodiments of the present invention, the above-mentioned message queue management module may further include an exception distribution unit, configured to resend the message to different Another message receiving module of the message receiving module.
需要说明的是,上述另一消息接收模块可以是指具有处理上述消息的其它消息接收模块。例如,上述消息的属性为输入输出,能处理属性为输入输出的消息的消费端有2个,分别为消息消费端1和消息消费端2,当消息消费端1处理该消息时出现异常,则可以将该消息重新发送至消息消费端2进行处理。It should be noted that the above another message receiving module may refer to other message receiving modules that process the above messages. For example, the attribute of the above message is input and output, and there are two consumers that can process messages whose attributes are input and output, namely message consumer 1 and message consumer 2. When message consumer 1 processes the message, an exception occurs, then The message can be resent to the message consumer end 2 for processing.
可以理解的是,上述云平台消息传输的管理系统可以是基于高级消息队列协议(AMOP),也可以其它的消息传输协议,在此不作限定。It can be understood that the above-mentioned management system for message transmission of the cloud platform may be based on Advanced Message Queuing Protocol (AMOP), or other message transmission protocols, which are not limited herein.
本发明实施例所提供的云平台消息传输的管理系统,通过消息发起模块生成消息并发送上述消息;消息队列管理模块接收上述消息发起模块发送的上述消息,根据消息队列内等待发送的消息数量,相应增减上述消息队列,并将上述消息均衡分配存储至预设消息队列,发送上述消息;消息接收模块接收上述消息队列处理模块发送的上述消息。消息队列管理模块根据各个消息队列的负荷的高低,可以动态地增加或者是减少相应的消息队列,以及将当前消息均衡分配存储至消息队列中,保证消息及时地被传输至消息消费端。而将消息存储至相应地消息队列,保证消息在传输过程中不会丢失。可见,该系统有利于提高云平台下消息传输的可靠性以及高效性。The management system for cloud platform message transmission provided by the embodiment of the present invention generates a message through the message initiation module and sends the above message; the message queue management module receives the above message sent by the above message initiation module, and according to the number of messages waiting to be sent in the message queue, Correspondingly increase or decrease the above-mentioned message queue, store the above-mentioned messages in a balanced manner in the preset message queue, and send the above-mentioned message; the message receiving module receives the above-mentioned message sent by the above-mentioned message queue processing module. The message queue management module can dynamically increase or decrease the corresponding message queue according to the load level of each message queue, and evenly allocate and store the current message in the message queue to ensure that the message is transmitted to the message consumer in a timely manner. The message is stored in the corresponding message queue to ensure that the message will not be lost during transmission. It can be seen that the system is conducive to improving the reliability and efficiency of message transmission under the cloud platform.
为了更好地介绍本发明实施例提供的云平台消息传输管理系统的组成关系,下面将结合图2进行介绍。In order to better introduce the composition relationship of the cloud platform message transmission management system provided by the embodiment of the present invention, the following will introduce it in conjunction with FIG. 2 .
图2为本发明实施例所提供的云平台消息传输管理系统的一种具体实施方式的结构示意框图。FIG. 2 is a schematic structural block diagram of a specific implementation manner of a cloud platform message transmission management system provided by an embodiment of the present invention.
如图2所示,该系统可以包括消息生产端201、消息队列集群处理器202以及消息消费端203,。As shown in FIG. 2 , the system may include a message producer 201 , a message queue cluster processor 202 and a message consumer 203 .
其中,消息生成端内有m个生产者,其可以产生相应的消息,并将消息发送至消息队列集群处理器。其设置有消息声明功能,具体内容可以参见上文相应内容。Wherein, there are m producers in the message generating end, which can generate corresponding messages and send the messages to the message queue cluster processor. It is set with a message declaration function, and the specific content can be found in the corresponding content above.
消息队列集群处理器内预先配置有消息交换规则,以及N个消息队列。其可以持久化存储消息;可以动态增减相应的消息队列;在将消息分发至消息队列时,可以根据消息队列内等待发送的消息数量进行分发;在将消息发送至消息消费端时,可以根据消息消费端的负载情况进行相应分发。其具体内容可以参见上文相应内容。Message exchange rules and N message queues are pre-configured in the message queue cluster processor. It can persistently store messages; it can dynamically increase or decrease the corresponding message queue; when distributing messages to the message queue, it can be distributed according to the number of messages waiting to be sent in the message queue; when sending the message to the message consumer, it can be based on The load of the message consumer is distributed accordingly. For details, please refer to the corresponding content above.
消息消费端可以将接收到的任务进行处理。The message consumer can process the received tasks.
本发明实施例所提供的云平台消息传输的管理系统,可以实现云平台下消息的管理的准确性、可靠性以及高效性。The cloud platform message transmission management system provided by the embodiment of the present invention can realize the accuracy, reliability and efficiency of message management under the cloud platform.
下面对本发明实施例提供的云平台消息传输的管理方法进行介绍,下文描述的云平台消息传输的管理方法与上文描述的云平台消息传输的管理系统可相互对应参照。The following is an introduction to the management method of cloud platform message transmission provided by the embodiment of the present invention. The management method of cloud platform message transmission described below and the management system of cloud platform message transmission described above can be referred to in correspondence.
图3为本发明实施例提供的云平台消息传输的管理方法的一种具体实施方式的流程示意图,该方法可以包括以下步骤:Fig. 3 is a schematic flow chart of a specific embodiment of a management method for cloud platform message transmission provided by an embodiment of the present invention, the method may include the following steps:
步骤301:消息发起模块生成消息并发送所述消息;Step 301: the message initiating module generates a message and sends the message;
步骤302:消息队列管理模块接收所述消息发起模块发送的所述消息,根据消息队列内等待发送的消息数量,相应增减所述消息队列,并将所述消息均衡分配存储至预设消息队列,发送所述消息;Step 302: The message queue management module receives the message sent by the message initiation module, increases or decreases the message queue correspondingly according to the number of messages waiting to be sent in the message queue, and stores the balanced distribution of the messages in the preset message queue , sending the message;
步骤303:消息接收模块接收所述消息队列处理模块发送的所述消息。Step 303: The message receiving module receives the message sent by the message queue processing module.
可选地,还包括:Optionally, also include:
当消息处理成功时,所述消息接收模块向所述消息队列管理模块反馈成功指令;When the message processing is successful, the message receiving module feeds back a success instruction to the message queue management module;
所述消息队列管理模块根据所述成功指令,从所述消息队列中删除所述消息。The message queue management module deletes the message from the message queue according to the successful instruction.
可选地,还包括:Optionally, also include:
所述消息发送模块设定所述消息的接收者,并将所述消息进行持久化预设置。The message sending module sets the recipient of the message, and performs persistent preset setting on the message.
本发明实施例所提供的云平台消息传输的管理方法,消息队列管理模块根据各个消息队列的负荷的高低,可以动态地增加或者是减少相应的消息队列,以及将当前消息均衡分配存储到消息队列中,保证消息及时地被传输至消息消费端。而将消息存储至相应地消息队列,保证消息在传输过程中不会丢失。可见,该方法有利于提高云平台下消息传输的可靠性以及高效性。According to the management method of cloud platform message transmission provided by the embodiment of the present invention, the message queue management module can dynamically increase or decrease the corresponding message queue according to the load level of each message queue, and evenly allocate and store the current message to the message queue , to ensure that the message is transmitted to the message consumer in a timely manner. The message is stored in the corresponding message queue to ensure that the message will not be lost during transmission. It can be seen that this method is conducive to improving the reliability and efficiency of message transmission under the cloud platform.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
以上对本发明所提供的云平台消息传输的管理系统及方法进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The management system and method for cloud platform message transmission provided by the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710096149.8A CN106878197A (en) | 2017-02-22 | 2017-02-22 | A management system and method for cloud platform message transmission |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710096149.8A CN106878197A (en) | 2017-02-22 | 2017-02-22 | A management system and method for cloud platform message transmission |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106878197A true CN106878197A (en) | 2017-06-20 |
Family
ID=59167666
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710096149.8A Pending CN106878197A (en) | 2017-02-22 | 2017-02-22 | A management system and method for cloud platform message transmission |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106878197A (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107391275A (en) * | 2017-06-30 | 2017-11-24 | 联想(北京)有限公司 | A kind of message treatment method and electronic equipment |
| CN109150753A (en) * | 2018-08-01 | 2019-01-04 | 新华三技术有限公司 | message distributing method and device |
| CN109474612A (en) * | 2018-12-11 | 2019-03-15 | 江苏电力信息技术有限公司 | A kind of high performance mobile APP means of communication of high safety |
| CN109495523A (en) * | 2017-09-11 | 2019-03-19 | 北京金山云网络技术有限公司 | Management instruction delivery method, device, electronic equipment and storage medium |
| CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
| CN110968433A (en) * | 2018-09-29 | 2020-04-07 | 北京京东尚科信息技术有限公司 | Information processing method, system and electronic device |
| CN111694677A (en) * | 2020-05-08 | 2020-09-22 | 深圳木成林科技有限公司 | Message queue management method, device, terminal and computer-readable storage medium |
| CN112702509A (en) * | 2020-12-15 | 2021-04-23 | 杭州丽视智能科技有限公司 | Panoramic video generation method for camera, camera and storage medium |
| CN113965624A (en) * | 2020-06-29 | 2022-01-21 | 中国电信股份有限公司 | Method for processing message, message caching middleware and service system |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102457906A (en) * | 2010-10-26 | 2012-05-16 | 中国移动通信集团河南有限公司 | Load balancing control method and system of message queues |
| CN104753817A (en) * | 2013-12-25 | 2015-07-01 | 中国移动通信集团公司 | Local analogy method and local analogy system for cloud computing message queue service |
| CN106250249A (en) * | 2016-08-09 | 2016-12-21 | 广州唯品会信息科技有限公司 | The control method of message queue and device |
-
2017
- 2017-02-22 CN CN201710096149.8A patent/CN106878197A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102457906A (en) * | 2010-10-26 | 2012-05-16 | 中国移动通信集团河南有限公司 | Load balancing control method and system of message queues |
| CN104753817A (en) * | 2013-12-25 | 2015-07-01 | 中国移动通信集团公司 | Local analogy method and local analogy system for cloud computing message queue service |
| CN106250249A (en) * | 2016-08-09 | 2016-12-21 | 广州唯品会信息科技有限公司 | The control method of message queue and device |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107391275A (en) * | 2017-06-30 | 2017-11-24 | 联想(北京)有限公司 | A kind of message treatment method and electronic equipment |
| CN109495523A (en) * | 2017-09-11 | 2019-03-19 | 北京金山云网络技术有限公司 | Management instruction delivery method, device, electronic equipment and storage medium |
| CN109150753A (en) * | 2018-08-01 | 2019-01-04 | 新华三技术有限公司 | message distributing method and device |
| CN109150753B (en) * | 2018-08-01 | 2022-04-22 | 新华三技术有限公司 | Message distribution method and device |
| CN110968433A (en) * | 2018-09-29 | 2020-04-07 | 北京京东尚科信息技术有限公司 | Information processing method, system and electronic device |
| CN109474612A (en) * | 2018-12-11 | 2019-03-15 | 江苏电力信息技术有限公司 | A kind of high performance mobile APP means of communication of high safety |
| CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
| CN111694677A (en) * | 2020-05-08 | 2020-09-22 | 深圳木成林科技有限公司 | Message queue management method, device, terminal and computer-readable storage medium |
| CN113965624A (en) * | 2020-06-29 | 2022-01-21 | 中国电信股份有限公司 | Method for processing message, message caching middleware and service system |
| CN112702509A (en) * | 2020-12-15 | 2021-04-23 | 杭州丽视智能科技有限公司 | Panoramic video generation method for camera, camera and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106878197A (en) | A management system and method for cloud platform message transmission | |
| JP7271045B2 (en) | Electronic bill identifier assignment method, electronic bill generation method, apparatus and system thereof, storage medium and computer program | |
| US10341196B2 (en) | Reliably updating a messaging system | |
| CN106095572B (en) | distributed scheduling system and method for big data processing | |
| US9807015B2 (en) | Message processing using dynamic load balancing queues in a messaging system | |
| CN110458468B (en) | Task processing method and device, electronic equipment and storage medium | |
| CN110661668B (en) | A message sending management method and device | |
| CN111008075A (en) | Load balancing system, method, device, equipment and medium | |
| CN106257893A (en) | Storage server task response method, client, server and system | |
| CN110991808A (en) | Task allocation method and device | |
| CN106453136A (en) | Method and device for establishing message queue | |
| CN111431730A (en) | Service processing method, system, computer equipment and readable medium | |
| CN114546633A (en) | Distributed task processing method and system | |
| CN105872080A (en) | InCloud load balancing control method and device | |
| CN107342929B (en) | Method, device and system for sending new message notification | |
| CN110290009B (en) | Data scheduling method and device and computer readable storage medium | |
| CN114500546B (en) | Communication message sending method, device and equipment based on load balancing cluster | |
| CN113055493B (en) | Data packet processing method, device, system, scheduling device and storage medium | |
| CN115941604A (en) | A flow distribution method, device, equipment, storage medium and program product | |
| CN103299298A (en) | Method and system for processing business | |
| CN115426361A (en) | Distributed client packaging method and device, main server and storage medium | |
| CN112954084B (en) | Edge computing processing method, network function example and edge service management and control center | |
| CN107343037A (en) | The data transmission method and device of a kind of distributed memory system | |
| CN118119028A (en) | Channel resource allocation method, device, satellite load and storage medium | |
| CN106657195A (en) | Task processing method and relay device |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170620 |
|
| RJ01 | Rejection of invention patent application after publication |