CN109729021A - A kind of message processing method and electronic equipment - Google Patents

A kind of message processing method and electronic equipment Download PDF

Info

Publication number
CN109729021A
CN109729021A CN201811609755.6A CN201811609755A CN109729021A CN 109729021 A CN109729021 A CN 109729021A CN 201811609755 A CN201811609755 A CN 201811609755A CN 109729021 A CN109729021 A CN 109729021A
Authority
CN
China
Prior art keywords
message
processor
queue
class
processing
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
CN201811609755.6A
Other languages
Chinese (zh)
Inventor
张碧林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software 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 Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN201811609755.6A priority Critical patent/CN109729021A/en
Publication of CN109729021A publication Critical patent/CN109729021A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of message processing method and electronic equipments, this method is applied to electronic equipment, the electronic equipment has at least one processor, the described method includes: receiving multiple messages, and classification processing is carried out to the message, the message is at least divided into first kind message and the second class message, wherein the first kind message and the second class message have different weights;The message is arranged separately in multiple and different queues by the type based on the message, and makes the message that same type is only arranged in the same queue, wherein the queue is corresponding with the processor, or is corresponding with the core of the processor;The message in the queue corresponding thereto is handled using the processor.The higher control infomational message of weight can be different from the lower service message of weight in the treatment process of message by this method, ensure that control infomational message is not lost during processor.

Description

