[go: up one dir, main page]

WO2024125103A1 - Packet processing method and network side device - Google Patents

Packet processing method and network side device Download PDF

Info

Publication number
WO2024125103A1
WO2024125103A1 PCT/CN2023/127092 CN2023127092W WO2024125103A1 WO 2024125103 A1 WO2024125103 A1 WO 2024125103A1 CN 2023127092 W CN2023127092 W CN 2023127092W WO 2024125103 A1 WO2024125103 A1 WO 2024125103A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
identifier
queue
target
rule
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.)
Ceased
Application number
PCT/CN2023/127092
Other languages
French (fr)
Chinese (zh)
Inventor
冯仰忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Publication of WO2024125103A1 publication Critical patent/WO2024125103A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • H04W28/065Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information

Definitions

  • the embodiments of the present application relate to the field of communication technology, and in particular to a message processing method and a network-side device.
  • Hardware is usually used to accelerate the processing of messages to meet the acceleration performance of the network, such as routers, switches, servers, and smart network cards.
  • messages are usually processed in a fixed manner.
  • the message distribution strategy is relatively rigid when processing messages.
  • a type of message will only be delivered to a single queue or evenly distributed to multiple queues, and only fixed and simple message information can be provided to upper-level software users, such as the address, offset, and length of the message.
  • different services require different message information, and using a fixed method to process messages cannot meet different business needs, and the flexibility of message processing is low.
  • the embodiments of the present application provide a message processing method and a network-side device to solve the problem that the message processing method cannot meet different business requirements and the message processing flexibility.
  • a message processing method comprising: obtaining a first message feature corresponding to a message to be processed; determining a target message processing rule from pre-configured message processing rules based on the first message feature, wherein different first message features correspond to different message processing rules; and processing the message to be processed according to configuration data of at least one processing sub-rule in the target message processing rule.
  • a message processing device including: an acquisition module, used to obtain a first message feature corresponding to a message to be processed; a determination module, used to determine a target message processing rule from pre-configured message processing rules based on the first message feature, wherein different first message features correspond to different message processing rules; and a processing module, used to process the message to be processed according to configuration data of at least one processing sub-rule in the target message processing rule.
  • a network side device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
  • a readable storage medium on which a program or instruction is stored.
  • the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
  • a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
  • a computer program/program product is provided, wherein the computer program/program product is stored in a storage medium, and the computer program/program product is executed by at least one processor to implement the steps of the message processing method as described in the first aspect.
  • FIG1 is a schematic flow chart of a message processing method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram showing data source information provided by an embodiment of the present application.
  • FIG3 is a schematic diagram showing a configuration of a message processing rule provided in an embodiment of the present application.
  • FIG4 is a schematic diagram showing the deep parsing configuration information provided by an embodiment of the present application.
  • FIG5 is a schematic diagram showing a buffer pool provided in an embodiment of the present application.
  • FIGS. 6 and 7 are schematic diagrams showing queue configurations provided in embodiments of the present application.
  • FIG8 is a schematic diagram showing the structure of a message processing device provided in an embodiment of the present application.
  • FIG9 shows a schematic diagram of the structure of a network side device provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by “first” and “second” are generally of the same type, and the number of objects is not limited.
  • the first object can be one or more.
  • “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally represents that the objects associated with each other are in an "or” relationship.
  • FIG1 a flow chart of a message processing method provided in an embodiment of the present application is provided, and the method includes:
  • Step S101 obtaining a first message feature corresponding to a message to be processed.
  • the first message feature refers to the feature of the message to be processed, which includes but is not limited to: the number of bytes offset from the message header, the length of the extracted data, the data matching mask, etc.
  • the message feature description information in the predefined data source information can be used to extract the first message feature from the message to be processed. Obtain a first message feature.
  • obtaining the first message feature corresponding to the message to be processed includes:
  • Target data source information from pre-configured data source information, where the target data source information includes first message feature description information; and obtain a first message feature corresponding to the first message feature description information from a message to be processed.
  • the data source information is a predefined standard table for extracting message features.
  • the message features are extracted according to the message feature description information in the predefined data source in the table, wherein the message feature description information is used to indicate the required message features to be extracted from the message.
  • the data source information includes n pieces of data source information, namely, data source 1 to data source n, and each piece of data source information corresponds to a first identifier (the first identifier is the digital number after the data source).
  • Each piece of data source information includes, but is not limited to, the number of bytes offset from the message header, the length of the extracted data, the data matching mask, whether the data source is cascaded, and the first identifier of the cascaded data source. Whether the data source is cascaded refers to whether it is associated with other data sources.
  • the number of bytes offset from the message header and the corresponding value, the length of the extracted data and the corresponding value, the data matching mask and the corresponding value, whether the data source is cascaded and the corresponding value, and the first identifier of the cascaded data source and the corresponding value are the first message description information.
  • the maximum length of data extracted by a single data source can be set to 4 or 8 bytes.
  • data source cascading can be configured.
  • the maximum cascading level and maximum cascading number of data sources can be configured so that the extracted information can be stored in the message feature description information.
  • Step S103 determining a target message processing rule from pre-configured message processing rules according to the first message feature.
  • the message processing rule refers to the processing method for processing message features.
  • the message processing rule pre-configures at least one configuration data for processing message features.
  • the processing rule is also configured with a second identifier to indicate the data source information used by the message processing rule, and the message feature corresponding to the second identifier in the message processing rule.
  • the configuration data in the message processing rule includes but is not limited to message upload configuration data, deep analysis configuration data, queue identifier, buffer identifier (Pool number), second identifier (data source information identifier), second message feature (matching value, mask, whether to cascade and cascade rule ID), and hash configuration data (HASH identifier).
  • the message upload configuration data is configured with an identifier of whether to only send message fragments and the offset and length of the message fragments to be sent, or an identifier of sending a complete message is configured to send a complete message;
  • the deep analysis configuration information includes a deep analysis identifier and deep analysis configuration information, and the deep analysis identifier indicates whether the message needs to enter the deep analysis model for further analysis. If further analysis is required, deep analysis configuration information is configured, which mainly includes custom levels, L2, L3 ⁇ L5 and other levels.
  • the deep analysis configuration information includes the extraction offset position and length of multiple custom fields;
  • the L2 analysis configuration includes the destination media access control address (Media Access Control, MAC) extraction identifier, the source MAC extraction identifier, the virtual local area network (Virtual Local Area Network, VLAN) extraction identifier, and the Ethernet type Ether TYPE extraction identifier;
  • the configuration information of L3 ⁇ L5 is mainly the four-tuple/five-tuple/seven-tuple analysis and extraction identifiers related to the standard protocol information;
  • the queue identifier indicates the starting queue number when the message is queued. If the hash configuration data is configured, the starting queue number + hash value is used as the queue for entry.
  • the queue is entered according to the starting queue number; the buffer identifier indicates which buffer the extracted message features are stored in; the second identifier indicates the digital number of the data source information referenced in the message processing rule, and the second message feature indicates the feature of the message that can be processed in the message processing rule.
  • multiple message processing rules can also be configured, such as the commonly used maximum of 32 or 64 entries.
  • the hardware can detect the actual number of configured entries.
  • Matching entries can be configured with priorities to solve multi-entry matching problems. For example, there are n matching entries with IDs from 1 to n.
  • the priorities of message processing rules can be configured to decrease in sequence or increase in sequence.
  • the default rule configuration needs to be configured. The default rule configuration needs to configure the message to continue to be sent or discarded. If it continues to be sent, the default sending needs to be configured. queue.
  • the message processing rule includes a second identifier and a second message feature
  • determining a target message processing rule from preconfigured message processing rules according to the first message feature includes:
  • the first identifier and the first message feature corresponding to the target data source information are matched with the second identifier and the second message feature in each message processing rule.
  • the message processing rule in which the first identifier matches the second identifier and the first message feature matches the second message feature is determined as the target message processing rule.
  • the message processing rule when searching for a target message processing rule that is compatible with the first message feature from multiple message processing rules, the message processing rule is searched from multiple message processing rules according to the feature information in the first message feature and the first identifier of the first message feature.
  • the message processing rule whose second identifier is consistent with the first identifier and whose second message feature is consistent with the first message feature is the target message processing rule.
  • Step S105 Process the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule.
  • the configuration data includes but is not limited to message upload configuration data, deep analysis configuration data, queue identifier, buffer identifier, second identifier, second message characteristics, hash configuration data, etc.
  • the message to be processed is processed according to these configuration data in the message processing rules, which will be explained in detail later.
  • the first message feature corresponding to the message to be processed is obtained; the target message processing rule is determined from the pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and the message to be processed is processed according to the configuration data of at least one processing sub-rule in the target message processing rule. It is possible to flexibly process the message to be processed by using different message processing rules according to different message features, thereby using different message processing rules according to different business needs, improving the flexibility of message processing. During processing, the message can be processed according to at least one processing sub-rule in the message processing rule, further improving the flexibility of message processing.
  • the method before determining the message upload configuration data in the target message processing rule, the method further includes: configuring the buffer identifier in the message processing rule; when the message upload segment is configured as the third identifier, configuring the buffer identifier as the fifth identifier, The fifth identifier corresponds to the first buffer; when the message uploading segment is configured as the fourth identifier, the identifier of the buffer is configured as the sixth identifier, and the sixth identifier corresponds to the second buffer.
  • each buffer pool contains several buffers (Regions), as shown in Figure 5.
  • Each buffer pool Pool in the figure contains three buffer regions, namely Region 0, Region 1, and Region 2.
  • the buffer size in each buffer region is the same and can be applied for independently.
  • Each buffer pool Buffer Pool sets multiple buffer regions to store different information of the message.
  • the buffer pool Buffer Pool can support multiple, as shown in Figure 5, there are n.
  • each buffer region contains N memory buffer block addresses, each memory buffer block address corresponds to a memory buffer block, and the memory buffer blocks in different buffer regions can store different information of the message.
  • the memory buffer block in Region 0 can store the largest message
  • the memory buffer block in Region 1 can be used to store the smallest message description information
  • the buffer block in Region 2 is neither too large nor too small and can be used to store message fragments.
  • each buffer Region can be configured separately according to the needs.
  • each memory buffer block in Region 0 is larger, such as 2K bytes, which can be used to store the complete content of the message.
  • the memory buffer block Buffer in Region 1 is smaller, such as 64 bytes, which can be used to store message description information.
  • the memory buffer block Buffer in Region 2 is medium, such as 256 bytes, which is used to store extracted message fragments.
  • the buffer pool is divided into a first buffer and a second buffer; the first buffer is used to store complete messages, and the second buffer is used to store message fragments.
  • different identifiers can be configured to distinguish, so that the corresponding information can be stored in the corresponding buffer according to different identifiers of the buffer.
  • the message upload fragment configuration data includes the fourth identifier and the third identifier, and specifically configures the message upload fragment in the message processing rule to obtain the message upload configuration data; the configuration includes one of the following: configuring the fourth identifier of the message upload fragment, and the offset and length of the message fragment to be uploaded; configuring the third identifier of the complete message to be uploaded. Different identifiers configured in the message upload fragment are used to determine whether to upload a message fragment or a complete message.
  • the rule is stored in the corresponding buffer, specifically determining the message upload configuration data pre-configured in the data storage sub-rule of the target message processing rule; determining the buffer identifier in the message upload configuration data, and storing the message to be processed in the buffer corresponding to the buffer identifier.
  • determining the buffer identifier in the message upload configuration data and storing the message to be processed in the buffer corresponding to the buffer identifier includes: when the buffer identifier is a third identifier, storing the complete message corresponding to the message to be processed in the first buffer of the buffer pool; when the buffer identifier is a fourth identifier, storing at least one message fragment in the message to be processed in the second buffer of the buffer pool, and the first buffer and the second buffer are different.
  • the configuration data includes deep analysis configuration data
  • the processing sub-rules include deep analysis sub-rules
  • processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule includes: determining the deep analysis configuration data pre-configured in the deep analysis sub-rule of the target processing rule, the deep analysis configuration information including a deep analysis identifier and deep analysis configuration information; when the deep analysis identifier is configured as the seventh identifier, performing deep analysis processing on the message to be processed according to the deep analysis configuration information to obtain deep analysis data.
  • the deep analysis configuration information includes at least one of the following:
  • the data extraction identifier of the VLAN corresponding to the media access control address is the data extraction identifier of the VLAN corresponding to the media access control address.
  • a data extraction identifier of a four-tuple and/or a five-tuple and/or a seven-tuple of a standard protocol is a standard protocol.
  • the deep parsing configuration information includes a deep parsing flag and deep parsing configuration information.
  • the deep parsing flag indicates whether the message needs to enter the deep parsing model for further parsing.
  • the seventh flag can be 1.
  • the deep parsing flag is configured as 1, it indicates whether the message needs to enter the deep parsing model for further parsing. If further parsing is required, configure the deep parsing configuration information, which mainly includes custom levels, L2, L3 ⁇ L5, etc.
  • the L2 parsing configuration information includes the extraction offset position and length of multiple custom fields; the L2 parsing configuration includes the destination MAC extraction identifier, source MAC extraction identifier, VLAN extraction identifier, and Ether TYPE extraction identifier; the L3 ⁇ L5 configuration information mainly includes the parsing extraction identifiers such as the four-tuple/five-tuple/seven-tuple related to the standard protocol information.
  • the processing sub-rule includes a queue processing sub-rule
  • the configuration data includes a queue identifier
  • processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule includes: determining the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; and sending the deep analysis data to the target queue corresponding to the queue identifier.
  • each queue corresponds to a queue identifier.
  • the queue identifier is preconfigured in the queue processing sub-rule, and the deep analysis data obtained after deep analysis of the identifier to be processed can be stored in the target queue.
  • the method before sending the deep parsing data to the target queue corresponding to the target queue identifier, the method further includes: determining second message feature description information corresponding to the message to be processed, the second message feature description information including the deep parsing data and configuration data of at least one processing sub-rule in the target message processing rule; sending the deep parsing data to the target queue corresponding to the target queue identifier includes: sending a storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier.
  • the storage address corresponding to the second message feature description information refers to the physical address of the buffer storing the second message feature description information.
  • the method further includes: configuring the queue.
  • the configuration includes at least one of the following: an identifier of the queue. A first alarm depth of the queue. A second alarm depth of the queue, the second alarm depth being greater than the first alarm depth.
  • each queue can be configured with a maximum depth of n, a first alarm depth of j, and a second alarm depth of k.
  • the number of queues can be configured to m, which can be configured according to actual needs.
  • the receiving module in the queue management is used to extract the message queue information in the second message description information.
  • the queue information may be a directly given queue number, or it may need to be based on the second message feature.
  • the configuration data in the description information calculates the HASH value and uses the original queue number + HASH value as the final queue number and hands it over to the queue management module.
  • the queue management module puts the first address of the message description information into the queue according to the queue number transmitted by the receiving module and updates the actual depth of the queue.
  • the message feature description information is delivered to other queues. After the actual depths of other queues reach the first alarm depth, the message feature description information is delivered to the queue again, until the actual depth of the queue reaches the second alarm depth and no longer receives the delivered message feature description information.
  • the method further includes:
  • the hash configuration data including the calculation hash value identifier and the hash value range; when the calculation hash value identifier is configured as the ninth identifier, calculate the target hash value according to the hash value range; determine the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; determine the target queue identifier according to the target hash value and the queue identifier; and send the deep analysis data to the target queue corresponding to the target queue identifier.
  • the hash value calculation identifier is configured as the hash value calculation identifier (such as configured as 1)
  • a hash value is calculated according to the range of the HASH value range
  • the hash value and the queue identifier pre-configured in the queue processing sub-rule are added to obtain a target queue identifier.
  • the pre-configured queue identifier can be a digital number
  • the target queue identifier obtained by adding the hash value and the queue identifier pre-configured in the queue processing sub-rule is also a digital number, and the corresponding queue is found according to the target queue identifier.
  • sending the storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier includes: determining an actual depth of the first queue corresponding to the target queue identifier; when the actual depth of the first queue is greater than the first alarm depth of the first queue, selecting a target queue from the second queue, and the actual depth of the target queue does not exceed the first alarm depth of the target queue; sending the storage address corresponding to the second message feature description information to the target queue until the target queue identifier is reached.
  • the actual depth of the target queue exceeds the first alarm depth.
  • the method further includes: sending the storage address corresponding to the second message feature description information to the first queue until the actual depth of the first queue is greater than the second alarm depth of the first queue.
  • the queue corresponding to the target queue identifier is configured with a load sharing queue. If not, the physical address corresponding to the second message description information is directly stored in the queue corresponding to the target queue identifier according to the target queue identifier; if the queue is configured with a load sharing queue, that is, when the actual depth of the queue i corresponding to the target queue identifier is greater than or equal to the first alarm depth of the queue i, the storage address corresponding to the second message description information will be delivered to other queues according to the user's configuration information.
  • This user configuration information can be configured separately. For example, several (assuming q) consecutive queues can be configured as load sharing queues with each other.
  • a certain queue when the queue i corresponding to the target queue identifier reaches the first alarm depth, the next adjacent queue i+1 can be preferentially selected as the queue for entry; when the i-th and i+1-th queues both reach the first alarm depth, the i+2 queue is entered, and so on, to ensure that the storage address corresponding to the same second message feature description information enters the least queue as possible; in a packet-by-packet scenario, when the queue i corresponding to the target queue identifier reaches the first alarm depth, the second message description information can be distributed to the remaining queues for processing one by one.
  • the first alarm depth is set to 1, it means that the messages are evenly distributed to multiple queues. After multiple queues have reached the first alarm depth, the messages can still be stored in the queues according to the flow-by-flow or packet-by-packet process until the actual depth of the queue reaches the second alarm depth and no more messages are received.
  • sending at least part of the second message feature description information to the target queues includes: sending the storage address corresponding to the second message feature description information to the target queue with the highest priority in sequence according to the priority of each target queue.
  • the message processing method provided in the embodiment of the present application may be executed by a message processing device.
  • the message processing device is used as an example to execute the loading message processing method.
  • the message processing device provided in the embodiment of the present application is described.
  • Fig. 8 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application.
  • the message processing device 800 includes: an acquisition module 801, which is used to acquire a first message feature corresponding to a message to be processed; a determination module 802, which is used to determine a target message processing rule from pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and a processing module 803, which is used to process the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule.
  • the present application by obtaining the first message feature corresponding to the message to be processed; determining the target message processing rule from the pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule. It is possible to flexibly process the message to be processed by using different message processing rules according to different message features, thereby using different message processing rules according to different business needs, improving the flexibility of message processing. During processing, the message can be processed according to at least one processing sub-rule in the message processing rule, further improving the flexibility of message processing.
  • the acquisition module 801 is further used to determine target data source information from pre-configured data source information, where the target data source information includes first message feature description information; and to obtain a first message feature corresponding to the first message feature description information from the message to be processed.
  • the message processing rule includes a second identifier and a second message feature
  • the determination module 802 is also used to match the first identifier and the first message feature corresponding to the target data source information with the second identifier and the second message feature in each message processing rule; and determine that the message processing rule in which the first identifier matches the second identifier and the first message feature matches the second message feature is the target message processing rule.
  • the configuration data includes message upload configuration data
  • the processing sub-rule includes a data storage sub-rule
  • the processing module 803 is further used to determine the message upload configuration data pre-configured in the data storage sub-rule of the target message processing rule; determine the message upload configuration data in the message upload configuration data;
  • the buffer identifier of the buffer is used to store the message to be processed in the buffer corresponding to the buffer identifier.
  • the processing module 803 is also used to store the complete message corresponding to the message to be processed in the first buffer of the buffer pool when the buffer identifier is the third identifier; and to store at least one message fragment in the message to be processed in the second buffer of the buffer pool when the buffer identifier is the fourth identifier, and the first buffer and the second buffer are different.
  • it also includes: a configuration module, used to configure the message upload fragment in the message processing rule to obtain the message upload configuration data; the configuration includes one of the following: configuring the fourth identifier of the message upload fragment, and the offset and length of the message fragment to be uploaded; configuring the third identifier of the complete message to be uploaded.
  • the configuration module is also used to configure the buffer identifier in the message processing rule; when the message sending segment is configured as the third identifier, the buffer identifier is configured as the fifth identifier, and the fifth identifier corresponds to the first buffer; when the message sending segment is configured as the fourth identifier, the buffer identifier is configured as the sixth identifier, and the sixth identifier corresponds to the second buffer.
  • the method further includes: a division module, configured to divide the buffer pool into a first buffer and a second buffer; the first buffer is configured to store complete messages, and the second buffer is configured to store message fragments.
  • the configuration data includes deep parsing configuration data
  • the processing sub-rules include deep parsing sub-rules
  • the processing module 803 is also used to determine the deep parsing configuration data pre-configured in the deep parsing sub-rules of the target processing rules
  • the deep parsing configuration information includes a deep parsing identifier and deep parsing configuration information; when the deep parsing identifier is configured as the seventh identifier, deep parsing processing is performed on the message to be processed according to the deep parsing configuration information to obtain deep parsing data;
  • the deep parsing configuration information includes at least one of the following: the message offset position and length of the custom field; the data extraction identifier of the destination media access control address; the data extraction identifier of the source media access control address; the data extraction identifier of the virtual local area network corresponding to the media access control address; the data extraction identifier of the quadruple and/or quintuple and/or septuple of the standard protocol; determine
  • the processing sub-rule includes a queue processing sub-rule
  • the configuration data includes a queue identifier
  • the processing module 803 is also used to determine the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; and send the deep analysis data to the target queue corresponding to the queue identifier.
  • the determination module 802 is also used to determine the hash configuration data pre-configured in the hash calculation sub-rule of the target message processing rule, the hash configuration data including a calculated hash value identifier and a hash value range; when the calculated hash value identifier is configured as the ninth identifier, the target hash value is calculated according to the hash value range; the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule is determined; the target queue identifier is determined according to the target hash value and the queue identifier; and the deep analysis data is sent to the target queue corresponding to the target queue identifier.
  • the determination module 802 is also used to determine second message feature description information corresponding to the message to be processed, the second message feature description information including deep analysis data and configuration data of at least one processing sub-rule in the target message processing rule; sending the deep analysis data to the target queue corresponding to the target queue identifier includes: sending the storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier.
  • the configuration module is also used to configure the queue; the configuration includes at least one of the following: an identifier of the queue; a first alarm depth of the queue; a second alarm depth of the queue, the second alarm depth being greater than the first alarm depth.
  • the configuration module is also used to determine the actual depth of the first queue corresponding to the target queue identifier; when the actual depth of the first queue is greater than the first alarm depth of the first queue, select a target queue from the second queue, the actual depth of the target queue not exceeding the first alarm depth of the target queue; send the storage address corresponding to the second message feature description information to the target queue until the actual depth of the target queue exceeds the first alarm depth.
  • the configuration module is further configured to send the storage address corresponding to the second message feature description information to the first queue until the actual depth of the first queue is greater than the first queue. Second alarm depth.
  • the configuration module is further configured to send the storage address corresponding to the second message feature description information to the target queue with the highest priority according to the priorities of the target queues.
  • the message processing device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip.
  • the electronic device can be a network-side device.
  • the network-side device can be a server, a network attached storage (NAS), etc., which is not specifically limited in the embodiment of the present application.
  • the message processing device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 1 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • an embodiment of the present application also provides a network side device 900, including a processor 901 and a memory 902, and the memory 902 stores a program or instruction that can be executed on the processor 901.
  • the program or instruction is executed by the processor 901
  • the various steps of the above-mentioned message processing method embodiment are implemented and the same technical effect can be achieved.
  • An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
  • a program or instruction is stored.
  • each process of the above-mentioned message processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the processor is the processor in the terminal in the above embodiment.
  • the readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
  • An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned message processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
  • the present application embodiment further provides a computer program/program product, which is stored in a storage medium and executed by at least one processor to implement the above.
  • the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a storage medium such as ROM/RAM, a magnetic disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

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

