CN106330766A - Message transmitting method and apparatus - Google Patents

Message transmitting method and apparatus Download PDF

Info

Publication number
CN106330766A
CN106330766A CN201610673429.6A CN201610673429A CN106330766A CN 106330766 A CN106330766 A CN 106330766A CN 201610673429 A CN201610673429 A CN 201610673429A CN 106330766 A CN106330766 A CN 106330766A
Authority
CN
China
Prior art keywords
message
sent
queue
rotation queue
server
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
Application number
CN201610673429.6A
Other languages
Chinese (zh)
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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201610673429.6A priority Critical patent/CN106330766A/en
Publication of CN106330766A publication Critical patent/CN106330766A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6225Fixed service order, e.g. Round Robin
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6295Queue scheduling characterised by scheduling criteria using multiple queues, one for each individual QoS, connection, flow or priority

Landscapes

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

Abstract

The present invention discloses a message transmitting method and apparatus. The method includes the following steps that: the number of messages stored in a second message circular queue is obtained; if the number of the messages stored in the second message circular queue does not exceed a first threshold value, messages to be transmitted stored in a first message circular queue are obtained and are stored in the second message circular queue; the messages to be transmitted in the second message circular queue are processed; and the processed messages to be transmitted are transmitted to a client. According to the message transmitting method and apparatus of the invention, a plurality of message circular queues store different messages, and therefore, the problems of frequent locking, memory allocation and release, which are caused by a condition that one queue buffering region is adopted, can be solved, the efficiency of message transmission can be improved, and system overhead can be reduced.

Description

一种消息发送方法及装置A message sending method and device

技术领域technical field

本发明实施例涉及软件技术领域,尤其涉及一种消息发送方法及装置。The embodiments of the present invention relate to the technical field of software, and in particular, to a message sending method and device.

背景技术Background technique

现有的消息通知系统一般采用一个队列缓冲区来存放从通知库中捞取的数据,然后将队列缓冲区的数据发送到对应的客户端。该方法实现简单,但缓冲区通过使用队列来实现,数据到达时要在队列尾部分配内存,数据发送完成时需要在队列头部释放内存。如果系统承载着较大的数据流,将面临着较大的内存操作导致的开销压力。同时,在多线程环境下,对队列中的数据进行处理将面临着频繁的加解锁操作,极大地影响系统的TPS。Existing message notification systems generally use a queue buffer to store data retrieved from the notification library, and then send the data in the queue buffer to the corresponding client. This method is simple to implement, but the buffer is implemented by using a queue. When data arrives, memory must be allocated at the end of the queue, and memory must be released at the head of the queue when data transmission is complete. If the system carries a large data flow, it will face the overhead pressure caused by large memory operations. At the same time, in a multi-threaded environment, processing the data in the queue will face frequent adding and unlocking operations, which greatly affects the TPS of the system.

发明内容Contents of the invention

本发明实施例提供一种消息发送方法及装置,用以提高消息发送的效率,降低系统开销。Embodiments of the present invention provide a message sending method and device, which are used to improve message sending efficiency and reduce system overhead.

本发明实施例提供的一种消息发送方法,包括:A message sending method provided by an embodiment of the present invention includes:

确定第二消息循环队列存储的消息的数量;determining the number of messages stored in the second message circular queue;

若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中;If the number of messages stored in the second message loop queue does not exceed the first threshold, then acquire the messages to be sent stored in the first message loop queue and store them in the second message loop queue;

对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。Processing the messages to be sent in the second message circular queue, and sending the processed messages to be sent to the client.

优选地,在将处理之后的待发送的消息发送至客户端之后,还包括:Preferably, after sending the processed to-be-sent message to the client, it further includes:

若所述客户端反馈所述待发送的消息未发送成功,则将所述未发送成功的消息存储至第三消息循环队列中;If the client feeds back that the message to be sent has not been sent successfully, storing the message that was not sent successfully in a third message loop queue;

将所述第三消息循环队列中的未发送成功的消息发送至所述客户端。Send the unsuccessfully sent messages in the third message loop queue to the client.

优选地,将所述第三消息循环队列中的未发送成功的消息发送至所述客户端之后,还包括:Preferably, after sending the unsuccessfully sent messages in the third message loop queue to the client, the method further includes:

若所述未发送成功的消息的发送次数大于第二阈值,则通知服务器所述未发送成功的消息发送失败。If the number of sending times of the unsuccessfully sent messages is greater than the second threshold, the server is notified that the unsuccessfully sent messages fail to be sent.

优选地,在将所述未发送成功的消息存储至第三消息循环队列中之前,还包括:Preferably, before storing the unsuccessfully sent messages in the third message loop queue, the method further includes:

若所述第三消息循环队列中的未发送成功的消息的数量超过第三阈值,则通知服务器所述待发送的消息未发送成功,并在设定时间之后从所述服务器中重新捞取所述未发送成功的消息至所述第一消息循环队列。If the number of unsuccessfully sent messages in the third message loop queue exceeds the third threshold, the server is notified that the message to be sent has not been sent successfully, and after a set time, the message is retrieved from the server. Messages that are not sent successfully are sent to the first message circular queue.

优选地,还包括:Preferably, it also includes:

确定所述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量是否小于第四阈值;determining whether the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than a fourth threshold;

若是,则从所述服务器中捞取待发送的消息;If so, retrieve the message to be sent from the server;

将从服务器中捞取的待发送的消息按序存储至所述第一消息循环队列的尾部。The messages retrieved from the server to be sent are sequentially stored at the tail of the first message circular queue.

优选地,还包括:Preferably, it also includes:

若所述客户端反馈消息发送成功,则将消息发送成功的状态通知给服务器,以使所述发送成功的消息不被捞取。If the client feedbacks that the message is successfully sent, it notifies the server of the successful message sending status, so that the successfully sent message will not be retrieved.

