Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method and device for triggering delayed tasks based on message queue system

A message queue and message technology, applied in the computer field, can solve the problems of many scan times, high database implementation cost, delayed task delay, etc.

Active Publication Date: 2020-10-20
ADVANCED NEW TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, the above method of triggering delayed tasks has many disadvantages. First, the implementation cost of the database is relatively high; second, the timer scans the database at fixed intervals. If the interval is too small, higher requirements are placed on the performance of the database. (more queries), and if the interval time is too large, the timing of finding data that meets the conditions will be delayed, resulting in a delay in the triggering of the delayed task
Again, there are too many invalid scans, which wastes machine performance. For example, if the data meets the conditions after 3 minutes and scans once every 10 seconds, the data will be read for 60 seconds*3 / 10 seconds=18 times before the data meets the conditions.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for triggering delayed tasks based on message queue system
  • A method and device for triggering delayed tasks based on message queue system
  • A method and device for triggering delayed tasks based on message queue system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] Message queuing technology is a technology for exchanging information between distributed applications, which can be used to achieve system decoupling and improve system response time. figure 1 An example of a system architecture diagram of a message queue system, such as figure 1 As shown, a message queue system may include three parts: Producer11, Message Queue (Message Queue)12, Consumer13. The delivery process of a message may include: Producer11 as the producer of the message (transmitted data is the message, for example, various types of data files, or a processing request sent by an application to other applications, etc.), can send a produced A message 14 is sent to the message queue 12, and the Consumer 13 can pull the message from the message queue 12 for consumption (for example, trigger a certain task according to the pulled message).

[0028] In the example of the present disclosure, the above-mentioned message queue 12 can be called a message queue server...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a message queue system-based delay task triggering method and apparatus. The method comprises the steps of producing messages corresponding to delay tasks by a message queue client as a producer, wherein the messages include task information required for triggering the delay tasks; sending the messages to a message queue by the message queue client as the producer, wherein the messages are arranged in the message queue according to a timeout sequence, and delay time of the delay tasks corresponding to the messages of the same message queue is same; and sending the messages to the message queue client as a consumer according to an arrangement sequence by the message queue, and triggering the corresponding delay tasks in sequence according to the task information by the message queue client of the consumer when the messages are timed out. Therefore, the trigging delay and cost of the delay tasks are shortened and reduced.

Description

technical field [0001] The present disclosure relates to the field of computer technology, in particular to a method and device for triggering delayed tasks based on a message queue system. Background technique [0002] One type of business requirement is as follows: Taking the transfer business as an example, the transfer business is estimated to arrive in three minutes, and each transfer will be checked after three minutes to see if the business has arrived, and an alarm will be issued if it does not arrive. The above query of whether the transfer business has arrived is a delayed task, that is, after the transfer has occurred for a period of time (for example, three minutes), it will be checked whether it has arrived, rather than immediately. In order to trigger the delayed task after the delayed task reaches the timeout time, the current mainstream implementation method can be that every time a transfer occurs, the corresponding information is written into the database (...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/54
CPCG06F9/546
Inventor 林育智
Owner ADVANCED NEW TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products