CN116320087A - Message processing method, message processing device, electronic equipment and storage medium - Google Patents
Message processing method, message processing device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116320087A CN116320087A CN202310227855.7A CN202310227855A CN116320087A CN 116320087 A CN116320087 A CN 116320087A CN 202310227855 A CN202310227855 A CN 202310227855A CN 116320087 A CN116320087 A CN 116320087A
- Authority
- CN
- China
- Prior art keywords
- message
- preset
- processed
- fields
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 41
- 238000003672 processing method Methods 0.000 title claims abstract description 17
- 238000004458 analytical method Methods 0.000 claims abstract description 30
- 238000000034 method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 14
- 230000005540 biological transmission Effects 0.000 abstract description 16
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000002776 aggregation Effects 0.000 description 5
- 238000004220 aggregation Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 3
- ABEXEQSGABRUHS-UHFFFAOYSA-N 16-methylheptadecyl 16-methylheptadecanoate Chemical compound CC(C)CCCCCCCCCCCCCCCOC(=O)CCCCCCCCCCCCCCC(C)C ABEXEQSGABRUHS-UHFFFAOYSA-N 0.000 description 2
- 241000764238 Isis Species 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005417 image-selected in vivo spectroscopy Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012739 integrated shape imaging system Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/32—Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
- H04L47/323—Discarding or blocking control packets, e.g. ACK packets
Abstract
The application discloses a message processing method, a message processing device, electronic equipment and a storage medium. The message processing method comprises the following steps: determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types, acquiring an analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule, and analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue. The message processing method provided by the embodiment of the application greatly reduces the congestion occurrence rate in the message transmission process, improves the message processing efficiency, and improves the following conditions in the related technology: in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, so that the message processing efficiency is low.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message processing method, a message processing device, an electronic device, and a storage medium.
Background
The message is a data unit for data exchange and transmission in the network. Typically, when a station is to send a message, it appends a destination address to the message, and the network node sends the message to the next node, based on the destination address information on the message, all the way to the destination node on a node-by-node basis. After each node receives the whole message and checks, it stores the message temporarily, then uses the route information to find out the address of the next node, and then transmits the whole message to the next node. In the related art, in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, which results in low message processing efficiency, and improvement of the situation is currently needed.
Disclosure of Invention
The present application provides a message processing method, a message processing device, an electronic device, and a storage medium, so as to improve the following situations in the related art: in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, so that the message processing efficiency is low. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
According to one aspect of the embodiments of the present application, there is provided a method for processing a message, including:
determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types;
acquiring an analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule;
and analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
In some embodiments of the present application, determining the message type of each message to be processed according to a plurality of preset fields and the correspondence between the preset fields and the message types includes:
comparing the fields of the message to be processed with the preset fields to determine the preset fields contained in the message to be processed;
and determining the type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
In some embodiments of the present application, the determining the message type of each message to be processed according to the plurality of preset fields and the correspondence between the preset fields and the message types further includes:
and under the condition that the message to be processed does not contain the preset field, determining the type of the message to be processed as a message to be discarded.
In some embodiments of the present application, the obtaining the parsing sequence queue of the to-be-processed message according to the determined message type and the preset priority rule includes:
discarding the message to be discarded;
determining the processing priority sequence of the rest messages to be processed according to the determined message type and a preset priority rule;
and arranging the rest messages to be processed into the analysis sequence queue according to the processing priority sequence.
In some embodiments of the present application, the comparing the fields of the message to be processed with the plurality of preset fields includes:
acquiring a field in a header of the message to be processed;
and comparing the fields in the header with the plurality of preset fields.
According to another aspect of an embodiment of the present application, there is provided a message processing apparatus, including:
the message type determining module is used for determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types;
the analysis sequence queue acquisition module is used for acquiring the analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule;
and the message analyzing module is used for analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
In some embodiments of the present application, the message type determining module includes:
the comparison unit is used for comparing the fields of the message to be processed with the preset fields and determining the preset fields contained in the message to be processed;
and the determining unit is used for determining the type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
In some embodiments of the present application, the determining unit is further configured to determine that the type of the pending packet is a pending packet, where the pending packet does not include the preset field.
According to another aspect of the embodiments of the present application, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement any one of the above-mentioned message processing methods.
According to another aspect of the embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the method for processing a message according to any one of the above.
One of the technical solutions provided in one aspect of the embodiments of the present application may include the following beneficial effects:
according to the message processing method provided by the embodiment of the application, the message type of each message to be processed is determined according to a plurality of preset fields and the corresponding relation between the preset fields and the message types, the analysis sequence queue of the message to be processed is obtained according to the determined message types and the preset priority rule, the message to be processed is analyzed according to the message arrangement sequence of the analysis sequence queue, the congestion occurrence rate of the message transmission process is greatly reduced, the message processing efficiency is improved, and the following conditions in the related technology are improved: in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, so that the message processing efficiency is low.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flow chart of a message processing method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of determining a message type of each message to be processed according to a plurality of preset fields and a correspondence between preset fields and message types in an embodiment of the present application.
Fig. 3 shows a block diagram of a message processing apparatus according to an embodiment of the present application.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
FIG. 5 illustrates a computer-readable storage medium schematic of one embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Messages are data units exchanged and transmitted in the network, as well as units transmitted by the network. The message contains the complete data information to be sent, and the lengths of the complete data information are not required to be consistent. The message is continuously encapsulated into packets, packets and frames for transmission in the transmission process, wherein the encapsulation mode is to add a header formed by some control information, namely the header is a message header. In the related art, in a network routing device or a data exchange device, the occurrence rate of congestion in a message transmission process is high, which results in low message processing efficiency.
Aiming at the technical problems in the related art, the embodiment of the application provides a message processing method, which determines the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types, acquires an analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule, analyzes the message to be processed according to the message arrangement sequence of the analysis sequence queue, greatly reduces the congestion occurrence rate in the message transmission process, improves the message processing efficiency, and improves the following conditions in the related art: in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, so that the message processing efficiency is low.
Referring to fig. 1, an embodiment of the present application provides a message processing method, including steps S10 to S30:
s10, determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types.
Referring to fig. 2, in an embodiment, determining a message type of each message to be processed according to a plurality of preset fields and corresponding relations between preset fields and message types may include steps S101 to S102:
s101, comparing fields of a message to be processed with a plurality of preset fields, and determining the preset fields contained in the message to be processed.
The comparing the field of the message to be processed with a plurality of preset fields may include: acquiring a field in a header of a message to be processed; the fields in the header are compared with a plurality of preset fields.
S102, determining the message type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
Determining the message type of each message to be processed according to the plurality of preset fields and the corresponding relation between the preset fields and the message types, and the method can further comprise: s103, under the condition that the message to be processed does not contain a preset field, determining the type of the message to be processed as the message to be discarded.
The messages to be discarded mainly comprise illegal messages, error messages, non-target messages and other messages which do not meet the preset requirements. In a typical network routing/switching device, incoming data/packets may be queued through several layers before being processed by the parsing engine. Some messages may need to be dropped due to congestion downstream of the queuing/processing chain.
It is beneficial to perform some basic classification and give these messages a higher priority on regular network traffic before discarding some control class messages, which may increase the message processing efficiency. Control class messages may provide beneficial information in managing network flows.
For general classification purposes, messages may be classified into L2 type and l3+ type control class messages. The L2 control class message is identified by information in the L2 header, such as the ethernet type (ARP is 16'h 0806) and the destination address (BPDU/STP is 48' h 0180_c200_0002). In this embodiment, the messages can be classified into L2 messages and l3+ messages.
Illustratively, the L2 message may include:
ARP (address resolution protocol) messages, BPDU/STP messages, LACP (link aggregation control protocol) messages, LLDP (link layer discovery protocol) messages, GARP (gratuitous address resolution protocol) messages, ITU-T OAM (CCM IEEE 802.1 ag), MRP (media redundancy protocol) messages, VSRP (Virtual Service Redundancy Protocol ) messages, and the like.
ARP (Address Resolution Protocol), address resolution protocol, is a TCP/IP protocol that obtains a physical address from an IP address. Broadcasting an ARP request containing a target IP address to all hosts on a local area network when the hosts send information, and receiving a return message so as to determine the physical address of the target; after receiving the return message, the IP address and the physical address are stored in the local ARP cache and kept for a certain time, and the ARP cache is directly inquired when the request is next time so as to save resources. The address resolution protocol is based on that each host computer in the network trusts each other, and the host computers on the local area network can autonomously send ARP response messages, and other host computers can record the response messages into the local ARP cache without detecting the authenticity of the messages when receiving the response messages. The ARP command may be used to query the correspondence between IP addresses and MAC addresses in the native ARP cache, add or delete static correspondences, etc. Related protocols are RARP and proxy ARP. NDP is used to replace address resolution protocols in IPv 6.
LACP (Link Aggregation Control Protocol ) is a protocol for implementing link dynamic aggregation and deaggregation based on the ieee802.3ad standard, which is a protocol commonly used in link aggregation. The member ports in the link aggregation group which are started with the LACP protocol interact by sending LACPDU messages, and the two parties agree on which ports can send and receive the messages, so as to determine the link for bearing the service flow.
The link layer discovery protocol (Link Layer Discovery Protocol, LLDP) is a data link layer protocol. The network device may advertise its own status by sending LLDPDU (Link Layer Discovery Protocol Data Unit) in the local network, which is a protocol that enables devices in the network to discover and advertise status, and interact information with each other.
Gratuitous ARP is also known as Gratuitous ARP, gratuitous ARP. The Gratuitous ARP is different from a general ARP request, and it does not expect to obtain the mac address corresponding to the IP, but when the host starts up, it will send a Gratuitous ARP request, i.e. the mac address requesting its own IP address.
The chinese name of ITU-T is the international telecommunications union telecommunication standards substation (ITU-T for ITU Telecommunication Standardization Sector), which is a branch office under the international telecommunications union management that specializes in formulating telecommunication standards. Operation and maintenance management (Operation Administration and Maintenance) refers to the general classification of management work of networks into 3 major classes according to actual needs of operation of the operator network: operation (Operation), administration (Administration), maintenance (Maintenance), abbreviated as OAM. The operation mainly completes analysis, prediction, planning and configuration work of daily network and business; maintenance is mainly a daily operation activity performed on testing and fault management of a network and services thereof.
Illustratively, the l3+ messages (including L3 messages and L4 messages, etc.) may include:
BGP messages based on IP, OSPF v3 messages based on IP, PIM messages based on IPv6, ND6 messages based on IPv6, ISIS messages based on GRE, GRE keep-alive messages, etc.
Table 1 shows preset fields corresponding to various L2 messages, and the preset fields according to which the L2 control class messages are identified. Table 2 shows preset fields corresponding to various l3+ messages, and the preset fields according to which l3+ control class messages are identified.
TABLE 1
TABLE 2
For example, the location of the bytes required to identify the V4RteAlert message is L4 header word 1, corresponding to bytes 58-61, as follows:
||L2 header-B[0:13]||IPV6-B[14:53]||L4-B[54+]|。
to support SNAP header and 2 groups of VLANs, the first word (word) of L4 will be shifted by 14 bits (6 bits for SNAP and 8 bits for 2 VLANs).
Thus, in order to be able to identify messages up to V4RteAlert complexity (with SNAP header and 2 VLANs), the control message classifier must be enabled to obtain the first 76 bytes of the message.
To identify and match an L2 destination (for BPDU/STP etc. messages) only one comparator pool is needed (one 48-bit comparator for each message type that needs to identify the L2 destination address).
The mask is used to identify the address range. When matching is performed on the L2 ethertype field, an implicit VLAN and SNAP header are first identified. Similarly, for L3 (IP) headers and higher level headers, the correct location of the required fields is first resolved and identified. The steps of parsing the identification are simpler and require less delay. This delay may be hidden (executed in parallel) by the message queue process, so that control messages can be identified before any message loss occurs.
The classifier generated information is a single bit (control packet or non-control packet) that can be easily extended to multiple bits of service priority.
The logic that interprets the information from the pool of comparators (the comparators that identify each field of the control packet) simply ANDs the results of the comparators at the different packet layers (as set by the control registers) and ANDs the results of all pools.
When it is desired to discard certain messages, the queuing logic may use the result of the classifier to give higher priority to control packets.
S20, according to the determined message type and a preset priority rule, acquiring an analysis sequence queue of the message to be processed.
According to the determined message type and a preset priority rule, obtaining an analysis sequence queue of the message to be processed may include: discarding the message to be discarded; determining the processing priority sequence of the rest messages to be processed according to the determined message type and a preset priority rule; and arranging the rest messages to be processed into an analysis sequence queue according to the processing priority sequence.
The preset priority rules of various messages can be set according to the actual application requirements. For example, the preset priority rule may be set to have a higher priority for the L2 packets than for the l3+ packets, where the processing priority of the L2 packets is arranged in the following order from high to low:
ARP message, BPDU/STP message, LACP message, LLDP message, GARP message, ITU-T OAM, MRP message, VSRP message.
The processing priority of the various L3+ messages is arranged from high to low in the following order: BGP messages based on IP, OSPF v3 messages based on IP, PIM messages based on IPv6, ND6 messages based on IPv6, ISIS messages based on GRE, GRE keep-alive messages.
S30, analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
Specifically, the message of the parsing sequence queue can be processed according to the message arrangement sequence in the parsing sequence queue by the parsing engine.
The message processing method provided by the embodiment of the application greatly reduces the congestion occurrence rate in the message transmission process, improves the message processing efficiency, and improves the condition of low message processing efficiency caused by higher congestion occurrence rate in the message transmission process in the related technology.
Referring to fig. 3, another embodiment of the present application provides a message processing apparatus, including:
the message type determining module is used for determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types;
the analysis sequence queue acquisition module is used for acquiring an analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule;
and the message analyzing module is used for analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
In one embodiment, the message type determining module includes:
the comparison unit is used for comparing the field of the message to be processed with a plurality of preset fields and determining the preset fields contained in the message to be processed;
and the determining unit is used for determining the message type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
In one embodiment, the determining unit is further configured to determine that the type of the message to be processed is a message to be discarded if the message to be processed does not include a preset field.
In one embodiment, according to the determined message type and a preset priority rule, obtaining an analysis sequence queue of the message to be processed includes: discarding the message to be discarded; determining the processing priority sequence of the rest messages to be processed according to the determined message type and a preset priority rule; and arranging the rest messages to be processed into an analysis sequence queue according to the processing priority sequence.
In one embodiment, comparing the field of the message to be processed with a plurality of preset fields includes: acquiring a field in a header of a message to be processed; the fields in the header are compared with a plurality of preset fields.
According to the message processing device provided by the embodiment of the application, the message type of each message to be processed is determined according to the preset fields and the corresponding relation between the preset fields and the message types, the analysis sequence queue of the message to be processed is obtained according to the determined message types and the preset priority rules, the message to be processed is analyzed according to the message arrangement sequence of the analysis sequence queue, the congestion occurrence rate of the message transmission process is greatly reduced, the message processing efficiency is improved, and the following conditions in the related technology are improved: in a network routing device or a data switching device, the occurrence rate of congestion in a message transmission process is high, so that the message processing efficiency is low.
Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement a message processing method according to any one of the foregoing embodiments.
Referring to fig. 4, the electronic device 10 may include: processor 100, memory 101, bus 102 and communication interface 103, processor 100, communication interface 103 and memory 101 being connected by bus 102; the memory 101 has stored therein a computer program executable on the processor 100, which when executed by the processor 100 performs the method provided by any of the embodiments described herein.
The memory 101 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and the at least one other network element is implemented via at least one communication interface 103 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 100 or by instructions in the form of software. The processor 100 may be a general-purpose processor, and may include a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and, in combination with its hardware, performs the steps of the method described above.
The electronic device provided by the embodiment of the application and the method provided by the embodiment of the application are the same in the invention conception, and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
Another embodiment of the present application provides a computer readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement a message processing method according to any one of the foregoing embodiments. Referring to fig. 5, a computer readable storage medium is shown as an optical disc 20 having a computer program (i.e., a program product) stored thereon, which, when executed by a processor, performs the method provided by any of the embodiments described above.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above-described embodiments of the present application has the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, for the same inventive concept as the method provided by the embodiments of the present application.
It should be noted that:
the term "module" is not intended to be limited to a particular physical form. Depending on the particular application, modules may be implemented as hardware, firmware, software, and/or combinations thereof. Furthermore, different modules may share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the examples herein. The required structure for the construction of such devices is apparent from the description above. In addition, the present application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and the above description of specific languages is provided for disclosure of preferred embodiments of the present application.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing examples merely represent embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method for processing a message, comprising:
determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types;
acquiring an analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule;
and analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
2. The method according to claim 1, wherein determining the message type of each message to be processed according to the plurality of preset fields and the correspondence between the preset fields and the message types comprises:
comparing the fields of the message to be processed with the preset fields to determine the preset fields contained in the message to be processed;
and determining the type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
3. The method according to claim 2, wherein determining the message type of each message to be processed according to the plurality of preset fields and the correspondence between the preset fields and the message types further comprises:
and under the condition that the message to be processed does not contain the preset field, determining the type of the message to be processed as a message to be discarded.
4. The method according to claim 3, wherein the obtaining the parsing sequence queue of the message to be processed according to the determined message type and the preset priority rule includes:
discarding the message to be discarded;
determining the processing priority sequence of the rest messages to be processed according to the determined message type and a preset priority rule;
and arranging the rest messages to be processed into the analysis sequence queue according to the processing priority sequence.
5. The method according to claim 2, wherein the comparing the field of the message to be processed with the plurality of preset fields comprises:
acquiring a field in a header of the message to be processed;
and comparing the fields in the header with the plurality of preset fields.
6. A message processing apparatus, comprising:
the message type determining module is used for determining the message type of each message to be processed according to a plurality of preset fields and the corresponding relation between the preset fields and the message types;
the analysis sequence queue acquisition module is used for acquiring the analysis sequence queue of the message to be processed according to the determined message type and a preset priority rule;
and the message analyzing module is used for analyzing the message to be processed according to the message arrangement sequence of the analysis sequence queue.
7. The apparatus of claim 6, wherein the message type determining module comprises:
the comparison unit is used for comparing the fields of the message to be processed with the preset fields and determining the preset fields contained in the message to be processed;
and the determining unit is used for determining the type of each message to be processed according to the corresponding relation between the preset field and the message type and the preset field contained in the message to be processed.
8. The apparatus of claim 6, wherein the determining unit is further configured to determine that the type of the pending packet is a pending packet if the pending packet does not include the preset field.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement the message processing method of any of claims 1-5.
10. A computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the message processing method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310227855.7A CN116320087A (en) | 2023-03-07 | 2023-03-07 | Message processing method, message processing device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310227855.7A CN116320087A (en) | 2023-03-07 | 2023-03-07 | Message processing method, message processing device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116320087A true CN116320087A (en) | 2023-06-23 |
Family
ID=86786479
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310227855.7A Pending CN116320087A (en) | 2023-03-07 | 2023-03-07 | Message processing method, message processing device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116320087A (en) |
-
2023
- 2023-03-07 CN CN202310227855.7A patent/CN116320087A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10892987B2 (en) | Segment routing network processing of packets including packets having a segment identifier structure providing processing and/or memory efficiencies | |
US8792506B2 (en) | Inter-domain routing in an n-ary-tree and source-routing based communication framework | |
EP2985959B1 (en) | Progressive mac address learning | |
US8958418B2 (en) | Frame handling within multi-stage switching fabrics | |
US7079537B1 (en) | Layer 3 switching logic architecture in an integrated network switch | |
EP1657633A1 (en) | Routing and forwarding table management for network processor architectures | |
US9154586B2 (en) | Method for parsing network packets having future defined tags | |
US20090135833A1 (en) | Ingress node and egress node with improved packet transfer rate on multi-protocol label switching (MPLS) network, and method of improving packet transfer rate in MPLS network system | |
US8542679B2 (en) | Method of controlling data propagation within a network | |
US20060114915A1 (en) | VLAN translation in a network device | |
US20220255772A1 (en) | Packet sending method, apparatus, and system | |
EP4109830A1 (en) | Packet processing method, device, system, and storage medium | |
CN108347392B (en) | Cross-board processing method, device and system for service message | |
CN108471390B (en) | Cross-board processing system for service message and redirection method for service message | |
US6751220B1 (en) | Apparatus and method of managing virtual private network routing data | |
EP3920512A1 (en) | Transmission method and device for message | |
US7352748B1 (en) | Updating of routing data in a network element | |
US11855888B2 (en) | Packet verification method, device, and system | |
US20120106555A1 (en) | Low latency carrier class switch-router | |
CN116320087A (en) | Message processing method, message processing device, electronic equipment and storage medium | |
US20210320929A1 (en) | Packet Detection Method and First Network Device | |
EP3913865B1 (en) | Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium | |
CN111343096B (en) | Method, equipment, exchange chip and storage medium for forwarding standard separation message | |
US11882039B1 (en) | UDF-based traffic offloading methods and systems | |
WO2023078144A1 (en) | Message processing method, apparatus and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |