CN105337896A - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN105337896A
CN105337896A CN201410360849.XA CN201410360849A CN105337896A CN 105337896 A CN105337896 A CN 105337896A CN 201410360849 A CN201410360849 A CN 201410360849A CN 105337896 A CN105337896 A CN 105337896A
Authority
CN
China
Prior art keywords
message
buffer queue
queue
looking ahead
buffer
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
CN201410360849.XA
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410360849.XA priority Critical patent/CN105337896A/en
Priority to PCT/CN2015/083601 priority patent/WO2016011894A1/en
Publication of CN105337896A publication Critical patent/CN105337896A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Abstract

The embodiment of the invention provides a message processing method and device. The message processing method comprises the following steps: respectively storing messages to be processed in a cache queue in different pre-fetched cache queues according to flow types of the messages, wherein the pre-fetched cache queues are caches pre-established between a task cache and an order-preserving queue; and respectively distributing the messages in each pre-fetched cache queue to different processor cores to process. Different flow messages are separated through the pre-fetched cache queues and distributed to the different processor cores to perform concurrent processing; therefore, the problem that the whole CPU is relatively low in message processing efficiency due to scheduling congestion and the plurality of idle processor cores in the message treatment process can be effectively solved; and the message processing efficiency of the CPU is effectively increased.

Description

