CN105760235A - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN105760235A
CN105760235A CN201610168441.1A CN201610168441A CN105760235A CN 105760235 A CN105760235 A CN 105760235A CN 201610168441 A CN201610168441 A CN 201610168441A CN 105760235 A CN105760235 A CN 105760235A
Authority
CN
China
Prior art keywords
group
user
core
message
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610168441.1A
Other languages
Chinese (zh)
Other versions
CN105760235B (en
Inventor
姚烁
范路路
郭永亮
程爱爽
马宏源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610168441.1A priority Critical patent/CN105760235B/en
Publication of CN105760235A publication Critical patent/CN105760235A/en
Application granted granted Critical
Publication of CN105760235B publication Critical patent/CN105760235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a message processing method and device. The message processing method is applied to network equipment with a multi-core processor; each core of the multi-core processor corresponds to at least one user group; each user group is allocated with a corresponding weight by the core corresponding to the user group. The message processing method comprises the following steps: receiving at least one message; confirming user groups corresponding to the messages, and allocating the messages to the corresponding user groups; confirming a user group, with the maximum weight, of the user groups corresponding to a first core of the multi-core processor as the user group to be processed, and processing the messages in the user group to be processed by using the first core. Therefore, when multiple users share the multi-core processor, the cores of the multi-core processor can respectively process messages of identical or different user groups according to respective weights of corresponding user groups, the proportioning of the users occupying the resources of the cores of the multi-core processor can be relatively reasonably controlled, and the message processing efficiency and reliability can be also improved.

Description

Message processing method and device
Technical field
The application relates to network communication technology field, particularly relates to a kind of message processing method and device.
Background technology
Virtualization is a kind of resource management techniques, presents, break the obstacle that can not cut between entity structure after the various actual resources of computer give abstract, conversion, makes the user can than configuration better way originally to apply these resources.
In prior art, thread isolation can be carried out according to different user, distribute the polycaryon processor time of specific ratio, input/output time for each user thread, limit the size that can use internal memory, it is provided that equipment accesses and controls, allow each user think and oneself monopolize whole system.Further, in order to realize distribution and the isolation of polycaryon processor, operating system needs to arrange polycaryon processor affinity for each user thread and comes which polycaryon processor regulation user can take.
But, the accounting of each nuclear resource of uncontrollable CU polycaryon processor in prior art, cause the demand that cannot meet user for virtual machine disposal ability.
Summary of the invention
The application provides a kind of message processing method and device, more reasonably to control the accounting of each nuclear resource of CU polycaryon processor.
First aspect according to the embodiment of the present application, it is provided that a kind of message processing method,
Described method is applied to include on the network equipment of polycaryon processor, and at least one user's group is answered in each verification of described polycaryon processor, and each user's group is organized each corresponding core and is assigned corresponding weight with this user, including:
Receive at least one message;
Determine user's group that each described message is corresponding, and by each described message distribution to corresponding user's group;
User's group that in the user's group answer the first of described polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilizes described first core to process the message in described pending user's group.
Second aspect according to the embodiment of the present application, provide a kind of message process device, described device is applied to include on the network equipment of polycaryon processor, at least one user's group is answered in each verification of described polycaryon processor, each user's group is organized each corresponding core and is assigned corresponding weight with this user, including:
Receive unit, be used for receiving at least one message;
User's group determines unit, for determining user's group that each described message is corresponding, and by each described message distribution to corresponding user's group;
Message process unit, is defined as pending user's group for checking user's group that in the user's group answered, weight is maximum by the first of described polycaryon processor, and utilizes described first core to process the message in described pending user's group.
Application the embodiment of the present application, by receiving at least one message;Determine user's group that each message is corresponding, and by each message distribution to corresponding user's group;User's group that in the user's group answer the first of polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilize the first core to process the message in pending user's group, make the network equipment when multiple users share polycaryon processor, each core of polycaryon processor can process the message of identical or different user group respectively according to the weight of each self-corresponding user group, more reasonably control the accounting of each nuclear resource of CU polycaryon processor, thus improve efficiency and the reliability of Message processing.
Accompanying drawing explanation
Fig. 1 is the application scenarios schematic diagram of application the embodiment of the present application Message processing;
Fig. 2 is an embodiment flow chart of the application message processing method;
Fig. 3 is another embodiment flow chart of the application message processing method;
Fig. 4 is another embodiment flow chart of the application message processing method;
Fig. 5 is the schematic diagram of a kind of processing mode in the application message processing method;
Fig. 6 is the schematic diagram of the another kind of processing mode in the application message processing method;
Fig. 7 is the schematic diagram of the another kind of processing mode in the application message processing method;
Fig. 8 is the schematic diagram of the another kind of processing mode in the application message processing method;
Fig. 9 is a kind of hardware architecture diagram of the application message process device place equipment;
Figure 10 is an embodiment block diagram of the application message process device.
Detailed description of the invention
Here in detail exemplary embodiment being illustrated, its example representation is in the accompanying drawings.When as explained below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the application.On the contrary, they only with in appended claims describe in detail, the application some in the example of consistent apparatus and method.
It is only merely for the purpose describing specific embodiment at term used in this application, and is not intended to be limiting the application." one ", " described " and " being somebody's turn to do " of the singulative used in the application and appended claims is also intended to include most form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and comprises any or all of one or more project of listing being associated and be likely to combination.
Although should be appreciated that and be likely to adopt term first, second, third, etc. to describe various information in the application, but these information should not necessarily be limited by these terms.These terms are only used for being distinguished from each other out same type of information.Such as, when without departing from the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.Depend on linguistic context, word as used in this " if " can be construed to " ... time " or " when ... " or " in response to determining ".
Referring to Fig. 1, for applying the application scenarios schematic diagram of the embodiment of the present application Message processing.This application scenarios includes user and includes the network equipment of multinuclear (core) processor.Wherein, and at least one the user's group (group) corresponding of each core in polycaryon processor, each group is assigned the weight of correspondence by each core.Wherein, weight can be timeslice.
In the embodiment of the present application, the network equipment is when receiving user's message, can first determine user's group that each user's message is corresponding, and by each user's message distribution to corresponding user's group, then user's group that in the user's group arbitrary verification of polycaryon processor answered, weight is maximum is defined as pending user's group that this arbitrary verification is answered, and finally utilizes this arbitrary core to process the message in corresponding pending user's group.
Wherein, the process message standard of each core of polycaryon processor is all the same, is all the message in user's group that in user's group of priority treatment self correspondence, timeslice is maximum.
Therefore, the message processing method in the embodiment of the present application, the timeslice organized by each user can more reasonably control the accounting of each nuclear resource of CU polycaryon processor.
Below in conjunction with accompanying drawing, Message processing embodiment of the present invention is described in detail.
Referring to Fig. 2, an embodiment flow chart for the application message processing method, the method can apply to include on the network equipment of polycaryon processor, at least one user's group is answered in each verification of this polycaryon processor, each user's group is organized each corresponding core and is assigned corresponding weight with this user, and this user's group can be identical by the weight organizing corresponding each core distribution with this user, it is also possible to different.This message processing method may comprise steps of:
Step 210, receives at least one message.
Specifically, the message that the network equipment receives can be the message that same user sends, it is also possible to be the message of different user transmission.
Step 220, it is determined that user's group that each message is corresponding, and by each message distribution to corresponding user's group.
Specifically, after receiving message, it is possible to first this message is resolved, obtain analysis result, this analysis result can include one or more in source IP address, source port, purpose IP address, destination interface and transport layer protocol.Such as: source IP address can be the IP address of user, may determine that, according to source IP address, the message which user sends.
If organizing, default user, user's group that the analysis result matching message in coupling list item is corresponding, then the user's group matched can be defined as user's group that this message is corresponding.
Step 230, user's group that in the user's group answer the first of polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilizes the first core to process the message in pending user's group.
Specifically, the first core also refers to any one core in polycaryon processor.If user's group that in user's group that the first verification is answered, weight is maximum is one, it is possible to user's group maximum for this weight is determined directly as pending user's group;If user's group that in user's group that the first verification is answered, weight is maximum is for multiple, it is possible to arbitrarily chooses one from user's group that these weights are maximum and is defined as pending user's group.
Whether it addition, for multiple cores, it is possible to identical according to user's group that weight in user's group that each verification is answered is maximum, and the message amount that the maximum user's group of weight includes is to determine pending user's group, including:
User's group that weight is maximum from user's group that the first verification is answered select user's group to be defined as targeted group.
Specifically, if user's group that in first user's group of answering of verification, weight is maximum is one, then can directly using user's group maximum for this weight as targeted group;If user's group that in first user's group of answering of verification, weight is maximum is for multiple, then user's group can be selected as targeted group from the maximum user's group of these weights.
When first checks the targeted group that other verification that the targeted group answered is polycaryon processor is answered, and first message amount that include of the targeted group answered of verification when being not less than the quantity sum of the first core and other core, then the targeted group that the first verification is answered is defined as pending user's group.
Such as: polycaryon processor includes core 1, core 2 ..., core n.Wherein, the targeted group of core 1 correspondence organizes 1 for user, and the targeted group of core 2 correspondence also organizes 1 for user, and the targeted group that other verifications are answered except core 1 and core 2 is not that user organizes 1;And, user organizes 1 message amount included and is not less than 2, showing that user organizes the 1 enough core 1 of the message amount included and core 2 processes simultaneously, user now just can organize the 1 pending user's group being defined as core 1 and core 2, namely core 1 and core 2 can process the different messages that user organizes in 1 simultaneously respectively.
When first checks the targeted group that other verification that the targeted group answered is polycaryon processor is answered, and first the message amount that includes of the targeted group answered of verification less than the quantity sum of the first core and other core time, if the first core and other core are competed successfully, then the targeted group that the first verification is answered is defined as pending user's group.
Such as: polycaryon processor includes core 1, core 2 ..., core n.Wherein, the targeted group of core 3 correspondence organizes 2 for user, and the targeted group of core 4 correspondence also organizes 2 for user, and the targeted group that other verifications are answered except core 3 and core 4 is not that user organizes 2;And, user organizes 2 message amount included less than 2, show that user organizes the 2 inadequate cores 3 of the message amount included and core 4 processes simultaneously, core 3 and core 4 is now needed to be at war with, if core 3 is competed successfully, then user is organized the 2 pending user's groups being defined as core 3, and utilizes core 3 to process the message that user organizes in 2;If core 4 is competed successfully, then user is organized the 2 pending user's groups being defined as core 3, and utilizes core 4 to process the message that user organizes in 2.
It should be noted that each core only processes a message every time, after this Message processing, it is necessary to reaffirm pending user's group, then process the message in the pending user's group reaffirmed.
As seen from the above-described embodiment, by receiving at least one message;Determine user's group that each message is corresponding, and by each message distribution to corresponding user's group;User's group that in the user's group answer the first of polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilize the first core to process the message in pending user's group, make the network equipment when multiple users share polycaryon processor, each core of polycaryon processor can process the message of identical or different user group respectively according to the weight of each self-corresponding user group, more reasonably control the accounting of each nuclear resource of CU polycaryon processor, thus improve efficiency and the reliability of Message processing.
Referring to Fig. 3, another embodiment flow chart for the application message processing method, the method can apply to include on the network equipment of polycaryon processor, at least one user's group is answered in each verification of this polycaryon processor, each user's group is assigned the weight of correspondence by each core, it is possible to comprise the following steps:
Step 310, receives at least one message.This step is identical with step 210, here repeats no more.
Step 320, it is determined that user's group that each message is corresponding, and by each message distribution to corresponding user's group.This step is identical with step 220, here repeats no more.
Step 330, user's group that in the user's group answer the first of polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilizes the first core to process the message in pending user's group.This step is identical with step 230, here repeats no more.
Step 340, utilize first examine and make cuts wait a little while,please process user group by first core distribution weight.
Specifically, each user group that first verification is answered all has by the weight of the first core distribution, and the maximum user's group of weight is for pending user's group, after the message in this pending user's group is processed, first core can reduce the weight of this pending user group accordingly, the user's group reducing weight is likely to remain user's group that in each user's group that the first verification is answered, weight is maximum, it is also possible to be not user's group that in each user's group of answering of the first verification, weight is maximum.
Step 350, when the weight by the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default weight.
Specifically, the first core can arrange the weight preset of each user group of self correspondence in advance according to practical situation, it is also possible to according to practical situation, each weight preset is adjusted in real time.Wherein, the weight preset of each user group that the first core is arranged can be identical, it is also possible to differs.
As seen from the above-described embodiment, after utilizing the first core to process the message in pending user's group, can utilize first examine and make cuts wait a little while,please process user group by first core distribution weight, and when the weight by the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default weight, make the network equipment after processing message, the weight of each user group that the first verification is answered can also be adjusted in real time, thus improve the practicality of Message processing.
Referring to Fig. 4, another embodiment flow chart for the application message processing method, the method can apply to include on the network equipment of polycaryon processor, at least one user's group is answered in each verification of this polycaryon processor, each user's group is assigned the timeslice of correspondence by each core, it is possible to comprise the following steps:
Step 410, receives at least one message.This step is identical with step 210, here repeats no more.
Step 420, it is determined that user's group that each message is corresponding, and by each message distribution to corresponding user's group.This step is identical with step 220, here repeats no more.
Step 430, user's group that in the user's group answer the first of polycaryon processor the verification, timeslice is maximum is defined as pending user's group, and utilizes the first core to process the message in pending user's group.
Specifically, if user's group that in first user's group of answering of verification, timeslice is maximum is one, it is possible to user's group maximum for this timeslice is determined directly as pending user's group;If user's group that in user's group that the first verification is answered, timeslice is maximum is for multiple, it is possible to arbitrarily chooses one from user's group that these timeslices are maximum and is defined as pending user's group.
Additionally, for multiple cores, whether identical can organize according to the user that timeslice in user's group that each verification is answered is maximum, and the message amount that the maximum user's group of timeslice includes is to determine pending user's group, including: user's group that timeslice is maximum from user's group that the first verification is answered select user's group to be defined as targeted group.
Specifically, if user's group that in first user's group of answering of verification, timeslice is maximum is one, then can directly using user's group maximum for this timeslice as targeted group;If user's group that in first user's group of answering of verification, timeslice is maximum is for multiple, then user's group can be selected as targeted group from the maximum user's group of these timeslices.
When first checks the targeted group that other verification that the targeted group answered is polycaryon processor is answered, and first message amount that include of the targeted group answered of verification when being not less than the quantity sum of the first core and other core, then the targeted group that the first verification is answered is defined as pending user's group.
When first checks the targeted group that other verification that the targeted group answered is polycaryon processor is answered, and first the message amount that includes of the targeted group answered of verification less than the quantity sum of the first core and other core time, if the first core and other core are competed successfully, then the targeted group that the first verification is answered is defined as pending user's group.
It should be noted that each core only processes a message every time, after this Message processing, it is necessary to reaffirm pending user's group, then process the message in the pending user's group reaffirmed.
Such as: shown in Fig. 5, first user group is user's group (this first user group is not answered with other verification except the first core) that the first verification is answered, user's group that in user's group that so this first user group or the first verification are answered, timeslice is maximum, now can utilize the first core to process the message in first user group.
Again such as: as shown in Figure 6, second user's group is user's group that the second verification is answered, also be the 3rd verification answer user's group (this second user group with except the second core, the 3rd core other verification should), and, when second user's group be only the user that in user's group of answering of the second verification, timeslice is maximum organize time, it is possible to processed the message in second user's group by the second core;When second user's group be only the user that in user's group of answering of the 3rd verification, timeslice is maximum organize time, it is possible to processed the message in second user's group by the 3rd core;When second user's group is user's group that in user's group of answering of the second verification, timeslice is maximum, also it is that the user that in user's group of answering of the 3rd verification, timeslice is maximum is when organizing, if the message amount in second user's group is not less than two, then can be processed the different messages in second user's group respectively by the second core and the 3rd core simultaneously;If the message amount in second user's group is less than two, then need the second core and the 3rd core to be at war with, and utilize the successful core of competition to process the message of second user's group.
Again such as: as shown in Figure 7,3rd user organizes and fourth user group is all user's group (the 3rd user's group and fourth user group are not answered with other verification except the 4th core) that the 4th verification is answered, if user's group that in user's group that the 3rd user's group is the 4th verification answers, timeslice is maximum, and fourth user group is not user's group that in user's group that the 4th verification is answered, timeslice is maximum, then the 4th core can be utilized to process the message in the 3rd user's group;In like manner, if fourth user group is user's group that in user's group that the 4th verification is answered, timeslice is maximum, and the 3rd user group is not user's group that in user's group that the 4th verification is answered, timeslice is maximum, then the 4th core can be utilized to process the message in fourth user group;Further, if user's group that in user's group that the 3rd user's group and fourth user group are all the 4th verifications answers, timeslice is maximum, then the 4th core can be utilized to process the message of any one user group in the 3rd user's group and fourth user group.
Again such as: as shown in Figure 8,5th user's group and the 6th user's group are user's group that the 5th verification is answered, also be the 6th verification answer user's group (the 5th user group and the 6th user group with except the 5th core, the 6th core other verification should), it processes the process of message, as shown in table 1.G5 in table 1 is the 5th user's group, G6 is the 6th user's group, C5 is the 5th core, C6 is the 6th core, whether Rule of judgment one is user's group that in corresponding for C5 user's group, timeslice is maximum for characterizing G5, whether Rule of judgment two is user's group that in corresponding for C6 user's group, timeslice is maximum for characterizing G5, whether Rule of judgment three is user's group that in corresponding for C5 user's group, timeslice is maximum for characterizing G6, it is judged that whether condition four is user's group that in corresponding for C6 user's group, timeslice is maximum for characterizing G6.
Table 1
In above-mentioned table 1:
Processing mode one includes: (1) is when the C5 targeted group selecting G5 to be self correspondence, and the targeted group of C6 is G6, and C5 now can be utilized to process the message in G5, and utilizes C6 to process the message in G6;(2) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is not less than two, C5 and C6 now can be utilized to process the different messages in G6 respectively simultaneously;(3) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G6;(4) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G6.
Processing mode two includes: (1) is when the C6 targeted group selecting G5 to be self correspondence, and the targeted group of C5 is G6, and C6 now can be utilized to process the message in G5, and utilizes C5 to process the message in G6;(2) when the C6 targeted group selecting G6 to be self correspondence, and the targeted group of C5 is also G6, if the message amount in G6 is not less than two, C5 and C6 now can be utilized to process the different messages in G6 respectively simultaneously;(3) when the C6 targeted group selecting G6 to be self correspondence, and the targeted group of C5 is also G6, if the message amount in G6 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G6;(4) when the C6 targeted group selecting G6 to be self correspondence, and the targeted group of C5 is also G6, if the message amount in G6 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G6.
Processing mode three includes: (1) is when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is G5, and C5 now can be utilized to process the message in G6, and utilizes C6 to process the message in G5;(2) when the C5 targeted group selecting G5 to be self correspondence, and the targeted group of C6 is also G5, if the message amount in G5 is not less than two, C5 and C6 now can be utilized to process the different messages in G5 respectively simultaneously;(3) when the C5 targeted group selecting G5 to be self correspondence, and the targeted group of C6 is also G5, if the message amount in G5 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G5;(4) when the C5 targeted group selecting G5 to be self correspondence, and the targeted group of C6 is also G5, if the message amount in G5 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G5.
Processing mode four includes: (1) is when the C5 targeted group selecting G5 to be self correspondence, and the targeted group of C6 is G6, and C6 now can be utilized to process the message in G6, and utilizes C5 to process the message in G5;(2) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is not less than two, C5 and C6 now can be utilized to process the different messages in G6 respectively simultaneously;(3) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G6;(4) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group of C6 is also G6, if the message amount in G6 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G6.
Processing mode five includes: (1) is when the C5 targeted group selecting G5 to be self correspondence, and the targeted group that C6 selects G6 to be self correspondence, C5 now can be utilized to process the message in G5, and utilize C6 to process the message in G6;(2) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group that C6 selects G5 to be self correspondence, C5 now can be utilized to process the message in G6, and utilize C6 to process the message in G5;(3) when the C5 targeted group selecting G5 to be self correspondence, and the targeted group that C6 also selects G5 to be self correspondence, if the message amount in G5 is not less than two, C5 and C6 now can be utilized to process the different messages in G5 respectively simultaneously;If the message amount in G5 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G5;If the message amount in G5 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G5.(4) when the C5 targeted group selecting G6 to be self correspondence, and the targeted group that C6 also selects G6 to be self correspondence, if the message amount in G6 is not less than two, the different messages that C5 and C6 processes in G6 respectively simultaneously now can be utilized;If the message amount in G6 is less than two, and C5 competes successfully, and C5 now can be utilized to process the message in G6;If the message amount in G6 is less than two, and C6 competes successfully, and C6 now can be utilized to process the message in G6.
Step 440, records the first core and processes the process time of the message in pending user's group.
Step 450, utilizes the first core to deduct the process time from the timeslice by the first core distribution that pending user organizes, obtains the surplus value of timeslice.
Specifically, each user group that first verification is answered all has by the timeslice of the first core distribution, and the maximum user's group of timeslice is for pending user's group, after the message in this pending user's group is processed, the process time can be deducted from the timeslice that pending user organizes, the user's group reducing timeslice is likely to remain user's group that in each user's group that the first verification is answered, timeslice is maximum, it is also possible to be not user's group that in each user's group of answering of the first verification, timeslice is maximum.
Step 460, when the surplus value by the timeslice of the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default timeslice.
Specifically, the first core can arrange the timeslice preset of each user group of self correspondence in advance according to practical situation, it is also possible to according to practical situation, each timeslice preset is adjusted.Wherein, each timeslice preset can be identical, it is also possible to differs.
As seen from the above-described embodiment, after utilizing the first core to process the message in pending user's group, the first core can be recorded and process the process time of the message in pending user's group, the first core is utilized to deduct the process time from the timeslice by the first core distribution that pending user organizes, obtain the surplus value of timeslice, when the surplus value by the timeslice of the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default timeslice, make the network equipment after processing message, the timeslice of each user group that the first verification is answered can also be adjusted in real time, thus improve the practicality of Message processing.
Corresponding with aforementioned message processing method embodiment, present invention also offers the embodiment of message process device.
The embodiment of the application message process device can be applied on network devices.Device embodiment can be realized by software, it is also possible to is realized by the mode of hardware or software and hardware combining.Implemented in software for example, as the device on a logical meaning, it is that computer program instructions corresponding in nonvolatile memory is read to run in internal memory and formed by the processor by its place equipment.Say from hardware view; as shown in Figure 9; a kind of hardware architecture diagram for the application message process device place equipment; except the processor shown in Fig. 9, network interface, internal memory and nonvolatile memory; in embodiment, the equipment at device place generally can also include other hardware, such as the forwarding chip etc. of responsible process message;This equipment from hardware configuration is it is also possible that distributed equipment, it is possible to include multiple interface card, in order to carry out the extension of Message processing at hardware view.
Referring to Figure 10, an embodiment block diagram for the application message process device, this device can apply to include on the network equipment of polycaryon processor, at least one user's group is answered in each verification of described polycaryon processor, each user's group is organized each corresponding core and is assigned corresponding weight with this user, and may be used for performing the message processing method shown in Fig. 2, it is possible to including: receive unit 101, user's group determines unit 102 and message process unit 103.
Wherein, receive unit 101, be used for receiving at least one message;
User's group determines unit 102, for determining user's group that each described message is corresponding, and by each described message distribution to corresponding user's group;
Message process unit 103, is defined as pending user's group for checking user's group that in the user's group answered, weight is maximum by the first of described polycaryon processor, and utilizes described first core to process the message in described pending user's group.
As seen from the above-described embodiment, by receiving at least one message;Determine user's group that each message is corresponding, and by each message distribution to corresponding user's group;User's group that in the user's group answer the first of polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilize the first core to process the message in pending user's group, make the network equipment when multiple users share polycaryon processor, each core of polycaryon processor can process the message of identical or different user group respectively according to the weight of each self-corresponding user group, more reasonably control the accounting of each nuclear resource of CU polycaryon processor, thus improve efficiency and the reliability of Message processing.
In an optional implementation, described user's group determines that unit 102 includes: resolve subelement and coupling subelement (not shown in Figure 10).
Resolving subelement, for described message is resolved, obtain analysis result, described analysis result includes one or more in source IP address, source port, purpose IP address, destination interface and transport layer protocol;
Coupling subelement, if matching, for organizing in coupling list item default user, user's group that described analysis result is corresponding, is then defined as, by the user's group matched, user's group that described message is corresponding.
In another optional implementation, described message process unit 103 may include that first determines that subelement (not shown in Figure 10) determined by subelement and second.
Select subelement, user's group that the user's group answered, weight is maximum selects user's group be defined as targeted group for checking from described first;
First determines subelement, for the targeted group answered when other verification that described targeted group is described polycaryon processor, and the message amount that includes of described targeted group is when being not less than the quantity sum of described first core and other core described, then described targeted group is defined as pending user's group;
Second determines subelement, for the targeted group answered when other verification that described targeted group is described polycaryon processor, and the message amount that includes of described targeted group less than the quantity sum of described first core and other core described time, if described first core and other core are competed successfully, then described targeted group is defined as pending user's group.
In another optional implementation, described device can also include: the first computing unit and the first allocation units (not shown in Figure 10).
First computing unit, for described utilize described first core to process the message in described pending user's group after, utilize the described first weight by the first core distribution examining and making cuts less described pending user group;
First allocation units, for when the weight by the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default weight.
As seen from the above-described embodiment, after utilizing the first core to process the message in pending user's group, can utilize first examine and make cuts wait a little while,please process user group by first core distribution weight, and when the weight by the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default weight, make the network equipment after processing message, the weight of each user group that the first verification is answered can also be adjusted in real time, thus improve the practicality of Message processing.
In another optional implementation, described weight is timeslice;Described device can also include: record unit, the second computing unit and the second allocation units (not shown in Figure 10).
Record unit, after the described message utilized in the described first core described pending user's group of process, records described first core and processes the process time of the message in described pending user's group;
Second computing unit, for utilizing described first core to deduct the described process time from the timeslice by the first core distribution that described pending user organizes, obtains the surplus value of described timeslice;
Second allocation units, for when the surplus value by the timeslice of the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default timeslice.
As seen from the above-described embodiment, after utilizing the first core to process the message in pending user's group, the first core can be recorded and process the process time of the message in pending user's group, the first core is utilized to deduct the process time from the timeslice by the first core distribution that pending user organizes, obtain the surplus value of timeslice, when the surplus value by the timeslice of the first core distribution of each user group that the first verification is answered is all zero, utilizing the first core is that each user's group that the first verification is answered is respectively allocated default timeslice, make the network equipment after processing message, the timeslice of each user group that the first verification is answered can also be adjusted in real time, thus improve the practicality of Message processing.
What in said apparatus, the function of unit and the process that realizes of effect specifically referred in said method corresponding step realizes process, does not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part illustrates referring to the part of embodiment of the method.Device embodiment described above is merely schematic, the wherein said unit illustrated as separating component can be or may not be physically separate, the parts shown as unit can be or may not be physical location, namely may be located at a place, or can also be distributed on multiple NE.Some or all of module therein can be selected according to the actual needs to realize the purpose of the application scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, all within spirit herein and principle, any amendment of making, equivalent replacements, improvement etc., should be included within the scope that the application protects.

