CN104951373A - Message queue processing method of scheduling system - Google Patents

Message queue processing method of scheduling system Download PDF

Info

Publication number
CN104951373A
CN104951373A CN201510289360.2A CN201510289360A CN104951373A CN 104951373 A CN104951373 A CN 104951373A CN 201510289360 A CN201510289360 A CN 201510289360A CN 104951373 A CN104951373 A CN 104951373A
Authority
CN
China
Prior art keywords
message
label
priority
message queue
labels
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.)
Granted
Application number
CN201510289360.2A
Other languages
Chinese (zh)
Other versions
CN104951373B (en
Inventor
张鹏
魏义登
倪继建
高创
郭顺利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chang Guangyu
Suirui Technology Group Co Ltd
Original Assignee
Zhejiang Uhope Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uhope Communications Technology Co Ltd filed Critical Zhejiang Uhope Communications Technology Co Ltd
Priority to CN201510289360.2A priority Critical patent/CN104951373B/en
Publication of CN104951373A publication Critical patent/CN104951373A/en
Application granted granted Critical
Publication of CN104951373B publication Critical patent/CN104951373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a message queue processing method of a scheduling system. The message queue processing method of the scheduling system solves the problem that messages of an existing scheduling system are not processed properly. The message queue processing method of the scheduling system includes the following steps that messages sent by an access terminal of the scheduling system are received, and each message is provided with a first label and a second label, wherein the first labels represent message types, the priorities of different first labels are different, the second labels represent the priorities of the messages in the message types, and the priorities of the first labels are higher than the priority of the second labels; according to the first labels and the second labels, the messages are arrayed in sequence according to the priorities to form a message queue; a message processing module obtains the messages from the message queue to performing processing. The message queue processing method of the scheduling system has the advantages that when multiple client sides perform automatic operation, the response speed of the system is remarkably improved, the system resource is reduced, the stability of the system is improved, and the immediate response of usage scenarios of the scheduling system is achieved.

Description

The message queue disposal route of dispatching system
Technical field
The invention belongs to communication technique field, especially relate to a kind of message queue disposal route of dispatching system.
Background technology
In dispatching services system, message queue is the container preserving message in the transmitting procedure of message, the fundamental purpose of message queue is to provide route and ensures the transmission of message, communicated by message between all nodes, the operation of scheduling strategy to whole cluster of message queue has vital effect.Scheduling operation message in traditional dispatching services system, dispatching response message and module responds message add message queue according to time order and function relation, message processing module therefrom obtains message from message queue and processes, the scheduling strategy design of this kind of mode message queue is unreasonable, the message still simultaneously sent for two different disposal ranks cannot accomplish to respond fast for high-priority message, and receive a low priority message, receive a high-priority message at once, two message operate identical member, existing dispatching system first can process low priority message, receive high-priority message, operation before covering, wherein just there is necessity that original low priority message does not process, and need the rollback operation doing low priority message before the overlapping operation of process high-priority message, considerably increase the complicacy of system, and in the message handling task that message is assigned in the many message handling tasks of pending message or priority ratio is lower, so just may cause in the message handling task that timely message blocks in the message handling task that pending message is many or priority is lower, and then cause timely message time-out or process not in time, timely message can not get rapid process, the operational efficiency of whole dispatching services system is finally caused to be affected.
In order to solve prior art Problems existing, people have carried out long-term exploration, propose solution miscellaneous.Such as, Chinese patent literature discloses a kind of method and device application number that timely message processes in time: 200910087065.3], the method comprises: pending message is divided into timely message and non-timely message, and timely message and non-timely message is inserted into accordingly in the message queue of message handling task respectively; Judge whether contain pending timely message in message handling task, when containing pending timely message, then improve the priority of this message handling task; This message handling task processes pending timely message according to the priority after raising again.Correspondingly, the invention provides the device that a kind of timely message processes in time, comprising: message queue creation module, scheduler task module and message handling task module.
Such scheme to some extent solves the problem that in existing message queue, message cannot process in time, but the program still also exists: processing procedure is loaded down with trivial details, and response speed is low, the problem that system resource is high.
Summary of the invention
The object of the invention is for the problems referred to above, provide a kind of simple and reasonable, the message queue disposal route of the dispatching system of good stability.
For achieving the above object, present invention employs following technical proposal: the message queue disposal route of this dispatching system, it is characterized in that, this method comprises the steps:
A, receipt message: receive by the message sent that accesses terminal of dispatching system, described message is all with the first label and the second label, wherein the first tag characterization type of message and the priority of the first different labels is different, the priority of this message in second tag characterization the type message, the priority of the first described label is higher than the priority of the second label;
B, form message queue: message to be arranged in order according to right of priority according to the first label and the second label thus to form message queue;
C, message call: message processing module therefrom obtains message from message queue and processes.
This method can realize the summary responses of dispatching system use scenes, the message still simultaneously sent for two different disposal ranks can realize responding fast for high-priority message, improve the response speed of system, decrease system resource, improve the stability of system.
In the message queue disposal route of above-mentioned dispatching system, when receive same type message and priority higher than the type when the priority of first message, current message is inserted in described the type before first message, then judge current message and whether be that identical member is operated in first message, if identical member, then described the type is abandoned in first message; If different members, then retain described the type in first message.When receiving a low priority message, receive a high-priority message at once, and two message are when being to identical member, first can process high-priority message, after the low priority message that receives then directly abandon, improve system performance, reduce the complexity of system, and the sequence problem that identical message different operating is introduced well is improved.
In the message queue disposal route of above-mentioned dispatching system, the first described label comprises dispatching response label, module responds label and scheduling operation label, and wherein, dispatching response label is the first priority, module responds label is the second priority, and scheduling operation label is the 3rd priority.
In the message queue disposal route of above-mentioned dispatching system, the second described label is dynamic labels.
In the message queue disposal route of above-mentioned dispatching system, when a new message is received, utilize the pointer that Hash lookup algorithm is corresponding to the second label lookup according to the first label, the message queue described in being inserted by described new information.
Compared with prior art, the advantage of the message queue disposal route of this dispatching system is: the response speed obviously improving system when multiple client carries out automation mechanized operation, decrease system resource, situation about calling out improves the stability of system, realizes the summary responses of dispatching system use scenes.
Accompanying drawing explanation
Structured flowchart when Fig. 1 is receipt message in the present invention.
Fig. 2 is structured flowchart when forming message queue in the present invention.
Structured flowchart when Fig. 3 is message call in the present invention.
In figure, message 1, message queue 2, message processing module 3, dispatching response label B, the first priority scheduling responsive tags B1, the second priority scheduling responsive tags B2, module responds label C, the first priority block responsive tags C1, the second priority block responsive tags C2, scheduling operation label A, the first operation of priority scheduling operation label A 1, second priority scheduling label A 2, pointer P.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described in detail.
As Figure 1-3, the message queue disposal route of this dispatching system, comprise the steps: A, receipt message: receive by the message 1 sent that accesses terminal of dispatching system, message 1 is all with the first label and the second label, wherein the first tag characterization message 1 type and the priority of the first different labels is different, the priority of this message 1 in second tag characterization the type message 1, the priority of the first label is higher than the priority of the second label; B, form message queue: message 1 to be arranged in order according to right of priority according to the first label and the second label thus to form message queue 2; C, message call: message processing module 3 therefrom obtains message 1 from message queue 2 and processes, this method can realize the summary responses of dispatching system use scenes, the message 1 still simultaneously sent for two different disposal ranks can realize responding fast for high-priority message 1, improve the response speed of system, decrease system resource, improve the stability of system.
Particularly, in the present embodiment, when receive same type message 1 and priority higher than the type when the priority of first message 1, current message 1 is inserted in described the type before first message 1, then judge current message 1 and whether be that identical member is operated in first message 1, if identical member, then described the type is abandoned in first message 1; If different members, then retain described the type in first message 1, namely when receiving a low priority message 1, receive a high-priority message 1 at once, and when two message 1 are to identical member, first can process high-priority message 1, after the low priority message 1 that receives directly abandon, improve system performance, reduce the complexity of system, and the sequence problem that identical message 1 different operating is introduced well is improved.
Wherein, the first label in the present embodiment comprises dispatching response label B, module responds label C and scheduling operation label A, wherein, dispatching response label B is the first priority, module responds label C is the second priority, scheduling operation label A is the 3rd priority, and the second label is here dynamic labels.Suppose according to the second label, all have two priority in dispatching response label B, module responds label C and scheduling operation label A, then dispatching response label B is here divided into the first priority scheduling responsive tags B1 and the second priority scheduling responsive tags B2; Module responds label C is divided into the first priority block responsive tags C1 and the second priority block responsive tags C2; Scheduling operation label A is divided into the first priority scheduling operation label A 1 and the second priority scheduling operation label A 2.
When receiving new information 1, suppose that pointer P points to dispatching response label B and points to the second priority scheduling responsive tags B2, then utilize the pointer P that Hash lookup algorithm is corresponding to the second label lookup according to the first label, described new information 1 is inserted message queue 2.
Specific embodiment described herein is only to the explanation for example of the present invention's spirit.Those skilled in the art can make various amendment or supplement or adopt similar mode to substitute to described specific embodiment, but can't depart from spirit of the present invention or surmount the scope that appended claims defines.
Although more employ message 1, message queue 2, message processing module 3, dispatching response label B, the first priority scheduling responsive tags B1, the second priority scheduling responsive tags B2, module responds label C, the first priority block responsive tags C1, the second priority block responsive tags C2, scheduling operation label A, the first term such as the operation of priority scheduling operation label A 1, second priority scheduling label A 2, pointer P etc. herein, do not get rid of the possibility using other term.These terms are used to be only used to describe and explain essence of the present invention more easily; The restriction that they are construed to any one additional is all contrary with spirit of the present invention.