Message processing method and device
Technical field
The embodiment of the present invention relates to computer technology, particularly relates to a kind of message processing method and device.
Background technology
Central processing unit is (English: CentralProcessingUnit, be called for short CPU) comprise multiple processor core, can the multiple message of concurrent processing, generally use order-preserving control unit to carry out the control of the processing sequence of multiple message for multiple different stream packet.
In prior art, the processing mode for the message of multiple stream is sequential processes.Such as: comprise two buffer queues Q0, Q1 at task buffer, T stream packet T1, T2 and K stream packet K1, K2 is added in queue Q0 successively, G stream packet G1 is added successively in queue Q1, G2, be that atomic operation is (English: time ATOMIC) in the order-preserving pattern configurations of current order-preserving control unit, message T1 in queue Q0 is removed and processes to one of them processor core, and process information is recorded in order-preserving queue, when message T1 has not been processed, order-preserving queue can stop message T2 to be processed by other processor cores, and then cause subsequent packet K1, K2 can not be processed by other processor core, in addition, if queue Q0 and queue Q1 is configured with strict priority relationship, then when all messages of queue Q0 have not all processed, the message of the G stream in queue Q1 can not be processed.
But, in above-mentioned processing method, when processor core has not processed message T1, the message of other streams in same queue can not process, and when having priority relationship among queues, message in other queue can not process, and causes the obstruction of dispatch deal, causes the efficiency of whole CPU to the process of message lower.
Summary of the invention
The embodiment of the present invention provides a kind of message processing method and device, to overcome the obstruction dispatched in the processing procedure of message, causes the problem that the efficiency of whole CPU to the process of message is lower.
Embodiment of the present invention first aspect provides a kind of message processing method, comprising:
By the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead; Wherein, buffer queue of looking ahead described in is the buffer memory set up in advance between task buffer and order-preserving queue;
The message of looking ahead in buffer queue described in each is distributed to different processor cores respectively process.
In conjunction with first aspect, in the first possible execution mode of first aspect, describedly the message of looking ahead in buffer queue described in each is distributed to respectively after different processor cores processes, also comprises:
Record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
In conjunction with the first possible execution mode of first aspect, in the execution mode that the second of first aspect is possible, described in the look ahead quantity of buffer queue be more than or equal to one.
In conjunction with any one the possible execution mode in the first and the second of first aspect, first aspect, in the third possible execution mode of first aspect, the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then the described outstanding message by buffer queue takes out and according to the traffic category of described message, described message is put into different buffer queues of looking ahead respectively, comprising:
Message in described buffer queue is taken out;
The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
In conjunction with the third possible execution mode of first aspect, in the 4th kind of possible execution mode of first aspect, describedly distribute different processor cores respectively by the message of looking ahead in buffer queue described in each and process, and record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue, comprising:
Described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core process, the Message processing information of described first kind stream is recorded in described order-preserving queue, and the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core process, in described order-preserving queue, record the Message processing information of described Equations of The Second Kind stream.
Embodiment of the present invention second aspect provides a kind of message process device, comprising:
Processing module, for by the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead, described in buffer queue of looking ahead be the buffer memory set up in advance between task buffer and order-preserving queue;
Distribution module, processes for the message of looking ahead in buffer queue described in each is distributed to different processor cores respectively.
In conjunction with second aspect, in the first possible execution mode of second aspect, also comprise:
Logging modle, for record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
In conjunction with the first possible execution mode of second aspect, in the execution mode that the second of second aspect is possible, the quantity of buffer queue of looking ahead described in described processing module foundation is more than or equal to one.
In conjunction with any one the possible execution mode in the first and the second of second aspect, second aspect, in the third possible execution mode of second aspect, the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then described processing module specifically for:
Message in described buffer queue is taken out;
The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
In conjunction with the third possible execution mode of second aspect, in the 4th kind of possible execution mode of second aspect, comprising:
Described distribution module also processes for described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core, and described logging modle records the Message processing information of described first kind stream in described order-preserving queue;
Described distribution module also processes for the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core, and described logging modle records the Message processing information of described Equations of The Second Kind stream in described order-preserving queue.
The embodiment of the present invention third aspect provides a kind of central processor CPU, comprising: second aspect, second aspect the first, the second, the third message process device provided to the arbitrary execution mode in the 4th kind of execution mode and at least two processor cores.
The message processing method that the embodiment of the present invention provides and device, by the outstanding message in buffer queue is taken out and according to the traffic category of message by message respectively stored in different buffer queues of looking ahead, again each message of looking ahead in buffer queue is distributed to different processor cores respectively to process, directly from buffer queue, Message processing is taken out compared to prior art, when there is no the message having processed a stream, the message of other streams of same buffer queue can not be processed, by buffer queue of looking ahead different stream packets separated and distribute different processor core concurrent processing, solve the obstruction dispatched in the processing procedure of message, cause the problem that the efficiency of whole CPU to the process of message is lower, effectively improve the efficiency of CPU to the process of message.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of message processing method embodiment one provided by the invention;
Fig. 2 is the flow chart of message processing method embodiment two provided by the invention;
Fig. 3 is the process schematic diagram of message processing method embodiment two provided by the invention;
Fig. 4 is the structural representation of message process device embodiment one provided by the invention;
Fig. 5 is the structural representation of message process device embodiment two provided by the invention;
Fig. 6 is the structural representation of the embodiment of order-preserving control unit provided by the invention;
Fig. 7 is the structural representation of the embodiment of CPU provided by the invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The message processing method that the embodiment of the present invention provides is applicable to all needs and carries out Message processing or mutual communication system, go for the various equipment in communication system, such as all kinds of terminal equipment, various network element nodes such as base station, base station controller etc., the method specifically can be performed by the CPU in the said equipment.The CPU occurred in the embodiment of the present invention is multi-core CPU.
The task buffer occurred in the embodiment of the present invention is the temporary storage in CPU, its Capacity Ratio internal memory is little, but exchange velocity quickly, the data stored in task buffer are the sub-fractions in internal memory, that in the short time, CPU is about to access, when CPU calls mass data, directly can call from task buffer, thus accelerate reading rate.
The buffer queue occurred in the embodiment of the present invention is the logical block be arranged in task buffer, for the message of waiting task is carried out buffer memory.The order-preserving queue occurred in the embodiment of the present invention is the logical block of the buffering outstanding message arranged in order-preserving control unit, and buffer queue of looking ahead is the logical block set up between above-mentioned buffer queue and order-preserving queue in the embodiment of the present invention.
The order-preserving control unit occurred in the embodiment of the present invention is the inner hardware accelerator for completing stream order-preserving function of a kind of multi-core CPU, order-preserving control unit can multiple message of multiple processor core process same streams in control CPU time sequencing, ensure that message completes by entering order, can not occur out of order; And can concurrent processing between the message belonging to various flows, do not need to ensure that the entering order of not homogeneous turbulence and process complete sequence consensus.
Fig. 1 is the flow chart of message processing method embodiment one provided by the invention, and the executive agent of the present embodiment can be the order-preserving control unit in CPU, and as shown in Figure 1, the concrete steps that this order-preserving control unit performs this message processing method are:
S101: by the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead; Wherein, buffer queue of looking ahead described in is the buffer memory set up in advance between task buffer and order-preserving queue.
In the present embodiment, above-mentioned outstanding message is all general designations waiting outstanding message in buffer queue, and this outstanding message can be multiple messages of various flows classification.Order-preserving control unit establishes buffer queue of looking ahead in advance between buffer queue and order-preserving queue, this buffer queue of looking ahead is used for the outstanding message in buffer queue separated respectively according to traffic category, wherein, a kind of message of traffic category can be placed in each buffer queue of looking ahead, also can place the message of multiple traffic category, this present invention is not limited.
Outstanding message in buffer queue takes out according to message sequence current in buffer queue by order-preserving control unit successively, and is placed on respectively according to traffic category by all outstanding messages and looks ahead in buffer queue.
S102: the message of looking ahead in buffer queue described in each is distributed to different processor cores respectively and processes.
In the present embodiment, order-preserving control unit calls corresponding circuit and is processed by the different processor core of distributing to that each message of looking ahead in buffer queue walks abreast respectively, concrete: each message of looking ahead in buffer queue can be randomly assigned to different processor cores and process, also can distribute according to the idle situation of current processor core, priority allocation gives idle processor core, and the embodiment of the present invention is not particularly limited to this.
The message processing method that the present embodiment provides, by by the outstanding message in buffer queue according to the traffic category of message by message respectively stored in different buffer queues of looking ahead, again each message of looking ahead in buffer queue is distributed to different processor cores respectively to process, directly from buffer queue, Message processing is taken out compared to prior art, when there is no the message having processed a stream, the message of other streams of same buffer queue can not be processed, by buffer queue of looking ahead different stream packets separated and distribute different processor core concurrent processing, solve the obstruction dispatched in the processing procedure of message and cause the problem that the efficiency of whole CPU to the process of message is lower, effectively improve the efficiency of CPU to the process of message.
Fig. 2 is the flow chart of message processing method embodiment two provided by the invention, on the basis of the embodiment shown in above-mentioned Fig. 1, describedly the message of looking ahead in buffer queue described in each is distributed to respectively after different processor cores processes, also comprises: record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.In the present embodiment, by recording each Message processing information of looking ahead in buffer queue, can for the process progress of subsequent query message, and the idle condition of processor core, be convenient in the processing procedure of carrying out new message, according to the idle condition of processor core, new message can be distributed to different processor cores to process, reduce the idle degree of processor core, improve Message processing efficiency.
As shown in Figure 2, under actual conditions, the traffic category of outstanding message may have a lot, in the present embodiment, hypothesis has the stream of two kinds in buffer queue, if the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, and the packet buffer of this two classes stream is in same buffer queue, then the step of the processing method of concrete message is:
S201: the message in buffer queue is taken out.
S202: all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
In the present embodiment, described in the look ahead quantity of buffer queue be more than or equal to one, concrete number is determined according to the configuration of CPU, primary concern hardware resource and Data Concurrent requirement, and alternatively, the quantity of buffer queue of looking ahead is identical with the quantity of processor core.
Can select to have two buffer queues of looking ahead at least in the present embodiment, the message of first kind stream is put in order one of them buffer queue of looking ahead, the message of Equations of The Second Kind stream is put in order another look ahead buffer queue different from first kind stream, to be called by order-preserving control unit, concurrent processing message.
S203: described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core and processes, the Message processing information of described first kind stream is recorded in described order-preserving queue, and the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core process, in described order-preserving queue, record the Message processing information of described Equations of The Second Kind stream.
In the present embodiment, two outstanding messages of looking ahead in buffer queue will be placed on respectively, distribute to two different processor cores respectively and process, and record the process information of each message, complete the process of order-preserving control unit to message.
In above-described embodiment one and embodiment two, order-preserving control unit at least includes: at least one buffer queue, at least one look ahead buffer queue and order-preserving queue, to carry out order-preserving process for the message entering this CPU.
The message processing method that the present embodiment provides, by the outstanding message in buffer queue is taken out, first kind stream packet is put into a buffer queue of looking ahead, and another kind of stream packet is put into another buffer queue of looking ahead, again two messages of looking ahead in buffer queue are distributed to different processor cores respectively to process, and in order-preserving queue, record the process information of each message of looking ahead in buffer queue respectively, compared to directly taking out Message processing from buffer queue, when there is no the message having processed a stream, the prior art of the message of other streams of same buffer queue can not be processed, by buffer queue of looking ahead different stream packets separated and distribute different processor core concurrent processing, efficiently solve the obstruction dispatched in same buffer queue in the processing procedure of message, and the problem that multiple processor core is idle, effectively improve the efficiency of CPU to the process of message.
On the basis of above-described embodiment, below especially exemplified by an example, the processing method of message provided by the invention is described in detail.
Fig. 3 is the process schematic diagram of message processing method embodiment two provided by the invention.As shown in Figure 3, wherein, illustrate that, by the processing method of the message invented, concrete processing procedure is as follows with the example of the buffer queue in order-preserving control unit, look ahead buffer queue and order-preserving queue below:
Task buffer comprises two buffer queues Q_0, Q_1, wherein, priority query is set to (English: PriorityQueue between Q_0 and Q_1, be called for short: PQ) mechanism carries out dispatch deal, outstanding message comprises the stream of three kinds, be assumed to be T stream, K stream and G stream packet, be appreciated that, T stream, K stream and G stream are only the exemplary explanations done to distinguish message kind, the message of any kind of the prior art can be represented, do not form any restriction to the embodiment of the present invention.T stream packet T1, T2 and K stream packet K1, K2 is added successively in buffer queue Q_0; Add G stream packet G1, G2 in queue Q_1 successively, and the order-preserving pattern configurations of current order-preserving control unit is atomic operation.
In the present embodiment, the buffer queue of looking ahead that order-preserving control unit is set up is three, each looking ahead can be (English: Round-Robin for polling dispatching between buffer queue, be called for short: RR) mechanism, outstanding message in buffer queue Q_0 and buffer queue Q_1 all takes out by order-preserving control unit, and according to the traffic category of outstanding message, T stream packet T1, T2 is put into first buffer queue of looking ahead; K stream packet K1, K2 are put into second buffer queue of looking ahead; G stream packet G1, G2 are put into the 3rd buffer queue of looking ahead.
After completing aforesaid operations process, all clear texts in task buffer put into different buffer queues of looking ahead by traffic category classification, and namely T, K, G stream puts into first, second, third corresponding buffer queue of looking ahead respectively.
Alternatively, this CPU can at least comprise: first processor core, the second processor core and the 3rd processor core, then order-preserving control unit can be distributed to first first processor core and processes by the T stream packet of looking ahead in buffer queue; The K stream packet of looking ahead second in buffer queue is distributed to the second processor core and is processed; The G stream packet that 3rd is looked ahead in buffer queue is distributed to the 3rd processor core process.
Namely in processing procedure, if when message T1 gets clogged, what the message K1 of K stream can be concurrent is processed by the second processor core, and in order-preserving queue the process information of recorded message K1, solve the flow blocked problem in same buffer queue.
If T1 gets clogged during process, the message G1 of G stream can concurrently be processed by the 3rd processor core, and in order-preserving queue the process information of recorded message G1, solve the scheduling obstructing problem between different buffer queue.
Especially, when being provided with strict priority between each buffer queue (priority of Q_0 is greater than Q_1 priority), when solving the scheduling between different buffer queue and blocking, G stream packet is taken out again after not needing the message waiting for T stream, K flows all to take out, can taking out in advance and distributing idle processor core of G stream packet processes, make full use of idle processor core to process the G stream in Low Priority Queuing Q_1, CPU concurrent processing ability can be improved, and do not seize the resource of the processor core of the T stream got clogged in high-priority queue.
Being appreciated that above-mentioned first, second, and third order not representing processor core, only for being distinguished by each processor core, not forming any restriction to the embodiment of the present invention.
The message processing method that the present embodiment provides, by by buffer queue Q_0, outstanding message in Q_1 takes out, T stream packet is put into first buffer queue of looking ahead, and K stream packet is put into second buffer queue of looking ahead, G stream packet is put into the 3rd buffer queue of looking ahead, again three messages of looking ahead in buffer queue are distributed to different processor cores respectively to process, by at task buffer, buffer queue of looking ahead is increased between order-preserving queue, different stream packets is separated and distributes different processor core concurrent processing, improve multiple stream concurrent processing efficiency, solve flow blocked problem and scheduling obstructing problem, particularly when occurring blocking, task concurrency can be improved, promote CPU to the disposal ability of the concurrent stream of order-preserving, effectively improve the efficiency of CPU to the process of message.
Especially, in above-mentioned all embodiments, in processing procedure, to look ahead from the buffer queue of task buffer some messages, and put into different buffer queues of looking ahead by traffic category differentiation, be not directly from team's head of the buffer queue of task buffer successively take out and put into buffer queue of looking ahead, but the taking-up message that can walk abreast from multiple buffer queue or put into different buffer queues of looking ahead according to traffic category after all being taken out by the message in all buffer queues.
Further, from multiple buffer queue of looking ahead, the message of each stream is obtained respectively by traffic category, and Random assignment or according to the idle condition of current processor core, the message of each stream is distributed to each processor core and process, then be recorded in order-preserving queue, both can continue to keep stream order-preserving, and also can prevent flow blocked and scheduling from blocking.
Looking ahead in buffer queue, be also be (English: FirstInputFirstOutput according to first-in first-out by the category division of stream, be called for short: FIFO) principle order-preserving, therefore, do not destroy the packet order preserving in same stream according to the processing method of the application.
The number of buffer queue of looking ahead is set up in order-preserving control unit in CPU, determine according to the configuration of CPU, the balance that primary concern hardware resource and concurrency require, be not defined as the corresponding buffer queue of looking ahead of message of a stream, namely can comprise the message of the stream of several type in same buffer queue of looking ahead, just under equal conditions, buffer queue quantity of looking ahead is more, by overstepping the bounds of propriety for the message of not homogeneous turbulence loose, the concurrent processing ability of the message of stream is better.
Alternatively, as an alternative embodiment of the invention, if task buffer comprises two buffer queues Q_0, Q_1, wherein, T stream packet T1, T2 and K stream packet K1, K2 is added in buffer queue Q_0 successively; Add G stream packet G1, G2 and H stream packet H1, H2 in queue Q_1 successively, and the order-preserving pattern configurations of current order-preserving control unit is atomic operation.
Optionally, the buffer queue of looking ahead that order-preserving control unit is set up is three, outstanding message in buffer queue Q_0 and buffer queue Q_1 all takes out by order-preserving control unit, and according to the traffic category of outstanding message, T stream packet T1, T2 is put into first buffer queue of looking ahead; K stream packet K1, K2 are put into second buffer queue of looking ahead; G stream packet G1, G2 and H stream packet H1, H2 are put into the 3rd buffer queue of looking ahead, and namely T, K, G and H stream puts into first, second, third corresponding buffer queue of looking ahead respectively.
If CPU at least comprises three processor cores, then order-preserving control unit can be distributed to first a processor core and processes by the T stream packet of looking ahead in buffer queue; The K stream packet of looking ahead second in buffer queue is distributed to another processor core and is processed; Look ahead the 3rd G stream in buffer queue and H stream packet is distributed to the 3rd processor core and is processed.
Fig. 4 is the structural representation of message process device embodiment one provided by the invention, as shown in Figure 4, this message process device 40, comprise: processing module 41, distribution module 42, wherein, processing module 41, for by the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead, described in buffer queue of looking ahead be the buffer memory set up in advance between task buffer and order-preserving queue; Distribution module 42, processes for the message of looking ahead in buffer queue described in each is distributed to different processor cores respectively.
The message process device that the present embodiment provides, for performing the technical scheme of the embodiment of the method shown in Fig. 1, by processing module the outstanding message in buffer queue taken out and according to the traffic category of message by message respectively stored in different buffer queues of looking ahead, each message of looking ahead in buffer queue is distributed to different processor cores and is processed by distribution module respectively, directly from buffer queue, Message processing is taken out compared to prior art, when there is no the message having processed a stream, the message of other streams of same buffer queue can not be processed, by buffer queue of looking ahead different stream packets separated and distribute different processor core concurrent processing, solve the obstruction dispatched in the processing procedure of message, cause the problem that the efficiency of whole CPU to the process of message is lower, effectively improve the efficiency of CPU to the process of message.
Fig. 5 is the structural representation of message process device embodiment two provided by the invention, and as shown in Figure 5, in the embodiment two of the processing unit of message of the present invention, on the basis of above-described embodiment, this device 40 also comprises; Logging modle 43, for record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
Described processing module 41 set up described in the look ahead quantity of buffer queue be more than or equal to one.
Further, the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then described processing module 41 specifically for: by described buffer queue message take out; The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
Described distribution module 42 also processes for described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core, and described logging modle 43 records the Message processing information of described first kind stream in described order-preserving queue;
Described distribution module 42 also processes for the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core, and described logging modle 43 records the Message processing information of described Equations of The Second Kind stream in described order-preserving queue.
The message process device that the present embodiment provides, for performing the technical scheme of the either method embodiment shown in Fig. 1 to Fig. 3, its perform principle and technique effect similar, therefore not to repeat here.
Fig. 6 is the structural representation of the embodiment of order-preserving control unit provided by the invention, and as shown in Figure 6, this order-preserving control unit 50 comprises: processor 51 and memory 52.Wherein, processor 51 for the outstanding message in buffer queue is taken out and according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead, described in buffer queue of looking ahead be the buffer memory that described processor 51 is set up between task buffer and order-preserving queue; Processor 51 also processes for the message of looking ahead in buffer queue described in each is distributed to different processor cores respectively.
Optionally, also comprise: memory 52, for record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
The order-preserving control unit that the present embodiment provides, for performing the technical scheme of the method shown in Fig. 1, it realizes principle and technique effect is similar, by processor the outstanding message in buffer queue taken out and according to the traffic category of message by message respectively stored in different buffer queues of looking ahead, and each message of looking ahead in buffer queue is distributed to different processor cores respectively process, memory records the process information of each message of looking ahead in buffer queue respectively in order-preserving queue, by buffer queue of looking ahead different stream packets separated and distribute different processor core concurrent processing, efficiently solve the obstruction dispatched in the processing procedure of message, cause the problem that the efficiency of whole CPU to the process of message is lower, effectively improve the efficiency of CPU to the process of message.
On the basis of above-described embodiment, the quantity of buffer queue of looking ahead described in described processor 51 foundation is more than or equal to one.
Optionally, if the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then described processor 51 specifically for: by described buffer queue message take out; The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
Described processor 51 also processes for described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core, and described memory 52 records the Message processing information of described first kind stream in described order-preserving queue;
Described processor 51 also processes for the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core, and described memory 52 records the Message processing information of described Equations of The Second Kind stream in described order-preserving queue.
The order-preserving control unit that the present embodiment provides, for performing the technical scheme of the embodiment of the method shown in any one of Fig. 1 to Fig. 3, it realizes principle and technique effect is similar, does not repeat them here.
Fig. 7 is the structural representation of the embodiment of CPU provided by the invention, and as shown in Figure 7, this CPU60 comprises: the message process device 61 that in Fig. 4, Fig. 5, any embodiment provides and at least two processor cores 62.
The message processing method that the CPU that the present embodiment provides provides for performing any embodiment shown in Fig. 1 to Fig. 3, it realizes principle and technique effect is similar, with reference to other embodiments of the present invention, can not repeat at this.
Adopt the CPU that the embodiment of the present invention provides, by message process device 61 outstanding message in buffer queue taken out and according to the traffic category of message by message respectively stored in different buffer queues of looking ahead, again each message of looking ahead in buffer queue is distributed to different processor cores 62 respectively to process, directly from buffer queue, Message processing is taken out compared to prior art, different stream packets separates and distributes different processor core concurrent processing by buffer queue of looking ahead, solve the obstruction dispatched in the processing procedure of message, cause the problem that the efficiency of whole CPU to the process of message is lower, effectively improve the efficiency of CPU to the process of message.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that program command is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (11)