Embodiments of the present application provide a packet processing method and a network side device. The method comprises: obtaining a first packet feature corresponding to a packet to be processed; according to the first packet feature, determining a target packet processing rule from pre-configured packet processing rules, wherein different first packet features correspond to different packet processing rules; and processing said packet according to configuration data of at least one processing sub-rule in the target packet processing rule.

Description

报文处理方法及网络侧设备Message processing method and network side device

交叉引用cross reference

本申请要求在2022年12月13日提交中国专利局、申请号为202211596157.6、名称为“报文处理方法及网络侧设备”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the China Patent Office on December 13, 2022, with application number 202211596157.6 and title “Message Processing Method and Network Side Device”. The entire contents of the application are incorporated by reference into this application.

技术领域Technical Field

本申请实施例涉及通信技术领域,尤其涉及一种报文处理方法及网络侧设备。The embodiments of the present application relate to the field of communication technology, and in particular to a message processing method and a network-side device.

背景技术Background technique

随着5G通信技术的迅猛发展,各个领域对网络加速性能的要求越来越高,通常采用硬件来对报文进行加速处理从而满足网络的加速性能,如路由器、交换机、服务器以及智能网卡等。With the rapid development of 5G communication technology, various fields have higher and higher requirements for network acceleration performance. Hardware is usually used to accelerate the processing of messages to meet the acceleration performance of the network, such as routers, switches, servers, and smart network cards.