A kind of message processing method and electronic equipment
Technical field
The present invention relates to data processing field relevant to network communication, in particular to a kind of message processing method and electronics Equipment.
Background technique
Network is at essential tool in society, in face of increasingly complicated business scenario, more and more electricity at present Sub- equipment is added into network.In many cases, a large amount of electronic equipment is all using the concatenated formal distribution of communication line In a network, as being only attached by a pair of communication interface between two electronic equipments.In such configuration surroundings, not only Service traffics need to handle between the two systems, while also needing to handle or synchronize some important controls between two systems Information (need to be handled corresponding control infomational message).Detection and place of the processor of usual electronic equipment to service message Reason needs to consume the long period, if the transmission rate of service message is quickly, the packet receiving team of the communication interface between two systems Column can be filled there is a situation where packet loss, phenomena such as packet loss can also occur at this moment important control infomational message, be affected pair The acquisition and processing of important control infomational message.
Summary of the invention
The embodiment of the present invention be designed to provide a kind of message processing method and electronic equipment, this method can be in messages Treatment process in, the higher control infomational message of weight is different from the lower service message of weight, ensure that control information Message is not lost during processor.
In order to solve the above-mentioned technical problem, embodiments herein adopts the technical scheme that a kind of Message processing side Method, is applied to electronic equipment, and the electronic equipment has at least one processor, which comprises
Multiple messages are received, and classification processing is carried out to the message, the message is at least divided into first kind report Text and the second class message, wherein the first kind message and the second class message have different weights;
The message is arranged separately in multiple and different queues by the type based on the message, and makes the same queue In be only arranged with the message of same type, wherein the queue is corresponding with the processor, or is corresponding with the processing The core of device;
The message in the queue corresponding thereto is handled using the processor.
Preferably, the multiple messages of the reception, and classification processing is carried out to the message and includes:
The head data and body of data of the message are analyzed, to obtain preset mark field;
The type of the message is determined according to the preset mark field.
Preferably, the multiple messages of the reception, and classification processing is carried out to the message and includes:
Using field programmable gate array, and determine according to the source address of the message and destination address the class of the message Type, alternatively,
Using field programmable gate array, and determine according to the custom field of the message type of the message, Described in message include based on IP address transmission message.
Preferably, the electronic equipment at least has first processor and second processor, it is described to utilize the place The message in the reason device processing queue corresponding thereto includes:
First kind message is distributed into first processor processing;
Second class message is distributed into first processor and/or second processor processing, wherein the first kind message Weight is higher than the weight of the second class message.
Preferably, the message is arranged separately in multiple and different queues by the type based on the message, And the message for being only arranged with same type in the same queue is set to include:
The first kind message is arranged in first queue, the second class message is arranged separately on second team Column neutralize in third queue, so that the first processor handles the first kind message and part the second class message, institute State second processor processing part the second class message, wherein the first queue has the stream with the first kind message Measure corresponding preset length.
The embodiment of the invention also provides a kind of electronic equipment, have at least one processor, and the electronic equipment includes:
Receiving module, the receiving module, which is configured that, receives multiple messages, and carries out classification processing to the message, with The message is at least divided into first kind message and the second class message, wherein the first kind message and the second class report Stationery has different weights;
Processing module, it is more that the processing module is configured that the message is arranged separately on by the type based on the message In a different queue, and make the message that same type is only arranged in the same queue, wherein the queue is corresponding with The processor, or it is corresponding with the core of the processor;The queue corresponding thereto is handled using the processor In the message.
Preferably, the receiving module is further configured to:
The head data and body of data of the message are analyzed, to obtain preset mark field;
The type of the message is determined according to the preset mark field.
Preferably, the receiving module is further configured to:
Using field programmable gate array, and determine according to the source address of the message and destination address the class of the message Type, alternatively,
Using field programmable gate array, and determine according to the custom field of the message type of the message, Described in message include based on IP address transmission message.
Preferably, the electronic equipment at least has a first processor and second processor, the processing module is into one Step is configured that
First kind message is distributed into first processor processing;
Second class message is distributed into first processor and/or second processor processing, wherein the first kind message Weight is higher than the weight of the second class message.
Preferably, the processing module is further configured to:
The first kind message is arranged in first queue, the second class message is arranged separately on second team Column neutralize in third queue, so that the first processor handles the first kind message and part the second class message, institute State second processor processing part the second class message, wherein the first queue has the stream with the first kind message Measure corresponding preset length.
The beneficial effect of the embodiment of the present invention is: this method can be higher by weight in the treatment process of message Control infomational message is different from the lower service message of weight, ensure that control infomational message is not lost during processor It loses.
Detailed description of the invention
Fig. 1 is the flow chart of the message processing method of the embodiment of the present invention;
Fig. 2 is the flow chart of step S1 in Fig. 1 of the embodiment of the present invention;
Fig. 3 is the flow chart of step S3 in Fig. 1 of the embodiment of the present invention;
Fig. 4 is the message circulation schematic diagram of a specific embodiment of the message processing method of the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the electronic equipment of the embodiment of the present invention.
Specific embodiment
Various schemes and feature of the invention are described herein with reference to attached drawing.
It should be understood that various modifications can be made to the embodiment invented herein.Therefore, description above should not regard To limit, and only as the example of embodiment.Those skilled in the art will expect within the scope and spirit of this invention Other modifications.
The attached drawing being included in the description and forms part of the description shows the embodiment of the present invention, and with it is upper What face provided is used to explain the present invention substantially description and the detailed description given below to embodiment of the invention together Principle.
It is of the invention by the description of the preferred form with reference to the accompanying drawings to the embodiment for being given as non-limiting example These and other characteristic will become apparent.
Although being also understood that invention has been described referring to some specific examples, those skilled in the art Member realizes many other equivalents of the invention in which can determine, they have feature as claimed in claim and therefore all In the protection scope defined by whereby.
When read in conjunction with the accompanying drawings, in view of following detailed description, above and other aspect of the invention, feature and advantage will become It is more readily apparent.
Specific embodiments of the present invention are described hereinafter with reference to attached drawing;It will be appreciated, however, that the embodiment invented is only Various ways implementation can be used in example of the invention.Known and/or duplicate function and structure and be not described in detail to avoid Unnecessary or extra details makes the present invention smudgy.Therefore, the specific structural and functionality invented herein is thin Section is not intended to restrictions, but as just the basis of claim and representative basis be used to instructing those skilled in the art with Substantially any appropriate detailed construction diversely uses the present invention.
This specification can be used phrase " in one embodiment ", " in another embodiment ", " in another embodiment In " or " in other embodiments ", it can be referred to one or more of identical or different embodiment according to the present invention.
A kind of message processing method of the embodiment of the present invention, is applied to the electronic equipments such as computer, the electronic equipment and its His equipment is communicated to connect by communication line and other equipment, data interaction can be carried out with other equipment, as the electronics is set Standby is the first electronic equipment, is communicated to connect by communication interface and the second electronic equipment.The electronic equipment has at least one Processor, such as can have multiple processors, and processor is mutually coordinated to handle task, as shown in Figure 1, the processing method includes Following steps:
S1, receives multiple messages, and carries out classification processing to message, and message is at least divided into first kind message and the Two class messages, wherein first kind message and the second class message have different weights.Electronic equipment can by communication interface come The message that other equipment are sent is received, needs to carry out classification processing to the message after reception.It can be according to message in the present embodiment Practical composition situation message is classified, be at least divided into first kind message and the second class message, this makes it possible to according to power Different types of message is handled again, this includes individually handling the higher message of weight, improve the place of electronic equipment Manage the treatment effeciency of device.
Message is arranged separately in multiple and different queues based on the type of message, and makes only to arrange in same queue by S2 There is the message of same type, wherein queue is corresponding with processor, or is corresponding with the core of processor.
S3 handles the message in queue corresponding thereto using processor.
Queue is a kind of linear list in data structure, it allows to carry out delete operation in the front end (front) of table, and in table Rear end (rear) carry out insertion operation, the length of queue solves the size of its memory space, the i.e. quantity of stored messages, when When the processing speed of processor cannot meet the needs, the quantity of message be more than queue length after spillover can occur, thus Message loss is caused, in this implementation, since different messages being arranged in corresponding queue according to type, so that processing Device processing frequency when handling a kind of message in a queue is steady, big fluctuation will not occur, and can effectively improve The treatment effeciency of processor, it is also important that since a kind of message with higher weights is aligned in a queue, and And the queue can be arranged according to this kind of message, therefore can be to avoid this kind of message with higher weights during processing Loss occurs.For example, control infomational message has higher weights, all control infomational messages are arranged in the same team In column, and the queue is corresponding with a processor, enables a processor to using matched processing mode processing control Infomational message improves treatment effeciency, while guaranteeing that the control infomational message will not be lost during receiving message.Another In a embodiment, processor can have multiple cores, and each queue can also be corresponding with core, and a such as queue is one corresponding Core or the corresponding core of multiple queues, so that the mode phase of the processing mode of core and above-mentioned processor processing message Seemingly.
In addition, during message in processor processing queue corresponding thereto, for higher weights For message, often itself flow is less, and such as the control infomational message flow with higher weights is less, will not be in the short time It is interior to take corresponding queue, therefore be further able to guarantee that corresponding processor can satisfy processing requirement, guarantee the tool Have the control infomational message of higher weights does not have packet loss phenomenon in receive process.In one embodiment, it can also incite somebody to action The length or capacity of queue are preset according to actual use situation, such as can be according to the flow for receiving message, Huo Zhegen It is preset according to the flow for the message for receiving type corresponding with the queue, to further avoid message loss phenomenon hair It is raw.
In one embodiment of the invention, as shown in Fig. 2, the multiple messages of the reception, and classify to message The step of processing the following steps are included:
S11 analyzes the head data and body of data of message, to obtain preset mark field;
S12 determines the type of message according to preset mark field.
Specifically, message has head data and body of data, preset mark field can be pre-placed in messages, Such as it can be placed among a data or among body of data, naturally it is also possible to it is placed between data and body of data, It since head data and body of data all have significant feature, is easy to differentiate, and then is easy therefrom to get preset mark Field.Such as in ethernet networks, message is all fixed with MAC header (head data) beginning, can be pre- between MAC header and data The preset mark field for first encapsulating several bytes is the message of which type come identification message with these preset mark fields, Control infomational message is such as indicated with the first label.It is pre- by having in analysis message when electronic equipment is when receiving message If the type for the determination message that tag field just can be read fastly, and then determine for such message to be stored in that queue.
In one embodiment of the invention, the multiple messages of the reception, and the step of classification processing is carried out to message The following steps are included:
Using field programmable gate array, and determine according to the source address of message and destination address the type of message, alternatively, Using field programmable gate array, and determine according to the custom field of message the type of message, wherein message includes being based on IP The message of address transmission.
Specifically, field programmable gate array (FPGA, Field programmable gate array) is programmable Device is compared with conventional logic circuit and gate array (such as PAL, GAL and CPLD device), and field programmable gate array has difference Structure.Field programmable gate array realizes combinational logic using small-sized look-up table, can not only realize combination logic function but also can Realize the basic logic unit module of sequential logic function.The logic of field programmable gate array is by internally static storage Unit loads programming data come what is realized, stores value in a memory cell and determines the logic function of logic unit and each Connecting mode between module or between module and I/O, and finally determine function achieved by field programmable gate array, it is existing Field programmable gate array allows unlimited number of programming.Therefore field programmable gate array can be programmed in the present embodiment with Make that there is biggish flexibility and scalability it is suitable for the reception and analysis message.In the present embodiment, message is based on IP Address transmission, electricity can be such as simulated with field programmable gate array come the communication interface and related hardware of analog electronic equipment The network interface card of sub- equipment receives message, and field programmable gate array can determine message according to the source address and destination address of message Type, i.e., the type of message is determined according to the relevant information of the source of message and destination.In another embodiment, existing Field programmable gate array can determine the type of message according to the custom field of message, especially for some more special For message, custom field, such field programmable gate can be preset in messages according to the particular content of the message Array can judge the type of message when after receiving message and to the message analysis according to custom field.
In one embodiment of the invention, as shown in figure 3, electronic equipment at least has first processor and second processing Device, first processor and second processor can cooperate with each other, such as execute different tasks respectively or be performed simultaneously The step of identical task, the message handled using processor in queue corresponding thereto the following steps are included:
First kind message is distributed to first processor processing by S31;
Second class message distributed to first processor and/or second processor and handled by S32, wherein first kind message Weight is higher than the weight of the second class message.
Specifically, first processor can such as control infomational message with the higher first kind message of alignment processing weight, the One processor can be handled smoothly when processing controls infomational message, will not be caused too to the working frequency of first processor Big fluctuation, ensure that processing speed, so that Loss will not occur for the control infomational message.In the present embodiment, it will use First processor and/or second processor handle the second class message, such as the processing lower service message of weight, the service message Quantity it is larger, in order to guarantee as far as possible improve treatment effeciency the handling the service message of the task can be distributed at second Device is managed, or distributes to first processor and second processor simultaneously, due to being for same industry during the treatment Business message can also avoid the loss of service message to greatest extent, and since first processor is in processing control information report It is only needed using fewer resource when literary, therefore there are also rest processing capacities to carry out processing business message, avoids process resource waste.
In one embodiment of the invention, described that message is arranged separately on by multiple and different teams based on the type of message In column, and make the message that same type is only arranged in same queue the following steps are included: first kind message is arranged in first In queue, by the second class message be arranged separately in second queue and third queue in so that first processor handle the first kind Message and part the second class message, second processor handle the second class of part message, wherein first queue has and first kind report The corresponding preset length of flow of text.
Specifically in conjunction with Fig. 4, first kind message, which can be, controls the lesser messages of received quantities such as infomational message, and second Class message can be the biggish service message of received quantity, therefore control infomational message can only be arranged (storage) first In queue, handled by first processor;And by service message be arranged in second queue and third queue in, or even also arranged It is listed in other queues (according to actual needs to determine), second queue is handled by first processor, and by second processor Third queue is handled, guarantees treatment effeciency.Furthermore during processing, phase first can be formed based on the message of arrangement in the queue The logical relation answered, is handled further according to the logical relation by processor, and the first kind of first queue within hardware will such as be arranged Message extracts, and loads corresponding program in memory so that it is associated with first processor;Within hardware by setting Second class message of second queue and the second class message of third queue extract, and in memory load corresponding program with Keep it associated with second processor, to guarantee that each processor can correctly search out corresponding message, and correct The corresponding message of processing.More queues can also be set in certain the present embodiment and separate the report of more types Text, processing mode is similar with the above process, and details are not described herein.
The present invention also provides a kind of electronic equipment, which is set by communication line with other with other equipment Standby communication connection can carry out data interaction with other equipment, if the electronic equipment is the first electronic equipment, be connect by communication Mouth is communicated to connect with the second electronic equipment.The electronic equipment has at least one processor, such as can have multiple processors, locates Reason device is mutually coordinated to handle task, as shown in figure 5, the electronic equipment includes:
Receiving module, receiving module, which is configured that, receives multiple messages, and carries out classification processing to message, extremely by message First kind message and the second class message are divided into less, wherein first kind message and the second class message have different weights.It receives Module can receive the message of other equipment transmission by communication interface, need to carry out classification processing to the message after reception. Receiving module can classify message according to the practical composition situation of message in the present embodiment, at least be divided into first kind message With the second class message, this makes it possible to handle different types of message according to weight, this includes higher to weight Message is individually handled, and improves the treatment effeciency of the processor of electronic equipment.
Processing module, processing module are configured that message is arranged separately in multiple and different queues by the type based on message, And make the message that same type is only arranged in same queue, wherein queue is corresponding with processor, or is corresponding with processor Core;The message in queue corresponding thereto is handled using processor.
Queue is a kind of linear list in data structure, it allows to carry out delete operation in the front end (front) of table, and in table Rear end (rear) carry out insertion operation, the length of queue solves the size of its memory space, the i.e. quantity of stored messages, when When the processing speed of processor cannot meet the needs, the quantity of message be more than queue length after spillover can occur, thus Cause message loss, in this implementation, since different messages is arranged in corresponding queue by processing module according to type, So that processor processing frequency when handling a kind of message in a queue is steady, big fluctuation will not occur, and can The treatment effeciency of processor is effectively improved, it is also important that since a kind of message with higher weights is aligned in one In queue, and the queue can be arranged according to this kind of message, therefore can exist to avoid this kind of message with higher weights Loss occurs in treatment process.For example, control infomational message has higher weights, all control infomational messages are arranged In the same queue, and the queue is corresponding with a processor, enables a processor to using matched processing side Formula processing control infomational message, improves treatment effeciency, while guaranteeing that the control information will not be lost during receiving message Message.In another embodiment, processor can have multiple cores, and each queue can also be corresponding with core, and such as one The corresponding core of queue or the corresponding core of multiple queues, so that the processing mode of core and the processing of above-mentioned processor are reported The mode of text is similar.
In addition, during message in processor processing queue corresponding thereto, for higher weights For message, often itself flow is less, and such as the control infomational message flow with higher weights is less, will not be in the short time It is interior to take corresponding queue, therefore be further able to guarantee that corresponding processor can satisfy processing requirement, guarantee the tool Have the control infomational message of higher weights does not have packet loss phenomenon in receive process.In one embodiment, processing module The length of queue or capacity can also be preset according to actual use situation, such as can be according to the stream for receiving message Amount, or preset according to the flow for the message for receiving type corresponding with the queue, to further avoid message Loss occurs.
In one embodiment of the invention, receiving module is further configured to: analyzing the head data and data sheet of message Body, to obtain preset mark field;The type of message is determined according to preset mark field.
Specifically, message has head data and body of data, preset mark field can be pre-placed in messages, Such as it can be placed among a data or among body of data, naturally it is also possible to it is placed between data and body of data, It since head data and body of data all have significant feature, is easy to differentiate, and then receiving module is easy therefrom to get Preset mark field.Such as in ethernet networks, message is all fixed with MAC header (head data) beginning, can be in MAC header and number Which type is the preset mark field for encapsulating several bytes in advance between come identification message be with these preset mark fields Message, such as with first label come indicate control infomational message.When receiving module is when receiving message, by analysis message The determination message for thering is preset mark field just can read fastly type, and then determine such message being stored in that queue In the middle.
In one embodiment of the invention, receiving module is further configured to: utilizing field programmable gate array, and root The type of message is determined according to the source address and destination address of message, alternatively, using field programmable gate array, and according to message Custom field determines the type of message, and wherein message includes the message based on IP address transmission.
Specifically, field programmable gate array (FPGA, Field programmable gate array) is programmable Device is compared with conventional logic circuit and gate array (such as PAL, GAL and CPLD device), and field programmable gate array has difference Structure.Field programmable gate array realizes combinational logic using small-sized look-up table, can not only realize combination logic function but also can Realize the basic logic unit module of sequential logic function.The logic of field programmable gate array is by internally static storage Unit loads programming data come what is realized, stores value in a memory cell and determines the logic function of logic unit and each Connecting mode between module or between module and I/O, and finally determine function achieved by field programmable gate array, it is existing Field programmable gate array allows unlimited number of programming.Therefore field programmable gate array can be programmed in the present embodiment with Make that there is biggish flexibility and scalability it is suitable for the reception and analysis message.In the present embodiment, message is based on IP Address transmission, receiving module can with field programmable gate array come the communication interface and related hardware of analog electronic equipment, Message is received such as the network interface card of analog electronic equipment, field programmable gate array can be according to the source address and destination address of message It determines the type of message, i.e., determines the type of message according to the relevant information of the source of message and destination.In another reality It applies in example, receiving module can determine the type of message using field programmable gate array according to the custom field of message, special It is not that can be preset in messages according to the particular content of the message customized for some more special messages Field, such field programmable gate array can be sentenced when after receiving message and to the message analysis according to custom field The type of disconnected message.
In one embodiment of the invention, electronic equipment at least has first processor and second processor, handles mould Block is further configured to:
First kind message is distributed into first processor processing;
Second class message is distributed into first processor and/or second processor processing, wherein the weight of first kind message Higher than the weight of the second class message.
Specifically, first processor can such as control infomational message with the higher first kind message of alignment processing weight, the One processor can be handled smoothly when processing controls infomational message, will not be caused too to the working frequency of first processor Big fluctuation, ensure that processing speed, so that Loss will not occur for the control infomational message.In the present embodiment, it will use First processor and/or second processor handle the second class message, such as the processing lower service message of weight, the service message Quantity it is larger, in order to guarantee as far as possible improve treatment effeciency processing module can will handle the service message task distribution To second processor, or first processor and second processor are distributed to simultaneously, due to being directed to during the treatment Same service message can also avoid the loss of service message to greatest extent, and since first processor is in processing control It is only needed using fewer resource when infomational message processed, therefore there are also rest processing capacities to carry out processing business message, avoids processing money Source waste.
In one embodiment of the invention, processing module is further configured to: first kind message is arranged in first team In column, by the second class message be arranged separately in second queue and third queue in so that first processor handle first kind report Text and the second class of part message, second processor handle the second class of part message, wherein first queue has and first kind message The corresponding preset length of flow.
Specifically in conjunction with Fig. 4, first kind message, which can be, controls the lesser messages of received quantities such as infomational message, and second Class message can be the biggish service message of received quantity, therefore control infomational message can only be arranged and (be deposited by processing module Storage) in first queue, it is handled by first processor;And by service message be arranged in second queue and third queue in, very To being also arranged in other queues (according to actual needs to determine), second queue is handled by first processor, and by Second processor handles third queue, guarantees treatment effeciency.Furthermore during processing, processing module can first be based on being arranged in Message in queue forms corresponding logical relation, is handled further according to the logical relation by processor, will such as be arranged within hardware The first kind message of first queue extract, and in memory load corresponding program so that it is related to first processor Connection;Setting the second class message of second queue within hardware and the second class message of third queue are extracted, and Corresponding program is loaded in memory so that it is associated with second processor, to guarantee that each processor can be searched out correctly Corresponding message, and correctly handle corresponding message.Can also be arranged in certain the present embodiment more queues and The message of more types is separated, processing mode is similar with the above process, and details are not described herein.
Above embodiments are only exemplary embodiment of the present invention, are not used in the limitation present invention, protection scope of the present invention It is defined by the claims.Those skilled in the art can within the spirit and scope of the present invention make respectively the present invention Kind modification or equivalent replacement, this modification or equivalent replacement also should be regarded as being within the scope of the present invention.