1. a message processing method, is characterized in that, comprising:
By the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead; Wherein, buffer queue of looking ahead described in is the buffer memory set up in advance between task buffer and order-preserving queue;
The message of looking ahead in buffer queue described in each is distributed to different processor cores respectively process.
2. method according to claim 1, is characterized in that, is describedly distributed to by the message of looking ahead in buffer queue described in each after different processor cores processes respectively, also comprises:
Record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
3. method according to claim 2, is characterized in that, described in the look ahead quantity of buffer queue be more than or equal to one.
4. the method according to any one of claims 1 to 3, it is characterized in that, the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then the described outstanding message by buffer queue takes out and according to the traffic category of described message, described message is put into different buffer queues of looking ahead respectively, comprising:
Message in described buffer queue is taken out;
The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
5. method according to claim 4, it is characterized in that, describedly distribute different processor cores respectively by the message of looking ahead in buffer queue described in each and process, and record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue, comprising:
Described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core process, the Message processing information of described first kind stream is recorded in described order-preserving queue, and the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core process, in described order-preserving queue, record the Message processing information of described Equations of The Second Kind stream.
6. a message process device, is characterized in that, comprising:
Processing module, for by the outstanding message in buffer queue according to the traffic category of described message by described message respectively stored in different buffer queues of looking ahead, described in buffer queue of looking ahead be the buffer memory set up in advance between task buffer and order-preserving queue;
Distribution module, processes for the message of looking ahead in buffer queue described in each is distributed to different processor cores respectively.
7. device according to claim 6, is characterized in that, also comprises:
Logging modle, for record respectively in described order-preserving queue each described in look ahead the process information of the message in buffer queue.
8. device according to claim 7, is characterized in that, the quantity of buffer queue of looking ahead described in described processing module foundation is more than or equal to one.
9. the device according to any one of claim 6 to 8, is characterized in that, the traffic category of described outstanding message comprises first kind stream and Equations of The Second Kind stream, then described processing module specifically for:
Message in described buffer queue is taken out;
The all messages being described first kind stream by traffic category put into buffer queue of looking ahead described in, and all messages being described Equations of The Second Kind stream by traffic category put into buffer queue of looking ahead described in another different from described first kind stream.
10. device according to claim 9, is characterized in that, comprising:
Described distribution module also processes for described message of looking ahead the stream of the first kind described in buffer queue is distributed to first processor core, and described logging modle records the Message processing information of described first kind stream in described order-preserving queue;
Described distribution module also processes for the message of Equations of The Second Kind stream in buffer queue of looking ahead described in another is distributed to the second processor core, and described logging modle records the Message processing information of described Equations of The Second Kind stream in described order-preserving queue.
11. 1 kinds of central processor CPUs, is characterized in that, comprise the arbitrary described message process device of claim 6-10 and at least two processor cores.
CN201410360849.XA 2014-07-25 2014-07-25 Message processing method and device Pending CN105337896A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410360849.XA CN105337896A (en) 2014-07-25 2014-07-25 Message processing method and device
PCT/CN2015/083601 WO2016011894A1 (en) 2014-07-25 2015-07-08 Message processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410360849.XA CN105337896A (en) 2014-07-25 2014-07-25 Message processing method and device