优选地,还包括:Preferably, it also includes:

若所述第一消息循环队列存储的待发送的消息超过第五阈值,将从所述服务器捞取的消息丢弃。If the messages to be sent stored in the first message circular queue exceed the fifth threshold, the messages retrieved from the server are discarded.

相应地,本发明实施例还提供了一种消息发送装置,包括:Correspondingly, an embodiment of the present invention also provides a message sending device, including:

确定单元,用于确定第二消息循环队列存储的消息的数量;a determining unit, configured to determine the number of messages stored in the second message circular queue;

获取单元,用于若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中;An acquisition unit, configured to acquire messages to be sent stored in the first message loop queue and store them in the second message loop queue if the number of messages stored in the second message loop queue does not exceed the first threshold;

处理单元,用于对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。The processing unit is configured to process the messages to be sent in the second message circular queue, and send the processed messages to be sent to the client.

优选地,所述处理单元还用于:Preferably, the processing unit is also used for:

在将处理之后的待发送的消息发送至客户端之后,若所述客户端反馈所述待发送的消息未发送成功,则将所述未发送成功的消息存储至第三消息循环队列中;After sending the processed message to be sent to the client, if the client feeds back that the message to be sent has not been sent successfully, storing the message that was not sent successfully in a third message loop queue;

将所述第三消息循环队列中的未发送成功的消息发送至所述客户端。Send the unsuccessfully sent messages in the third message loop queue to the client.

优选地,所述处理单元还用于:Preferably, the processing unit is also used for:

将所述第三消息循环队列中的未发送成功的消息发送至所述客户端之后,若所述未发送成功的消息的发送次数大于第二阈值,则通知服务器所述未发送成功的消息发送失败。After sending the unsuccessfully sent messages in the third message loop queue to the client, if the number of times the unsuccessfully sent messages are sent is greater than a second threshold, then notify the server that the unsuccessfully sent messages are sent fail.

优选地,所述处理单元还用于:Preferably, the processing unit is also used for:

在将所述未发送成功的消息存储至第三消息循环队列中之前,若所述第三消息循环队列中的未发送成功的消息的数量超过第三阈值,则通知服务器所述待发送的消息未发送成功,并在设定时间之后从所述服务器中重新捞取所述未发送成功的消息至所述第一消息循环队列。Before storing the unsuccessfully sent messages in the third message loop queue, if the number of unsuccessfully sent messages in the third message loop queue exceeds a third threshold, then notify the server of the messages to be sent Not successfully sent, and after a set time, retrieve the failed message from the server to the first message circular queue.

优选地,所述确定单元,还用于确定所述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量是否小于第四阈值;Preferably, the determining unit is further configured to determine whether the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than a fourth threshold;

所述获取单元,还用于若所述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量小于第四阈值,则从所述服务器中捞取待发送的消息;并将从服务器中捞取的待发送的消息按序存储至所述第一消息循环队列的尾部。The acquisition unit is further configured to retrieve messages to be sent from the server if the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than a fourth threshold messages; and store the messages retrieved from the server to the tail of the first message circular queue in sequence.

优选地,所述处理单元还用于:Preferably, the processing unit is also used for:

若所述客户端反馈消息发送成功,则将消息发送成功的状态通知给服务器,以使所述发送成功的消息不被捞取。If the client feedbacks that the message is successfully sent, it notifies the server of the successful message sending status, so that the successfully sent message will not be retrieved.

优选地,所述处理单元还用于:Preferably, the processing unit is also used for:

若所述第一消息循环队列存储的待发送的消息超过第五阈值,将从所述服务器捞取的消息丢弃。If the messages to be sent stored in the first message circular queue exceed the fifth threshold, the messages retrieved from the server are discarded.

本发明实施例表明,通过确定第二消息循环队列存储的消息的数量,若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中,对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。通过多个消息循环队列分别存储不同的消息,避免了采用一个队列缓冲区频繁的进行内存分配与释放的问题,从而提高消息发送效率,降低系统开销。The embodiment of the present invention shows that by determining the number of messages stored in the second message loop queue, if the number of messages stored in the second message loop queue does not exceed the first threshold, then obtain the messages to be sent stored in the first message loop queue message, and store it in the second message loop queue, process the message to be sent in the second message loop queue, and send the processed message to be sent to the client. By storing different messages in multiple message loop queues, the problem of frequent memory allocation and release using one queue buffer is avoided, thereby improving message sending efficiency and reducing system overhead.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1为本发明实施例提供的一种系统架构的结构示意图;FIG. 1 is a schematic structural diagram of a system architecture provided by an embodiment of the present invention;

图2为本发明实施例提供的一种消息发送方法的流程示意图;FIG. 2 is a schematic flowchart of a message sending method provided by an embodiment of the present invention;

图3为本发明实施例提供的一种系统部署的示意图;FIG. 3 is a schematic diagram of a system deployment provided by an embodiment of the present invention;

图4为本发明实施例提供的一种消息发送方法的流程示意图;FIG. 4 is a schematic flowchart of a message sending method provided by an embodiment of the present invention;

图5为本发明实施例提供的一种消息发送方法的流程示意图;FIG. 5 is a schematic flowchart of a message sending method provided by an embodiment of the present invention;

图6为本发明实施例提供的一种消息发送方法的流程示意图;FIG. 6 is a schematic flowchart of a message sending method provided by an embodiment of the present invention;

图7为本发明实施例提供的一种消息发送装置的结构示意图。FIG. 7 is a schematic structural diagram of a message sending device provided by an embodiment of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than 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示例性的示出了本发明实施例提供的一种系统架构,该系统架构适用于运行本发明实施例中提供的一种消息发送方法。该系统架构包括服务器101、客户端102、消息捞取装置103、消息处理发送装置104和消息存储转发装置105。该服务器101用于提供待发送的消息,消息捞取装置103用于从服务器中捞取消息并存储在循环队列1中,消息处理发送装置104用于从循环队列1中获取待发送消息存储在循环队列2中,并对循环队列2中的消息进行处理和发送至客户端102中,消息存储转发装置105用于发送消息处理发送装置104未发送成功的消息。FIG. 1 exemplarily shows a system architecture provided by an embodiment of the present invention, and the system architecture is suitable for running a method for sending a message provided in an embodiment of the present invention. The system architecture includes a server 101 , a client 102 , a message retrieval device 103 , a message processing and sending device 104 and a message storage and forwarding device 105 . The server 101 is used to provide messages to be sent, the message fetching device 103 is used to retrieve messages from the server and store them in the circular queue 1, and the message processing and sending device 104 is used to obtain messages to be sent from the circular queue 1 and store them in the circular queue 2, and process the messages in the circular queue 2 and send them to the client 102, the message storage and forwarding means 105 is used to send the message that the message processing sending means 104 fails to send.

基于上述描述,图2示出了本发明实施例提供的一种消息发送的流程,该流程可以由消息发送装置执行。Based on the above description, FIG. 2 shows a message sending process provided by an embodiment of the present invention, and the process can be executed by a message sending device.

如图2所示,该方法流程具体步骤包括:As shown in Figure 2, the specific steps of the method process include:

步骤201,确定第二消息循环队列存储的消息的数量。Step 201, determine the number of messages stored in the second message circular queue.

步骤202,若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中。Step 202, if the number of messages stored in the second message loop queue does not exceed the first threshold, acquire the messages to be sent stored in the first message loop queue, and store them in the second message loop queue.

步骤203,对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。Step 203, process the messages to be sent in the second message circular queue, and send the processed messages to the client.

在本发明实施例中,在对第二消息循环队列中的待发送的消息进行处理之前,需要确定第二消息循环队列存储的消息的数量,若该第二消息循环队列存储的消息的数量未超过第一阈值,就可以获取第一消息循环队列存储的待发送的消息,并将该获取的待发送的消息存储至第二消息循环队列中,然后对该第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。其中,该第一消息循环队列可以为上述图1中的循环队列1,该第二消息循环队列可以为上述图1中的循环队列2,第一阈值可以依据经验进行设定。In the embodiment of the present invention, before processing the messages to be sent in the second message circular queue, it is necessary to determine the number of messages stored in the second message circular queue, if the number of messages stored in the second message circular queue is not If the first threshold is exceeded, the message to be sent stored in the first message loop queue can be acquired, and the acquired message to be sent can be stored in the second message loop queue, and then the message to be sent in the second message loop queue can be The message is processed, and the message to be sent after processing is sent to the client. Wherein, the first message circular queue may be the circular queue 1 in FIG. 1 above, the second message circular queue may be the circular queue 2 in FIG. 1 above, and the first threshold may be set based on experience.

举例来说,上述消息处理发送装置从循环队列1中获取消息并保存至循环队列2中,同时对该消息进行处理和发送。具体的,当循环队列1不为空时,如果循环队列2未满,则将循环队列1的头部获取的消息保存至循环队列2中,如果循环队列2已满,则继续查询循环队列2是否已满。在对循环队列2中的消息进行处理时,可以是内部字段数据更新、形变等处理方式。特别地,此时对循环队列2中的消息进行处理与循环队列1的消息接收隔离开来,无需进行加解锁操作。For example, the above-mentioned message processing and sending device acquires a message from the circular queue 1 and saves it in the circular queue 2, and processes and sends the message at the same time. Specifically, when the circular queue 1 is not empty, if the circular queue 2 is not full, save the message obtained by the head of the circular queue 1 to the circular queue 2, and if the circular queue 2 is full, continue to query the circular queue 2 Is it full. When processing the messages in the circular queue 2, the internal field data update, deformation and other processing methods may be used. In particular, at this time, the processing of the messages in the circular queue 2 is isolated from the message reception of the circular queue 1, and there is no need to perform an unlocking operation.

在上述步骤203中将处理之后的待发送的消息发送至客户端之后,若客户端反馈该待发送的消息未发送成功,则将该未发送成功的消息存储至第三消息循环队列中,并将该第三消息循环队列中未发送成功的消息发送至客户端。该待发送的消息未发送成功可以表示为发送失败或发送超时。若该客户端反馈消息发送成功,则将消息发送成功的状态通知给服务器,以使该发送成的消息不被捞取。通过第三消息循环队列来存储未发送成功的消息,可以预防因发送失败或超时的消息的积压导致缓冲区内数据处理的低效的问题。After the processed message to be sent is sent to the client in step 203 above, if the client feeds back that the message to be sent has not been sent successfully, then the message that has not been sent successfully is stored in the third message loop queue, and The unsuccessfully sent messages in the third message loop queue are sent to the client. The failure to send the message to be sent may be indicated as sending failure or sending timeout. If the client feedbacks that the message is successfully sent, it will notify the server of the successful message sending status, so that the sent message will not be retrieved. By using the third message loop queue to store messages that have not been sent successfully, the problem of inefficient data processing in the buffer caused by the backlog of messages that fail to send or time out can be prevented.

进一步地,在将第三消息循环队列中的未发送成功的消息发送至客户端之后,若该未发送成功的消息的发送次数大于第二阈值,则通知服务器该未发送成功的消息发送失败。该第二阈值可以依据经验进行设置,该第三消息循环队列可以是图1中的循环队列3。Further, after the unsuccessfully sent message in the third message loop queue is sent to the client, if the number of times the unsuccessfully sent message is sent is greater than the second threshold, the server is notified that the unsuccessfully sent message fails to be sent. The second threshold can be set according to experience, and the third message circular queue can be the circular queue 3 in FIG. 1 .

具体的,在循环队列3不为空时,从循环队列3中获取消息进行发送,当消息发送次数超过配置参数规定的次数时,更新消息发送失败至服务器,否则就是重新发送消息,直至消息发送次数超过配置参数规定的次数。Specifically, when the circular queue 3 is not empty, obtain the message from the circular queue 3 and send it. When the number of times the message is sent exceeds the number specified by the configuration parameter, the update message fails to be sent to the server; otherwise, the message is resent until the message is sent The number of times exceeds the number specified by the configuration parameter.

优选地,在上述将未发送成功的消息存储至第三消息循环队列中之前,若第三消息循环队列中的未发送成功的消息的数量超过第三阈值,则通知服务器待发送的消息未发送成功,并在设定时间之后从服务器中重新捞取该未发送成功的消息至该第一消息循环队列,避免由于第三消息循环队列满而引起的消息丢失。Preferably, before storing the unsuccessfully sent messages in the third message loop queue, if the number of unsuccessfully sent messages in the third message loop queue exceeds the third threshold, the server is notified that the message to be sent has not been sent success, and re-fetch the unsuccessful message from the server to the first message circular queue after the set time, so as to avoid message loss due to the fullness of the third message circular queue.

为了能更精确的从服务器中捞取待发送的消息,还需要确定上述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量是否小于第四阈值,若是,则从服务器中捞取待发送的消息,否则,说明消息总量过多,无法捞取新的待发送的消息。在捞取之后,将从服务器中捞取的待发送的消息按序存储至第一消息循环队列的尾部。In order to retrieve messages to be sent from the server more accurately, it is also necessary to determine whether the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than the fourth threshold, and if so, Then retrieve the message to be sent from the server, otherwise, it means that the total amount of messages is too large to retrieve a new message to be sent. After fetching, the messages to be sent fetched from the server are sequentially stored at the tail of the first message circular queue.

进一步地,在从服务器中捞取待发送的消息时,若干第一消息循环队列中存储的待发送的消息数量过满,也就是说若上述第一消息循环队列存储的待发送的消息超过第五阈值,则将从服务器捞取的消息丢弃。该第五阈值依据经验设置。Further, when retrieving messages to be sent from the server, the number of messages to be sent stored in several first message circular queues is too full, that is to say, if the number of messages to be sent stored in the above-mentioned first message circular queue exceeds the fifth Threshold, the messages obtained from the server are discarded. The fifth threshold is set based on experience.

为了更好的解释本发明实施例,下面将结合图1、图3、图4、图5和图6来,描述本发明实施例中消息发送的具体流程。In order to better explain the embodiment of the present invention, the specific flow of message sending in the embodiment of the present invention will be described below in conjunction with FIG. 1 , FIG. 3 , FIG. 4 , FIG. 5 and FIG. 6 .

图3示例性的示出了本发明实施例适用的系统部署的结构,消息捞取装置中的消息捞取线程从服务器捞取消息存储到循环队列1中,消息处理发送装置中的消息处理发送线程从循环队列1中获取消息,并保存至循环队列2中,对该循环队列2中的消息进行处理,然后通过Internet发送至客户端。如果消息未发送成功,则保存至循环队列3中,消息存储转发装置中的消息存储转发线程对循环队列3中的消息进行发送。Fig. 3 exemplarily shows the structure of the system deployment applicable to the embodiment of the present invention, the message fetching thread in the message fetching device fetches messages from the server and stores them in the circular queue 1, and the message processing and sending thread in the message processing sending device starts from the loop Obtain messages from queue 1 and save them in circular queue 2, process the messages in circular queue 2, and then send them to the client through the Internet. If the message is not sent successfully, it is stored in the circular queue 3, and the message store-and-forward thread in the message store-and-forward device sends the message in the circular queue 3.

具体的,消息捞取装置所执行的流程如图4所示,该流程具体包括:Specifically, the process performed by the message retrieval device is shown in Figure 4, and the process specifically includes:

步骤401,从配置参数中获取捞取消息触发值n。In step 401, the retrieval message trigger value n is obtained from configuration parameters.

步骤402,判断服务是否运行,若是,则转入步骤403,若否,则转入步骤408。Step 402, determine whether the service is running, if yes, go to step 403, if not, go to step 408.

步骤403,判断三个循环队列消息总量是否小于n,若是则转入步骤404,若否,则重新执行步骤403。In step 403, it is judged whether the total amount of messages in the three circular queues is less than n, and if yes, then go to step 404, if not, then execute step 403 again.

步骤404,从服务器中捞取m条消息。Step 404, retrieve m messages from the server.

步骤405,判断m是否大于0,若是,则转入步骤406,若否,则转入步骤409。Step 405, judge whether m is greater than 0, if yes, go to step 406, if not, go to step 409.

步骤406,判断循环队列1是否未满,若是,则转入步骤407,若否,则转入步骤410。Step 406, judge whether the circular queue 1 is not full, if yes, go to step 407, if not, go to step 410.

步骤407,将消息保存至循环队列1中。Step 407, save the message in circular queue 1.

步骤408,结束服务。Step 408, end the service.

步骤409,线程休眠。Step 409, the thread sleeps.

步骤410,将消息丢弃。Step 410, discarding the message.