Claims (10)

1. a kind of message processing method, which is characterized in that be applied to electronic equipment, the electronic equipment is at least one processing Device, which comprises
Receive multiple messages, and classification processing carried out to the message, by the message at least divide into first kind message and Second class message, wherein the first kind message and the second class message have different weights;
The message is arranged separately in multiple and different queues by the type based on the message, and is made in the same queue only It is arranged with the message of same type, wherein the queue is corresponding with the processor, or is corresponding with the processor Core;
The message in the queue corresponding thereto is handled using the processor.
2. the method according to claim 1, wherein the multiple messages of the reception, and being carried out to the message Classification processing includes:
The head data and body of data of the message are analyzed, to obtain preset mark field;
The type of the message is determined according to the preset mark field.
3. the method according to claim 1, wherein the multiple messages of the reception, and being carried out to the message Classification processing includes:
Using field programmable gate array, and determine according to the source address of the message and destination address the type of the message, Alternatively,
Using field programmable gate array, and determine according to the custom field of the message type of the message, wherein institute Stating message includes the message based on IP address transmission.
4. the method according to claim 1, wherein the electronic equipment at least has first processor and second Processor, it is described to handle the message in the queue corresponding thereto using the processor and include:
First kind message is distributed into first processor processing;
Second class message is distributed into first processor and/or second processor processing, wherein the weight of the first kind message Higher than the weight of the second class message.
5. according to the method described in claim 4, it is characterized in that, the type based on the message divides the message It is not arranged in multiple and different queues, and makes the message for being only arranged with same type in the same queue include:
The first kind message is arranged in first queue, the second class message is arranged separately in the second queue In third queue, so that the first processor handles the first kind message and part the second class message, described the Two processors handle part the second class message, wherein the first queue has the flow phase with the first kind message Corresponding preset length.
6. a kind of electronic equipment, which is characterized in that there is at least one processor, the electronic equipment includes:
Receiving module, the receiving module, which is configured that, receives multiple messages, and carries out classification processing to the message, by institute It states message and at least divides into first kind message and the second class message, wherein the first kind message and the second class message tool There is different weights;
Processing module, the processing module be configured that the type based on the message by the message be arranged separately on it is multiple not With in queue, and make the message that same type is only arranged in the same queue, wherein the queue is corresponding with described Processor, or it is corresponding with the core of the processor;It is handled using the processor in the queue corresponding thereto The message.
7. electronic equipment according to claim 6, which is characterized in that the receiving module is further configured to:
The head data and body of data of the message are analyzed, to obtain preset mark field;
The type of the message is determined according to the preset mark field.
8. electronic equipment according to claim 6, which is characterized in that the receiving module is further configured to:
Using field programmable gate array, and determine according to the source address of the message and destination address the type of the message, Alternatively,
Using field programmable gate array, and determine according to the custom field of the message type of the message, wherein institute Stating message includes the message based on IP address transmission.
9. electronic equipment according to claim 6, which is characterized in that the electronic equipment at least have first processor and Second processor, the processing module are further configured to:
First kind message is distributed into first processor processing;
Second class message is distributed into first processor and/or second processor processing, wherein the weight of the first kind message Higher than the weight of the second class message.
10. electronic equipment according to claim 9, which is characterized in that the processing module is further configured to:
The first kind message is arranged in first queue, the second class message is arranged separately in the second queue In third queue, so that the first processor handles the first kind message and part the second class message, described the Two processors handle part the second class message, wherein the first queue has the flow phase with the first kind message Corresponding preset length.
CN201811609755.6A 2018-12-27 2018-12-27 A kind of message processing method and electronic equipment Pending CN109729021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811609755.6A CN109729021A (en) 2018-12-27 2018-12-27 A kind of message processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811609755.6A CN109729021A (en) 2018-12-27 2018-12-27 A kind of message processing method and electronic equipment