Publications (1)

Publication Number Publication Date
CN105337896A true CN105337896A (en) 2016-02-17

Family

ID=55162501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410360849.XA Pending CN105337896A (en) 2014-07-25 2014-07-25 Message processing method and device

Country Status (2)

Country Link
CN (1) CN105337896A (en)
WO (1) WO2016011894A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329813A (en) * 2017-06-09 2017-11-07 北京中科睿芯科技有限公司 A kind of global perception data active prefetching method and system towards many-core processor
CN107454016A (en) * 2017-09-29 2017-12-08 湖南恒茂高科股份有限公司 Message process device and method
CN109391559A (en) * 2017-08-10 2019-02-26 华为技术有限公司 The network equipment
CN109617832A (en) * 2019-01-31 2019-04-12 新华三技术有限公司合肥分公司 Message caching method and device
CN110532067A (en) * 2018-05-25 2019-12-03 杭州海康威视数字技术股份有限公司 Event-handling method, device, equipment and storage medium
CN110661731A (en) * 2019-09-26 2020-01-07 光大兴陇信托有限责任公司 Message processing method and device
CN110855528A (en) * 2019-11-22 2020-02-28 新华三技术有限公司 Message processing method and test equipment
CN111083075A (en) * 2019-12-20 2020-04-28 盛科网络(苏州)有限公司 Method for processing message by multi-core SoC and SoC applying same
CN111294291A (en) * 2020-01-16 2020-06-16 新华三信息安全技术有限公司 Protocol message processing method and device
CN112152940A (en) * 2019-06-28 2020-12-29 华为技术有限公司 Message processing method, device and system
CN112187665A (en) * 2020-09-28 2021-01-05 杭州迪普科技股份有限公司 Message processing method and device
WO2021135810A1 (en) * 2019-12-30 2021-07-08 上海商汤智能科技有限公司 Data processing method and apparatus, computer device, storage medium, and computer program
CN113630318A (en) * 2020-05-06 2021-11-09 华为技术有限公司 Message transmission method and frame type communication equipment
CN115086248A (en) * 2022-06-15 2022-09-20 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer equipment

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958953A (en) * 2018-06-29 2018-12-07 南京南瑞继保电气有限公司 A kind of method for message interaction based on multi-core processor
CN110177054B (en) * 2019-05-22 2022-08-19 新华三技术有限公司 Port queue scheduling method, device, network controller and storage medium
CN111262792B (en) * 2020-01-17 2022-04-01 新华三信息安全技术有限公司 Message forwarding method, device, network equipment and storage medium
CN111865811B (en) * 2020-06-24 2022-06-17 浪潮(北京)电子信息产业有限公司 Data processing method, device, equipment and medium
CN113032798A (en) * 2021-01-29 2021-06-25 新华三信息安全技术有限公司 File encryption and decryption method, equipment and storage medium
CN113098580B (en) * 2021-02-25 2022-11-08 深圳震有科技股份有限公司 Satellite air interface message caching and speed limiting processing method, device, equipment and medium
CN113824651B (en) * 2021-11-25 2022-02-22 上海金仕达软件科技有限公司 Market data caching method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090225771A1 (en) * 2008-03-06 2009-09-10 Nec Corporation Apparatus and method for tcp buffer copy distributed parallel processing
CN101616083A (en) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 A kind of message forwarding method and device
CN101699788A (en) * 2009-10-30 2010-04-28 清华大学 Modularized network intrusion detection system
CN102521047A (en) * 2011-11-15 2012-06-27 重庆邮电大学 Method for realizing interrupted load balance among multi-core processors
CN102811169A (en) * 2012-07-24 2012-12-05 成都卫士通信息产业股份有限公司 Virtual private network (VPN) implementation method and system for performing multi-core parallel processing by using Hash algorithm
CN103218455A (en) * 2013-05-07 2013-07-24 中国人民解放军国防科学技术大学 Method of high-speed concurrent processing of user requests of Key-Value database
US8693490B1 (en) * 2012-12-20 2014-04-08 Unbound Networks, Inc. Parallel processing using multi-core processor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761619B2 (en) * 2005-05-13 2010-07-20 Microsoft Corporation Method and system for parallelizing completion event processing
CN101304322B (en) * 2008-06-30 2010-07-28 杭州华三通信技术有限公司 Network equipment and packet forwarding method
CN102780616B (en) * 2012-07-19 2015-06-17 北京星网锐捷网络技术有限公司 Network equipment and method and device for message processing based on multi-core processor

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090225771A1 (en) * 2008-03-06 2009-09-10 Nec Corporation Apparatus and method for tcp buffer copy distributed parallel processing
CN101616083A (en) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 A kind of message forwarding method and device
CN101699788A (en) * 2009-10-30 2010-04-28 清华大学 Modularized network intrusion detection system
CN102521047A (en) * 2011-11-15 2012-06-27 重庆邮电大学 Method for realizing interrupted load balance among multi-core processors
CN102811169A (en) * 2012-07-24 2012-12-05 成都卫士通信息产业股份有限公司 Virtual private network (VPN) implementation method and system for performing multi-core parallel processing by using Hash algorithm
US8693490B1 (en) * 2012-12-20 2014-04-08 Unbound Networks, Inc. Parallel processing using multi-core processor
US20140177643A1 (en) * 2012-12-20 2014-06-26 Unbound Networks, Inc. Parallel processing using multi-core processor
CN103218455A (en) * 2013-05-07 2013-07-24 中国人民解放军国防科学技术大学 Method of high-speed concurrent processing of user requests of Key-Value database

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329813A (en) * 2017-06-09 2017-11-07 北京中科睿芯科技有限公司 A kind of global perception data active prefetching method and system towards many-core processor
CN107329813B (en) * 2017-06-09 2020-08-04 北京中科睿芯科技有限公司 Global sensing data active prefetching method and system for many-core processor
CN109391559A (en) * 2017-08-10 2019-02-26 华为技术有限公司 The network equipment
US11165710B2 (en) 2017-08-10 2021-11-02 Huawei Technologies Co., Ltd. Network device with less buffer pressure
CN107454016A (en) * 2017-09-29 2017-12-08 湖南恒茂高科股份有限公司 Message process device and method
CN110532067A (en) * 2018-05-25 2019-12-03 杭州海康威视数字技术股份有限公司 Event-handling method, device, equipment and storage medium
CN109617832A (en) * 2019-01-31 2019-04-12 新华三技术有限公司合肥分公司 Message caching method and device
CN109617832B (en) * 2019-01-31 2022-07-08 新华三技术有限公司合肥分公司 Message caching method and device
CN112152940A (en) * 2019-06-28 2020-12-29 华为技术有限公司 Message processing method, device and system
CN112152940B (en) * 2019-06-28 2022-08-09 华为云计算技术有限公司 Message processing method, device and system
CN110661731A (en) * 2019-09-26 2020-01-07 光大兴陇信托有限责任公司 Message processing method and device
CN110855528A (en) * 2019-11-22 2020-02-28 新华三技术有限公司 Message processing method and test equipment
CN111083075B (en) * 2019-12-20 2022-01-11 苏州盛科通信股份有限公司 Method for processing message by multi-core SoC and SoC applying same
CN111083075A (en) * 2019-12-20 2020-04-28 盛科网络(苏州)有限公司 Method for processing message by multi-core SoC and SoC applying same
WO2021135810A1 (en) * 2019-12-30 2021-07-08 上海商汤智能科技有限公司 Data processing method and apparatus, computer device, storage medium, and computer program
CN111294291A (en) * 2020-01-16 2020-06-16 新华三信息安全技术有限公司 Protocol message processing method and device
CN113630318A (en) * 2020-05-06 2021-11-09 华为技术有限公司 Message transmission method and frame type communication equipment
CN112187665A (en) * 2020-09-28 2021-01-05 杭州迪普科技股份有限公司 Message processing method and device
CN112187665B (en) * 2020-09-28 2023-04-07 杭州迪普科技股份有限公司 Message processing method and device
CN115086248A (en) * 2022-06-15 2022-09-20 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer equipment