在一些场景下,采用硬件对报文进行加速处理时,通常采用固定的方式对报文进行处理,例如对报文进行处理时的报文的分发策略比较固化,一种类型的报文只会被投递到单一队列或者均匀分发到多个队列,并且只能提供固定的简单的报文信息给上层软件用户,如报文存放的地址、偏移以及长度等。但是,针对不同的业务,其所需报文的信息不同,采用固定的方式对报文进行处理,并不能满足不同的业务需求,报文处理的灵活度较低。In some scenarios, when hardware is used to accelerate the processing of messages, messages are usually processed in a fixed manner. For example, the message distribution strategy is relatively rigid when processing messages. A type of message will only be delivered to a single queue or evenly distributed to multiple queues, and only fixed and simple message information can be provided to upper-level software users, such as the address, offset, and length of the message. However, different services require different message information, and using a fixed method to process messages cannot meet different business needs, and the flexibility of message processing is low.

发明内容Summary of the invention

本申请实施例提供一种报文处理方法及网络侧设备,以解决对报文进行处理的方式不能满足不同的业务需求,报文处理的灵活度的问题。 The embodiments of the present application provide a message processing method and a network-side device to solve the problem that the message processing method cannot meet different business requirements and the message processing flexibility.

第一方面,提供了一种报文处理方法,包括:获取待处理报文对应的第一报文特征;根据所述第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理。In a first aspect, a message processing method is provided, comprising: obtaining a first message feature corresponding to a message to be processed; determining a target message processing rule from pre-configured message processing rules based on the first message feature, wherein different first message features correspond to different message processing rules; and processing the message to be processed according to configuration data of at least one processing sub-rule in the target message processing rule.

第二方面,提供了一种报文处理装置,包括:获取模块,用于获取待处理报文对应的第一报文特征;确定模块,用于根据所述第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;处理模块,用于根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理。In a second aspect, a message processing device is provided, including: an acquisition module, used to obtain a first message feature corresponding to a message to be processed; a determination module, used to determine a target message processing rule from pre-configured message processing rules based on the first message feature, wherein different first message features correspond to different message processing rules; and a processing module, used to process the message to be processed according to configuration data of at least one processing sub-rule in the target message processing rule.

第三方面,提供了一种网络侧设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, a network side device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

第四方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

第五方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

第六方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的报文处理方法的步骤。In a sixth aspect, a computer program/program product is provided, wherein the computer program/program product is stored in a storage medium, and the computer program/program product is executed by at least one processor to implement the steps of the message processing method as described in the first aspect.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1示出本申请实施例的提供的报文处理方法的示意性流程图;FIG1 is a schematic flow chart of a message processing method provided in an embodiment of the present application;

图2示出本申请实施例的提供的数据源信息的示意图;FIG2 is a schematic diagram showing data source information provided by an embodiment of the present application;

图3示出本申请实施例的提供的报文处理规则的配置示意图; FIG3 is a schematic diagram showing a configuration of a message processing rule provided in an embodiment of the present application;

图4示出本申请实施例的提供的深度解析配置信息的示意图;FIG4 is a schematic diagram showing the deep parsing configuration information provided by an embodiment of the present application;

图5示出本申请实施例的提供的缓冲池的示意图;FIG5 is a schematic diagram showing a buffer pool provided in an embodiment of the present application;

图6和图7示出本申请实施例的提供的队列配置示意图;6 and 7 are schematic diagrams showing queue configurations provided in embodiments of the present application;

图8示出本申请实施例提供的报文处理装置的结构示意图;FIG8 is a schematic diagram showing the structure of a message processing device provided in an embodiment of the present application;

图9示出本申请实施例提供的网络侧设备的结构示意图。FIG9 shows a schematic diagram of the structure of a network side device provided in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally represents that the objects associated with each other are in an "or" relationship.

下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的报文处理方法进行详细地说明。The message processing method provided in the embodiment of the present application is described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.

如图1所示,为本申请实施例提供的一种报文处理方法的流程示意图,该方法包括:As shown in FIG1 , a flow chart of a message processing method provided in an embodiment of the present application is provided, and the method includes:

步骤S101,获取待处理报文对应的第一报文特征。Step S101, obtaining a first message feature corresponding to a message to be processed.

第一报文特征指的是待处理报文的特征,其包括但不限于:从报文头开始偏移字节数、提取的数据长度、数据匹配掩码等。对于第一报文特征而言,可以按照预先定义好的数据源信息中的报文特征描述信息来从待处理报文中 获取第一报文特征。The first message feature refers to the feature of the message to be processed, which includes but is not limited to: the number of bytes offset from the message header, the length of the extracted data, the data matching mask, etc. For the first message feature, the message feature description information in the predefined data source information can be used to extract the first message feature from the message to be processed. Obtain a first message feature.

为了保证获取到规范和有效的第一报文特征以提高对报文处理的效率,在一种可能的实现方式中,获取待处理报文对应的第一报文特征包括:In order to ensure that a standardized and effective first message feature is obtained to improve the efficiency of message processing, in a possible implementation manner, obtaining the first message feature corresponding to the message to be processed includes:

从预先配置的数据源信息中确定目标数据源信息,目标数据源信息包括第一报文特征描述信息;从待处理报文中获取与第一报文特征描述信息对应的第一报文特征。Determine target data source information from pre-configured data source information, where the target data source information includes first message feature description information; and obtain a first message feature corresponding to the first message feature description information from a message to be processed.

数据源信息为预先定义好的用来提取报文特征的规范表,按照该表中预先定义好的数据源中的报文特征描述信息来提取报文特征,其中,报文特征描述信息用来指示从报文中提取所需要的报文特征。The data source information is a predefined standard table for extracting message features. The message features are extracted according to the message feature description information in the predefined data source in the table, wherein the message feature description information is used to indicate the required message features to be extracted from the message.

例如,如图2所示的,数据源信息包括n条数据源信息,分别为数据源1至数据源n,每条数据源信息对应有第一标识(第一标识即为数据源后的数字编号)。每条数据源信息包括但不限于从报文头开始偏移字节数、提取的数据长度、数据匹配掩码、数据源是否级联以及级联的数据源的第一标识,数据源是否级联指的是是否关联其他的数据源。其中,报文头开始偏移字节数以及对应的数值、提取的数据长度以及对应的数值、数据匹配掩码以及对应的数值、数据源是否级联以及对应的数值以及级联的数据源的第一标识以及对应的数值即为第一报文描述信息。For example, as shown in FIG2 , the data source information includes n pieces of data source information, namely, data source 1 to data source n, and each piece of data source information corresponds to a first identifier (the first identifier is the digital number after the data source). Each piece of data source information includes, but is not limited to, the number of bytes offset from the message header, the length of the extracted data, the data matching mask, whether the data source is cascaded, and the first identifier of the cascaded data source. Whether the data source is cascaded refers to whether it is associated with other data sources. Among them, the number of bytes offset from the message header and the corresponding value, the length of the extracted data and the corresponding value, the data matching mask and the corresponding value, whether the data source is cascaded and the corresponding value, and the first identifier of the cascaded data source and the corresponding value are the first message description information.

为了提高硬件处理和存储效率,单个数据源提取的数据长度最大可以定为4或8个字节,当4或8字节不够可以配置数据源级联,数据源最大级联等级最大级联数目可以配置以便提取的信息能存到报文特征描述信息中。数据源信息的条目有多条,比如可以配置16条。In order to improve the hardware processing and storage efficiency, the maximum length of data extracted by a single data source can be set to 4 or 8 bytes. When 4 or 8 bytes are not enough, data source cascading can be configured. The maximum cascading level and maximum cascading number of data sources can be configured so that the extracted information can be stored in the message feature description information. There are multiple entries of data source information, for example, 16 entries can be configured.

步骤S103,根据第一报文特征从预先配置的报文处理规则中确定目标报文处理规则。Step S103: determining a target message processing rule from pre-configured message processing rules according to the first message feature.

其中,不同的第一报文特征对应不同的报文处理规则。Among them, different first message features correspond to different message processing rules.

具体来讲,报文处理规则指的是对报文特征进行处理的处理方式,报文处理规则中预先配置了至少一个配置数据用来对报文特征进行处理,对报文 处理规则中还配置了第二标识用来表示该报文处理规则所使用的数据源信息、以及报文处理规则中与该第二标识对应的报文特征。如图3所示的,报文处理规则中的配置数据包括但不限于报文上传配置数据、深度解析配置数据、队列标识、缓冲区标识(Pool编号)、第二标识(数据源信息标识)、第二报文特征(匹配值、掩码、是否级联和级联规则ID)、哈希配置数据(HASH标识)。其中,报文上传配置数据中配置了是否只上送报文片段的标识以及所要上送的报文片段的偏移和长度或者配置上送完整报文的标识以上送完整报文;深度解析配置信息包括深度解析标识和深度解析配置信息,深度解析标识表示报文是否需要进入深度解析模型进行进一步的解析。如果需要进一步的解析,则配置深度解析配置信息,主要包含自定义层级、L2、L3~L5等层级,如图4所示的,深度解析配置信息中包含了多个自定义字段的提取偏移位置和长度;L2解析配置中包含了目的媒体存取控制位址(Media Access Control,MAC)提取标识、源MAC提取标识、虚拟局域网(Virtual Local Area Network,VLAN)提取标识、以太类型Ether TYPE提取标识;L3~L5的配置信息主要是标准协议信息相关的四元组/五元组/七元组等解析提取标识;队列标识表示报文入队时的起始队列编号,如果配置了哈希配置数据则根据起始队列编号+哈希值作为入队队列,如果没配置哈希配置数据则根据起始队列编号入队;缓冲区标识表示提取到的报文特征存储到哪个缓冲区;第二标识表示的是该条报文处理规则中所引用的数据源信息的数字编号、第二报文特征表示的该条报文处理规则中所能处理的报文的特征。Specifically, the message processing rule refers to the processing method for processing message features. The message processing rule pre-configures at least one configuration data for processing message features. The processing rule is also configured with a second identifier to indicate the data source information used by the message processing rule, and the message feature corresponding to the second identifier in the message processing rule. As shown in Figure 3, the configuration data in the message processing rule includes but is not limited to message upload configuration data, deep analysis configuration data, queue identifier, buffer identifier (Pool number), second identifier (data source information identifier), second message feature (matching value, mask, whether to cascade and cascade rule ID), and hash configuration data (HASH identifier). Among them, the message upload configuration data is configured with an identifier of whether to only send message fragments and the offset and length of the message fragments to be sent, or an identifier of sending a complete message is configured to send a complete message; the deep analysis configuration information includes a deep analysis identifier and deep analysis configuration information, and the deep analysis identifier indicates whether the message needs to enter the deep analysis model for further analysis. If further analysis is required, deep analysis configuration information is configured, which mainly includes custom levels, L2, L3~L5 and other levels. As shown in Figure 4, the deep analysis configuration information includes the extraction offset position and length of multiple custom fields; the L2 analysis configuration includes the destination media access control address (Media Access Control, MAC) extraction identifier, the source MAC extraction identifier, the virtual local area network (Virtual Local Area Network, VLAN) extraction identifier, and the Ethernet type Ether TYPE extraction identifier; the configuration information of L3~L5 is mainly the four-tuple/five-tuple/seven-tuple analysis and extraction identifiers related to the standard protocol information; the queue identifier indicates the starting queue number when the message is queued. If the hash configuration data is configured, the starting queue number + hash value is used as the queue for entry. If the hash configuration data is not configured, the queue is entered according to the starting queue number; the buffer identifier indicates which buffer the extracted message features are stored in; the second identifier indicates the digital number of the data source information referenced in the message processing rule, and the second message feature indicates the feature of the message that can be processed in the message processing rule.

其中,报文处理规则也可以配置多条,比如常用最大32或64个条目等,用户配置小于最大条目时硬件可以检测出实际配置的条目数。匹配条目可以配置优先级用于解决多条目匹配问题,比如n条匹配条目,ID从1~n,可以配置报文处理规则的优先级依次降低或者优先级依次升高。进一步的,如果报文没有命中任何一条报文处理规则,则需要配置默认规则配置,默认规则配置中需要配置报文继续上送或丢弃策略,如果继续上送需配置默认上送的 队列。Among them, multiple message processing rules can also be configured, such as the commonly used maximum of 32 or 64 entries. When the user configures less than the maximum number of entries, the hardware can detect the actual number of configured entries. Matching entries can be configured with priorities to solve multi-entry matching problems. For example, there are n matching entries with IDs from 1 to n. The priorities of message processing rules can be configured to decrease in sequence or increase in sequence. Furthermore, if the message does not hit any message processing rule, the default rule configuration needs to be configured. The default rule configuration needs to configure the message to continue to be sent or discarded. If it continues to be sent, the default sending needs to be configured. queue.

在一种可能的实现方式中,报文处理规则包括第二标识和第二报文特征,根据第一报文特征从预先配置的报文处理规则中确定目标报文处理规则包括:In a possible implementation, the message processing rule includes a second identifier and a second message feature, and determining a target message processing rule from preconfigured message processing rules according to the first message feature includes:

将与目标数据源信息对应的第一标识和第一报文特征与各报文处理规则中的第二标识和第二报文特征进行匹配。确定第一标识与第二标识相匹配,且第一报文特征与第二报文特征相匹配的报文处理规则为目标报文处理规则。The first identifier and the first message feature corresponding to the target data source information are matched with the second identifier and the second message feature in each message processing rule. The message processing rule in which the first identifier matches the second identifier and the first message feature matches the second message feature is determined as the target message processing rule.

具体来讲,从多个报文处理规则中查找与第一报文特征相适配的目标报文处理规则时,则是按照第一报文特征中的特征信息与第一报文特征的第一标识去从多个报文处理规则中查找,第二标识与第一标识一致,且第二报文特征与第一报文特征一致的报文处理规则为目标报文处理规则。Specifically, when searching for a target message processing rule that is compatible with the first message feature from multiple message processing rules, the message processing rule is searched from multiple message processing rules according to the feature information in the first message feature and the first identifier of the first message feature. The message processing rule whose second identifier is consistent with the first identifier and whose second message feature is consistent with the first message feature is the target message processing rule.

步骤S105,根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理。Step S105: Process the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule.

如上,配置数据包括但不限于报文上传配置数据、深度解析配置数据、队列标识、缓冲区标识、第二标识、第二报文特征、哈希配置数据等,按照报文处理规则中的这些配置数据对待处理报文进行处理,后文将会具体说明。As mentioned above, the configuration data includes but is not limited to message upload configuration data, deep analysis configuration data, queue identifier, buffer identifier, second identifier, second message characteristics, hash configuration data, etc. The message to be processed is processed according to these configuration data in the message processing rules, which will be explained in detail later.

通过本申请实施例公开的技术方案,通过获取待处理报文对应的第一报文特征;根据第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理。能够针对不同的报文特征采用不同的报文处理规则灵活的对待处理报文进行处理,从而针对不同的业务需求采用不同的报文处理规则进行处理,提高了对报文进行处理的灵活度,在处理时,又可以按照报文处理规则中至少一种处理子规则对报文进行处理,进一步提高了对报文进行处理的灵活度。Through the technical solution disclosed in the embodiment of the present application, the first message feature corresponding to the message to be processed is obtained; the target message processing rule is determined from the pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and the message to be processed is processed according to the configuration data of at least one processing sub-rule in the target message processing rule. It is possible to flexibly process the message to be processed by using different message processing rules according to different message features, thereby using different message processing rules according to different business needs, improving the flexibility of message processing. During processing, the message can be processed according to at least one processing sub-rule in the message processing rule, further improving the flexibility of message processing.

在一种可能的实现方式中,在确定目标报文处理规则中的报文上传配置数据之前,方法还包括:对报文处理规则中的缓冲区标识进行配置;在报文上送片段被配置为第三标识的情况下,将缓冲区的标识配置为第五标识,第 五标识对应第一缓冲区;在报文上送片段被配置为第四标识的情况下,将缓冲区的标识配置为第六标识,第六标识对应第二缓冲区。In a possible implementation, before determining the message upload configuration data in the target message processing rule, the method further includes: configuring the buffer identifier in the message processing rule; when the message upload segment is configured as the third identifier, configuring the buffer identifier as the fifth identifier, The fifth identifier corresponds to the first buffer; when the message uploading segment is configured as the fourth identifier, the identifier of the buffer is configured as the sixth identifier, and the sixth identifier corresponds to the second buffer.

具体来讲,每个缓冲池(Buffer Pool)包含几个缓冲区(Region),如图5所示的,图中每个缓冲池Pool中包含3个缓冲区Region,分别是Region 0、Region 1、Region 2,每个缓冲区Region中的缓冲大小相同且可以独立申请。每个缓冲池Buffer Pool设置多个缓冲区Region是为了存储报文的不同信息,缓冲池Buffer Pool可以支持多个,如图5中以有n个。对于每个缓冲区Region而言,每个缓冲区Region中又包含了N个内存缓冲块地址,每个内存缓冲块地址对应一个内存缓冲块,不同缓冲区Region中的内存缓冲块可以存储报文的不同信息,比如,Region 0中内存缓冲块最大可以存放报文,Region 1中的内存缓冲块最小可以用来存放报文描述信息,Region 2中的缓冲块不大不小可以用来存放报文片段。Specifically, each buffer pool (Buffer Pool) contains several buffers (Regions), as shown in Figure 5. Each buffer pool Pool in the figure contains three buffer regions, namely Region 0, Region 1, and Region 2. The buffer size in each buffer region is the same and can be applied for independently. Each buffer pool Buffer Pool sets multiple buffer regions to store different information of the message. The buffer pool Buffer Pool can support multiple, as shown in Figure 5, there are n. For each buffer region, each buffer region contains N memory buffer block addresses, each memory buffer block address corresponds to a memory buffer block, and the memory buffer blocks in different buffer regions can store different information of the message. For example, the memory buffer block in Region 0 can store the largest message, the memory buffer block in Region 1 can be used to store the smallest message description information, and the buffer block in Region 2 is neither too large nor too small and can be used to store message fragments.

对某个缓冲池Buffer Pool进行配置,可以根据需求分别配置每个缓冲区Region,比如Region 0中的每个内存缓冲块较大,比如2K字节,可以用来存放报文的完整内容,Region 1中的内存缓冲块Buffer较小,比如64字节,可以用来存储报文描述信息,Region 2中的内存缓冲块Buffer中等,比如256字节,用来存放提取出的报文片段。在一种可能的实现方式中,将缓冲池划分为第一缓冲区和第二缓冲区;第一缓冲区用于存储完整报文,第二缓冲区用于存储报文片段。对应于缓冲区,可以配置不同的标识来进行区分,从而可以针对缓冲区不同的标识将对应的信息存储到对应的缓冲区中。When configuring a buffer pool Buffer Pool, each buffer Region can be configured separately according to the needs. For example, each memory buffer block in Region 0 is larger, such as 2K bytes, which can be used to store the complete content of the message. The memory buffer block Buffer in Region 1 is smaller, such as 64 bytes, which can be used to store message description information. The memory buffer block Buffer in Region 2 is medium, such as 256 bytes, which is used to store extracted message fragments. In a possible implementation, the buffer pool is divided into a first buffer and a second buffer; the first buffer is used to store complete messages, and the second buffer is used to store message fragments. Corresponding to the buffer, different identifiers can be configured to distinguish, so that the corresponding information can be stored in the corresponding buffer according to different identifiers of the buffer.

其中,报文上传片段配置数据包括第四标识和第三标识,具体是对报文处理规则中的报文上传片段进行配置,得到报文上传配置数据;配置包括以下之一:配置报文上传片段的第四标识,以及要上送的报文片段偏移和长度;配置上送完整报文的第三标识。对于报文上传片段中配置的不同的标识,以确定上传报文片段还是完整报文。The message upload fragment configuration data includes the fourth identifier and the third identifier, and specifically configures the message upload fragment in the message processing rule to obtain the message upload configuration data; the configuration includes one of the following: configuring the fourth identifier of the message upload fragment, and the offset and length of the message fragment to be uploaded; configuring the third identifier of the complete message to be uploaded. Different identifiers configured in the message upload fragment are used to determine whether to upload a message fragment or a complete message.