Publications (1)

Publication Number Publication Date
CN109729021A true CN109729021A (en) 2019-05-07

Family

ID=66297363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811609755.6A Pending CN109729021A (en) 2018-12-27 2018-12-27 A kind of message processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN109729021A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110943941A (en) * 2019-12-06 2020-03-31 北京天融信网络安全技术有限公司 Message receiving method, message sending method, network card and electronic equipment
CN112799840A (en) * 2021-01-29 2021-05-14 北京百度网讯科技有限公司 Method, device, equipment and storage medium for transmitting data
CN113630318A (en) * 2020-05-06 2021-11-09 华为技术有限公司 Message transmission method and frame type communication equipment
WO2024011854A1 (en) * 2022-07-14 2024-01-18 天翼云科技有限公司 Message transmission method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030081615A1 (en) * 2001-10-22 2003-05-01 Sun Microsystems, Inc. Method and apparatus for a packet classifier
CN104579962A (en) * 2015-01-23 2015-04-29 盛科网络(苏州)有限公司 Method and device for differentiating QoS strategies of different messages
CN105511954A (en) * 2014-09-23 2016-04-20 华为技术有限公司 Method and device for message processing
CN106713185A (en) * 2016-12-06 2017-05-24 瑞斯康达科技发展股份有限公司 Load balancing method and apparatus of multi-core CPU
CN106789152A (en) * 2016-11-17 2017-05-31 东软集团股份有限公司 Processor extended method and device based on many queue network interface cards
CN107659515A (en) * 2017-09-29 2018-02-02 曙光信息产业(北京)有限公司 Message processing method, device, message processing chip and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030081615A1 (en) * 2001-10-22 2003-05-01 Sun Microsystems, Inc. Method and apparatus for a packet classifier
CN105511954A (en) * 2014-09-23 2016-04-20 华为技术有限公司 Method and device for message processing
CN104579962A (en) * 2015-01-23 2015-04-29 盛科网络(苏州)有限公司 Method and device for differentiating QoS strategies of different messages
CN106789152A (en) * 2016-11-17 2017-05-31 东软集团股份有限公司 Processor extended method and device based on many queue network interface cards
CN106713185A (en) * 2016-12-06 2017-05-24 瑞斯康达科技发展股份有限公司 Load balancing method and apparatus of multi-core CPU
CN107659515A (en) * 2017-09-29 2018-02-02 曙光信息产业(北京)有限公司 Message processing method, device, message processing chip and server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110943941A (en) * 2019-12-06 2020-03-31 北京天融信网络安全技术有限公司 Message receiving method, message sending method, network card and electronic equipment
CN110943941B (en) * 2019-12-06 2022-03-11 北京天融信网络安全技术有限公司 Message receiving method, network card and electronic equipment
CN113630318A (en) * 2020-05-06 2021-11-09 华为技术有限公司 Message transmission method and frame type communication equipment
EP4135276A4 (en) * 2020-05-06 2023-10-04 Huawei Technologies Co., Ltd. Message transmission method and frame-type communication device
CN112799840A (en) * 2021-01-29 2021-05-14 北京百度网讯科技有限公司 Method, device, equipment and storage medium for transmitting data
WO2024011854A1 (en) * 2022-07-14 2024-01-18 天翼云科技有限公司 Message transmission method and apparatus