Claims (5)

1. a message queue disposal route for dispatching system, it is characterized in that, this method comprises the steps:
A, receipt message: receive by the message (1) sent that accesses terminal of dispatching system, described message (1) is all with the first label and the second label, wherein the first tag characterization message (1) type and the priority of the first different labels is different, the priority of this message (1) in second tag characterization the type message (1), the priority of the first described label is higher than the priority of the second label;
B, form message queue: message (1) to be arranged in order according to right of priority according to the first label and the second label thus to form message queue (1);
C, message call: message processing module (2) therefrom obtains message (1) from message queue (1) and processes.
2. the message queue disposal route of dispatching system according to claim 1, it is characterized in that, when receive same type message (1) and priority higher than the type when the priority of first message (1), current message (1) is inserted in described the type front in first message (1), then judge current message (1) and whether be that identical member is operated in first message (1), if identical member, then described the type is abandoned in first message (1); If different members, then retain described the type in first message (1).
3. the message queue disposal route of dispatching system according to claim 1 and 2, it is characterized in that, the first described label comprises dispatching response label (B), module responds label (C) and scheduling operation label (A), wherein, dispatching response label (B) is the first priority, module responds label (C) is the second priority, and scheduling operation label (A) is the 3rd priority.
4. the message queue disposal route of dispatching system according to claim 3, is characterized in that, the second described label is dynamic labels.
5. the message queue disposal route of dispatching system according to claim 3, it is characterized in that, when receiving new information (1), utilize the pointer that Hash lookup algorithm is corresponding to the second label lookup according to the first label, the message queue (1) described in being inserted by described new information (1).
CN201510289360.2A 2015-05-28 2015-05-28 The message queue processing method of scheduling system Active CN104951373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510289360.2A CN104951373B (en) 2015-05-28 2015-05-28 The message queue processing method of scheduling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510289360.2A CN104951373B (en) 2015-05-28 2015-05-28 The message queue processing method of scheduling system

Publications (2)

Publication Number Publication Date
CN104951373A true CN104951373A (en) 2015-09-30
CN104951373B CN104951373B (en) 2018-11-27

Family

ID=54166041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510289360.2A Active CN104951373B (en) 2015-05-28 2015-05-28 The message queue processing method of scheduling system

Country Status (1)

Country Link
CN (1) CN104951373B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124716A (en) * 2019-12-26 2020-05-08 中国航空工业集团公司沈阳飞机设计研究所 Multi-priority queue message transmission method in unmanned aerial vehicle
CN113905336A (en) * 2021-11-18 2022-01-07 中国平安财产保险股份有限公司 Text recognition-based short message sending method, device, equipment and storage medium
CN113923169A (en) * 2021-10-11 2022-01-11 浙江大华技术股份有限公司 Message filtering method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859122A (en) * 2006-02-23 2006-11-08 华为技术有限公司 Method and device for realizing classified service to business provider
CN101366010A (en) * 2005-12-22 2009-02-11 直观外科手术公司 Multi-priority messaging
CN101582786A (en) * 2009-06-17 2009-11-18 中兴通讯股份有限公司 Instant handling method and device of instant messages
US20140173264A1 (en) * 2012-12-17 2014-06-19 Itron, Inc. Priority activation of metrology driver in boot sequence

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101366010A (en) * 2005-12-22 2009-02-11 直观外科手术公司 Multi-priority messaging
CN1859122A (en) * 2006-02-23 2006-11-08 华为技术有限公司 Method and device for realizing classified service to business provider
CN101582786A (en) * 2009-06-17 2009-11-18 中兴通讯股份有限公司 Instant handling method and device of instant messages
US20140173264A1 (en) * 2012-12-17 2014-06-19 Itron, Inc. Priority activation of metrology driver in boot sequence

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124716A (en) * 2019-12-26 2020-05-08 中国航空工业集团公司沈阳飞机设计研究所 Multi-priority queue message transmission method in unmanned aerial vehicle
CN113923169A (en) * 2021-10-11 2022-01-11 浙江大华技术股份有限公司 Message filtering method and device, storage medium and electronic device
CN113905336A (en) * 2021-11-18 2022-01-07 中国平安财产保险股份有限公司 Text recognition-based short message sending method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN104951373B (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN110677277B (en) Data processing method, device, server and computer readable storage medium
CN111818136B (en) Data processing method, device, electronic equipment and computer readable medium
CN102301664B (en) Method and device for dispatching streams of multicore processor
CN107133109B (en) Method and device for communication between modules and computing equipment
CN104951373A (en) Message queue processing method of scheduling system
CN104683472A (en) Data transmission method capable of supporting large data volume
CN109783573B (en) Multi-path pushed data synchronization method and terminal
CN114461393A (en) Multitask scheduling method, multitask scheduling device, electronic equipment, multitask scheduling system and automatic driving vehicle
CN105530207A (en) Switch port arbitration circuit and method in support of multi-type data frames
CN104866528A (en) Multi-platform data acquisition method and system
CN102821045B (en) Method and device for copying multicast message
CN102984083A (en) Queue management method and device
CN107968848B (en) A kind of method, terminal device and storage medium obtaining IP address
AU2013347470A1 (en) Traffic management scheduling method and apparatus
CN103440213A (en) Network card driving method applied to system with multiple CPUs (Central Processing Unit) and network cards
CN117271137A (en) Multithreading data slicing parallel method
CN109756503B (en) Communication protocol design method of fire-fighting robot
CN102117261B (en) Communication method between inner processors of chip
CN105763481A (en) Information caching method and device
CN101349975B (en) Method for implementing interrupt bottom semi-section mechanism in embedded operation system
CN116361031A (en) Message transmission method, system, device, processor and electronic equipment
CN114513504A (en) Message queue multi-cloud adaptation method, device and equipment and readable storage medium
CN103150162B (en) Improve the method for embedded software code degree of share
CN112417015A (en) Data distribution method and device, storage medium and electronic device
CN110888741A (en) Resource scheduling method and device for application container, server and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211130

Address after: Room 101, floor 1, building 19, yard 1, Baosheng South Road, Haidian District, Beijing 100192

Patentee after: Suirui Technology Group Co.,Ltd.

Address before: 100192 Beijing suirui center, building 19, Aobei Science Park, 1 Baosheng South Road, Haidian District, Beijing

Patentee before: Chang Guangyu

Effective date of registration: 20211130

Address after: 100192 Beijing suirui center, building 19, Aobei Science Park, 1 Baosheng South Road, Haidian District, Beijing

Patentee after: Chang Guangyu

Address before: 310052 floor 22, Hengxin building, No. 588 Jiangnan Avenue, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: ZHEJIANG UHOPE COMMUNICATIONS TECHNOLOGY Co.,Ltd.