上述消息捞取装置主要功能为从服务器获取消息数据并保存至循环队列1中,具体的,消息捞取线程启动,读取配置参数,获得线程睡眠时间片大小,捞取消息触发值大小等,然后在主服务保持运行的情况下,分别获取3个循环队列的剩余消息数,其总量小于捞取消息触发值时,触发消息捞取动作。从服务器捞取消息,如果捞取不到消息,则线程睡眠一段时间后重新进入步骤b;如果捞取到消息,则将消息按序插入到循环队列1中。在将消息保存到循环队列1中时,如果配置的循环队列1长度较短或捞取到的通知消息较多导致循环队列1被塞满,则将消息丢弃。由于服务器中消息状态未被设置为成功或失败,后续这些消息依然会被重新捞取,因此该操作并不会导致消息真正丢失。The main function of the above-mentioned message fetching device is to obtain message data from the server and save it in the circular queue 1. Specifically, the message fetching thread starts, reads the configuration parameters, obtains the thread sleep time slice size, fetches the message trigger value, etc., and then in the main When the service keeps running, the number of remaining messages in the three circular queues is respectively obtained. When the total amount is less than the trigger value for message retrieval, the message retrieval action is triggered. Get messages from the server. If no messages are found, the thread sleeps for a period of time and then re-enters step b; if messages are found, insert messages into circular queue 1 in sequence. When storing messages in circular queue 1, if the configured circular queue 1 is short or the circular queue 1 is full due to the large number of notification messages retrieved, the message will be discarded. Since the message status in the server is not set to success or failure, these messages will still be retrieved later, so this operation will not cause the message to be lost.

消息处理发送装置所执行的流程如图5所示,该流程具体包括:The process performed by the message processing and sending device is shown in Figure 5, and the process specifically includes:

步骤501,启动消息处理发送线程。Step 501, start the message processing and sending thread.

步骤502,判断服务是否运行,若是,则转入步骤503,否则,转入步骤511。Step 502, judge whether the service is running, if yes, go to step 503, otherwise, go to step 511.

步骤503,判断循环队列1是否不为空,若是,则转入步骤504,若否,则转入步骤512。Step 503 , judging whether the circular queue 1 is not empty, if yes, then go to step 504 , if not, then go to step 512 .

步骤504,判断循环队列2是否未满,若是,则转入步骤505,若否,则重新执行步骤504。Step 504, judge whether the circular queue 2 is not full, if yes, go to step 505, if not, re-execute step 504.

步骤505,从循环队列1中的头部获取消息并保存至循环队列2的尾部。Step 505, get the message from the head of the circular queue 1 and save it to the tail of the circular queue 2.

步骤506,对最新获取的消息进行处理。Step 506, process the latest acquired message.

步骤507,将处理后的消息发送至客户端。Step 507, send the processed message to the client.

步骤508,判断消息发送是否未成功,若是,则转入步骤509,若否,则转入步骤513。Step 508, judge whether the message sending is unsuccessful, if yes, go to step 509, if not, go to step 513.

步骤509,判断循环队列3中未用长度是否大于15%,若是,则转入步骤510,若否,则转入步骤514。Step 509, judge whether the unused length in the circular queue 3 is greater than 15%, if yes, go to step 510, if not, go to step 514.

步骤510,将该条消息存储至循环队列3。Step 510, store the message in the circular queue 3.

步骤511,结束。Step 511, end.

步骤512,等待被唤醒或等待超时。Step 512, waiting to be woken up or waiting for timeout.

步骤513,更新消息投递状态至服务器。Step 513, update the delivery status of the message to the server.

步骤514,通知服务器更新该消息时间戳以便后续捞取。Step 514, notify the server to update the timestamp of the message for subsequent retrieval.

该消息处理发送装置主要功能为从循环队列1中获取消息数据并保存至循环队列2中,同时对该消息进行处理和发送,具体的,消息处理发送线程启动,读取配置参数,获得线程超时等待时间片大小等参数信息。在主服务保持运行的情况下,如果循环队列1为空,则线程阻塞等待被唤醒或等待超时后继续查询循环队列1是否为空,当循环队列1不为空时,如果循环队列2未满,则将循环队列1头部获取的消息保存到循环队列2中。如果循环队列2已满,则继续查询循环队列2是否已满,对最新获取的消息进行处理,如内部字段数据更新、形变等等。将处理后的消息发送至客户端,如果发送成功,则更新消息投递状态至服务器,后续该条消息将不再被捞取。如果发送失败或超时,此时若循环队列3的未用长度不足总长度的10%,则直接通知服务器,设定此消息在未来几分钟之后被再次捞取,从而避免由于循环队列3满而引起的消息丢失。否则,将该条消息存储至循环队列3。The main function of the message processing and sending device is to obtain message data from the circular queue 1 and save it in the circular queue 2, and process and send the message at the same time. Specifically, the message processing and sending thread is started, the configuration parameters are read, and the thread timeout is obtained. Wait for parameter information such as time slice size. When the main service keeps running, if the circular queue 1 is empty, the thread blocks and waits to be woken up or waits for a timeout to continue to query whether the circular queue 1 is empty. When the circular queue 1 is not empty, if the circular queue 2 is not full , save the message obtained from the head of circular queue 1 into circular queue 2. If the circular queue 2 is full, continue to inquire whether the circular queue 2 is full, and process the latest acquired messages, such as internal field data update, deformation, and so on. Send the processed message to the client. If the message is sent successfully, update the delivery status of the message to the server, and the message will no longer be retrieved later. If the sending fails or times out, if the unused length of the circular queue 3 is less than 10% of the total length at this time, the server will be notified directly, and the message will be retrieved again after a few minutes in the future, so as to avoid causing the circular queue 3 to be full message is lost. Otherwise, store the message in circular queue 3.

消息存储转发装置所执行的流程如图6所示,该流程具体包括:The process performed by the message store and forward device is shown in Figure 6, and the process specifically includes:

步骤601,从配置参数中获取消息发送尝试次数T。In step 601, the number T of message sending attempts is obtained from configuration parameters.

步骤602,判断服务是否运行,若是,则转入步骤603,若否,则转入步骤609。Step 602, judge whether the service is running, if yes, go to step 603, if not, go to step 609.

步骤603,判断循环队列3是否不为空,若是,则转入步骤604,若否,则转入步骤610。Step 603, judging whether the circular queue 3 is not empty, if yes, then go to step 604, if not, then go to step 610.

步骤604,从循环队列3中获取消息进行处理,并令t=T。Step 604, obtain messages from the circular queue 3 for processing, and set t=T.

步骤605,判断t是否大于0,若是,则转入步骤606,若否,则转入步骤611。Step 605, judge whether t is greater than 0, if yes, go to step 606, if not, go to step 611.

步骤606,将处理后的消息发送至客户端。Step 606, send the processed message to the client.

步骤607,判断消息发送是否未成功,若是,则转入步骤608,若否,则转入步骤612。Step 607, judge whether the message sending is unsuccessful, if yes, go to step 608, if not, go to step 612.

步骤608,令t=t-1。Step 608, let t=t-1.

步骤609,结束。Step 609, end.

步骤610,等待被唤醒或等待超时。Step 610, waiting to be woken up or waiting for timeout.

步骤611,更新消息投递状态至服务器。Step 611, update the delivery status of the message to the server.

步骤612,更新消息投递状态至服务器。Step 612, update the delivery status of the message to the server.

该消息存储转发装置主要功能为将消息处理发送装置投递失败或超时的消息进行存储转发,具体的,消息存储转发线程启动,读取配置参数,获得消息重复发送次数等参数信息。在主服务保持运行的情况下,如果循环队列3为空,则线程阻塞等待被唤醒或等待超时后继续查询循环队列3是否为空,当循环队列3不为空时,从循环队列3获取消息等待发送。当消息发送次数超过配置参数规定的次数时,更新消息发送失败至服务器,否则,将获取的消息进行发送。重复这个过程,直至发送次数满更新消息发送失败至服务器,或发送成功后更新消息发送成功至服务器。The main function of the message store-and-forward device is to store and forward messages that fail to be delivered or timed out by the message processing and sending device. Specifically, the message store-and-forward thread is started, configuration parameters are read, and parameter information such as the number of repeated message transmissions is obtained. When the main service keeps running, if the circular queue 3 is empty, the thread blocks and waits to be woken up or waits for a timeout to continue to query whether the circular queue 3 is empty. When the circular queue 3 is not empty, get the message from the circular queue 3 waiting to be sent. When the number of times the message is sent exceeds the number specified by the configuration parameter, the update message will fail to be sent to the server, otherwise, the obtained message will be sent. Repeat this process until the update message fails to be sent to the server until the number of sending times is full, or the update message is successfully sent to the server after sending successfully.

本发明实施例表明,通过确定第二消息循环队列存储的消息的数量,若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中,对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。通过多个消息循环队列分别存储不同的消息,避免了采用一个队列缓冲区频繁的进行内存分配与释放的问题,从而提高消息发送效率,降低系统开销。The embodiment of the present invention shows that by determining the number of messages stored in the second message loop queue, if the number of messages stored in the second message loop queue does not exceed the first threshold, then obtain the messages to be sent stored in the first message loop queue message, and store it in the second message loop queue, process the message to be sent in the second message loop queue, and send the processed message to be sent to the client. By storing different messages in multiple message loop queues, the problem of frequent memory allocation and release using one queue buffer is avoided, thereby improving message sending efficiency and reducing system overhead.

基于相同的技术构思,图7示出了本发明实施例提供的一种消息发送装置的结构,该装置可以执行消息发送方法的流程。Based on the same technical concept, FIG. 7 shows the structure of a message sending device provided by an embodiment of the present invention, and the device can execute the flow of the message sending method.

如图7所示,该装置具体包括:As shown in Figure 7, the device specifically includes:

确定单元701,用于确定第二消息循环队列存储的消息的数量;A determining unit 701, configured to determine the number of messages stored in the second message circular queue;

获取单元702,用于若所述第二消息循环队列存储的消息的数量未超过第一阈值,则获取第一消息循环队列存储的待发送的消息,并存储至所述第二消息循环队列中;The acquiring unit 702 is configured to acquire the messages to be sent stored in the first message loop queue and store them in the second message loop queue if the number of messages stored in the second message loop queue does not exceed the first threshold ;

处理单元703,用于对所述第二消息循环队列中的待发送的消息进行处理,并将处理之后的待发送的消息发送至客户端。The processing unit 703 is configured to process the messages to be sent in the second message circular queue, and send the processed messages to be sent to the client.

优选地,所述处理单元703还用于:Preferably, the processing unit 703 is further configured to:

在将处理之后的待发送的消息发送至客户端之后,若所述客户端反馈所述待发送的消息未发送成功,则将所述未发送成功的消息存储至第三消息循环队列中;After sending the processed message to be sent to the client, if the client feeds back that the message to be sent has not been sent successfully, storing the message that was not sent successfully in a third message loop queue;

将所述第三消息循环队列中的未发送成功的消息发送至所述客户端。Send the unsuccessfully sent messages in the third message loop queue to the client.

优选地,所述处理单元703还用于:Preferably, the processing unit 703 is further configured to:

将所述第三消息循环队列中的未发送成功的消息发送至所述客户端之后,若所述未发送成功的消息的发送次数大于第二阈值,则通知服务器所述未发送成功的消息发送失败。After sending the unsuccessfully sent messages in the third message loop queue to the client, if the number of times the unsuccessfully sent messages are sent is greater than a second threshold, then notify the server that the unsuccessfully sent messages are sent fail.

