CN106789695B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN106789695B
CN106789695B CN201611057792.1A CN201611057792A CN106789695B CN 106789695 B CN106789695 B CN 106789695B CN 201611057792 A CN201611057792 A CN 201611057792A CN 106789695 B CN106789695 B CN 106789695B
Authority
CN
China
Prior art keywords
processing
functional module
message
module
functional
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.)
Active
Application number
CN201611057792.1A
Other languages
Chinese (zh)
Other versions
CN106789695A (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 DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201611057792.1A priority Critical patent/CN106789695B/en
Publication of CN106789695A publication Critical patent/CN106789695A/en
Application granted granted Critical
Publication of CN106789695B publication Critical patent/CN106789695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/23Bit dropping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a message processing method and a device, which are applied to network equipment, wherein the network equipment is preset with a plurality of functional modules, and the method comprises the following steps: aiming at a session first message received by network equipment, acquiring information of a plurality of fields of the message as message key information for storage; selecting one functional module from the plurality of residual functional modules as a current functional module; determining the subset of message key information and a processing result information set required by the current functional module for message processing, and sending the subset to the current functional module; wherein the processing result information set is initially empty; receiving processing result information returned by the current functional module, and updating the processing result information into a processing result information set; and if the number of the residual functional modules is not zero, returning to the step of selecting one functional module from the residual functional modules as the current functional module. The technical scheme of the application can improve the message processing efficiency and is easy to realize the addition or deletion of a certain functional module.

Description

Message processing method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet.
Background
With the continuous development of networks, the functions of network devices are more and more, and the efficiency of processing messages by network devices is concerned.
In the related art, the function modules preset by the network device are usually connected in series according to a certain order, so that when the network device receives a message, the current function module processing the message receives the key information of the message and the processing result information set of the message by all the function modules before the current function module, and similarly, when the next function module processes the message, the next function module not only receives the data information received by the current function module, but also receives the processing result information of the message by the current function module.
Therefore, under the application scene that the network equipment has various functions, a large amount of data needs to be transmitted among the functional modules when the network equipment processes the messages, and the message processing efficiency is greatly reduced. In addition, the functional modules are connected in series and in mutual communication in sequence, which also causes difficulty in adding or deleting any functional module.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for processing a message, so as to solve the problems of low message processing efficiency and difficulty in adding or deleting a function module in the related art.
Specifically, the method is realized through the following technical scheme:
in a first aspect, the present application provides a packet processing method, which is applied to a network device, where the network device has a plurality of preset functional modules, and the method includes:
aiming at a session first message received by network equipment, acquiring information of a plurality of fields of the message as message key information for storage;
selecting one functional module from the plurality of residual functional modules as a current functional module;
determining the subset of message key information and a processing result information set required by the current functional module for message processing, and sending the subset to the current functional module; wherein the processing result information set is initially empty;
receiving processing result information returned by the current function module, and updating the processing result information into a processing result information set;
and if the number of the residual functional modules is not zero, returning to the step of selecting one functional module from the residual functional modules as the current functional module.
In a second aspect, the present application provides a packet processing apparatus, which is applied to a network device, where the network device has a plurality of preset functional modules, and the apparatus includes:
the information acquisition unit is used for acquiring information of a plurality of fields of a session first message received by network equipment as message key information to be stored;
the module selecting unit is used for selecting one functional module from the plurality of residual functional modules as a current functional module;
the information sending unit is used for determining the message key information and the subset of the processing result information set required by the current functional module for message processing, and sending the message key information and the subset to the current functional module; wherein the processing result information set is initially empty;
the information updating unit is used for receiving the processing result information returned by the current function module and updating the processing result information into a processing result information set;
and the quantity detection unit is used for returning to the step of selecting one functional module from the plurality of residual functional modules as the current functional module when the quantity of the residual functional modules is not zero.
According to the technical scheme, the session head message is sequentially processed through the functional modules which need to process the session head message in the plurality of functional modules, the obtained processing result information set is stored in the control center, and the message key information and the processing result information subset are sent to the current functional module according to the needs, so that unnecessary redundant data can be avoided when the current functional module processes the message, the transmission quantity of data is reduced, and the message processing efficiency is improved. In addition, data transmission is not needed among the functional modules, namely the functional modules are independent, so that deletion or addition of a certain functional module can be easily realized.
Drawings
Fig. 1 is a functional block architecture diagram in the related art;
fig. 2 is a functional module architecture diagram of a message processing method according to an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating a message processing method according to an exemplary embodiment of the present application;
FIG. 4 is a flow chart illustrating selection of a current function module according to an exemplary embodiment of the present application;
fig. 5 is a hardware structure diagram of a device in which a message processing apparatus according to an exemplary embodiment of the present application is located;
fig. 6 is a block diagram of a message processing apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, a functional block architecture diagram in the related art is shown. The functional modules are connected in series in sequence, and are configured in the network equipment in advance. The current functional module receives the message key information and the processing result information set transmitted by the previous functional module, selects useful information to process the message, and then sends the message key information and the updated processing result information set to the next functional module, so that the next functional module selects the useful information to process the message, and thus, each functional module has to receive redundant information which is not needed when processing the message, which causes huge data information transmitted among the functional modules and reduces the message processing efficiency of the network equipment.
Referring to fig. 2, a functional module architecture diagram of a message processing method according to an exemplary embodiment of the present application is shown. The method can be applied to network equipment, wherein a plurality of functional modules are preset in the network equipment, and the functional modules are independent from each other. The processing of the various steps in the method is in fact a process of dispatch control, which can be visually understood as a "control center" performing a plurality of steps, which can be implemented by computer software. The control center can store the processing result information obtained after the message processing is carried out by each functional module, and can also send the message key information and the subset of the processing result information set required by the message processing to the current functional module.
Based on the functional module architecture diagram shown in fig. 2, referring to fig. 3, a flowchart of a message processing method according to an exemplary embodiment of the present application is shown, where the method may include the following steps:
step 301: aiming at a session first message received by network equipment, acquiring information of a plurality of fields of the message as message key information for storage.
In this embodiment, when a session is newly established, a first session packet received by the network device may be referred to as a session header packet of the session. The network device may extract information of a plurality of fields in the received session header message as message key information, where the message key information may be generally customized by a developer, for example: the message key information may include information of fields such as a source IP address, a destination IP address, a source MAC address, a destination MAC address, and a port number in the session header message. After extracting the key information of the messages, the network equipment can store the key information of the messages to the control center.
Step 302: and selecting one functional module from the plurality of residual functional modules as the current functional module.
In this embodiment, the control center may select one function module from the remaining function modules, and determine whether the selected function module needs to perform message processing, and if the selected function module needs to perform message processing, may use the selected function module as the current function module, and perform step 303; otherwise, the next functional module may be reselected in the processing order and the process continues to step 302.
For example, assuming that there are 3 function modules preset in the network device, the set of the remaining function modules may initially include a function module 1, a function module 2, and a function module 3. After the control center selects the functional module 1, it can determine whether the functional module 1 needs to perform message processing. If the functional module 1 needs to perform message processing, the functional module 1 can be used as the current functional module; otherwise, the control center may select the functional module 2 from the remaining functional modules 2 and 3, and determine whether the functional module 2 needs to perform message processing, so as to determine whether to use the functional module 2 as the current functional module.
Step 303: determining the subset of message key information and a processing result information set required by the current functional module for message processing, and sending the subset to the current functional module; wherein the processing result information set is initially empty.
In this embodiment, after selecting the current function module, the control center may determine a subset of a set of message key information and processing result information required by the current function module when performing message processing, and send the subset of message key information and processing result information to the current function module.
For example, assuming that the control center determines the function module 3 as the current function module in the foregoing step 302, if the function module 3 needs the destination IP address of the session header packet and the processing result information of the function module 2 when performing packet processing, the control center may use the destination IP address as the packet key information, and send the processing result information of the function module 2 as the processing result information subset to the function module 3.
It should be noted that, when the processing result information set is initially empty, that is, no functional module has yet processed the packet, the control center does not store any processing result information for the new session.
Step 304: and receiving the processing result information returned by the current functional module, and updating the processing result information into a processing result information set.
In this embodiment, after receiving the message key information and the processing result information subset sent by the control center, the current functional module may perform message processing by using these information. The subsequent current functional module can return the processing result information obtained by message processing to the control center, and the control center can update the processing result information to the processing result information set.
For example, it is assumed that the function module 1 is a destination NAT (Network Address Translation) function module, and the function module 2 is a routing function module. The destination NAT function module can search a destination NAT mapping table by using a destination IP address of a session first message, obtain a destination IP address after NAT and return the destination IP address to the control center, and the control center can update the destination IP address after NAT to a processing result information set; the subsequent routing function module may search a routing table by using the source IP address of the session first packet and the destination IP address after the NAT to obtain routing information and return the routing information to the control center, and the control center may update the routing information to a processing result information set, that is, the processing information set includes the destination IP address after the NAT and the routing information.
Step 305: and if the number of the residual functional modules is not zero, returning to the step of selecting one functional module from the residual functional modules as the current functional module.
In this embodiment, when the number of the remaining functional modules is not zero, it indicates that the network device has not finished processing the packet, and may return to step 302 to continue the packet processing.
In an optional embodiment, after all the function modules that need to process the session header message complete message processing, the control center may output the message key information and the processing result information set of the session header message, so that the network device establishes a session entry according to the message key information and the processing result information set. When the network device receives a subsequent message of the session, the subsequent message can be processed according to the session table entry. By adopting the mode, the situation that which functional modules need to process the subsequent message and which functional modules do not need to process the subsequent message can be avoided, the effect of rapidly processing the message is achieved, and the message processing efficiency can be improved.
As can be seen from the above embodiments, in the present application, the function module that needs to process the session header message among the plurality of function modules sequentially processes the session header message, and stores the obtained processing result information set in the control center, and sends the message key information and the processing result information subset to the current function module as needed, so that unnecessary redundant data can be avoided when the current function module processes the message, the transmission amount of data is reduced, and the message processing efficiency is improved. In addition, data transmission is not needed among the functional modules, namely the functional modules are independent, so that deletion or addition of a certain functional module can be easily realized.
Referring to fig. 4, in conjunction with the foregoing step 302, the following steps may be taken to select the current function module:
step 3021: and selecting one functional module from the plurality of functional modules according to a preset processing sequence among the functional modules.
In this embodiment, the control center may select one functional module from a set of several remaining functional modules according to a processing order preset among the functional modules, where the processing order may be generally customized by a developer. The subsequent control center may remove the selected functional module from the set of remaining functional modules, which initially includes all functional modules.
For example, assuming that there are 3 function modules preset in the network device, the set of the remaining function modules may initially include a function module 1, a function module 2, and a function module 3. After the control center selects the functional module 1 according to the processing sequence from the functional module 1 to the functional module 3, the collection of the remaining functional modules may include the functional module 2 and the functional module 3.
It should be noted that, instead of setting the processing order for the functional modules, the control center may select one functional module from a set of several remaining functional modules and remove the functional module from the set of remaining functional modules. However, this method is complex in actual implementation, and therefore, a processing order is usually set for the functional modules, so that the control center selects one functional module from a set of several remaining functional modules according to the processing order.
Step 3022: when the selected functional module is not the first functional module in the processing sequence, judging whether the selected functional module needs to process the message according to a preset rule; if yes, determining the selected function module as the current function module; otherwise, the next functional module is reselected according to the processing order.
In this embodiment, if the control center detects that the function module selected in the foregoing step 3021 is the first function module in the processing order, the default selected function module needs to perform message processing, and the function module may be determined as the current function module. If the control center detects that the function module selected in the foregoing step 3021 is not the first function module in the processing order, it may determine whether the selected function module needs to perform message processing according to a preset rule.
For example, assuming that 3 function modules are preset in the network device, when the control center selects the function module 1 according to the processing order from the function module 1 to the function module 3, the first function module in the default processing order needs to perform message processing, so that the function module 1 can be determined as the current function module. Subsequently, when the control center selects the functional module 2, since the functional module 2 is not the first functional module in the processing sequence, it can be determined whether the functional module 2 needs to perform message processing according to a preset rule.
In an optional embodiment, if the control center detects that the selected functional module is not the first functional module in the processing order, it indicates that at least one functional module has processed the message. The control center can judge whether the selected functional module needs to process the message or not according to the stored message key information and the processing result information set.
For example, when the control center selects the functional module 2, it may determine whether the functional module 2 needs to process the message according to the stored key information of the message and the processing result information 1 returned to the control center after the functional module 1 processes the message. Assuming that the functional module 1 shown in fig. 2 is a packet filtering functional module, and after the packet filtering functional module processes the session first message, the processing result information returned to the control center is that the session first message is discarded, according to the processing result information, the subsequent functional modules 2 and 3 do not need to process the session first message any more. In another example, it is assumed that the functional module 2 shown in fig. 2 is a non-equivalent routing functional module, the functional module 3 is an equivalent routing functional module, the functional module 4 is a source NAT functional module, and after the non-equivalent routing functional module processes the session first packet, the processing result information returned to the control center is the found non-equivalent routing information, according to the processing result information, the equivalent routing information does not need to be found again, that is, the equivalent routing functional module does not need to process the session first packet, but the source NAT functional module processes the session first packet.
When the control center judges that a certain functional module does not need to process the message according to the message key information and the processing result information set, the control center can skip the functional module, continue to select the next functional module and judge whether the functional module needs to process the message. By adopting the mode, the control center can avoid sending the message key information and the processing result information set to the functional module which does not need to process the message, thereby reducing the data transmission quantity, and simultaneously improving the flexibility of message processing, thereby further improving the message processing efficiency.
In another optional embodiment, a corresponding processing identifier may be configured for each of the plurality of functional modules, where the processing identifier may be generally customized by a developer, and each processing identifier may be used to mark whether the corresponding functional module is in a state that requires message processing. It should be noted that the initial default state of the processing identifier corresponding to the first functional module in the processing order is a state in which message processing is required, that is, the first functional module is defaulted to require message processing.
For example, 0 may be set as the processing identifier of the functional module that does not need to perform message processing, and 1 may be set as the processing identifier of the functional module that needs to perform message processing. In an initial default state, that is, when no functional module has processed a message, the processing identifiers of all functional modules may be set to 1, indicating that each default functional module needs to process a message.
When the processing identifier corresponding to the selected functional module is set to be in a state of needing to process the message, the control center can determine the functional module as the current functional module; when the processing identifier corresponding to the selected functional module is set to be in a state that the message processing is not required, the control center may reselect a next functional module according to the processing order, and determine whether the functional module can be used as the current functional module according to the processing identifier.
It should be noted that the control center may match the message key information and the processing result information set with a preset processing condition table, update the processing identifiers corresponding to the remaining functional modules according to the matching result, and set the processing identifier corresponding to the functional module that does not need to perform message processing as a message processing-unnecessary state. The processing condition table may be generally customized by a developer. With reference to step 304, after the control center updates the processing information returned by the current functional module into the processing information set, the processing identifiers corresponding to the remaining functional modules may be modified according to the message key information and the updated processing information set.
For example, assuming that the function module 1 shown in fig. 2 is a packet filtering function module, and the packet filtering function module processes the session first packet, and the processing result information returned to the control center is the discarded session first packet, the control center can determine that neither the function module 2 nor the function module 3 needs to process the session first packet any more after matching the processing result information with the processing condition table, and the control center can set the processing identifiers respectively corresponding to the function module 2 and the function module 3 to be in the state where no packet processing is needed. In another example, a typical processing condition is a result mutual exclusion condition, that is, if the processing result of the first functional module and the processing result of the second functional module are mutually exclusive, as long as the processing result of either the first or second functional module has been updated, that is, the result mutual exclusion condition has been satisfied, the other one may not be processed, and may be identified as a state that does not need to be processed. Assuming that the functional module 2 shown in fig. 2 is a non-equivalent routing functional module, the functional module 3 is an equivalent routing functional module, and the functional module 4 is a source NAT functional module, the non-equivalent routing functional module processes the session first packet, and then returns the processing result information to the control center as the searched non-equivalent routing information. In the processing condition table corresponding to the equivalent routing function module, the found non-equivalent routing information corresponds to that message processing is not required, and the non-equivalent routing information does not correspond to that message processing is required, so that the control center can determine that the equivalent routing function module does not need to process the session first message any more after matching the processing result information with the processing condition table, and the source NAT function module processes the session first message. The control center can set the processing identifier corresponding to the equivalent routing function module as a message processing-unnecessary state, and set the processing identifier corresponding to the source NAT function module as a message processing-necessary state.
When the control center judges that a certain functional module does not need to perform message processing according to the processing identifier, the control center can skip the functional module, continue to select the next functional module and judge whether the functional module needs to perform message processing. By adopting the mode, the control center can avoid sending the subset of the stored message key information and the processing result information set to the functional module which does not need to process the message, reduce the data transmission quantity, and simultaneously improve the flexibility of message processing, thereby further improving the message processing efficiency.
Corresponding to the embodiment of the message processing method, the application also provides an embodiment of a message processing device.
The embodiment of the message processing device can be applied to network equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the network device where the software implementation is located as a logical means. In terms of hardware, as shown in fig. 5, the present application is a hardware structure diagram of a network device where a message processing apparatus is located, and except for a processor, a memory, a network interface, and a nonvolatile memory, the network device where the apparatus is located in the embodiment may also include other hardware according to an actual function of the message processing, which is not described again.
Referring to fig. 6, a block diagram of a message processing apparatus according to an exemplary embodiment of the present application is shown, where the message processing apparatus 600 may be applied to the network device shown in fig. 5, and includes:
an information obtaining unit 601, configured to obtain, for a session header packet received by a network device, information of multiple fields of the packet as packet key information for storage;
a module selecting unit 602, configured to select one function module from the remaining function modules as a current function module;
an information sending unit 603, configured to determine a subset of a set of message key information and processing result information required for message processing performed by the current functional module, and send the subset to the current functional module; wherein the processing result information set is initially empty;
an information updating unit 604, configured to receive processing result information returned by the current function module, and update the processing result information to a processing result information set;
a number detection unit 605, configured to, when the number of remaining functional modules is not zero, return to the step of selecting one functional module from the remaining functional modules as the current functional module.
In an alternative embodiment, the module selecting unit 602 may include:
a module selection subunit 6021 for selecting one function module from the plurality of remaining function modules according to a preset processing order among the function modules;
a module determining subunit 6022, configured to determine, according to a preset rule, whether the selected functional module needs to process the message when the selected functional module is not the first functional module in the processing order; if yes, determining the selected function module as the current function module; otherwise, the next functional module is reselected according to the processing order.
In another optional embodiment, the module determination subunit 6022 may determine whether the selected functional module needs to perform message processing in the following manner:
and judging whether the first residual function module needs to process the message or not according to the message key information and the processing result information set.
In another alternative embodiment, the message processing apparatus 600 may include:
an identifier updating unit 606, configured to match the message key information and the processing result information set with a preset processing condition table, and update a processing identifier corresponding to each function in the plurality of remaining function modules;
the module determination subunit 6022 may determine whether the selected functional module needs to perform message processing in the following manner:
configuring a corresponding processing identifier for each functional module in the plurality of functional modules; each processing identification is used for marking whether the corresponding functional module is in a state of needing message processing;
when the processing identifier corresponding to the selected functional module is set to be in a state of needing message processing, taking the selected functional module as the current functional module; and when the processing identifier corresponding to the selected functional module is set to be in a state of not needing to process the message, reselecting the next functional module according to the processing sequence.
In another optional embodiment, the initial default state of the processing identifier corresponding to the first functional module is a state in which message processing is required.
In another alternative embodiment, the processing condition is a result mutual exclusion condition.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A message processing method is applied to network equipment, wherein a plurality of functional modules are preset in the network equipment, and the method comprises the following steps:
aiming at a session first message received by network equipment, acquiring information of a plurality of fields of the message as message key information for storage;
selecting one functional module from the plurality of residual functional modules as a current functional module;
determining the subset of message key information and a processing result information set required by the current functional module for message processing, and sending the subset to the current functional module; wherein the processing result information set is initially empty;
receiving processing result information returned by the current function module, and updating the processing result information into a processing result information set;
and if the number of the residual functional modules is not zero, returning to the step of selecting one functional module from the residual functional modules as the current functional module.
2. The method of claim 1, wherein selecting one of the remaining functional modules as the current functional module comprises:
selecting one functional module from the plurality of residual functional modules according to a preset processing sequence among the functional modules;
when the selected functional module is not the first functional module in the processing sequence, judging whether the selected functional module needs to process the message according to a preset rule; if yes, determining the selected function module as the current function module; otherwise, the next functional module is reselected according to the processing order.
3. The method according to claim 2, wherein the determining whether the selected functional module needs to perform the message processing according to the preset rule includes:
and judging whether the selected functional module needs to process the message or not according to the message key information and the processing result information set.
4. The method of claim 3, further comprising:
matching the message key information and the processing result information set with a preset processing condition table, and updating a processing identifier corresponding to each function in the plurality of residual function modules;
the judging whether the selected functional module needs to process the message according to the message key information and the processing result information set comprises the following steps:
configuring a corresponding processing identifier for each functional module in the plurality of functional modules; each processing identification is used for marking whether the corresponding functional module is in a state of needing message processing;
when the processing identifier corresponding to the selected functional module is set to be in a state of needing message processing, taking the selected functional module as the current functional module; and when the processing identifier corresponding to the selected functional module is set to be in a state of not needing to process the message, reselecting the next functional module according to the processing sequence.
5. The method according to claim 4, wherein the initial default state of the processing identifier corresponding to the first functional module is a state in which message processing is required.
6. The method of claim 4, wherein the processing condition is a result mutual exclusion condition, and wherein the result mutual exclusion condition is considered to be satisfied if the results processed by two modules do not need to exist or are not allowed to exist at the same time.
7. A message processing device is applied to a network device, wherein a plurality of functional modules are preset in the network device, and the device comprises:
the information acquisition unit is used for acquiring information of a plurality of fields of a session first message received by network equipment as message key information to be stored;
the module selecting unit is used for selecting one functional module from the plurality of residual functional modules as a current functional module;
the information sending unit is used for determining the message key information and the subset of the processing result information set required by the current functional module for message processing, and sending the message key information and the subset to the current functional module; wherein the processing result information set is initially empty;
the information updating unit is used for receiving the processing result information returned by the current function module and updating the processing result information into a processing result information set;
and the quantity detection unit is used for returning to the step of selecting one functional module from the plurality of residual functional modules as the current functional module when the quantity of the residual functional modules is not zero.
8. The apparatus of claim 7, wherein the module selecting unit comprises:
the module selection subunit is used for selecting one functional module from the plurality of residual functional modules according to a preset processing sequence among the functional modules;
a module judging subunit, configured to, when the selected functional module is not the first functional module in the processing order, judge, according to a preset rule, whether the selected functional module needs to process the packet; if yes, determining the selected function module as the current function module; otherwise, the next functional module is reselected according to the processing order.
9. The apparatus according to claim 8, wherein the module determining subunit determines whether the selected functional module needs to perform the message processing by:
and judging whether the first residual function module needs to process the message or not according to the message key information and the processing result information set.
10. The apparatus of claim 9, further comprising:
the identifier updating unit is used for matching the message key information and the processing result information set with a preset processing condition table and updating the processing identifier corresponding to each function in the plurality of residual function modules;
the module judging subunit judges whether the selected functional module needs to perform message processing or not by the following mode:
configuring a corresponding processing identifier for each functional module in the plurality of functional modules; each processing identification is used for marking whether the corresponding functional module is in a state of needing message processing;
when the processing identifier corresponding to the selected functional module is set to be in a state of needing message processing, taking the selected functional module as the current functional module; and when the processing identifier corresponding to the selected functional module is set to be in a state of not needing to process the message, reselecting the next functional module according to the processing sequence.
11. The apparatus according to claim 10, wherein the initial default state of the processing identifier corresponding to the first functional module is a state requiring message processing.
12. The apparatus of claim 10, wherein the processing condition is a result mutual exclusion condition, and wherein the result mutual exclusion condition is considered to be satisfied if two modules process results that do not need or are not allowed to exist simultaneously.
CN201611057792.1A 2016-11-24 2016-11-24 Message processing method and device Active CN106789695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611057792.1A CN106789695B (en) 2016-11-24 2016-11-24 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611057792.1A CN106789695B (en) 2016-11-24 2016-11-24 Message processing method and device

Publications (2)

Publication Number Publication Date
CN106789695A CN106789695A (en) 2017-05-31
CN106789695B true CN106789695B (en) 2020-04-03

Family

ID=58911507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611057792.1A Active CN106789695B (en) 2016-11-24 2016-11-24 Message processing method and device

Country Status (1)

Country Link
CN (1) CN106789695B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474518B (en) * 2017-09-07 2021-08-20 华为技术有限公司 Method and device for forwarding message
CN107454016A (en) * 2017-09-29 2017-12-08 湖南恒茂高科股份有限公司 Message process device and method
CN113407973B (en) * 2021-07-16 2022-03-29 重庆允成互联网科技有限公司 Software function authority management method, system, server and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022408A (en) * 2007-02-01 2007-08-22 华为技术有限公司 Method for transmitting point-to-point message and transmitting convergent node
CN101052010A (en) * 2007-05-18 2007-10-10 中兴通讯股份有限公司 Multiple engine quick master-slave swap and its method
CN101136772A (en) * 2007-09-28 2008-03-05 华为技术有限公司 Timing transmission packet method and packet transmission module
CN101599963A (en) * 2009-06-10 2009-12-09 电子科技大学 Suspected network threat information screener and Screening Treatment method
CN101969404A (en) * 2010-10-25 2011-02-09 杭州华三通信技术有限公司 Method and equipment for processing messages
CN202076851U (en) * 2011-06-17 2011-12-14 上海思源弘瑞自动化有限公司 Merging unit with dual-network independent sampling function
CN103106088A (en) * 2012-12-28 2013-05-15 上海斐讯数据通信技术有限公司 Hardware and firmware independently updating system and method thereof
CN104954280A (en) * 2015-04-23 2015-09-30 华为技术有限公司 Data message processing method and device
CN104994166A (en) * 2015-07-10 2015-10-21 李德毅 Intelligent vehicle distributed process virtual switch communication method
CN105337894A (en) * 2014-06-24 2016-02-17 华为技术有限公司 Apparatus, system and method for providing QoS for service message
CN105391593A (en) * 2015-12-30 2016-03-09 迈普通信技术股份有限公司 Message transmission method and equipment
CN106161459A (en) * 2016-08-10 2016-11-23 广州海格通信集团股份有限公司 The media asset management system of multi-platform access can be supported simultaneously

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5812533B2 (en) * 2012-05-31 2015-11-17 株式会社日立製作所 Communication device and communication method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022408A (en) * 2007-02-01 2007-08-22 华为技术有限公司 Method for transmitting point-to-point message and transmitting convergent node
CN101052010A (en) * 2007-05-18 2007-10-10 中兴通讯股份有限公司 Multiple engine quick master-slave swap and its method
CN101136772A (en) * 2007-09-28 2008-03-05 华为技术有限公司 Timing transmission packet method and packet transmission module
CN101599963A (en) * 2009-06-10 2009-12-09 电子科技大学 Suspected network threat information screener and Screening Treatment method
CN101969404A (en) * 2010-10-25 2011-02-09 杭州华三通信技术有限公司 Method and equipment for processing messages
CN202076851U (en) * 2011-06-17 2011-12-14 上海思源弘瑞自动化有限公司 Merging unit with dual-network independent sampling function
CN103106088A (en) * 2012-12-28 2013-05-15 上海斐讯数据通信技术有限公司 Hardware and firmware independently updating system and method thereof
CN105337894A (en) * 2014-06-24 2016-02-17 华为技术有限公司 Apparatus, system and method for providing QoS for service message
CN104954280A (en) * 2015-04-23 2015-09-30 华为技术有限公司 Data message processing method and device
CN104994166A (en) * 2015-07-10 2015-10-21 李德毅 Intelligent vehicle distributed process virtual switch communication method
CN105391593A (en) * 2015-12-30 2016-03-09 迈普通信技术股份有限公司 Message transmission method and equipment
CN106161459A (en) * 2016-08-10 2016-11-23 广州海格通信集团股份有限公司 The media asset management system of multi-platform access can be supported simultaneously

Also Published As

Publication number Publication date
CN106789695A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
KR101886291B1 (en) Flow entry configuration method, apparatus, and system
US20150304212A1 (en) Method and apparatus for matching flow table, and switch
CN106878194B (en) Message processing method and device
CN105684382A (en) Packet control method, switch and controller
CN106789695B (en) Message processing method and device
CN110311866B (en) Method and device for rapidly forwarding message
CN105959254A (en) Message processing method and device
JP6195014B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, RELAY DEVICE, AND COMMUNICATION PROGRAM
CN107547283B (en) Management method and device of distributed aggregation group
CN106803809B (en) Message forwarding method and device
JP2019523608A (en) Packet monitoring
CN113825129A (en) Industrial internet asset mapping method under 5G network environment
CN103701653B (en) The processing method of a kind of interface hot plug configuration data and network configuration server
CN114302259A (en) User information collection method, device, equipment and computer readable storage medium
WO2015027401A1 (en) Packet processing method, device and system
CN113132356B (en) UDP message distribution method, device and storage medium
CN105376706B (en) Method and device for subscribing equipment position information
CN105939344A (en) TCP (Transmission Control Protocol) connection establishing method and device
EP3054728B1 (en) Mobility management method and system
CN109634908B (en) Data association method, data processing device and storage medium
CN108259340B (en) Topology information transmission method and device
CN107870925B (en) Character string filtering method and related device
CN107483508B (en) Message filtering method, device, equipment and storage medium
CN105897490A (en) Automatic network topology discovery method
CN108574637B (en) Address self-learning method and device and switch

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
GR01 Patent grant
GR01 Patent grant