CN101582786B - Instant handling method and device of instant messages - Google Patents
Instant handling method and device of instant messages Download PDFInfo
- Publication number
- CN101582786B CN101582786B CN2009100870653A CN200910087065A CN101582786B CN 101582786 B CN101582786 B CN 101582786B CN 2009100870653 A CN2009100870653 A CN 2009100870653A CN 200910087065 A CN200910087065 A CN 200910087065A CN 101582786 B CN101582786 B CN 101582786B
- Authority
- CN
- China
- Prior art keywords
- message
- timely
- priority
- instant
- processing task
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000012545 processing Methods 0.000 claims description 212
- 238000013507 mapping Methods 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 16
- 230000007306 turnover Effects 0.000 claims description 14
- 238000000638 solvent extraction Methods 0.000 claims 1
- 239000013307 optical fiber Substances 0.000 description 4
- 230000006854 communication Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/107—Computer-aided management of electronic mailing [e-mailing]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/226—Delivery according to priorities
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Entrepreneurship & Innovation (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- Computer Hardware Design (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Data Mining & Analysis (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses an instant handling method of instant messages, which is characterized by creating message queues based on message levels. The method comprises the following steps: dividing the messages to be handled into instant messages and non-instant messages and correspondingly inserting the instant messages and non-instant messages into the message queues of message handling task; judging whether the message handling task contains the instant messages to be handled, if so, increasing the priority level of the message handling task; handling the instant messages to be handled by the message handling task according to the increased priority level. Accordingly, the invention provides an instant handling device of instant messages, comprising a message queue creating module, a scheduler task module and a message handling task module; therefore, by the invention, the purpose of instant handling of instant messages can be effectively achieved.
Description
Technical Field
The present invention relates to information processing technologies, and in particular, to a method and an apparatus for timely processing a timely message.
Background
Message Queues (Message Queues) are containers that hold messages during their transmission, and the main purpose of a Message queue is to provide routing and guarantee delivery of messages, for example: the recipient is unavailable when the message is sent and the message queue will hold the message until it can be successfully delivered. The message queue is the simplest method for changing parallel access into serial access, and can realize asynchronous response of messages, thereby reducing many resource sharing problems to be considered in parallel access. Moreover, the function expansion is relatively easy, namely only corresponding message queues and message processing tasks need to be added. Therefore, the asynchronous response of the message improves the system performance, the priority is given to the message processing task, and the message processing speed is high when the priority of the message processing task is high. Therefore, the processing speed of the message in the corresponding message queue can be improved by improving the priority of the message processing task.
However, by increasing the priority of the message processing task, it is not possible to treat different messages in the message queue corresponding to the task differently. In a preemptive multitasking system, especially in an embedded system, some services are limited by time, and messages corresponding to the services need to be processed in time, and if the processing is not timely, the services and even the system performance are affected. Thus, such messages that need to be processed in a timely manner are often referred to as timely messages, such as: in an embedded system, a first-in first-out (FIFO) message queue is created through MSG _ Q _ FIFO, and when an optical fiber breaks in the communication process, the alarm message reporting the optical fiber break needs to be processed in time, and then the optical fiber can be switched to a standby optical fiber as soon as possible. Some messages have no time limit or have low requirements on processing time, so that the messages need to be processed in time preferentially. Therefore, if all messages are processed simply in a first-in first-out manner, if the timely messages are distributed to the message processing tasks with more messages to be processed or the message processing tasks with lower priorities, the timely messages may be blocked in the message processing tasks with more messages to be processed or the message processing tasks with lower priorities, and further the timely messages are overtime or not timely processed, and finally the service is affected.
Therefore, the problem that timely messages cannot be processed timely due to the fact that only task priorities are considered and message priorities are ignored is urgently needed to be solved, but an effective solution is not provided at present.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and an apparatus for timely processing a timely message, so as to effectively achieve the purpose of timely processing the timely message.
In order to achieve the above purpose, the invention discloses a method for timely processing a timely message, which creates a message queue based on message level, and comprises the following steps: dividing the message to be processed into a timely message and a non-timely message, setting message level parameters of the non-timely message and the timely message corresponding to the non-timely message and the timely message respectively, correspondingly inserting the non-timely message into the tail part of a message queue according to the set message level parameters, and correspondingly inserting the timely message into the head part of the message queue; judging whether the message processing task contains the instant message to be processed or not, and if so, increasing the priority of the message processing task; the message processing task processes the instant message to be processed according to the improved priority.
In the above method, the determining whether the message processing task includes the instant message to be processed includes: when the message processing task is judged to contain no timely message to be processed, further judging whether the priority of the message processing task is improved, if so, reducing the priority of the message processing task to the default priority, and then processing the non-timely message to be processed according to the default priority; and if the priority of the message processing task is not improved, the message processing task directly processes the non-timely message to be processed according to the original priority.
Wherein, after the step of dividing the timely message and the non-timely message, the method further comprises: establishing a message mapping table, and recording the instant message command codes to be processed, the non-instant message command codes and the respective corresponding message levels into the message mapping table; the judging whether the message processing task contains the instant message to be processed comprises the following steps: and judging whether the message processing task contains the instant message to be processed or not according to the message level corresponding to the command code of the message to be processed in the message mapping table.
Wherein, the increasing the priority of the message processing task comprises: setting a default priority and a turnover priority for each message processing task, and setting the initial priority of the message processing task as the default priority;
when the message processing task contains the instant message to be processed, the priority of the message processing task is improved from the default priority to the turnover priority; wherein the rollover priority is higher than a default priority.
In order to implement the method, the invention provides a device for timely processing the timely message, which comprises the following steps: the system comprises a message queue creating module, a scheduling task module and a message processing task module; the message queue creating module is used for creating a message queue based on the message level; the scheduling task module is used for dividing the messages to be processed into timely messages and non-timely messages, setting message level parameters of the non-timely messages and the timely messages corresponding to the non-timely messages and the timely messages respectively, correspondingly inserting the non-timely messages into the tail parts of the message queues according to the set message level parameters, correspondingly inserting the timely messages into the head parts of the message queues, and improving the priority of message processing tasks for timely processing the timely messages; and the message processing task module is used for processing the timely message and the non-timely message inserted by the scheduling task module according to the priority of the message processing task.
In the above apparatus, the task scheduling module includes: the system comprises a message grading unit, a first judging unit and a task scheduling unit; the message classification unit is used for dividing the message to be processed into a timely message and a non-timely message, setting message level parameters of the non-timely message and the timely message corresponding to the non-timely message and the timely message respectively, correspondingly inserting the non-timely message into the tail part of the message queue according to the set message level parameters, and correspondingly inserting the timely message into the head part of the message queue; the first judging unit is used for judging whether the message processing task contains the instant message to be processed or not and informing the task scheduling unit when the message processing task contains the instant message to be processed; when the message processing task only contains the non-timely message to be processed, the message processing task module is notified; and the task scheduling unit is used for improving the priority of the message processing task for timely processing the instant message according to the notification of the first judging unit.
The task scheduling unit is specifically configured to: setting a default priority and a turnover priority for each message processing task, and setting the initial priority of the message processing task as the default priority; when the message processing task contains the instant message to be processed, the priority of the message processing task is improved from the default priority to the turnover priority;
wherein the rollover priority is higher than a default priority. The task scheduling module further comprises: the message mapping unit is used for establishing a message mapping table and recording the instant message command codes to be processed, the non-instant message command codes and the message levels corresponding to the instant message command codes and the non-instant message command codes to the message mapping table; the first determining unit is specifically configured to determine whether the message processing task includes the instant message to be processed according to a message level corresponding to the command code of the message to be processed in the message mapping table.
In the above apparatus, the message processing task module includes: a second judging unit, configured to judge whether the priority of the message processing task is increased when it is known that the message processing task processes a non-timely message according to the notification of the scheduling task module, and notify the priority adjusting unit when the priority of the message processing task is increased; a priority adjusting unit, configured to maintain a priority of a message processing task for processing a non-immediate message at a default priority according to the notification of the second determining unit; and the message processing unit is used for processing the timely message and the non-timely message inserted by the scheduling task module.
According to the technical scheme, the message queue based on the message level is established, the messages to be processed are divided into the timely messages and the non-timely messages, and the timely messages are inserted into the head of the message queue and the priority of the message processing tasks containing the timely messages to be processed is improved, so that the processing speed of the timely messages is improved. Therefore, the invention can distinguish and process the timely message from the non-timely message, improves the intelligence of the system for processing the message and the capability of processing the timely message, and achieves the purpose of processing the timely message in time.
Therefore, the processing mechanism of the instant message provided by the invention solves the problem that the instant message is difficult to be processed in time in the prior art.
Drawings
FIG. 1 is a schematic diagram of a method for timely processing a timely message according to the present invention;
FIG. 2 is a schematic diagram of an apparatus for timely processing of instant messages according to the present invention.
Detailed Description
The basic idea of the invention is that: the method comprises the steps of establishing a message queue based on message levels, dividing messages to be processed into timely messages and non-timely messages, and improving the processing speed of the timely messages by inserting the timely messages into the head of the message queue and improving the priority of message processing tasks containing the timely messages to be processed.
It should be noted that the priority of the message processing task includes: a default priority and a rollover priority, wherein the rollover priority is higher than the default priority. The priority of the message processing task is set as the default priority under the default condition, but when the instant message is to be processed, the priority of the message processing task is improved from the default priority to the turning priority.
Generally, real-time applications in preemptive multitask systems consist of a series of tasks that are independent of each other and work in concert, and thus message queues are the primary communication mechanism in preemptive multitask systems, especially embedded systems. For example: the main mechanism for communication between tasks of the VxWorks system is a message queue. The message queue allows a certain number of messages of different lengths to be queued. Any task or Interrupt Service Routine (ISR) can send a message to the message queue. Any task may accept messages from a message queue and multiple message processing tasks may send and accept messages from the same message queue. The embedded system generally comprises four parts, namely an embedded microprocessor, peripheral hardware equipment, an embedded operating system, an application program of a user and the like, and is used for realizing the functions of controlling, monitoring or managing other equipment and the like.
In particular, the message queue has many functions, such as: create and initialize message queue functions, terminate and release message queue functions, send a message to a message queue function, and receive a message from a message queue function, and the like. The message queue is created with parameters such as: the parameter MAX _ MSGS specifies the maximum number of queued messages allowable in the message queue and the parameter MAX _ MSG _ LEN specifies the maximum number of bytes allowed per message. And the parameter MSG _ Q _ PRIORITY specifies the PRIORITY of each message in the message queue. Wherein the priority of the message is determined according to the message level, such as: the priority of the timely message is higher than the priority of the non-timely message, so the timely message is at the head of the message queue.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below. The method for timely processing the instant message according to the present invention is described below by taking the processing of the instant message by the embedded system as an example. Referring to fig. 1, the method for timely processing a timely message according to the present invention is shown to implement a process, which mainly includes the following steps:
the message queue in the present embodiment is different from a general first-in first-out message queue, where a message queue based on a message level is created, and the message queue is created by calling a creation function of the message queue at the time of initialization of the embedded system. Namely: according to the message level, the message is inserted into the tail part of the message queue or into the head part of the message queue, so as to distinguish the messages of different levels, such as timely message and non-timely message. For example: in the VxWorks operating system, what is created using MSG _ Q _ PRIORITY is a message queue based on message level. Wherein the message level generally refers to dividing a message into: timely messages and non-timely messages.
102, a scheduling task receives messages, divides the received messages into timely messages and non-timely messages, and correspondingly inserts the timely messages and the non-timely messages into a message queue of a message processing task according to message levels;
according to the importance, timeliness and the like of the messages, the scheduling task divides the received messages, such as alarm messages and performance messages of the bottom layer, into immediate (Ungent) messages and non-immediate (Normal) messages, and the message level of the immediate messages is higher than that of the non-immediate messages. In this way, when distributing messages to the message processing task, timely messages and non-timely messages are correspondingly inserted into the message queue of the message processing task according to the message level, that is, the message level is high at the head of the message queue, and the message level is low at the tail of the message queue, that is: if the message is not timely, the message is correspondingly inserted into the tail part of the message queue, and if the message is timely, the message is correspondingly inserted into the head part of the message queue. For example: in a message queue based on priority, when a scheduling task distributes messages to a message processing task, inserting a non-timely message into the tail of the message queue of the message processing task by setting a message level parameter of the non-timely message as MSG _ PRI _ NORMAL; the instant message is inserted into the message queue header of the message processing task by setting the message level parameter of the instant message to MSG _ PRI _ URGENT. The message processing task can receive messages from the message queue, and a plurality of message processing tasks can send and receive messages from the same message queue; in addition, each message processing task may have its own message queue.
In addition, in this embodiment, a message mapping table is also established, so as to determine whether a message in a message processing task is an immediate message or a non-immediate message in a task scheduling process. The mapping relationship between the message command codes and the message levels recorded in the message mapping table is as follows: when the timely message and the non-timely message are divided, the command code of the message to be processed after the message level is divided and the corresponding message level are recorded in a message mapping table.
103, the scheduling task judges whether the message processing task contains the instant message to be processed, and if the message processing task contains the instant message to be processed, the step 104 is executed; if no timely message to be processed is contained, go to step 105;
in this step, the scheduling task determines whether the message in the message processing task is a timely message or a non-timely message according to the command code representing the message level and whether the command code corresponds to the timely message or the non-timely message in the mapping table. For example: the command code of a certain received message is A1Specifying 1 in the mapping table represents a timely message, 0 represents a non-timely message, and command code A1Corresponding to 1, the command code is then known as A1Is an instant message.
104, the scheduling task increases the priority of the message processing task containing the instant message to be processed, and then the step 107 is executed;
in this embodiment, the message processing tasks waiting for the message are arranged according to the priority rule, and two priorities are set for each message processing task, that is: a default priority and a rollover priority, wherein the rollover priority is higher than the default priority. And the initial priority of the message processing task is set as the default priority, and when the message processing task needs to process the instant message, the scheduling task can improve the priority of the message processing task with the instant message to be processed to a higher level than the priority of other message processing tasks without the instant message to be processed.
Specifically, upon receiving an instant message, the embedded system schedules a message processing task containing the instant message to be processed by a scheduling task to increase the priority of the message processing task. The embedded system increases the priority of the message processing task of the instant message to be processed to the turning priority in a task scheduling mode according to a message-based priority ceiling algorithm. Therefore, the present embodiment sets the priority of the scheduling task in the system to be the highest, that is, higher than the priority of other message processing tasks, so as to avoid that the messages received by the embedded system, especially the timely messages, are not distributed in time. Here, setting the priority of the message processing task satisfies the following condition:
M1<M2<M3<...<Mx<N1<N2<N3<...<Nx<T
wherein M isxAnd NxThe priority of the message processing task x and the turnover priority of the instant message to be processed are respectively the default priority of the message processing task x and the turnover priority of the instant message to be processed, and T is the priority of the scheduling task. Then, when the message processing task processes a general message, namely a non-instant message, the message processing task is in a default priority level; when there is an instant message to be processed, the priority of the message processing task is scheduled to the turnover priority by the scheduling task. The priority of the scheduling task is set to be the highest, so that the scheduling task can preferentially and timely improve the priority of the message processing task containing the instant message to be processed to the turning priority of the message processing task. Therefore, the scheduling task can insert the message into the message queue according to the message level, and can improve the priority of the message processing task containing the to-be-processed instant message.
For example: the default priorities for the alert message processing tasks and the underlying performance message processing tasks are 100 and 80, respectively, and the roll-over priorities are 120 and 110, respectively. Wherein the larger the number specifying the default priority and the rollover priority, the higher the corresponding priority. When the bottom layer performance message processing task contains the instant message to be processed, the priority of the bottom layer performance message processing task is increased to the turning priority, namely 110, at the moment, the turning priority of the bottom layer performance message processing task is higher than the default priority 100 of the alarm message processing task, and the instant message in the bottom layer performance message processing task is processed in time before the alarm message processing task. Of course, if the alarm message processing task and the bottom layer performance message processing task both contain the instant message, both the two message processing tasks will be raised to the flipping priority, at this time, the flipping priority 120 of the alarm message processing task is higher than the flipping priority 110 of the bottom layer performance message processing task, and at this time, the instant message in the alarm message processing task is still processed preferentially.
after all the instant messages are processed, the message processing task needs to check whether the priority of the message processing task is changed, and if the priority of the message processing task is changed, the priority of the message processing task is reduced back to the default priority. If not, the priority of the message processing task is the default priority and does not need to be invoked.
And step 107, the message processing task processes the message to be processed according to the priority of the message processing task.
In step 107, if the message processing task contains the to-be-processed instant message, the to-be-processed instant message is processed according to the improved priority; when the message processing task processes the non-timely message, if the priority of the message processing task is not improved, the non-timely message to be processed is processed according to the original priority; if the priority of the message processing task is improved, the priority of the message processing task is reduced to the default priority, and then the non-timely message to be processed is processed according to the default priority.
For simplicity of explanation, the foregoing embodiments are described as a series of acts or combinations, but it will be appreciated by those skilled in the art that the invention is not limited by the order of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention.
In order to implement the above method, the present invention further provides a device for timely processing a timely message, as shown in fig. 2, including: a message queue creating module 201, a scheduling task module 202 and a message processing task module 203; wherein,
a message queue creating module 201 for creating a message queue based on message level;
the scheduling task module 202 is configured to divide the message to be processed into a timely message and a non-timely message, correspondingly insert the timely message and the non-timely message into a message queue of a message processing task, and improve the priority of the message processing task including the timely message to be processed;
and the message processing task module 203 is configured to process the instant message inserted by the scheduling task module according to the priority of the message processing task.
In the above apparatus, the task scheduling module 202 includes: the system comprises a message grading unit, a first judging unit and a task scheduling unit; wherein,
the message classification unit is used for dividing the message to be processed into a timely message and a non-timely message and correspondingly inserting the timely message and the non-timely message into a message queue respectively;
the first judging unit is used for judging whether the message processing task contains the instant message to be processed or not and informing the task scheduling unit when the message processing task contains the instant message to be processed; when the message processing task only contains the non-timely message to be processed, the message processing task module 203 is informed;
and the task scheduling unit is used for improving the priority of the message processing task for timely processing the instant message according to the notification of the first judging unit.
The message classification unit is specifically configured to: setting message level parameters of non-timely messages and timely messages, correspondingly inserting the non-timely messages into the tail part of a message queue according to the set message level parameters, and correspondingly inserting the timely messages into the head part of the message queue.
Wherein, the task scheduling module 202 further includes: the message mapping unit is used for establishing a message mapping table and recording the instant message command codes to be processed, the non-instant message command codes and the message levels corresponding to the instant message command codes and the non-instant message command codes to the message mapping table; and the first judging unit is specifically configured to judge whether the message processing task includes the instant message to be processed according to the message level corresponding to the command code of the message to be processed in the message mapping table.
The task scheduling unit is specifically configured to: setting a default priority and a turnover priority for each message processing task, and setting the initial priority of the message processing task as the default priority; when the message processing task contains the instant message to be processed, the priority of the message processing task is improved from the default priority to the turnover priority; wherein the rollover priority is higher than a default priority.
In the above apparatus, the message processing task module 203 includes:
a second judging unit, configured to judge whether the priority of the message processing task is increased when it is known that the message processing task processes a non-immediate message according to the notification of the scheduling task module 202, and notify the priority adjusting unit when the priority of the message processing task is increased;
a priority adjusting unit, configured to maintain a priority of a message processing task for processing a non-immediate message at a default priority according to the notification of the second determining unit;
a message processing unit, configured to process the timely message and the non-timely message inserted by the scheduling task module 202.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. The above description is only for the purpose of illustrating the present invention, and is not intended to limit the scope of the present invention. Any modification and equivalent substitution made to the present invention within the spirit and the scope of the claims of the present invention fall within the scope of the present invention.
Claims (9)
1. A method for timely processing of instant messages, wherein a message queue based on message level is created, the method comprising:
dividing the message to be processed into a timely message and a non-timely message, setting message level parameters of the non-timely message and the timely message corresponding to the non-timely message and the timely message respectively, correspondingly inserting the non-timely message into the tail part of a message queue according to the set message level parameters, and correspondingly inserting the timely message into the head part of the message queue;
judging whether the message processing task contains the instant message to be processed or not, and if so, increasing the priority of the message processing task;
the message processing task processes the instant message to be processed according to the improved priority.
2. The method of claim 1, wherein the determining whether the message processing task includes the instant message to be processed comprises:
when the message processing task is judged to contain no timely message to be processed, further judging whether the priority of the message processing task is improved, if so, reducing the priority of the message processing task to the default priority, and then processing the non-timely message to be processed according to the default priority;
and if the priority of the message processing task is not improved, the message processing task directly processes the non-timely message to be processed according to the original priority.
3. The method for instant messaging and instant messaging according to claim 1 or 2, wherein after the step of partitioning the instant message and the non-instant message, the method further comprises:
establishing a message mapping table, and recording the instant message command codes to be processed, the non-instant message command codes and the respective corresponding message levels into the message mapping table;
the judging whether the message processing task contains the instant message to be processed comprises the following steps:
and judging whether the message processing task contains the instant message to be processed or not according to the message level corresponding to the command code of the message to be processed in the message mapping table.
4. The method of timely processing of instant messages according to claim 1 or 2, wherein the increasing the priority of the message processing task comprises:
setting a default priority and a turnover priority for each message processing task, and setting the initial priority of the message processing task as the default priority;
when the message processing task contains the instant message to be processed, the priority of the message processing task is improved from the default priority to the turnover priority;
wherein the rollover priority is higher than a default priority.
5. An apparatus for timely processing of instant messages, comprising: the system comprises a message queue creating module, a scheduling task module and a message processing task module; wherein,
the message queue creating module is used for creating a message queue based on the message level;
the scheduling task module is used for dividing the messages to be processed into timely messages and non-timely messages, setting message level parameters of the non-timely messages and the timely messages corresponding to the non-timely messages and the timely messages respectively, correspondingly inserting the non-timely messages into the tail part of the message queue according to the set message level parameters, and correspondingly inserting the timely messages into the head part of the message queue; and the priority of the message processing task for improving the timely processing of the timely message;
and the message processing task module is used for processing the timely message and the non-timely message inserted by the scheduling task module according to the priority of the message processing task.
6. The device for timely processing of instant messages according to claim 5, wherein the task scheduling module comprises: the system comprises a message grading unit, a first judging unit and a task scheduling unit; wherein,
the message classification unit is used for dividing the message to be processed into a timely message and a non-timely message, setting message level parameters of the non-timely message and the timely message corresponding to the non-timely message and the timely message respectively, correspondingly inserting the non-timely message into the tail part of the message queue according to the set message level parameters, and correspondingly inserting the timely message into the head part of the message queue;
the first judging unit is used for judging whether the message processing task contains the instant message to be processed or not and informing the task scheduling unit when the message processing task contains the instant message to be processed; when the message processing task only contains the non-timely message to be processed, the message processing task module is notified;
and the task scheduling unit is used for improving the priority of the message processing task for timely processing the instant message according to the notification of the first judging unit.
7. The device for timely processing of instant messages according to claim 6, wherein the task scheduling unit is specifically configured to:
setting a default priority and a turnover priority for each message processing task, and setting the initial priority of the message processing task as the default priority;
when the message processing task contains the instant message to be processed, the priority of the message processing task is improved from the default priority to the turnover priority; wherein the rollover priority is higher than a default priority.
8. The device for timely processing of instant messages according to claim 6 or 7, wherein the task scheduling module further comprises:
the message mapping unit is used for establishing a message mapping table and recording the instant message command codes to be processed, the non-instant message command codes and the message levels corresponding to the instant message command codes and the non-instant message command codes to the message mapping table;
the first determining unit is specifically configured to determine whether the message processing task includes the instant message to be processed according to a message level corresponding to the command code of the message to be processed in the message mapping table.
9. The device for timely processing of instant messages according to claim 5, wherein the message processing task module comprises:
a second judging unit, configured to judge whether the priority of the message processing task is increased when it is known that the message processing task processes a non-timely message according to the notification of the scheduling task module, and notify the priority adjusting unit when the priority of the message processing task is increased;
a priority adjusting unit, configured to maintain a priority of a message processing task for processing a non-immediate message at a default priority according to the notification of the second determining unit;
and the message processing unit is used for processing the timely message and the non-timely message inserted by the scheduling task module.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100870653A CN101582786B (en) | 2009-06-17 | 2009-06-17 | Instant handling method and device of instant messages |
PCT/CN2010/073404 WO2010145444A1 (en) | 2009-06-17 | 2010-05-31 | Method and device for processing instant message in time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100870653A CN101582786B (en) | 2009-06-17 | 2009-06-17 | Instant handling method and device of instant messages |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101582786A CN101582786A (en) | 2009-11-18 |
CN101582786B true CN101582786B (en) | 2012-06-13 |
Family
ID=41364761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100870653A Expired - Fee Related CN101582786B (en) | 2009-06-17 | 2009-06-17 | Instant handling method and device of instant messages |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101582786B (en) |
WO (1) | WO2010145444A1 (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101582786B (en) * | 2009-06-17 | 2012-06-13 | 中兴通讯股份有限公司 | Instant handling method and device of instant messages |
CN102196583B (en) * | 2010-03-18 | 2015-11-25 | 中兴通讯股份有限公司 | A kind of distribution method of channel resource and base station |
CN101782891B (en) * | 2010-03-26 | 2013-12-11 | 中兴通讯股份有限公司 | Method and system for communication of distributed system |
CN101847107B (en) * | 2010-03-30 | 2012-07-04 | 南京恩瑞特实业有限公司 | External data receiving method based on message queue |
JP5733680B2 (en) * | 2011-01-20 | 2015-06-10 | 日本電気株式会社 | Command execution device, command execution system, command execution method, and command execution program |
GB2496681A (en) * | 2011-11-21 | 2013-05-22 | Push Technology Ltd | A publish/subscribe system with time-sensitive message delivery to subscribers |
CN102591658B (en) * | 2011-12-28 | 2016-07-06 | 北京奇虎科技有限公司 | A kind of message treatment method and device |
CN102594733B (en) * | 2012-02-24 | 2014-01-08 | 腾讯科技(深圳)有限公司 | Method, system and device for realizing anonymous speed-dating |
CN104145260B (en) * | 2012-03-26 | 2016-08-10 | 华为技术有限公司 | Method for processing business, performance element and the system of a kind of distributed job system |
CN103517342A (en) * | 2012-06-21 | 2014-01-15 | 中兴通讯股份有限公司 | Adaptive Trap message treatment method and device |
CN103530173B (en) * | 2012-07-06 | 2018-07-17 | 上海宝信软件股份有限公司 | Changeable weight event handling system and method |
CN104753769A (en) * | 2015-03-24 | 2015-07-01 | 新余兴邦信息产业有限公司 | Method and device for issuing messages by message queue |
CN104951373B (en) * | 2015-05-28 | 2018-11-27 | 浙江元亨通信技术股份有限公司 | The message queue processing method of scheduling system |
CN105763608B (en) * | 2016-02-05 | 2019-03-15 | 浪潮(北京)电子信息产业有限公司 | A kind of message treatment method and device for cloud storage system |
CN106886454A (en) * | 2017-02-20 | 2017-06-23 | 深圳多哚新技术有限责任公司 | A kind of task processing method based on VR glasses, device and VR glasses |
CN109582445A (en) * | 2018-09-29 | 2019-04-05 | 阿里巴巴集团控股有限公司 | Message treatment method, device, electronic equipment and computer readable storage medium |
CN112346829B (en) * | 2019-08-07 | 2023-02-17 | 上海云盾信息技术有限公司 | Method and equipment for task scheduling |
CN111177636B (en) * | 2020-01-07 | 2023-11-03 | 北京同有飞骥科技股份有限公司 | Recursive scheduling method and system for webpage request |
CN116048828B (en) * | 2022-05-26 | 2023-10-20 | 荣耀终端有限公司 | Method for processing drawing message, electronic device and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1658611A (en) * | 2005-03-22 | 2005-08-24 | 中国科学院计算技术研究所 | Method for guarantee service quality of radio local network |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040151197A1 (en) * | 2002-10-21 | 2004-08-05 | Hui Ronald Chi-Chun | Priority queue architecture for supporting per flow queuing and multiple ports |
US7660321B2 (en) * | 2006-03-01 | 2010-02-09 | Alcatel-Lucent Usa Inc. | System and method for prioritizing session initiation protocol messages |
CN101222436A (en) * | 2008-01-25 | 2008-07-16 | 中兴通讯股份有限公司 | Graded data transmission method |
CN101582786B (en) * | 2009-06-17 | 2012-06-13 | 中兴通讯股份有限公司 | Instant handling method and device of instant messages |
-
2009
- 2009-06-17 CN CN2009100870653A patent/CN101582786B/en not_active Expired - Fee Related
-
2010
- 2010-05-31 WO PCT/CN2010/073404 patent/WO2010145444A1/en active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1658611A (en) * | 2005-03-22 | 2005-08-24 | 中国科学院计算技术研究所 | Method for guarantee service quality of radio local network |
Also Published As
Publication number | Publication date |
---|---|
CN101582786A (en) | 2009-11-18 |
WO2010145444A1 (en) | 2010-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101582786B (en) | Instant handling method and device of instant messages | |
US7889659B2 (en) | Controlling a transmission rate of packet traffic | |
EP2783490B1 (en) | Time-sensitive data delivery | |
CN102035732B (en) | Service scheduling method and device | |
US20120311082A1 (en) | Content push service | |
EP0422310A1 (en) | Distributed mechanism for the fast scheduling of shared objects | |
US8428076B2 (en) | System and method for priority scheduling of plurality of message types with serialization constraints and dynamic class switching | |
US8174987B2 (en) | Method and apparatus for implementing output queue-based flow control | |
CN107092521B (en) | Distributed task scheduling method, device and system | |
US20050276222A1 (en) | Platform level overload control | |
CN102594691A (en) | Method and device for processing message | |
CN101651615A (en) | Method and device for scheduling messages | |
US6615215B1 (en) | Method for graduated load sensitive task dispatching in computing system | |
CN113268446B (en) | Information processing method and device for multiple airborne bus accesses | |
CN114168367A (en) | Method and system for solving queue backlog through batch tasks | |
CN101997777B (en) | Interruption processing method, device and network equipment | |
WO2020067872A1 (en) | A method of prioritizing message handling in a publisher/subscriber broker | |
CN113835611A (en) | Storage scheduling method, device and storage medium | |
CN115883465A (en) | Flow control method, device, server, system and storage medium | |
CN114885018A (en) | Message pushing method, device, equipment and storage medium based on double queues | |
JP2010049314A (en) | Task scheduling device and task scheduling method | |
CN118227300B (en) | Redis queue-based system blocking processing method and device | |
CN113220441B (en) | Task scheduling method and device and electronic equipment | |
CN111966513B (en) | Multi-stage queue scheduling method and device without priori knowledge Coflow and scheduling equipment thereof | |
JP2000003286A (en) | Message processor and method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120613 Termination date: 20170617 |
|
CF01 | Termination of patent right due to non-payment of annual fee |