Similar Documents

Publication Publication Date Title
CN109729021A (en) A kind of message processing method and electronic equipment
CN105553880B (en) Data processing method and device in a kind of software defined network
US8724657B2 (en) System and method for offloading packet protocol encapsulation from software
CN103069757B (en) Packet reassembly and resequence method, apparatus and system
EP2317702A2 (en) Methods and apparatus related to a distributed switch fabric
CN105511954A (en) Method and device for message processing
CN101072176A (en) Report processing method and system
EP1070405A2 (en) System and process for application-level flow connection of data processing networks
WO2000060819A9 (en) Process for automatic detection of and quality of service adjustment for bulk data transfers
CN110324245A (en) A kind of method and device to be E-Packeted based on integrated flow table
CN108347477B (en) Data transmission method, device and server
US9106593B2 (en) Multicast flow reordering scheme
CN103067295A (en) Method and device and system for service transmission
CN102882705A (en) Method for reporting log through terminal equipment and log reporting system
CN110166857B (en) Method for realizing dynamic configuration of fiber channel switch
CN103955436A (en) Data processing device and terminal
CN104052679B (en) The load-balancing method of network traffics and device
CN105262753A (en) System and method for achieving security policy based on SDN virtual switch
CN107579920A (en) Transmission method, device, storage medium and the processor of data flow
CN104008130A (en) System and method for classifying network messages on basis of hybrid computation hardware
CN103685062A (en) Cache management method and device
CN102843287A (en) Computer and identifier management method
US8594101B2 (en) Packet relay apparatus and packet relay method
CN106210169A (en) IP address automatic allocating method and device
CN105323234B (en) Service node ability processing method, device, business classifier and service controller

Legal Events

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

Application publication date: 20190507

RJ01 Rejection of invention patent application after publication