优选地,所述处理单元703还用于:Preferably, the processing unit 703 is further configured to:

在将所述未发送成功的消息存储至第三消息循环队列中之前,若所述第三消息循环队列中的未发送成功的消息的数量超过第三阈值,则通知服务器所述待发送的消息未发送成功,并在设定时间之后从所述服务器中重新捞取所述未发送成功的消息至所述第一消息循环队列。Before storing the unsuccessfully sent messages in the third message loop queue, if the number of unsuccessfully sent messages in the third message loop queue exceeds a third threshold, then notify the server of the messages to be sent Not successfully sent, and after a set time, retrieve the failed message from the server to the first message circular queue.

优选地,所述确定单元701,还用于确定所述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量是否小于第四阈值;Preferably, the determining unit 701 is further configured to determine whether the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than a fourth threshold;

所述获取单元702,还用于若所述第一消息循环队列、第二消息循环队列和第三消息循环队列中存储的消息的总量小于第四阈值,则从所述服务器中捞取待发送的消息;并将从服务器中捞取的待发送的消息按序存储至所述第一消息循环队列的尾部。The acquiring unit 702 is further configured to retrieve messages to be sent from the server if the total amount of messages stored in the first message loop queue, the second message loop queue, and the third message loop queue is less than a fourth threshold. and store the messages retrieved from the server to the tail of the first message circular queue in sequence.

优选地,所述处理单元703还用于:Preferably, the processing unit 703 is further configured to:

若所述客户端反馈消息发送成功,则将消息发送成功的状态通知给服务器,以使所述发送成功的消息不被捞取。If the client feedbacks that the message is successfully sent, it notifies the server of the successful message sending status, so that the successfully sent message will not be retrieved.

优选地,所述处理单元703还用于:Preferably, the processing unit 703 is further configured to:

若所述第一消息循环队列存储的待发送的消息超过第五阈值,将从所述服务器捞取的消息丢弃。If the messages to be sent stored in the first message circular queue exceed the fifth threshold, the messages retrieved from the server are discarded.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (14)

1. a message method, it is characterised in that including:
Determine the quantity of the message of the second Message Rotation Queue storage;
If the quantity of the message of described second Message Rotation Queue storage is not less than first threshold, then obtain the first message loop team The message to be sent of row storage, and store to described second Message Rotation Queue;
Message to be sent in described second Message Rotation Queue is processed, and will process after message to be sent Send to client.
2. the method for claim 1, it is characterised in that the message to be sent after processing sends to client Afterwards, also include:
If message to be sent described in described client feedback does not sends successfully, then by described do not send successful message store to In 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
3. method as claimed in claim 2, it is characterised in that by not sending successfully in described 3rd Message Rotation Queue Message sends after described client, also includes:
If the described transmission times of successful message that do not sends is more than Second Threshold, then do not send successfully described in notice server Message sends unsuccessfully.
4. method as claimed in claim 2, it is characterised in that do not sending successful message store described to the 3rd message Before in round-robin queue, also include:
If the quantity not sending successful message in described 3rd Message Rotation Queue is more than the 3rd threshold value, then notify server Described message to be sent does not sends successfully, and does not sends into described in again fishing for from described server after a set time The message of merit is to described first Message Rotation Queue.
5. the method as described in any one of Claims 1-4, it is characterised in that also include:
Determine the message of storage in described first Message Rotation Queue, the second Message Rotation Queue and the 3rd Message Rotation Queue Whether total amount is less than the 4th threshold value;
From described server, the most then fish for message to be sent;
The message to be sent fished for from server is sequentially stored the afterbody to described first Message Rotation Queue.
6. the method as described in any one of Claims 1-4, it is characterised in that also include:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that described Send successful message not fished for.
7. the method as described in any one of Claims 1-4, it is characterised in that also include:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, by fish for from described server Message abandons.
8. a message dispensing device, it is characterised in that including:
Determine unit, for determining the quantity of the message of the second Message Rotation Queue storage;
Acquiring unit, if for the quantity of message of described second Message Rotation Queue storage not less than first threshold, then obtaining The message to be sent of the first Message Rotation Queue storage, and store to described second Message Rotation Queue;
Processing unit, for processing the message to be sent in described second Message Rotation Queue, and by after process Message to be sent send to client.
9. device as claimed in claim 8, it is characterised in that described processing unit is additionally operable to:
Message to be sent after processing sends after client, if to be sent disappearing described in described client feedback Breath does not sends successfully, then do not send successful message store described to the 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
10. device as claimed in claim 9, it is characterised in that described processing unit is additionally operable to:
The successful message that do not sends in described 3rd Message Rotation Queue is sent after described client, does not sends out if described Send the transmission times of successful message more than Second Threshold, then do not send successful message described in notice server and send unsuccessfully.
11. devices as claimed in claim 9, it is characterised in that described processing unit is additionally operable to:
Do not sending before successful message stores to the 3rd Message Rotation Queue by described, if described 3rd message loop team The quantity not sending successful message in row is more than the 3rd threshold value, then message to be sent described in notice server does not sends into Merit, and do not send successful message described in again fishing for from described server after a set time and follow to described first message Ring queue.
12. devices as described in any one of claim 9 to 11, it is characterised in that described determine unit, are additionally operable to determine described In first Message Rotation Queue, the second Message Rotation Queue and the 3rd Message Rotation Queue, whether the total amount of the message of storage is less than 4th threshold value;
Described acquiring unit, if being additionally operable to described first Message Rotation Queue, the second Message Rotation Queue and the 3rd message loop In queue, the total amount of the message of storage is less than the 4th threshold value, then fish for message to be sent from described server;And will be from clothes The message to be sent fished in business device sequentially stores the afterbody to described first Message Rotation Queue.
13. devices as described in any one of claim 9 to 11, it is characterised in that described processing unit is additionally operable to:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that described Send successful message not fished for.
14. devices as described in any one of claim 9 to 11, it is characterised in that described processing unit is additionally operable to:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, by fish for from described server Message abandons.
CN201610673429.6A 2016-08-16 2016-08-16 Message transmitting method and apparatus Pending CN106330766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610673429.6A CN106330766A (en) 2016-08-16 2016-08-16 Message transmitting method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610673429.6A CN106330766A (en) 2016-08-16 2016-08-16 Message transmitting method and apparatus