Also Published As

Publication number Publication date
WO2016011894A1 (en) 2016-01-28

Similar Documents

Publication Publication Date Title
CN105337896A (en) Message processing method and device
CN105577567B (en) Network packet method for parallel processing based on Intel DPDK
US8155134B2 (en) System-on-chip communication manager
CN102301664B (en) Method and device for dispatching streams of multicore processor
CN107729135B (en) Method and device for parallel data processing in sequence
CN107579926A (en) The QoS methods to set up of Ceph cloud storage systems based on token bucket algorithm
CN106571978B (en) Data packet capturing method and device
US20210132992A1 (en) Techniques for behavioral pairing in a task assignment system
JP6505610B2 (en) System and method for using a sequencer in concurrent priority queue
EP1346549B1 (en) Intercommunication preprocessor
CN110011936B (en) Thread scheduling method and device based on multi-core processor
CN102521057A (en) Resource scheduling method and device
RU2641250C2 (en) Device and method of queue management
US20140109100A1 (en) Scheduling method and system
CN109710414A (en) A kind of job scheduling method, device, equipment and storage medium
CN108304272B (en) Data IO request processing method and device
CN102799487A (en) IO (input/output) scheduling method and apparatus based on array/LUN (Logical Unit Number)
CA2697994A1 (en) Method and apparatus for data processing using queuing
CN113835611A (en) Storage scheduling method, device and storage medium
CN107911317B (en) Message scheduling method and device
CN113010464A (en) Data processing apparatus and device
CN112272933A (en) Queue control method, device and storage medium
CN105637475B (en) Concurrent access method and system
JP2002278778A (en) Scheduling device in symmetrical multiprocessor system
CN108139969A (en) A kind of internal memory configuring method, apparatus and system

Legal Events

Date Code Title Description
C06 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

Application publication date: 20160217

RJ01 Rejection of invention patent application after publication