在上传报文片段或者完整报文时,可以根据处理子规则包括数据存储子 规则,存储到对应的缓冲区,具体是确定目标报文处理规则的数据存储子规则中预先配置的报文上传配置数据;确定对报文上传配置数据中的缓冲区标识,将待处理报文存储至与缓冲区标识对应缓冲区。When uploading a message fragment or a complete message, you can include the data storage sub-rule according to the processing sub-rule. The rule is stored in the corresponding buffer, specifically determining the message upload configuration data pre-configured in the data storage sub-rule of the target message processing rule; determining the buffer identifier in the message upload configuration data, and storing the message to be processed in the buffer corresponding to the buffer identifier.

其中,确定对报文上传配置数据中的缓冲区标识,将待处理报文存储至与缓冲区标识对应缓冲区包括:在缓冲区标识为第三标识的情况下,将待处理报文对应的完整报文存储至缓冲池的第一缓冲区;在缓冲区标识为第四标识的情况下,将待处理报文中的至少一个报文片段存储至缓冲池的第二缓冲区,第一缓冲区和第二缓冲区不同。Among them, determining the buffer identifier in the message upload configuration data and storing the message to be processed in the buffer corresponding to the buffer identifier includes: when the buffer identifier is a third identifier, storing the complete message corresponding to the message to be processed in the first buffer of the buffer pool; when the buffer identifier is a fourth identifier, storing at least one message fragment in the message to be processed in the second buffer of the buffer pool, and the first buffer and the second buffer are different.

在一种可能的实现方式中,配置数据包括深度解析配置数据,处理子规则包括深度解析子规则,根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理包括:确定目标处理规则的深度解析子规则中预先配置的深度解析配置数据,深度解析配置信息包括深度解析标识和深度解析配置信息;在深度解析标识被配置为第七标识的情况下,根据深度解析配置信息对待处理报文进行深度解析处理,得到深度解析数据。In one possible implementation, the configuration data includes deep analysis configuration data, the processing sub-rules include deep analysis sub-rules, and processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule includes: determining the deep analysis configuration data pre-configured in the deep analysis sub-rule of the target processing rule, the deep analysis configuration information including a deep analysis identifier and deep analysis configuration information; when the deep analysis identifier is configured as the seventh identifier, performing deep analysis processing on the message to be processed according to the deep analysis configuration information to obtain deep analysis data.

深度解析配置信息包括以下至少一者:The deep analysis configuration information includes at least one of the following:

自定义字段的报文偏移位置和长度。The message offset position and length of the custom field.

目的MAC的数据提取标识。Destination MAC data extraction identifier.

源媒体存取控制位址的数据提取标识。Data extraction identifier of the source media access control address.

与媒体存取控制位址对应的VLAN的数据提取标识。The data extraction identifier of the VLAN corresponding to the media access control address.

标准协议的四元组和/或五元组和/或七元组的数据提取标识。A data extraction identifier of a four-tuple and/or a five-tuple and/or a seven-tuple of a standard protocol.

确定目标处理规则中的队列标识。Determine the queue ID in the target processing rule.

具体来讲,深度解析配置信息包括深度解析标识和深度解析配置信息,深度解析标识表示报文是否需要进入深度解析模型进行进一步的解析,如第七标识可以为1,深度解析标识被配置为1时,表示报文是否需要进入深度解析模型进行进一步的解析。如果需要进一步的解析,则配置深度解析配置信息,主要包含自定义层级、L2、L3~L5等层级,如上图4所示的,深度解 析配置信息中包含了多个自定义字段的提取偏移位置和长度;L2解析配置中包含了目的MAC提取标识、源MAC提取标识、VLAN提取标识、Ether TYPE提取标识;L3~L5的配置信息主要是标准协议信息相关的四元组/五元组/七元组等解析提取标识。Specifically, the deep parsing configuration information includes a deep parsing flag and deep parsing configuration information. The deep parsing flag indicates whether the message needs to enter the deep parsing model for further parsing. For example, the seventh flag can be 1. When the deep parsing flag is configured as 1, it indicates whether the message needs to enter the deep parsing model for further parsing. If further parsing is required, configure the deep parsing configuration information, which mainly includes custom levels, L2, L3~L5, etc. As shown in Figure 4 above, the deep parsing The L2 parsing configuration information includes the extraction offset position and length of multiple custom fields; the L2 parsing configuration includes the destination MAC extraction identifier, source MAC extraction identifier, VLAN extraction identifier, and Ether TYPE extraction identifier; the L3~L5 configuration information mainly includes the parsing extraction identifiers such as the four-tuple/five-tuple/seven-tuple related to the standard protocol information.

在一种可能的实现方式中,在深度解析标识为第八标识的情况下,处理子规则包括队列处理子规则,配置数据包括队列标识,根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理包括:确定目标报文处理规则的队列处理子规则中预先配置的队列标识;将深度解析数据发送到队列标识对应的目标队列。In a possible implementation, when the deep analysis identifier is the eighth identifier, the processing sub-rule includes a queue processing sub-rule, the configuration data includes a queue identifier, and processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule includes: determining the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; and sending the deep analysis data to the target queue corresponding to the queue identifier.

具体的,每一个队列都对应有队列标识,在队列处理子规则中预先配置的队列标识,对待处理标识进行深度解析后得到的深度解析数据可以存放到目标队列中。Specifically, each queue corresponds to a queue identifier. The queue identifier is preconfigured in the queue processing sub-rule, and the deep analysis data obtained after deep analysis of the identifier to be processed can be stored in the target queue.

在一种可能的实现方式中,在将深度解析数据发送到目标队列标识对应的目标队列之前,方法还包括:确定与待处理报文对应的第二报文特征描述信息,第二报文特征描述信息包括深度解析数据和目标报文处理规则中至少一种处理子规则的配置数据;将深度解析数据发送到目标队列标识对应的目标队列包括:将第二报文特征描述信息对应的存储地址发送到目标队列标识对应的目标队列。第二报文特征描述信息对应的存储地址指的是存储第二报文特征描述信息的缓冲区的物理地址。In a possible implementation, before sending the deep parsing data to the target queue corresponding to the target queue identifier, the method further includes: determining second message feature description information corresponding to the message to be processed, the second message feature description information including the deep parsing data and configuration data of at least one processing sub-rule in the target message processing rule; sending the deep parsing data to the target queue corresponding to the target queue identifier includes: sending a storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier. The storage address corresponding to the second message feature description information refers to the physical address of the buffer storing the second message feature description information.

在确定目标报文处理规则的队列处理子规则中预先配置的队列标识之前,方法还包括:对队列进行配置。配置包括以下至少一者:队列的标识。队列的第一告警深度。队列的第二告警深度,第二告警深度大于第一告警深度。Before determining the queue identifier preconfigured in the queue processing sub-rule of the target message processing rule, the method further includes: configuring the queue. The configuration includes at least one of the following: an identifier of the queue. A first alarm depth of the queue. A second alarm depth of the queue, the second alarm depth being greater than the first alarm depth.

具体来讲,如图6和图7所示的,每个队列可以配置最大深度为n、第1告警深度j、第2告警深度k,队列的数量可以配置m个,具体可以根据实际需要配置。队列管理中的接收模块用来提取第二报文描述信息中的报文入队信息,入队信息可能是直接给出的队列编号,也可能需要根据第二报文特征 描述信息中的配置数据计算出HASH值并由队列原始编号+HASH值作为最终的入队队列号并交给入队管理模块。入队管理模块根据接收模块传递的队列编号将将报文描述信息的首地址放入到队列中并更新队列的实际深度。在队列的实际深度达到第一告警深度时,将报文特征描述信息投递到其他的队列,在其他的队列中的实际深度都达到第一告警深度后,再将报文特征描述信息投递到该队列,直至该队列的实际深度达到第二告警深度后不再接收投递的报文特征描述信息。Specifically, as shown in Figures 6 and 7, each queue can be configured with a maximum depth of n, a first alarm depth of j, and a second alarm depth of k. The number of queues can be configured to m, which can be configured according to actual needs. The receiving module in the queue management is used to extract the message queue information in the second message description information. The queue information may be a directly given queue number, or it may need to be based on the second message feature. The configuration data in the description information calculates the HASH value and uses the original queue number + HASH value as the final queue number and hands it over to the queue management module. The queue management module puts the first address of the message description information into the queue according to the queue number transmitted by the receiving module and updates the actual depth of the queue. When the actual depth of the queue reaches the first alarm depth, the message feature description information is delivered to other queues. After the actual depths of other queues reach the first alarm depth, the message feature description information is delivered to the queue again, until the actual depth of the queue reaches the second alarm depth and no longer receives the delivered message feature description information.

在一种可能的实现方式中,在根据深度解析配置信息对待处理报文进行深度解析处理,得到深度解析数据之后,方法还包括:In a possible implementation, after performing deep parsing on the message to be processed according to the deep parsing configuration information to obtain deep parsing data, the method further includes:

确定目标报文处理规则的哈希计算子规则中预先配置的哈希配置数据,哈希配置数据包括计算哈希值标识和哈希值范围;在计算哈希值标识被配置为第九标识的情况下,根据哈希值范围计算目标哈希值;确定目标报文处理规则的队列处理子规则中预先配置的队列标识;根据目标哈希值和队列标识确定目标队列标识;将深度解析数据发送到目标队列标识对应的目标队列。Determine the hash configuration data pre-configured in the hash calculation sub-rule of the target message processing rule, the hash configuration data including the calculation hash value identifier and the hash value range; when the calculation hash value identifier is configured as the ninth identifier, calculate the target hash value according to the hash value range; determine the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; determine the target queue identifier according to the target hash value and the queue identifier; and send the deep analysis data to the target queue corresponding to the target queue identifier.

具体来讲,在得到深度解析数据之后,按照报文处理规则中配置的哈希配置数据来确定是否更新所要投递的队列,如果计算哈希值标识被配置为计算哈希值的标识(如配置为1),则按照HASH值范围的范围计算出一个哈希值,将该哈希值和的队列处理子规则中预先配置的队列标识相加,得到一个目标队列标识。其中,预先配置的队列标识可以为数字编号,哈希值和的队列处理子规则中预先配置的队列标识相加得到的目标队列标识也为数字编号,按照该目标队列标识找到对应的队列。Specifically, after obtaining the deep analysis data, determine whether to update the queue to be delivered according to the hash configuration data configured in the message processing rule. If the hash value calculation identifier is configured as the hash value calculation identifier (such as configured as 1), a hash value is calculated according to the range of the HASH value range, and the hash value and the queue identifier pre-configured in the queue processing sub-rule are added to obtain a target queue identifier. Among them, the pre-configured queue identifier can be a digital number, and the target queue identifier obtained by adding the hash value and the queue identifier pre-configured in the queue processing sub-rule is also a digital number, and the corresponding queue is found according to the target queue identifier.

在一种可能的实现方式中,将第二报文特征描述信息对应的存储地址发送到目标队列标识对应的目标队列包括:确定目标队列标识对应的第一队列的实际深度;在第一队列的实际深度大于第一队列的第一告警深度的情况下,从第二队列中选取目标队列,目标队列的实际深度不超过目标队列的第一告警深度;将第二报文特征描述信息对应的存储地址发送到目标队列,直至目 标队列的实际深度超出第一告警深度。在目标队列的实际深度超出第一告警深度的情况下,方法还包括:将第二报文特征描述信息对应的存储地址发送到第一队列,直至第一队列的实际深度大于第一队列的第二告警深度。In a possible implementation, sending the storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier includes: determining an actual depth of the first queue corresponding to the target queue identifier; when the actual depth of the first queue is greater than the first alarm depth of the first queue, selecting a target queue from the second queue, and the actual depth of the target queue does not exceed the first alarm depth of the target queue; sending the storage address corresponding to the second message feature description information to the target queue until the target queue identifier is reached. The actual depth of the target queue exceeds the first alarm depth. When the actual depth of the target queue exceeds the first alarm depth, the method further includes: sending the storage address corresponding to the second message feature description information to the first queue until the actual depth of the first queue is greater than the second alarm depth of the first queue.