Claims (10)

1. a message processing method, it is characterized in that, described method is applied to include on the network equipment of polycaryon processor, and at least one user's group is answered in each verification of described polycaryon processor, each user's group is organized each corresponding core and is assigned corresponding weight with this user, including:
Receive at least one message;
Determine user's group that each described message is corresponding, and by each described message distribution to corresponding user's group;
User's group that in the user's group answer the first of described polycaryon processor the verification, weight is maximum is defined as pending user's group, and utilizes described first core to process the message in described pending user's group.
2. method according to claim 1, it is characterised in that the described user's group determining that each described message is corresponding, including:
Described message being resolved, obtains analysis result, described analysis result includes one or more in source IP address, source port, purpose IP address, destination interface and transport layer protocol;
If organizing in coupling list item default user and matching user's group that described analysis result is corresponding, then the user's group matched is defined as user's group that described message is corresponding.
3. method according to claim 1, it is characterised in that user's group that in the described user's group first verification of described polycaryon processor answered, weight is maximum is defined as pending user's group, including:
User's group that weight is maximum from user's group that described first verification is answered select user's group to be defined as targeted group;
When the targeted group that other verification that described targeted group is described polycaryon processor is answered, and the message amount that includes of described targeted group is when being not less than the quantity sum of described first core and other core described, then described targeted group is defined as pending user's group;
When the targeted group that other verification that described targeted group is described polycaryon processor is answered, and the message amount that includes of described targeted group less than the quantity sum of described first core and other core described time, if described first core and other core are competed successfully, then described targeted group is defined as pending user's group.
4. the method according to any one of claim 1-3, it is characterised in that after the described message utilized in the described first core described pending user's group of process, described method also includes:
Utilize described first examine and make cuts less described pending user group by first core distribution weight;
When the weight by the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default weight.
5. the method according to any one of claim 1-3, it is characterised in that described weight is timeslice;After the described message utilized in the described first core described pending user's group of process, described method also includes:
Record described first core and process the process time of the message in described pending user's group;
Utilize described first core to deduct the described process time from the timeslice by the first core distribution that described pending user organizes, obtain the surplus value of described timeslice;
When the surplus value by the timeslice of the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default timeslice.
6. a message process device, it is characterized in that, described device is applied to include on the network equipment of polycaryon processor, and at least one user's group is answered in each verification of described polycaryon processor, each user's group is organized each corresponding core and is assigned corresponding weight with this user, including:
Receive unit, be used for receiving at least one message;
User's group determines unit, for determining user's group that each described message is corresponding, and by each described message distribution to corresponding user's group;
Message process unit, is defined as pending user's group for checking user's group that in the user's group answered, weight is maximum by the first of described polycaryon processor, and utilizes described first core to process the message in described pending user's group.
7. device according to claim 6, it is characterised in that described user's group determines that unit includes:
Resolving subelement, for described message is resolved, obtain analysis result, described analysis result includes one or more in source IP address, source port, purpose IP address, destination interface and transport layer protocol;
Coupling subelement, if matching, for organizing in coupling list item default user, user's group that described analysis result is corresponding, is then defined as, by the user's group matched, user's group that described message is corresponding.
8. device according to claim 6, it is characterised in that described message process unit includes:
Select subelement, user's group that the user's group answered, weight is maximum selects user's group be defined as targeted group for checking from described first;
First determines subelement, for the targeted group answered when other verification that described targeted group is described polycaryon processor, and the message amount that includes of described targeted group is when being not less than the quantity sum of described first core and other core described, then described targeted group is defined as pending user's group;
Second determines subelement, for the targeted group answered when other verification that described targeted group is described polycaryon processor, and the message amount that includes of described targeted group less than the quantity sum of described first core and other core described time, if described first core and other core are competed successfully, then described targeted group is defined as pending user's group.
9. the device according to any one of claim 6-8, it is characterised in that described device also includes:
First computing unit, for described utilize described first core to process the message in described pending user's group after, utilize the described first weight by the first core distribution examining and making cuts less described pending user group;
First allocation units, for when the weight by the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default weight.
10. the device according to any one of claim 6-8, it is characterised in that described weight is timeslice;
Described device also includes:
Record unit, after the described message utilized in the described first core described pending user's group of process, records described first core and processes the process time of the message in described pending user's group;
Second computing unit, for utilizing described first core to deduct the described process time from the timeslice by the first core distribution that described pending user organizes, obtains the surplus value of described timeslice;
Second allocation units, for when the surplus value by the timeslice of the first core distribution of each user group that described first verification is answered is all zero, utilizing described first core is that each user's group that described first verification is answered is respectively allocated default timeslice.
CN201610168441.1A 2016-03-22 2016-03-22 Message processing method and device Active CN105760235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610168441.1A CN105760235B (en) 2016-03-22 2016-03-22 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610168441.1A CN105760235B (en) 2016-03-22 2016-03-22 Message processing method and device