Publications (1)

Publication Number Publication Date
CN106330766A true CN106330766A (en) 2017-01-11

Family

ID=57740615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610673429.6A Pending CN106330766A (en) 2016-08-16 2016-08-16 Message transmitting method and apparatus

Country Status (1)

Country Link
CN (1) CN106330766A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102582A (en) * 2017-04-07 2017-08-29 深圳怡化电脑股份有限公司 The synchronous method and device of a kind of subsystem command
CN108228363A (en) * 2017-12-22 2018-06-29 中国银联股份有限公司 A kind of message method and device
CN110113495A (en) * 2019-05-10 2019-08-09 北京奇艺世纪科技有限公司 Long-range control method, device, electronic equipment and the system of APP
CN111338810A (en) * 2018-12-19 2020-06-26 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN112100556A (en) * 2020-08-25 2020-12-18 福建天泉教育科技有限公司 Method and system for optimizing message pushing mode
CN112532681A (en) * 2020-10-16 2021-03-19 深圳市科漫达智能管理科技有限公司 Parking lot software data exception handling method and device
CN112764947A (en) * 2021-01-15 2021-05-07 百果园技术(新加坡)有限公司 Message data pulling method, device, equipment and storage medium
CN116170385A (en) * 2023-04-21 2023-05-26 四川汉科计算机信息技术有限公司 Gateway information forwarding system, method, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997661A (en) * 2009-08-14 2011-03-30 华为技术有限公司 Data packet sending method, data packet acquiring method and device
CN103428072A (en) * 2012-05-23 2013-12-04 北京大学 Persistent message publishing method and system
CN103516580A (en) * 2012-06-26 2014-01-15 北京大学 Method of realizing message receiving and forwarding based on message queue and system thereof
CN104936156A (en) * 2015-06-25 2015-09-23 走遍世界(北京)信息技术有限公司 Short message sending method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997661A (en) * 2009-08-14 2011-03-30 华为技术有限公司 Data packet sending method, data packet acquiring method and device
CN103428072A (en) * 2012-05-23 2013-12-04 北京大学 Persistent message publishing method and system
CN103516580A (en) * 2012-06-26 2014-01-15 北京大学 Method of realizing message receiving and forwarding based on message queue and system thereof
CN104936156A (en) * 2015-06-25 2015-09-23 走遍世界(北京)信息技术有限公司 Short message sending method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102582A (en) * 2017-04-07 2017-08-29 深圳怡化电脑股份有限公司 The synchronous method and device of a kind of subsystem command
CN108228363A (en) * 2017-12-22 2018-06-29 中国银联股份有限公司 A kind of message method and device
CN111338810A (en) * 2018-12-19 2020-06-26 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN110113495A (en) * 2019-05-10 2019-08-09 北京奇艺世纪科技有限公司 Long-range control method, device, electronic equipment and the system of APP
CN112100556A (en) * 2020-08-25 2020-12-18 福建天泉教育科技有限公司 Method and system for optimizing message pushing mode
CN112532681A (en) * 2020-10-16 2021-03-19 深圳市科漫达智能管理科技有限公司 Parking lot software data exception handling method and device
CN112764947A (en) * 2021-01-15 2021-05-07 百果园技术(新加坡)有限公司 Message data pulling method, device, equipment and storage medium
CN112764947B (en) * 2021-01-15 2023-12-26 百果园技术(新加坡)有限公司 Message data pulling method, device, equipment and storage medium
CN116170385A (en) * 2023-04-21 2023-05-26 四川汉科计算机信息技术有限公司 Gateway information forwarding system, method, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106330766A (en) Message transmitting method and apparatus
CN107450971B (en) Task processing method and device
US20220413927A1 (en) Background Job Processing Framework
US8516054B2 (en) Message handling
CN112416614B (en) Data processing method, system and server based on message queue
CN111949386A (en) Task scheduling method, system, computing device and readable storage medium
US10325219B2 (en) Parallel retrieval of training data from multiple producers for machine learning systems
US20150040140A1 (en) Consuming Ordered Streams of Messages in a Message Oriented Middleware
CN106503017A (en) A kind of distributed reptile system task grasping system and method
JP2019503525A5 (en)
JP6198825B2 (en) Method, system, and computer program product for asynchronous message sequencing in a distributed parallel environment
JP2018504670A5 (en)
CN114490112B (en) Message processing method, device and system
CN105933369A (en) Message forwarding method and device
CN107613529A (en) Message processing method and base station
CN107222555B (en) Message processing method and device
CN113448699A (en) Distributed timed task processing system, method and related device
CN112231069A (en) Transaction identification processing method, device and electronic device
CN112306827B (en) Log acquisition device, method and computer readable storage medium
CN115277557B (en) Broadcast processing method, device, electronic equipment and storage medium
CN112748855A (en) Method and device for processing high-concurrency data request
US20200293370A1 (en) Usecase specification and runtime execution to serve on-demand queries and dynamically scale resources
CN106598497B (en) A kind of server cluster date storage method and device
CN113672364B (en) Task scheduling method and device, electronic equipment and storage medium
CN114647491B (en) A task scheduling method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170111