具体来讲,在得到第二报文描述信息和目标队列标识后,首先判断该目标队列标识对应的队列是否配置了负荷分担队列,如果没有配置,则根据目标队列标识直接将存储该第二报文描述信息对应的物理地址存放到该目标队列标识对应的队列中;如果该队列配置了负荷分担队列,即当该目标队列标识对应的队列i的实际深度大于或等于队列i的第1告警深度后,会根据用户的配置信息将第二报文描述信息对应的存储地址投递到其它队列,这种用户配置信息可以单独配置,比如某几个(假设为q个)连续的队列可以互相配置为负荷分担队列,在逐流场景(按照报文特征固定入某一队列或HASH值固定入某一队列),当目标队列标识对应的队列i达到第1告警深度后可以优先选择临近的下一个队列i+1作为入队队列,当第i、i+1队列均达到第1告警深度后再入队i+2队列,以此类推,保证同一个第二报文特征描述信息对应的存储地址尽量入最少的队列;在逐包场景,当目标队列标识对应的队列i达到第1告警深度后,可以逐个将第二报文描述信息分发到其余的队列处理,此处如果将第1告警深度设置为1则可以表示报文均匀分发到多个队列中,在多个队列均达到第1告警深度后报文仍可以依照逐流或者逐包的流程向队列中存放报文,直到队列的实际深度达到第2告警深度后将不再接收报文。Specifically, after obtaining the second message description information and the target queue identifier, it is first determined whether the queue corresponding to the target queue identifier is configured with a load sharing queue. If not, the physical address corresponding to the second message description information is directly stored in the queue corresponding to the target queue identifier according to the target queue identifier; if the queue is configured with a load sharing queue, that is, when the actual depth of the queue i corresponding to the target queue identifier is greater than or equal to the first alarm depth of the queue i, the storage address corresponding to the second message description information will be delivered to other queues according to the user's configuration information. This user configuration information can be configured separately. For example, several (assuming q) consecutive queues can be configured as load sharing queues with each other. In the flow-by-flow scenario (fixed into a certain queue according to message characteristics or fixed into a HASH value), a certain queue), when the queue i corresponding to the target queue identifier reaches the first alarm depth, the next adjacent queue i+1 can be preferentially selected as the queue for entry; when the i-th and i+1-th queues both reach the first alarm depth, the i+2 queue is entered, and so on, to ensure that the storage address corresponding to the same second message feature description information enters the least queue as possible; in a packet-by-packet scenario, when the queue i corresponding to the target queue identifier reaches the first alarm depth, the second message description information can be distributed to the remaining queues for processing one by one. Here, if the first alarm depth is set to 1, it means that the messages are evenly distributed to multiple queues. After multiple queues have reached the first alarm depth, the messages can still be stored in the queues according to the flow-by-flow or packet-by-packet process until the actual depth of the queue reaches the second alarm depth and no more messages are received.

在一种可能的实现方式中,目标队列为多个,将第二报文特征描述信息中的至少部分信息发送到目标队列包括:将第二报文特征描述信息对应的存储地址按照各目标队列的优先级依次发送到优先级最高的目标队列。In a possible implementation, there are multiple target queues, and sending at least part of the second message feature description information to the target queues includes: sending the storage address corresponding to the second message feature description information to the target queue with the highest priority in sequence according to the priority of each target queue.

需要说明的是,本申请实施例提供的报文处理方法,执行主体可以为报文处理装置,本申请实施例中以报文处理装置执行加载报文处理方法为例, 说明本申请实施例提供的报文处理装置。It should be noted that the message processing method provided in the embodiment of the present application may be executed by a message processing device. In the embodiment of the present application, the message processing device is used as an example to execute the loading message processing method. The message processing device provided in the embodiment of the present application is described.

图8是根据本申请实施例的报文处理装置的结构示意图。如图8所示,报文处理装置800包括:获取模块801,用于获取待处理报文对应的第一报文特征;确定模块802,用于根据第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;处理模块803,用于根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理。Fig. 8 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application. As shown in Fig. 8, the message processing device 800 includes: an acquisition module 801, which is used to acquire a first message feature corresponding to a message to be processed; a determination module 802, which is used to determine a target message processing rule from pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and a processing module 803, which is used to process the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule.

在本申请实施例中,通过获取待处理报文对应的第一报文特征;根据第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;根据目标报文处理规则中至少一种处理子规则的配置数据对待处理报文进行处理。能够针对不同的报文特征采用不同的报文处理规则灵活的对待处理报文进行处理,从而针对不同的业务需求采用不同的报文处理规则进行处理,提高了对报文进行处理的灵活度,在处理时,又可以按照报文处理规则中至少一种处理子规则对报文进行处理,进一步提高了对报文进行处理的灵活度。In the embodiment of the present application, by obtaining the first message feature corresponding to the message to be processed; determining the target message processing rule from the pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; and processing the message to be processed according to the configuration data of at least one processing sub-rule in the target message processing rule. It is possible to flexibly process the message to be processed by using different message processing rules according to different message features, thereby using different message processing rules according to different business needs, improving the flexibility of message processing. During processing, the message can be processed according to at least one processing sub-rule in the message processing rule, further improving the flexibility of message processing.

在一种可能的实现方式中,获取模块801,还用于从预先配置的数据源信息中确定目标数据源信息,目标数据源信息包括第一报文特征描述信息;从待处理报文中获取与第一报文特征描述信息对应的第一报文特征。In a possible implementation, the acquisition module 801 is further used to determine target data source information from pre-configured data source information, where the target data source information includes first message feature description information; and to obtain a first message feature corresponding to the first message feature description information from the message to be processed.

在一种可能的实现方式中,报文处理规则包括第二标识和第二报文特征,确定模块802,还用于将与目标数据源信息对应的第一标识和第一报文特征与各报文处理规则中的第二标识和第二报文特征进行匹配;确定第一标识与第二标识相匹配,且第一报文特征与第二报文特征相匹配的报文处理规则为目标报文处理规则。In one possible implementation, the message processing rule includes a second identifier and a second message feature, and the determination module 802 is also used to match the first identifier and the first message feature corresponding to the target data source information with the second identifier and the second message feature in each message processing rule; and determine that the message processing rule in which the first identifier matches the second identifier and the first message feature matches the second message feature is the target message processing rule.

在一种可能的实现方式中,配置数据包括报文上传配置数据,处理子规则包括数据存储子规则,处理模块803,还用于确定目标报文处理规则的数据存储子规则中预先配置的报文上传配置数据;确定对报文上传配置数据中 的缓冲区标识,将待处理报文存储至与缓冲区标识对应缓冲区。In a possible implementation, the configuration data includes message upload configuration data, the processing sub-rule includes a data storage sub-rule, and the processing module 803 is further used to determine the message upload configuration data pre-configured in the data storage sub-rule of the target message processing rule; determine the message upload configuration data in the message upload configuration data; The buffer identifier of the buffer is used to store the message to be processed in the buffer corresponding to the buffer identifier.

在一种可能的实现方式中,处理模块803,还用于在缓冲区标识为第三标识的情况下,将待处理报文对应的完整报文存储至缓冲池的第一缓冲区;在缓冲区标识为第四标识的情况下,将待处理报文中的至少一个报文片段存储至缓冲池的第二缓冲区,第一缓冲区和第二缓冲区不同。In one possible implementation, the processing module 803 is also used to store the complete message corresponding to the message to be processed in the first buffer of the buffer pool when the buffer identifier is the third identifier; and to store at least one message fragment in the message to be processed in the second buffer of the buffer pool when the buffer identifier is the fourth identifier, and the first buffer and the second buffer are different.

在一种可能的实现方式中,还包括:配置模块,用于对报文处理规则中的报文上传片段进行配置,得到报文上传配置数据;配置包括以下之一:配置报文上传片段的第四标识,以及要上送的报文片段偏移和长度;配置上送完整报文的第三标识。In a possible implementation, it also includes: a configuration module, used to configure the message upload fragment in the message processing rule to obtain the message upload configuration data; the configuration includes one of the following: configuring the fourth identifier of the message upload fragment, and the offset and length of the message fragment to be uploaded; configuring the third identifier of the complete message to be uploaded.

在一种可能的实现方式中,配置模块,还用于对报文处理规则中的缓冲区标识进行配置;在报文上送片段被配置为第三标识的情况下,将缓冲区的标识配置为第五标识,第五标识对应第一缓冲区;在报文上送片段被配置为第四标识的情况下,将缓冲区的标识配置为第六标识,第六标识对应第二缓冲区。In a possible implementation, the configuration module is also used to configure the buffer identifier in the message processing rule; when the message sending segment is configured as the third identifier, the buffer identifier is configured as the fifth identifier, and the fifth identifier corresponds to the first buffer; when the message sending segment is configured as the fourth identifier, the buffer identifier is configured as the sixth identifier, and the sixth identifier corresponds to the second buffer.

在一种可能的实现方式中,还包括:划分模块,用于将缓冲池划分为第一缓冲区和第二缓冲区;第一缓冲区用于存储完整报文,第二缓冲区用于存储报文片段。In a possible implementation, the method further includes: a division module, configured to divide the buffer pool into a first buffer and a second buffer; the first buffer is configured to store complete messages, and the second buffer is configured to store message fragments.

在一种可能的实现方式中,配置数据包括深度解析配置数据,处理子规则包括深度解析子规则,处理模块803,还用于确定目标处理规则的深度解析子规则中预先配置的深度解析配置数据,深度解析配置信息包括深度解析标识和深度解析配置信息;在深度解析标识被配置为第七标识的情况下,根据深度解析配置信息对待处理报文进行深度解析处理,得到深度解析数据;深度解析配置信息包括以下至少一者:自定义字段的报文偏移位置和长度;目的媒体存取控制位址的数据提取标识;源媒体存取控制位址的数据提取标识;与媒体存取控制位址对应的虚拟局域网的数据提取标识;标准协议的四元组和/或五元组和/或七元组的数据提取标识;确定目标处理规则中的队列标 识。In a possible implementation, the configuration data includes deep parsing configuration data, the processing sub-rules include deep parsing sub-rules, and the processing module 803 is also used to determine the deep parsing configuration data pre-configured in the deep parsing sub-rules of the target processing rules, and the deep parsing configuration information includes a deep parsing identifier and deep parsing configuration information; when the deep parsing identifier is configured as the seventh identifier, deep parsing processing is performed on the message to be processed according to the deep parsing configuration information to obtain deep parsing data; the deep parsing configuration information includes at least one of the following: the message offset position and length of the custom field; the data extraction identifier of the destination media access control address; the data extraction identifier of the source media access control address; the data extraction identifier of the virtual local area network corresponding to the media access control address; the data extraction identifier of the quadruple and/or quintuple and/or septuple of the standard protocol; determine the queue identifier in the target processing rule knowledge.

在一种可能的实现方式中,在深度解析标识为第八标识的情况下,处理子规则包括队列处理子规则,配置数据包括队列标识,处理模块803,还用于确定目标报文处理规则的队列处理子规则中预先配置的队列标识;将深度解析数据发送到队列标识对应的目标队列。In one possible implementation, when the deep analysis identifier is the eighth identifier, the processing sub-rule includes a queue processing sub-rule, the configuration data includes a queue identifier, and the processing module 803 is also used to determine the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule; and send the deep analysis data to the target queue corresponding to the queue identifier.

在一种可能的实现方式中,确定模块802,还用于确定目标报文处理规则的哈希计算子规则中预先配置的哈希配置数据,哈希配置数据包括计算哈希值标识和哈希值范围;在计算哈希值标识被配置为第九标识的情况下,根据哈希值范围计算目标哈希值;确定目标报文处理规则的队列处理子规则中预先配置的队列标识;根据目标哈希值和队列标识确定目标队列标识;将深度解析数据发送到目标队列标识对应的目标队列。In one possible implementation, the determination module 802 is also used to determine the hash configuration data pre-configured in the hash calculation sub-rule of the target message processing rule, the hash configuration data including a calculated hash value identifier and a hash value range; when the calculated hash value identifier is configured as the ninth identifier, the target hash value is calculated according to the hash value range; the queue identifier pre-configured in the queue processing sub-rule of the target message processing rule is determined; the target queue identifier is determined according to the target hash value and the queue identifier; and the deep analysis data is sent to the target queue corresponding to the target queue identifier.

在一种可能的实现方式中,确定模块802,还用于确定与待处理报文对应的第二报文特征描述信息,第二报文特征描述信息包括深度解析数据和目标报文处理规则中至少一种处理子规则的配置数据;将深度解析数据发送到目标队列标识对应的目标队列包括:将第二报文特征描述信息对应的存储地址发送到目标队列标识对应的目标队列。In one possible implementation, the determination module 802 is also used to determine second message feature description information corresponding to the message to be processed, the second message feature description information including deep analysis data and configuration data of at least one processing sub-rule in the target message processing rule; sending the deep analysis data to the target queue corresponding to the target queue identifier includes: sending the storage address corresponding to the second message feature description information to the target queue corresponding to the target queue identifier.

在一种可能的实现方式中,配置模块,还用于对队列进行配置;配置包括以下至少一者:队列的标识;队列的第一告警深度;队列的第二告警深度,第二告警深度大于第一告警深度。在一种可能的实现方式中,配置模块,还用于确定目标队列标识对应的第一队列的实际深度;在第一队列的实际深度大于第一队列的第一告警深度的情况下,从第二队列中选取目标队列,目标队列的实际深度不超过目标队列的第一告警深度;将第二报文特征描述信息对应的存储地址发送到目标队列,直至目标队列的实际深度超出第一告警深度。In a possible implementation, the configuration module is also used to configure the queue; the configuration includes at least one of the following: an identifier of the queue; a first alarm depth of the queue; a second alarm depth of the queue, the second alarm depth being greater than the first alarm depth. In a possible implementation, the configuration module is also used to determine the actual depth of the first queue corresponding to the target queue identifier; when the actual depth of the first queue is greater than the first alarm depth of the first queue, select a target queue from the second queue, the actual depth of the target queue not exceeding the first alarm depth of the target queue; send the storage address corresponding to the second message feature description information to the target queue until the actual depth of the target queue exceeds the first alarm depth.

在一种可能的实现方式中,配置模块,还用于将第二报文特征描述信息对应的存储地址发送到第一队列,直至第一队列的实际深度大于第一队列的 第二告警深度。In a possible implementation, the configuration module is further configured to send the storage address corresponding to the second message feature description information to the first queue until the actual depth of the first queue is greater than the first queue. Second alarm depth.

在一种可能的实现方式中,配置模块,还用于将第二报文特征描述信息对应的存储地址按照各目标队列的优先级发送到优先级最高的目标队列。In a possible implementation manner, the configuration module is further configured to send the storage address corresponding to the second message feature description information to the target queue with the highest priority according to the priorities of the target queues.

本申请实施例中的报文处理装置可以是电子设备,例如具有操作系统的电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是网络侧设备。示例性的,网络侧设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。The message processing device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a network-side device. Exemplarily, the network-side device can be a server, a network attached storage (NAS), etc., which is not specifically limited in the embodiment of the present application.

本申请实施例提供的报文处理装置能够实现图1的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。The message processing device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 1 and achieve the same technical effect. To avoid repetition, it will not be repeated here.

可选的,如图9所示,本申请实施例还提供一种网络侧设备900,包括处理器901和存储器902,存储器902上存储有可在处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述报文处理方法实施例的各个步骤,且能达到相同的技术效果。Optionally, as shown in Figure 9, an embodiment of the present application also provides a network side device 900, including a processor 901 and a memory 902, and the memory 902 stores a program or instruction that can be executed on the processor 901. When the program or instruction is executed by the processor 901, the various steps of the above-mentioned message processing method embodiment are implemented and the same technical effect can be achieved.

本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述报文处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned message processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

其中,处理器为上述实施例中的终端中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is the processor in the terminal in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述报文处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned message processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

本申请实施例另提供了一种计算机程序/程序产品,计算机程序/程序产品被存储在存储介质中,计算机程序/程序产品被至少一个处理器执行以实现上 述报文处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The present application embodiment further provides a computer program/program product, which is stored in a storage medium and executed by at least one processor to implement the above The various processes of the message processing method embodiment are described in detail, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (18)

