Method for parsing network message and communication device
First Claim
1. A method for parsing a network message implemented in a network device comprising:
- maintaining configuration files corresponding to different application protocol types;
receiving a network message, wherein the network message comprises one or more sections;
identifying that an application protocol type of the network message is a first application protocol;
acquiring interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and
executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result,wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message,wherein both the network message and the next message belong to a same application layer,wherein the decision method indicates that different atomic methods are executed according to different decision conditions,wherein the decision condition comprises one or more pieces of interesting data,wherein the acquired interesting data comprises a protocol type information of the next section when the interesting data indication information comprises first indication information that indicates protocol type information of the next section,wherein the decision result comprises an atomic method of changing a protocol type of a first section of the next message when the protocol type information is used as the decision condition, andwherein the protocol type of the first section of the next message is a protocol type indicated by the protocol type information.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for parsing a network message and a communication device, which includes: receiving a network message, where the network message includes one or more sections; identifying that an application protocol type of the network message is a first application protocol; acquiring, from a current section that is in the network message and that is described by a piece of section description information in a configuration file corresponding to the first application protocol, interesting data indicated by interesting data indication information in the section description information; and executing a decision method in the section description information by using all or a part of the acquired interesting data as a decision condition, thereby obtaining a corresponding decision result, when the current section is a last section of the network message, the decision result includes a processing method of a next message of the network message.
21 Citations
33 Claims
-
1. A method for parsing a network message implemented in a network device comprising:
-
maintaining configuration files corresponding to different application protocol types; receiving a network message, wherein the network message comprises one or more sections; identifying that an application protocol type of the network message is a first application protocol; acquiring interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, wherein the decision condition comprises one or more pieces of interesting data, wherein the acquired interesting data comprises a protocol type information of the next section when the interesting data indication information comprises first indication information that indicates protocol type information of the next section, wherein the decision result comprises an atomic method of changing a protocol type of a first section of the next message when the protocol type information is used as the decision condition, and wherein the protocol type of the first section of the next message is a protocol type indicated by the protocol type information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A method for parsing a network message implemented in a network device comprising:
-
maintaining configuration files corresponding to different application protocol types; receiving a network message, wherein the network message comprises one or more sections; identifying that an application protocol type of the network message is a first application protocol; acquiring interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the acquired interesting data comprises a protocol type information of a first section of the next message, length information of the first section of the next message, or encoding and decoding information of a first section of the next message, wherein the section description information comprises a section name, a section type, the interesting data indication information, and the decision method, wherein the section type indicates a scanning method used by the current section, and wherein acquiring interesting data indicated by the interesting data indication information in the section description information comprises; obtaining the interesting data indication information by scanning the current section corresponding to the section name using the scanning method indicated by the section type; and acquiring the interesting data indicated by the interesting data indication information. - View Dependent Claims (15)
-
-
16. A computer system, comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, and wherein; the acquired interesting data comprises a protocol type information of a first section of the next message, length information of the first section of the next message, or encoding and decoding information of a first section of the next message, the interesting data indication information is a header field name and the interesting data indicated by the interesting data indication information is a header field value located behind a corresponding header field, the interesting data indication information is the header field name and the interesting data indicated by the interesting data indication information is interesting data indicated by the header field name, the interesting data indication information is an attribute name and the interesting data indicated by the interesting data indication information is an attribute value, or the interesting data indication information is a label name and the interesting data indicated by the interesting data indication information is a label value. - View Dependent Claims (17, 18)
-
-
19. A computer system, comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, wherein the decision condition comprises one or more pieces of interesting data, and wherein in acquiring interesting data indicated by the interesting data indication information in the section description information and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition, acquire the interesting data indicated by the interesting data indication information in the section description information from the current section that is in the network message and that is described by the section description information in the one of the configuration files corresponding to the first application protocol, wherein the interesting data indication information comprises first indication information that indicates protocol type information of a next section and second indication information that indicates length information of the next section, and wherein the acquired interesting data comprises the protocol type information and the length information; and obtain the decision result using the protocol type information and the length information as the decision condition, wherein the length information indicates that the current section is the last section, wherein the decision result comprises an atomic method of changing a protocol type of a first section of the next message, and wherein the protocol type of the first section of the next message is a protocol type indicated by the protocol type information.
-
-
20. A computer system, comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, and wherein both the network message and the next message belong to a same application layer, wherein the decision result indicates a processing method of a next section of the current section when the current section is not the last section of the network message, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, and wherein the decision condition comprises one or more pieces of interesting data, wherein in acquiring interesting data indicated by the interesting data indication information in the section description information and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition, the processor is further configured to; acquire the interesting data indicated by the interesting data indication information in the section description information from the current section that is in the network message and that is described by the section description information in the one of the configuration files corresponding to the first application protocol, wherein the interesting data indication information comprises second indication information that indicates length information of the next section, and wherein the acquired interesting data comprises the length information; and obtain the decision result using the length information as the decision condition, wherein the decision result comprises an atomic method of setting the next section as a section with a preset length directly skipped, and wherein the preset length is a length indicated by the length information.
-
-
21. A computer system, comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the decision result indicates a processing method of a next section of the current section when the current section is not the last section of the network message, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, wherein the decision condition comprises one or more pieces of interesting data, and wherein in acquiring interesting data indicated by the interesting data indication information in the section description information and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition, the processor is further configured to; acquire the interesting data indicated by the interesting data indication information in the section description information from the current section that is in the network message and that is described by the section description information in the one of the configuration files corresponding to the first application protocol, wherein the interesting data indication information comprises first indication information that indicates protocol type information of a next section, and wherein the acquired interesting data comprises the protocol type information; and obtain the decision result using the protocol type information as the decision condition, wherein the decision result comprises an atomic method of setting a protocol type of the next section, and wherein the protocol type of the next section is a protocol type indicated by the protocol type information.
-
-
22. A parsing system, comprising:
-
a processor; a memory coupled to the processor and configured to store configuration files and a program that is used by the processor, wherein the configuration files correspond to different application protocol types; a compiler coupled to the processor and configured to compile the configuration files into protocol parsing auxiliary data that can be identified by the processor, wherein the processor is configured to; receive a network message comprising one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in protocol parsing auxiliary data corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, and wherein the acquired interesting data comprises a protocol type information of a first section of the next message, length information of the first section of the next message, or encoding and decoding information of a first section of the next message; a fast scanning compiler coupled to the processor and configured to; compile the interesting data indication information in each section described in each of the configuration files into machine-readable protocol parsing auxiliary data; and output a fast scanning table comprising a first n characters of the interesting data indication information and protocol parsing auxiliary data corresponding to a data delimiter in the section; a precise matching compiler coupled to the processor and configured to compile a multi-mode matching algorithm into machine-readable protocol parsing auxiliary data; and a logical decision compiler coupled to the processor and configured to compile the decision method in the configuration files into machine-readable protocol parsing auxiliary data. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. A computer system comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, wherein the decision condition comprises one or more pieces of interesting data, and wherein in acquiring interesting data indicated by the interesting data indication information in the section description information and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition, the processor is further configured to; acquire the interesting data indicated by the interesting data indication information in the section description information from the current section that is in the network message and that is described by the section description information in the one of the configuration files corresponding to the first application protocol, wherein the interesting data indication information comprises first indication information that indicates protocol type information of a next section, and wherein the acquired interesting data comprises the protocol type information; and obtain the decision result using the protocol type information as the decision condition, wherein the decision result comprises an atomic method of changing a protocol type of a first section of the next message, and wherein the protocol type of the first section of the next message is a protocol type indicated by the protocol type information.
-
-
33. A computer system, comprising:
-
an interface; a memory configured to store configuration files that correspond to different application protocol types; and a processor coupled to the memory and the interface, wherein the processor is configured to; obtain a network message which is received from the interface, wherein the network message comprises one or more sections; identify that an application protocol type of the network message is a first application protocol; acquire interesting data indicated by an interesting data indication information in a section description information from a current section that is in the network message and that is described by a piece of the section description information in one of the configuration files corresponding to the first application protocol; and execute a decision method in the section description information using all or a part of the acquired interesting data as a decision condition to obtain a decision result, wherein the decision result comprises a processing method of a next message of the network message when the current section is a last section of the network message, wherein both the network message and the next message belong to a same application layer, wherein the decision result indicates a processing method of a next section of the current section when the current section is not the last section of the network message, wherein the decision method indicates that different atomic methods are executed according to different decision conditions, wherein the decision condition comprises one or more pieces of interesting data, and wherein in acquiring interesting data indicated by the interesting data indication information in the section description information and executing a decision method in the section description information using all or a part of the acquired interesting data as a decision condition the processor is further configured to; acquire the interesting data indicated by the interesting data indication information in the section description information from the current section that is in the network message and that is described by the section description information in the one of the configuration files corresponding to the first application protocol, wherein the interesting data indication information comprises third indication information that indicates encoding and decoding information of the next section, and wherein the acquired interesting data comprises the encoding and decoding information; and obtain the decision result using the encoding and decoding information as the decision condition, wherein the decision result comprises an atomic method of setting a decoding algorithm that needs to be performed before the next section is to be processed, and wherein the decoding algorithm that needs to be performed before the next section is to be processed is the decoding algorithm indicated by the encoding and decoding information.
-
Specification