Publications (2)

Publication Number Publication Date
CN105760235A true CN105760235A (en) 2016-07-13
CN105760235B CN105760235B (en) 2019-05-07

Family

ID=56346290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610168441.1A Active CN105760235B (en) 2016-03-22 2016-03-22 Message processing method and device

Country Status (1)

Country Link
CN (1) CN105760235B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217467A (en) * 2007-12-28 2008-07-09 杭州华三通信技术有限公司 An inter-core load dispensing device and method
US7843926B1 (en) * 2005-04-05 2010-11-30 Oracle America, Inc. System for providing virtualization of network interfaces at various layers
CN102253857B (en) * 2011-06-24 2013-03-27 华中科技大学 Xen virtual machine scheduling control method in multi-core environment
CN103514043A (en) * 2012-06-29 2014-01-15 华为技术有限公司 Multi-processor system and data processing method thereof
CN103595654A (en) * 2013-11-01 2014-02-19 福建星网锐捷网络有限公司 HQoS implementation method, device and network equipment based on multi-core CPUs
CN103916906A (en) * 2014-03-07 2014-07-09 大唐移动通信设备有限公司 Method, device and system for distributing and processing user data messages
CN105450792A (en) * 2015-12-23 2016-03-30 东软集团股份有限公司 Port allocation method and device for converting multi-core forwarding network address port

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7843926B1 (en) * 2005-04-05 2010-11-30 Oracle America, Inc. System for providing virtualization of network interfaces at various layers
CN101217467A (en) * 2007-12-28 2008-07-09 杭州华三通信技术有限公司 An inter-core load dispensing device and method
CN102253857B (en) * 2011-06-24 2013-03-27 华中科技大学 Xen virtual machine scheduling control method in multi-core environment
CN103514043A (en) * 2012-06-29 2014-01-15 华为技术有限公司 Multi-processor system and data processing method thereof
CN103595654A (en) * 2013-11-01 2014-02-19 福建星网锐捷网络有限公司 HQoS implementation method, device and network equipment based on multi-core CPUs
CN103916906A (en) * 2014-03-07 2014-07-09 大唐移动通信设备有限公司 Method, device and system for distributing and processing user data messages
CN105450792A (en) * 2015-12-23 2016-03-30 东软集团股份有限公司 Port allocation method and device for converting multi-core forwarding network address port