一种报文处理方法,所述方法包括:A message processing method, the method comprising: 获取待处理报文对应的第一报文特征;Obtaining a first message feature corresponding to the message to be processed; 根据所述第一报文特征从预先配置的报文处理规则中确定目标报文处理规则,其中,不同的第一报文特征对应不同的报文处理规则;Determining a target message processing rule from pre-configured message processing rules according to the first message feature, wherein different first message features correspond to different message processing rules; 根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理。The message to be processed is processed according to configuration data of at least one processing sub-rule in the target message processing rule. 根据权利要求1所述的方法,其中,所述获取待处理报文对应的第一报文特征包括:The method according to claim 1, wherein obtaining the first message feature corresponding to the message to be processed comprises: 从预先配置的数据源信息中确定目标数据源信息,所述目标数据源信息包括第一报文特征描述信息;Determine target data source information from pre-configured data source information, wherein the target data source information includes first message feature description information; 从待处理报文中获取与所述第一报文特征描述信息对应的第一报文特征。A first message feature corresponding to the first message feature description information is obtained from the message to be processed. 根据权利要求2所述的方法,其中,所述报文处理规则包括第二标识和第二报文特征,所述根据所述第一报文特征从预先配置的报文处理规则中确定目标报文处理规则包括:The method according to claim 2, wherein the message processing rule includes a second identifier and a second message feature, and determining the target message processing rule from the preconfigured message processing rules according to the first message feature includes: 将与所述目标数据源信息对应的第一标识和所述第一报文特征与各所述报文处理规则中的第二标识和所述第二报文特征进行匹配;Matching the first identifier and the first message feature corresponding to the target data source information with the second identifier and the second message feature in each of the message processing rules; 确定所述第一标识与所述第二标识相匹配,且所述第一报文特征与所述第二报文特征相匹配的报文处理规则为所述目标报文处理规则。It is determined that the first identifier matches the second identifier, and the message processing rule in which the first message feature matches the second message feature is the target message processing rule. 根据权利要求1所述的方法,其中,所述配置数据包括报文上传配置数据,所述处理子规则包括数据存储子规则,所述根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理包括:The method according to claim 1, wherein the configuration data includes message upload configuration data, the processing sub-rule includes a data storage sub-rule, and the processing of the to-be-processed message according to the configuration data of at least one processing sub-rule in the target message processing rule includes: 确定所述目标报文处理规则的数据存储子规则中预先配置的报文上传配置数据; Determine the message upload configuration data pre-configured in the data storage sub-rule of the target message processing rule; 确定对所述报文上传配置数据中的缓冲区标识,将所述待处理报文存储至与所述缓冲区标识对应缓冲区。Determine a buffer identifier in the message upload configuration data, and store the message to be processed in a buffer corresponding to the buffer identifier. 根据权利要求4所述的方法,其中,所述确定对所述报文上传配置数据中的缓冲区标识,将所述待处理报文存储至与所述缓冲区标识对应缓冲区包括:The method according to claim 4, wherein the determining the buffer identifier in the message upload configuration data and storing the message to be processed in the buffer corresponding to the buffer identifier comprises: 在所述缓冲区标识为第三标识的情况下,将所述待处理报文对应的完整报文存储至缓冲池的第一缓冲区;When the buffer zone identifier is the third identifier, storing the complete message corresponding to the to-be-processed message in the first buffer zone of the buffer pool; 在所述缓冲区标识为第四标识的情况下,将所述待处理报文中的至少一个报文片段存储至所述缓冲池的第二缓冲区,所述第一缓冲区和所述第二缓冲区不同。When the buffer zone identifier is the fourth identifier, at least one message fragment in the to-be-processed message is stored in a second buffer zone of the buffer pool, and the first buffer zone and the second buffer zone are different. 根据权利要求5所述的方法,其中,在所述确定所述目标报文处理规则中预先配置的报文上传配置数据之前,所述方法还包括:The method according to claim 5, wherein, before determining the message upload configuration data pre-configured in the target message processing rule, the method further comprises: 对所述报文处理规则中的报文上传片段进行配置,得到所述报文上传配置数据;Configuring the message upload segment in the message processing rule to obtain the message upload configuration data; 所述配置包括以下之一:The configuration includes one of the following: 配置报文上传片段的第四标识,以及要上送的报文片段偏移和长度;Configure the fourth identifier of the message upload segment, as well as the offset and length of the message segment to be uploaded; 配置上送完整报文的第三标识。Configure the third flag for sending complete messages. 根据权利要求6所述的方法,其中,在所述确定所述目标报文处理规则中的报文上传配置数据之前,所述方法还包括:The method according to claim 6, wherein, before determining the message upload configuration data in the target message processing rule, the method further comprises: 对所述报文处理规则中的缓冲区标识进行配置;Configuring the buffer zone identifier in the message processing rule; 在所述报文上送片段被配置为所述第三标识的情况下,将所述缓冲区的标识配置为第五标识,所述第五标识对应所述第一缓冲区;When the message sending segment is configured as the third identifier, the identifier of the buffer is configured as a fifth identifier, and the fifth identifier corresponds to the first buffer; 在所述报文上送片段被配置为所述第四标识的情况下,将所述缓冲区的标识配置为第六标识,所述第六标识对应所述第二缓冲区。In a case where the message sending segment is configured as the fourth identifier, the identifier of the buffer is configured as a sixth identifier, and the sixth identifier corresponds to the second buffer. 根据权利要求4-7任一项所述的方法,其中,在所述确定所述目标报文处理规则中的报文上传配置数据之前,所述方法还包括: The method according to any one of claims 4 to 7, wherein, before determining the message upload configuration data in the target message processing rule, the method further comprises: 将所述缓冲池划分为第一缓冲区和第二缓冲区;Dividing the buffer pool into a first buffer zone and a second buffer zone; 所述第一缓冲区用于存储完整报文,所述第二缓冲区用于存储报文片段。The first buffer is used to store complete messages, and the second buffer is used to store message fragments. 根据权利要求1-7任一项所述的方法,其中,所述配置数据包括深度解析配置数据,所述处理子规则包括深度解析子规则,所述根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理包括:The method according to any one of claims 1 to 7, wherein the configuration data includes deep parsing configuration data, the processing sub-rule includes a deep parsing sub-rule, and the processing of the to-be-processed message according to the configuration data of at least one processing sub-rule in the target message processing rule includes: 确定所述目标处理规则的深度解析子规则中预先配置的深度解析配置数据,所述深度解析配置信息包括深度解析标识和深度解析配置信息;Determine the deep parsing configuration data pre-configured in the deep parsing sub-rule of the target processing rule, wherein the deep parsing configuration information includes a deep parsing identifier and deep parsing configuration information; 在所述深度解析标识被配置为第七标识的情况下,根据所述深度解析配置信息对所述待处理报文进行深度解析处理,得到深度解析数据;When the deep analysis flag is configured as the seventh flag, deep analysis processing is performed on the message to be processed according to the deep analysis configuration information to obtain deep analysis data; 所述深度解析配置信息包括以下至少一者:The deep analysis configuration information includes at least one of the following: 自定义字段的报文偏移位置和长度;The message offset position and length of the custom field; 目的媒体存取控制位址的数据提取标识;A data extraction identifier of a destination media access control address; 源媒体存取控制位址的数据提取标识;A data extraction identifier of a source media access control address; 与所述媒体存取控制位址对应的虚拟局域网的数据提取标识;A data extraction identifier of a virtual local area network corresponding to the media access control address; 标准协议的四元组和/或五元组和/或七元组的数据提取标识;A data extraction identifier of a four-tuple and/or a five-tuple and/or a seven-tuple of a standard protocol; 所述目标处理规则中的队列标识。The queue identifier in the target processing rule. 根据权利要求9所述的方法,其中,在所述深度解析标识为第八标识的情况下,所述处理子规则包括队列处理子规则,所述配置数据包括队列标识,所述根据所述目标报文处理规则中至少一种处理子规则的配置数据对所述待处理报文进行处理包括:The method according to claim 9, wherein, when the deep parsing identifier is the eighth identifier, the processing sub-rule includes a queue processing sub-rule, the configuration data includes a queue identifier, and the processing of the to-be-processed message according to the configuration data of at least one processing sub-rule in the target message processing rule includes: 确定所述目标报文处理规则的队列处理子规则中预先配置的队列标识;Determine a queue identifier preconfigured in a queue processing sub-rule of the target message processing rule; 将所述深度解析数据发送到所述队列标识对应的目标队列。The deep parsing data is sent to a target queue corresponding to the queue identifier. 根据权利要求9所述的方法,其中,在所述根据所述深度解析配 置信息对所述待处理报文进行深度解析处理,得到深度解析数据之后,所述方法还包括:The method according to claim 9, wherein in the After performing deep analysis on the message to be processed according to the configuration information and obtaining deep analysis data, the method further includes: 确定所述目标报文处理规则的哈希计算子规则中预先配置的哈希配置数据,所述哈希配置数据包括计算哈希值标识和哈希值范围;Determine the hash configuration data pre-configured in the hash calculation sub-rule of the target message processing rule, wherein the hash configuration data includes a calculation hash value identifier and a hash value range; 在所述计算哈希值标识被配置为第九标识的情况下,根据所述哈希值范围计算目标哈希值;When the calculation hash value identifier is configured as a ninth identifier, a target hash value is calculated according to the hash value range; 确定所述目标报文处理规则的队列处理子规则中预先配置的队列标识;Determine a queue identifier preconfigured in a queue processing sub-rule of the target message processing rule; 根据所述目标哈希值和所述队列标识确定所述目标队列标识;Determine the target queue identifier according to the target hash value and the queue identifier; 将所述深度解析数据发送到所述目标队列标识对应的目标队列。The deep parsing data is sent to a target queue corresponding to the target queue identifier. 根据权利要求11所述的方法,其中,在所述将所述深度解析数据发送到所述目标队列标识对应的目标队列之前,所述方法还包括:The method according to claim 11, wherein, before sending the deep parsing data to the target queue corresponding to the target queue identifier, the method further comprises: 确定与所述待处理报文对应的第二报文特征描述信息,所述第二报文特征描述信息包括所述深度解析数据和所述目标报文处理规则中所述至少一种处理子规则的配置数据;Determine second message feature description information corresponding to the message to be processed, where the second message feature description information includes the deep analysis data and configuration data of at least one processing sub-rule in the target message processing rule; 将所述深度解析数据发送到所述目标队列标识对应的目标队列包括:Sending the deep parsing data to the target queue corresponding to the target queue identifier includes: 将所述第二报文特征描述信息对应的存储地址发送到所述目标队列标识对应的目标队列。The storage address corresponding to the second message feature description information is sent to the target queue corresponding to the target queue identifier. 根据权利要求10所述的方法,其中,在所述确定所述目标报文处理规则的队列处理子规则中预先配置的队列标识之前,所述方法还包括:The method according to claim 10, wherein, before determining the queue identifier preconfigured in the queue processing sub-rule of the target message processing rule, the method further comprises: 对队列进行配置;Configure the queue; 所述配置包括以下至少一者:The configuration includes at least one of the following: 队列的标识;The ID of the queue; 队列的第一告警深度;The first alarm depth of the queue; 队列的第二告警深度,所述第二告警深度大于所述第一告警深度。A second alarm depth of the queue, wherein the second alarm depth is greater than the first alarm depth. 根据权利要求12所述的方法,其中,所述将所述第二报文特征描 述信息对应的存储地址发送到所述目标队列标识对应的目标队列包括:The method according to claim 12, wherein the second message feature is described as follows: The storage address corresponding to the information is sent to the target queue corresponding to the target queue identifier, including: 确定所述目标队列标识对应的第一队列的实际深度;Determine an actual depth of a first queue corresponding to the target queue identifier; 在所述第一队列的实际深度大于所述第一队列的第一告警深度的情况下,从第二队列中选取目标队列,所述目标队列的实际深度不超过所述目标队列的第一告警深度;In a case where the actual depth of the first queue is greater than the first alarm depth of the first queue, selecting a target queue from the second queue, the actual depth of the target queue not exceeding the first alarm depth of the target queue; 将所述第二报文特征描述信息对应的存储地址发送到所述目标队列,直至所述目标队列的实际深度超出所述第一告警深度。The storage address corresponding to the second message feature description information is sent to the target queue until the actual depth of the target queue exceeds the first alarm depth. 根据权利要求14所述的方法,其中,在所述目标队列的实际深度超出所述第一告警深度的情况下,所述方法还包括:The method according to claim 14, wherein, when the actual depth of the target queue exceeds the first alarm depth, the method further comprises: 将所述第二报文特征描述信息对应的存储地址发送到所述第一队列,直至所述第一队列的实际深度大于所述第一队列的第二告警深度。The storage address corresponding to the second message feature description information is sent to the first queue until the actual depth of the first queue is greater than the second alarm depth of the first queue. 根据权利要求14所述的方法,其中,所述目标队列为多个,所述将所述第二报文特征描述信息对应的存储地址发送到所述目标队列包括:The method according to claim 14, wherein there are multiple target queues, and sending the storage address corresponding to the second message feature description information to the target queue comprises: 将所述第二报文特征描述信息对应的存储地址按照各所述目标队列的优先级发送到优先级最高的目标队列。The storage address corresponding to the second message feature description information is sent to the target queue with the highest priority according to the priority of each target queue. 一种网络侧设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至16任一项所述的方法的步骤。A network side device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 16 are implemented. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至16任一项所述的方法的步骤。 A readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
PCT/CN2023/127092 2022-12-13 2023-10-27 Packet processing method and network side device Ceased WO2024125103A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211596157.6A CN118200975A (en) 2022-12-13 2022-12-13 Message processing method and network side device
CN202211596157.6 2022-12-13

Publications (1)

Publication Number Publication Date
WO2024125103A1 true WO2024125103A1 (en) 2024-06-20

Family

ID=91412673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/127092 Ceased WO2024125103A1 (en) 2022-12-13 2023-10-27 Packet processing method and network side device

Country Status (2)

Country Link
CN (1) CN118200975A (en)
WO (1) WO2024125103A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118827613A (en) * 2024-07-23 2024-10-22 中国电信股份有限公司 A network address translation method, device, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105453493A (en) * 2014-07-23 2016-03-30 华为技术有限公司 Service message forwarding method and device
CN108965130A (en) * 2018-07-27 2018-12-07 新华三技术有限公司 A kind of method and device of message forwarding
CN112003800A (en) * 2020-08-10 2020-11-27 牛芯半导体(深圳)有限公司 Method and device for message exchange and transmission of ports with different bandwidths
CN113765857A (en) * 2020-06-04 2021-12-07 华为技术有限公司 Message forwarding method, device, device and storage medium
CN114285906A (en) * 2021-12-24 2022-04-05 北京天融信网络安全技术有限公司 Message processing method and device, electronic equipment and storage medium
WO2022127586A1 (en) * 2020-12-17 2022-06-23 中兴通讯股份有限公司 Message processing method, node, and computer-readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105453493A (en) * 2014-07-23 2016-03-30 华为技术有限公司 Service message forwarding method and device
CN108965130A (en) * 2018-07-27 2018-12-07 新华三技术有限公司 A kind of method and device of message forwarding
CN113765857A (en) * 2020-06-04 2021-12-07 华为技术有限公司 Message forwarding method, device, device and storage medium
CN112003800A (en) * 2020-08-10 2020-11-27 牛芯半导体(深圳)有限公司 Method and device for message exchange and transmission of ports with different bandwidths
WO2022127586A1 (en) * 2020-12-17 2022-06-23 中兴通讯股份有限公司 Message processing method, node, and computer-readable storage medium
CN114285906A (en) * 2021-12-24 2022-04-05 北京天融信网络安全技术有限公司 Message processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118827613A (en) * 2024-07-23 2024-10-22 中国电信股份有限公司 A network address translation method, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN118200975A (en) 2024-06-14

Similar Documents

Publication Publication Date Title
EP4142233B1 (en) Packet forwarding method and apparatus, and device and storage medium
CN110383777B (en) Flexible processor for port expander devices
CN101421991B (en) Hardware filtering support for denial of service attacks
US8799507B2 (en) Longest prefix match searches with variable numbers of prefixes
US10742722B2 (en) Server load balancing
US8555374B2 (en) High performance packet processing using a general purpose processor
US10200284B2 (en) Packet processing method and device
CN107360096B (en) Method and system for forwarding VXLAN message
KR20150053620A (en) Apparatus and method for transmitting packet
JP2004172917A (en) Packet retrieving device, packet process retrieving method, and program
WO2016128835A1 (en) Method and system for inserting an openflow flow entry into a flow table using openflow protocol
CN111130946B (en) Acceleration method and device for deep packet identification and storage medium
EP2924926B1 (en) Lookup table creation method and query method, and controller, forwarding device and system therefor
CN111131050A (en) Flow table matching method and device
WO2024125103A1 (en) Packet processing method and network side device
EP2916516A1 (en) Packet processing method and apparatus
CN105207908B (en) A kind of message processing method and system
WO2017063578A1 (en) Data packet processing method and apparatus
CN116015796B (en) Flow table updating method, device, firewall device and storage medium
US11012542B2 (en) Data processing method and apparatus
CN119854392A (en) GRE message auditing method, GRE message auditing device and GRE message processing equipment
CN110224932B (en) Method and system for rapidly forwarding data
CN111224964A (en) Access control method and device
CN116016391B (en) Message forwarding method and system based on NAT gateway
CN117596205A (en) Message processing method, device, electronic equipment and readable medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23902303

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23902303

Country of ref document: EP

Kind code of ref document: A1