Also Published As

Publication number Publication date
CN105760235B (en) 2019-05-07

Similar Documents

Publication Publication Date Title
US10331549B2 (en) Collaborative computer aided test plan generation
US7065526B2 (en) Scalable database management system
CN106970978A (en) Data sharing method and device
CN103744719B (en) Lock management method and system, the collocation method and device of lock administration system
CN103475682B (en) File transfer method and file transfer equipment
CN107196982A (en) A kind for the treatment of method and apparatus of user's request
CN110362409A (en) Based on a plurality of types of resource allocation methods, device, equipment and storage medium
CN103617508A (en) Configurable business rule plug-in extension apparatus and business rule plug-in extension method
CN105933408A (en) Implementation method and device of Redis universal middleware
CN110020043B (en) Page crawling method, device, storage medium and processor
CN106991112A (en) Information query method and device
CN109450976A (en) A kind of method and device of the access of operation system
CN106202074A (en) A kind of method and device processing shared file
CN110278192A (en) Method, apparatus, computer equipment and the readable storage medium storing program for executing of extranet access Intranet
CN107133243A (en) A kind of data processing method and server
CN110716975B (en) Data interface generation method and data interface sharing platform
CN108829526A (en) A kind of inter-process communication methods, electronic equipment and readable storage medium storing program for executing
CN106713163A (en) Method and apparatus for deploying server load
CN110012050A (en) Message Processing, storage method, apparatus and system
CN102521043B (en) A kind of task processing method and application system
CN107071051A (en) For ordering the method and apparatus performed
US7962799B2 (en) System and method for synchronizing test runs on separate systems
CN105760235A (en) Message processing method and device
CN106161452A (en) The sending method of identifying code and device
CN110297843A (en) Data query method and system, terminal for B/S 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
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant