OAM alarm detection method and device
By supporting custom detection processes and configurations in OAM alarm detection, the problem that the solidified alarm detection mechanism cannot meet the ever-changing needs is solved, and more flexible alarm detection configuration and higher adaptability are achieved.
Patent Information
- Application Number
- CN202311098998.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the OAM alarm detection mechanism has been solidified and cannot meet the ever-changing new alarm detection needs.
By entering the corresponding OAM detection process according to the detection type field of the message, a preset custom detection process is supported, and the enable control type field and detection configuration field are obtained to determine the target detection result.
It realizes flexible alarm detection configuration, can adapt to changing user needs, and improves the flexibility of alarm detection.
Smart Images

Figure CN119583303A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to an OAM alarm detection method and device. Background Art
[0002] Operations, Administration and Maintenance (OAM) is a management and maintenance protocol for network devices. It can monitor and warn device status by sending and receiving different types of messages. If a device is found to have a fault or abnormality, OAM will report the alarm information to the Network Management System (NMS) to help operation and maintenance personnel find and solve the problem in a timely manner. With the gradual development of 5G technology, users' requirements for high bandwidth, low latency and high stability of the network are gradually increasing, and the OAM alarm detection function is an important means to improve the stability of network equipment.
[0003] At present, the OAM alarm implementation of mainstream switching chips is designed according to fixed parsing logic, and only supports common OAM alarm types, such as: Loss of Continuity (LOC), Remote Defect Indication (RDI), Bidirectional Forwarding Detection (BFD), Diagnostic (DIAG), etc. This implementation is generally designed according to the requirements of standard protocols and can only meet the basic OAM alarm detection needs of users. However, with the continuous changes in user needs, new alarm types and requirements are constantly being proposed, and the solidified alarm detection mechanism cannot meet the ever-changing new alarm detection needs.
[0004] In summary, there is no good solution to the above problems. Summary of the invention
[0005] The embodiments of the present application provide an OAM alarm detection method and device to at least solve the problem that the alarm detection mechanism in the related art is solidified and cannot meet the ever-changing new alarm detection requirements.
[0006] According to an embodiment of the present application, an OAM alarm detection method is provided, the method comprising: entering an OAM detection process corresponding to a detection type field of a message, wherein the OAM detection process comprises a preset custom detection process; when the OAM detection process is the custom detection process, obtaining an enable control type field and a detection configuration field corresponding to the detection type field; and determining a target detection result according to the enable control type field and the detection configuration field.
[0007] According to another embodiment of the present application, an OAM alarm detection device is provided, the device comprising:
[0008] A detection module, configured to enter an OAM detection process corresponding to a detection type field of a message according to the detection type field, wherein the OAM detection process includes a preset custom detection process;
[0009] An acquisition module, configured to acquire, when the OAM detection process is the custom detection process, an enabling control type field and a detection configuration field corresponding to the detection type field;
[0010] A determination module is used to determine a target detection result according to the enable control type field and the detection configuration field.
[0011] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps of any of the above method embodiments when executed by a processor.
[0012] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0013] Through the embodiments of the present application, it is possible to solve the problem in the related technology that the alarm detection mechanism is rigid and cannot meet the ever-changing new alarm detection needs. Starting from the logical design of alarm detection, independent custom alarm detection logic judgment is added and user configuration is supported, thereby improving the flexibility of alarm detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a hardware structure block diagram of the OAM alarm detection method of the embodiment of the present application;
[0015] Figure 2 is a flow chart of an OAM alarm detection method according to an embodiment of the present application;
[0016] Figure 3is a structural diagram of the OAM message format according to an embodiment of the present application;
[0017] Figure 4 is a flow chart of incoming packet detection according to an embodiment of the present application;
[0018] Figure 5 is a flowchart of polling detection according to an embodiment of the present application;
[0019] Figure 6 is a flowchart of alarm elimination according to an embodiment of the present application;
[0020] Figure 7 It is a block diagram of an OAM alarm detection device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0023] The method embodiments provided in the embodiments of the present application can be executed in a network device of a communication network, such as a switch, a switching chip, etc. In the embodiments of the present application, the method running on a switch is used as an example for explanation, but the present application is not limited thereto. Figure 1 is a hardware structure block diagram of the OAM alarm detection method of the embodiment of the present application, such as Figure 1 As shown, the hardware board may include one or more ( Figure 1 Only one is shown in the figure) a processor 12 (the processor 12 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 14 for storing data, wherein the above switch may also include a transmission device 16 for communication functions and an input and output device 18. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above switch. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0024] The memory 14 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the OAM alarm detection method in the embodiment of the present application. The processor 12 executes various functional applications and the OAM alarm detection method by running the computer program stored in the memory 14, that is, the above method is implemented. The memory 14 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 14 may further include a memory remotely arranged relative to the processor 12, and these remote memories may be connected to the switch via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0025] The transmission device 16 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider. In one example, the transmission device 16 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 16 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0026] In one embodiment of the present application, an OAM alarm detection method is provided, which is applied to a switch or similar network equipment and can be specifically executed by a switching chip inside the switch.
[0027] Figure 2 is a flow chart of an OAM alarm detection method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0028] Step S202, according to the detection type field of the message, entering the OAM detection process corresponding to the detection type field, wherein the OAM detection process includes a preset custom detection process;
[0029] Step S204, when the OAM detection process is the custom detection process, obtaining an enabling control type field and a detection configuration field corresponding to the detection type field;
[0030] Step S206: determine a target detection result according to the enable control type field and the detection configuration field.
[0031] In an embodiment of the present application, through the above-mentioned steps S202 to S206, the problem that the alarm detection mechanism in the related technology is solidified and cannot meet the ever-changing new alarm detection needs can be solved. Starting from the logical design of alarm detection, independent custom alarm detection logic judgment is added and user configuration is supported, thereby improving the flexibility of alarm detection.
[0032] In some embodiments, the OAM detection process may further include a preset fixed detection process to achieve compatibility with traditional OAM detection.
[0033] In some embodiments, the preset fixed detection process (i.e., traditional OAM detection) includes but is not limited to the following detection methods:
[0034] Connectivity Fault Management (CFM) is used to detect and locate network connection failures. It monitors network connections and locates fault points by sending and receiving detection frames.
[0035] Transparent OAM (TPOAM) is used for performance monitoring and fault management at the transport layer or data link layer. It monitors and controls data flows by embedding OAM information in the transport layer protocol header.
[0036] Bidirectional Forwarding Detection (BFD) is used to quickly detect and notify router or link failures in the network by periodically sending and receiving small probe messages on the network path.
[0037] In some embodiments, before entering the OAM detection process corresponding to the detection type field according to the detection type field of the message in step S202, the method further includes:
[0038] Step S200: receiving a message, and adding the detection type field to the system header of the message.
[0039] In this embodiment, the detection type field is used to indicate whether the message performs the fixed detection process or the custom detection process.
[0040] In an exemplary embodiment, when the number of fixed detection processes is 3, the value of the detection type field (custom_alm_type) can use 0 to 2 to represent the above three fixed detection processes, and use a value other than 0 to 2 to represent a custom detection process, for example, custom_alm_type = 0 represents the CFM detection process, custom_alm_type = 1 represents the TPOAM detection process, custom_alm_type = 2 represents the BFD detection process, and custom_alm_type = 3 represents the user-configured custom detection process. This application does not limit the number of detection types and the field values corresponding to each detection type.
[0041] In this embodiment, the user can flexibly configure the value of the detection type field, thereby improving the flexibility of alarm detection. When a new alarm detection requirement is added, a new detection type field value can be directly added without changing the original alarm detection logic.
[0042] In some embodiments, step S202 may include: determining a corresponding OAM detection type according to a value of the detection type field, and entering an OAM detection process corresponding to the OAM detection type, wherein the OAM detection type includes at least one preset custom detection type.
[0043] In another embodiment, the OAM detection type further includes at least one preset fixed detection type, such as one or a combination of CFM detection, TPOAM detection or BFD detection.
[0044] In some embodiments, step S204 may include: acquiring the enable control type field and the detection configuration field from a register corresponding to the OAM detection type, wherein each of the custom detection types corresponds to at least one group of the registers.
[0045] In some embodiments, each group of registers includes at least one register, and each register stores the values of an enable control type field and a detection configuration field corresponding to a custom detection type.
[0046] In the embodiment of the present application, custom configuration of OAM detection can be achieved by configuring the custom detection type, enable control type field and detection configuration field of the register.
[0047] In some embodiments, step S206 may also include: when each of the custom detection types corresponds to multiple groups of registers, obtaining a register matching relationship from a ternary content addressable memory (TCAM) according to a preset matching relationship mask value, wherein the register matching relationship includes AND and OR; determining a target detection result according to the register matching relationship and multiple groups of detection configuration fields, wherein the multiple groups of detection configuration fields are obtained respectively from the multiple groups of registers.
[0048] In this embodiment, a combination configuration of multiple groups of matching conditions can be achieved by setting the register matching relationship, which can further improve the flexibility of alarm detection compared to the matching method of a fixed set of conditions.
[0049] In some embodiments, the global enable control type under custom detection may include incoming packet detection, polling detection, and alarm disappearance. Incoming packet detection is used to detect whether a specified position in a message packet carries specified information, and if so, an alarm is generated. Polling detection is used to detect whether a specified message type is received within a certain period, and if not, an alarm is generated. Alarm disappearance is used to eliminate the alarm generated in polling detection.
[0050] In some embodiments, when the enable control type field includes an incoming packet detection enable control field, the detection configuration field includes: an alarm offset, an alarm length, an alarm mask, and an alarm expected value, wherein the alarm expected value is configured based on the session number of the message.
[0051] In some embodiments, step S206 may include the following steps:
[0052] Step S2061-1, judging whether to enter the incoming packet detection process according to the incoming packet detection enable control field;
[0053] Step S2061-2, if the judgment result is yes, obtaining a target alarm value from the message according to the alarm offset, the alarm length and the alarm mask;
[0054] Step S2061-3: When the target alarm value is consistent with the alarm expected value, generate an incoming packet detection alarm corresponding to the alarm expected value.
[0055] In some embodiments, after step S2061-3, the method further includes the following steps:
[0056] Step S2061-4, acquiring a corresponding alarm elimination period and an alarm elimination multiple from a target session table according to the detection type field, wherein the target session table is configured based on the session number of the message;
[0057] Step S2061-5, determining the product of the alarm elimination period and the alarm elimination multiple as the elimination time of the incoming packet detection alarm;
[0058] Step S2061-6: if no message corresponding to the incoming packet detection alarm is received within the cancellation time of the incoming packet detection alarm, cancel the incoming packet detection alarm.
[0059] In this embodiment, the target session table is configured based on the OAM session number (OAMID), and the alarm elimination conditions of the packet detection alarm are configured in the session table, which can be achieved by adding a detection type field and the corresponding alarm elimination cycle and alarm elimination multiple in the traditional OAM session table.
[0060] In some embodiments, when the enable control type field includes a polling detection enable control field or an alarm elimination enable control field, the detection configuration field includes: an operation code offset, an operation code length, and an operation code expected value.
[0061] In some embodiments, step S206 may include the following steps:
[0062] Step S2062-1, judging whether to enter the polling detection process according to the polling detection enable control field;
[0063] Step S2062-2, if the judgment result is yes, obtaining a target operation code value from the message according to the operation code offset and the operation code length;
[0064] Step S2062-3, when the target operation code value is consistent with the operation code expected value, perform polling detection according to the target operation code value, and obtain a polling detection result corresponding to the message.
[0065] In this embodiment, through polling detection, a LOC alarm of a corresponding message, such as CCM LOC / BFD LOC, etc., may be generated when certain designated messages are not received within a certain period.
[0066] In some embodiments, performing polling detection according to the target operation code value and obtaining a polling detection result corresponding to the message may further include the following steps:
[0067] Step S2062-4, acquiring a corresponding polling period and a polling multiple from a target session table according to the detection type field, wherein the target session table is configured based on the session number of the message;
[0068] Step S2062-5, determining the product of the polling cycle and the polling multiple as the generation time of the polling detection alarm;
[0069] Step S2062-6: If the target message corresponding to the target operation code value is not received within the generation time of the polling detection alarm, a polling detection alarm corresponding to the target message is generated.
[0070] In this embodiment, the alarm condition of the polling detection is configured in the session table, which can be achieved by adding a detection type field and a corresponding polling cycle and polling multiple in the traditional OAM session table.
[0071] In some embodiments, after generating a polling detection alarm corresponding to the target message in step S2062-6, the method further includes the following steps:
[0072] Step S2062-7, acquiring the corresponding polling alarm elimination period and polling alarm elimination multiple from the target session table according to the detection type field;
[0073] Step S2062-8, determining the product of the polling alarm elimination period and the polling alarm elimination multiple as the elimination time of the polling detection alarm;
[0074] Step S2062-9, after waiting for the elimination time of the polling detection alarm, eliminate the polling detection alarm corresponding to the target message.
[0075] In this embodiment, the alarm elimination condition of the polling detection is configured in the session table, which can be achieved by adding a detection type field and a corresponding polling alarm elimination period and polling alarm elimination multiple in the traditional OAM session table.
[0076] In an exemplary embodiment, the polling detection enable control field and the alarm elimination enable control field can be configured separately, and whether to enter the alarm elimination process can be determined based on the alarm elimination enable control field. If so, the alarm elimination process of the polling detection alarm in the above steps S2062-7 to S2062-9 is executed.
[0077] Although the related art can realize the new alarm detection function by redesigning the chip code logic, the versatility is poor, and the chip takes a long time from design to production. Through the embodiment of the present application, it can be compatible with the traditional alarm detection process, and provide good support and compatibility for the introduction of new alarms, realizing a more flexible alarm detection configuration method, which can better adapt to the ever-changing product needs.
[0078] Figure 3 is a schematic diagram of the structure of the OAM message format according to an embodiment of the present application, such as Figure 3 As shown, the chip OAM module parses the received message and adds a custom detection mark in the system header of the OAM message.
[0079] In this embodiment, the detection type field (custom_alm_type) can be added to the header type (head_type), and 0 to 2 are used to indicate a fixed detection type, and a value other than 0 to 2 is used to indicate a newly added custom detection type.
[0080] In this embodiment, a specific type value may be configured in the chip register, and when the value of the detection type field matches the type value in the chip register, the corresponding type alarm detection logic is executed.
[0081] Figure 4 is a flow chart of incoming packet detection according to an embodiment of the present application, such as Figure 4 As shown, the process includes the following steps:
[0082] Step S401, determining whether the packet header type (pkt_head_type) is a custom detection type (custom_type_n);
[0083] Step S402, determine whether the incoming packet detection enable control field (custom_headtype_coming_en) is enabled, and if enabled, enter the incoming packet detection process;
[0084] Step S403, obtaining a custom target alarm value (custom_alm_value) according to the detection configuration field;
[0085] Step S404, determining whether the target alarm value (custom_alm_value) is consistent with the alarm expected value (custom_alm_exp);
[0086] Step S405: When the target alarm value is consistent with the alarm expected value, a custom incoming packet detection alarm (custom_alm) is generated.
[0087] In this embodiment, if the packet header type in step S401 is not a user-defined detection type, the fixed detection process is entered.
[0088] In this embodiment, if the judgment result of any step from step S402 to step S404 is no, or the target alarm value is not extracted, then no incoming packet detection alarm corresponding to the user-defined detection type is generated.
[0089] In this embodiment, the configuration information corresponding to the incoming packet detection (ie, the detection configuration field) includes: an alarm offset (custom_alm_offset), an alarm length (custom_alm_len), an alarm mask (custom_alm_mask), and an alarm expected value (custom_alm_exp).
[0090] In this embodiment, the alarm offset is used to indicate the position of the message from which the match starts, the alarm length is used to indicate the length of the match, and the alarm mask is used to indicate the mask of the match. Step S403 can match the received message content according to the above three configuration information, and then extract the target alarm value. Due to the addition of the alarm mask, fuzzy matching of the target alarm value can be achieved, which improves the flexibility of matching.
[0091] In some embodiments, the expected alarm value in step S404 may be configured for an OAM message session ID (OAMID), and different OAMIDs may be configured with different expected alarm values.
[0092] In some embodiments, when the target alarm value is consistent with the alarm expected value, step S405 generates a custom alarm corresponding to the alarm expected value. If there are multiple alarm expected values, multiple custom alarm fields can also be added to the alarm table item.
[0093] In this embodiment, the alarm elimination of the incoming packet detection can be performed according to the alarm elimination period (custom_alm_coming_clr_period) and the alarm elimination multiple (custom_alm_coming_clr_dm) in the session table. The product of the alarm elimination period and the alarm elimination multiple is determined as the elimination time of the incoming packet detection alarm. If no message of the custom type is received within the elimination time, the custom alarm elimination is triggered.
[0094] Figure 5 is a flowchart of polling detection according to an embodiment of the present application, such as Figure 5 As shown, the process includes the following steps:
[0095] Step S501, determining whether the packet header type (pkt_head_type) is a custom detection type (custom_type_n);
[0096] Step S502, determine whether the polling detection enable control field (custom_alm_polling_en) is enabled, and if enabled, the polling detection process is entered;
[0097] Step S503, obtaining a custom target opcode value (custom_opcode_value) according to the detection configuration field;
[0098] Step S504, determining whether the target opcode value (custom_opcode_value) is consistent with the opcode expected value (custom_opcode_exp);
[0099] Step S505, when the target operation code value is consistent with the expected operation code value, polling detection is performed on the message packets corresponding to the target operation code value according to the session table information;
[0100] Step S506: Generate a customized polling detection alarm.
[0101] In this embodiment, if the packet header type in step S501 is not a user-defined detection type, the fixed detection process is entered.
[0102] In this embodiment, if the judgment result of any step from step S502 to step S504 is no, or the target operation code value is not extracted, the polling detection process ends.
[0103] In this embodiment, an operation code (opcode) may be used to indicate a message type, and a designated message targeted by the polling detection is determined according to a target operation code value.
[0104] In this embodiment, the configuration information corresponding to the polling detection includes: an opcode offset (custom_alm_poll_opcode_offset), an opcode length (custom_alm_poll_opcode_len), and an opcode expected value (custom_opcode_exp).
[0105] In this embodiment, the opcode offset is used to indicate the position of the message from which the match starts, and the opcode length is used to indicate the length of the match. Step S503 can match the received message content according to the above two configuration information, and then extract the target opcode value.
[0106] In this embodiment, polling detection is also performed according to the polling period (custom_alm_polling_period) and the polling multiple (custom_alm_polling_dm) in the session table. The two are multiplied to obtain the generation time of the polling detection alarm. If the specified message is not received within this time, this type of LOC alarm is triggered.
[0107] Figure 6 is a flowchart of alarm elimination according to an embodiment of the present application, such as Figure 6 As shown, the process includes the following steps:
[0108] Step S601, determining whether the packet header type (pkt_head_type) is a custom detection type (custom_type_n);
[0109] Step S602, determine whether the alarm elimination enable control field (custom_alm_clr_en) is enabled, and if enabled, the alarm elimination process is entered;
[0110] Step S603, obtaining a custom target opcode value (custom_opcode_value) according to the detection configuration field;
[0111] Step S604, determining whether the target opcode value (custom_opcode_value) is consistent with the opcode expected value (custom_opcode_exp);
[0112] Step S605: when the target operation code value is consistent with the expected operation code value, the message packet corresponding to the target operation code value is polled and detected according to the session table information;
[0113] Step S606, eliminating the customized polling detection alarm.
[0114] In this embodiment, if the packet header type in step S601 is not a user-defined detection type, the fixed detection process is entered.
[0115] In this embodiment, if the judgment result of any step from step S602 to step S604 is no, or the target operation code value is not extracted, the alarm elimination process of the polling detection is terminated.
[0116] In this embodiment, the configuration information corresponding to the alarm elimination includes: an opcode offset (custom_alm_poll_opcode_offset), an opcode length (custom_alm_poll_opcode_len), and an opcode expected value (custom_opcode_exp).
[0117] The alarm elimination process in the embodiment of the present application is aimed at the alarm elimination of the polling alarm, and the generation and elimination of the polling alarm can share the same set of configuration information.
[0118] In this embodiment, the opcode offset is used to indicate the position of the message from which the match starts, and the opcode length is used to indicate the length of the match. Step S603 can match the received message content according to the above two configuration information, and then extract the target opcode value.
[0119] In this embodiment, the polling detection alarm elimination also needs to be performed according to the polling alarm elimination period (custom_alm_clr_period) and the polling alarm elimination multiple (custom_alm_clr_cnt) in the session table. The two are multiplied to obtain the elimination time of the polling detection alarm. When a specified message is received within this time, the corresponding polling detection alarm is eliminated.
[0120] In one embodiment, the newly added custom OAM detection standard is as follows: for OAM messages with an operation code of 70, a remote defect indication (RDI) alarm is triggered when a certain offset position is 1, and a signal degrade (SD) alarm is triggered when a certain position is 1. If no message is received within 5 cycles, a LOC alarm is reported (polling detection). If any correct message is received within 5 cycles, the alarm disappears.
[0121] In this embodiment, according to the user-defined OAM detection standard, the user configures the OAM message header, register, and OAM session table as shown below.
[0122] Table 1 shows the global custom detection type, which is configured in the OAM packet header. The configuration value can be any value except the value corresponding to the fixed detection type.
[0123] Table 1, Global custom detection types
[0124] Custom detection type field Configuration Values custom_type_n 0x6
[0125] Table 2 is the global enable control, which is configured in the register. The enable control types include incoming packet detection, polling detection, and alarm elimination. All three enable control types are Ox1 (enabled), indicating that the custom detection type can execute the logic of these three alarm detection / elimination at the same time.
[0126] Table 2, Global Enable Control
[0127] Enable control type Configuration Values custom_headtype_coming_en_n 0x1 custom_alm_polling_en_n 0x1 custom_alm_clr_en_n 0x1
[0128] Table 3 is the incoming packet detection configuration, which is configured in the register to indicate the alarm matching condition. According to the configuration information in Table 3, information can be extracted from the specified position of the message and matched with the alarm expected value (custom_alm_exp). If the match is successful, an alarm of the corresponding type is generated. The detection configuration field may include: alarm offset (custom_alm_offset), alarm length (custom_alm_len), alarm mask (custom_alm_mask) and alarm expected value (custom_alm_exp).
[0129] Table 3, incoming packet detection configuration
[0130] Detection Configuration Fields Configuration Values custom_alm_offset_n 0x28 custom_alm_len_n 0x1 custom_alm_mask_n 0x1 custom_alm_exp_n 0x1
[0131] Table 4 shows the conditions for eliminating the incoming packet detection alarm. It is configured in the OAM session table. The value of the custom mode (custom_mode) corresponds to the custom detection type (custom_type). 0 to 3 can be used to represent the existing type, and values other than 0 to 3 can be used to represent the newly added type. The session configuration information includes: alarm elimination period (custom_alm_coming_clr_period) and alarm elimination multiple (custom_alm_coming_clr_dm).
[0132] Table 4, Configuration in the OAM session table (packet detection alarm elimination)
[0133] Session configuration information Configuration Values custom_mode 0x4 (0 to 3 are existing types) custom_alm_coming_clr_period 0x1 custom_alm_coming_clr_dm 0x3
[0134] Table 5 is the polling detection configuration, which is configured in the register. According to the configuration information in Table 5, information can be extracted from the specified position of the message and matched with the expected value of the opcode (custom_opcode_exp). If the match is successful, the specified message is polled for detection. The detection configuration field may include: opcode offset (custom_alm_poll_opcode_offset), opcode length (custom_alm_poll_opcode_len) and opcode expected value (custom_opcode_exp).
[0135] Table 5, Polling detection configuration
[0136] Detection Configuration Fields Configuration Values custom_opcode_exp_n 0x46 custom_alm_poll_opcode_offset 0x30 custom_alm_poll_opcode_len 0x4
[0137] Table 6 shows the polling detection conditions, which are configured in the OAM session table. The custom mode (custom_mode) value corresponds to the custom detection type (custom_type). 0 to 3 can be used to represent existing types, and values other than 0 to 3 can be used to represent new types. The session configuration information includes: polling period (custom_alm_polling_period) and polling multiple (custom_alm_polling_dm).
[0138] Table 6, OAM session table configuration (polling detection)
[0139] Session configuration information Configuration Values custom_mode 0x4 (0 to 3 are existing types) custom_alm_polling_period 0x1 custom_alm_polling_dm 0x5
[0140] Table 7 shows the polling detection alarm elimination conditions, which are configured in the OAM session table. The value of the custom mode (custom_mode) corresponds to the custom detection type (custom_type). 0 to 3 can be used to represent existing types, and values other than 0 to 3 can be used to represent new types. The session configuration information includes: polling alarm elimination period (custom_alm_clr_period) and polling alarm elimination multiple (custom_alm_clr_cnt).
[0141] Table 7, OAM session table configuration (polling detection alarm elimination)
[0142]
[0143]
[0144] According to another aspect of the embodiment of the present application, an OAM alarm detection device is also provided.
[0145] Figure 7 is a block diagram of an OAM alarm detection device according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0146] A detection module 72, configured to enter an OAM detection process corresponding to the detection type field according to the detection type field of the message, wherein the OAM detection process includes a preset custom detection process;
[0147] An acquisition module 74 is used to acquire an enabling control type field and a detection configuration field corresponding to the detection type field when the OAM detection process is the custom detection process;
[0148] The determination module 76 is used to determine the target detection result according to the enable control type field and the detection configuration field.
[0149] The embodiments of the present application can solve the problem that the alarm detection mechanism in the related technology is solidified and cannot meet the ever-changing new alarm detection needs. Starting from the logical design of alarm detection, independent custom alarm detection logic judgment is added and user configuration is supported, thereby improving the flexibility of alarm detection.
[0150] In some embodiments, the device further includes: a receiving module, configured to receive a message and add the detection type field to a system header of the message.
[0151] In this embodiment, the detection type field is used to indicate whether the message performs the fixed detection process or the custom detection process.
[0152] In an exemplary embodiment, the value of the detection type field (custom_alm_type) can use 0 to 2 to represent the above three fixed detection processes, and use values other than 0 to 2 to represent custom detection processes, for example, custom_alm_type = 0 represents the CFM detection process, custom_alm_type = 1 represents the TPOAM detection process, custom_alm_type = 2 represents the BFD detection process, and custom_alm_type = 3 represents the user-configured custom detection process. This application does not limit the number of detection types and the field values corresponding to each detection type.
[0153] In some embodiments, the detection module 72 is further used to determine a corresponding OAM detection type according to the value of the detection type field, and enter an OAM detection process corresponding to the OAM detection type, wherein the OAM detection type includes at least one preset custom detection type.
[0154] In some embodiments, the acquisition module 74 is further used to acquire the enable control type field and the detection configuration field from a register corresponding to the OAM detection type, wherein each of the custom detection types corresponds to at least one group of the registers.
[0155] In some embodiments, the determination module 76 may include:
[0156] A first acquisition unit is used for acquiring a register matching relationship from a ternary content addressable memory (TCAM) according to a preset matching relationship mask value when each of the custom detection types corresponds to multiple groups of registers, wherein the register matching relationship includes AND and OR;
[0157] The first determination unit is used to determine the target detection result according to the register matching relationship and multiple groups of detection configuration fields, wherein the multiple groups of detection configuration fields are respectively obtained from the multiple groups of registers.
[0158] In some embodiments, the global enable control type under custom detection may include incoming packet detection, polling detection, and alarm disappearance. Incoming packet detection is used to detect whether a specified position in a message packet carries specified information, and if so, an alarm is generated. Polling detection is used to detect whether a specified message type is received within a certain period, and if not, an alarm is generated. Alarm disappearance is used to eliminate the alarm generated in polling detection.
[0159] In some embodiments, when the enable control type field includes an incoming packet detection enable control field, the detection configuration field includes: an alarm offset, an alarm length, an alarm mask, and an alarm expected value, wherein the alarm expected value is configured based on the session number of the message.
[0160] In some embodiments, the determination module 76 may include:
[0161] A first judgment unit, configured to judge whether to enter an incoming packet detection process according to the incoming packet detection enable control field;
[0162] A second acquisition unit, configured to acquire a target alarm value from the message according to the alarm offset, the alarm length, and the alarm mask when the judgment result is yes;
[0163] The first alarm unit is used to generate an incoming packet detection alarm corresponding to the expected alarm value when the target alarm value is consistent with the expected alarm value.
[0164] In some embodiments, the device may further include an alarm cancellation module.
[0165] In some embodiments, the alarm elimination module may include:
[0166] a third acquisition unit, configured to acquire a corresponding alarm elimination period and an alarm elimination multiple from a target session table according to the detection type field, wherein the target session table is configured based on a session number of the message;
[0167] A second determining unit, configured to determine the product of the alarm elimination period and the alarm elimination multiple as the elimination time of the incoming packet detection alarm;
[0168] The first eliminating unit is configured to eliminate the incoming packet detection alarm if no message corresponding to the incoming packet detection alarm is received within the elimination time of the incoming packet detection alarm.
[0169] In some embodiments, when the enable control type field includes a polling detection enable control field or an alarm elimination enable control field, the detection configuration field includes: an operation code offset, an operation code length, and an operation code expected value.
[0170] In some embodiments, the determination module 76 may include:
[0171] A second judgment unit, used to judge whether to enter the polling detection process according to the polling detection enable control field;
[0172] a fourth acquisition unit, configured to acquire a target operation code value from the message according to the operation code offset and the operation code length when the judgment result is yes;
[0173] A polling detection unit is used to perform polling detection according to the target operation code value when the target operation code value is consistent with the operation code expected value, and obtain a polling detection result corresponding to the message.
[0174] In some embodiments, the polling detection unit may include:
[0175] a fifth acquiring unit, configured to acquire a corresponding polling period and a polling multiple from a target session table according to the detection type field, wherein the target session table is configured based on a session number of the message;
[0176] A third determining unit, configured to determine the product of the polling period and the polling multiple as the generation time of the polling detection alarm;
[0177] The second alarm unit is used to generate a polling detection alarm corresponding to the target message when the target message corresponding to the target operation code value is not received within the generation time of the polling detection alarm.
[0178] In some embodiments, the alarm elimination module may further include:
[0179] A sixth acquisition unit, configured to acquire a corresponding polling alarm elimination period and a polling alarm elimination multiple from the target session table according to the detection type field;
[0180] A fourth determining unit, configured to determine the product of the polling alarm elimination period and the polling alarm elimination multiple as the elimination time of the polling detection alarm;
[0181] The second eliminating unit is used to eliminate the polling detection alarm corresponding to the target message after waiting for the elimination time of the polling detection alarm.
[0182] Through the embodiments of the present application, it is possible to be compatible with the traditional alarm detection process, and provide good support and compatibility for the introduction of new alarms, thereby achieving a more flexible alarm detection configuration method, which can better adapt to the ever-changing product requirements.
[0183] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program executes the steps of any of the above method embodiments when executed by a processor.
[0184] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0185] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0186] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0187] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0188] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0189] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. An OAM alarm detection method, characterized in that: The method comprises: Entering an OAM detection process corresponding to the detection type field according to the detection type field of the message, wherein the OAM detection process includes a preset custom detection process; In the case where the OAM detection process is the custom detection process, acquiring an enabling control type field and a detection configuration field corresponding to the detection type field; A target detection result is determined according to the enable control type field and the detection configuration field.
2. The method according to claim 1, characterized in that Before entering the OAM detection process corresponding to the detection type field according to the detection type field of the message, the method further includes: A message is received, and the detection type field is added to the system header of the message.
3. The method according to claim 1, characterized in that: Entering an OAM detection process corresponding to the detection type field according to the detection type field of the message includes: The corresponding OAM detection type is determined according to the value of the detection type field, and an OAM detection process corresponding to the OAM detection type is entered, wherein the OAM detection type includes at least one preset user-defined detection type.
4. The method according to claim 3, characterized in that Acquiring an enable control type field and a detection configuration field corresponding to the detection type field, including: The enable control type field and the detection configuration field are acquired from a register corresponding to the OAM detection type, wherein each of the user-defined detection types corresponds to at least one group of the registers.
5. The method according to claim 4, characterized in that Determining a target detection result according to the enable control type field and the detection configuration field includes: In the case where each of the custom detection types corresponds to multiple groups of registers, a register matching relationship is obtained from a ternary content addressable memory TCAM according to a preset matching relationship mask value, wherein the register matching relationship includes AND and OR; The target detection result is determined according to the register matching relationship and the multiple groups of detection configuration fields, wherein the multiple groups of detection configuration fields are respectively obtained from the multiple groups of registers.
6. The method according to claim 1, characterized in that In the case where the enable control type field includes an incoming packet detection enable control field, the detection configuration field includes: an alarm offset, an alarm length, an alarm mask, and an alarm expected value, wherein the alarm expected value is configured based on the session number of the message.
7. The method according to claim 6, characterized in that Determining a target detection result according to the enable control type field and the detection configuration field includes: Determine whether to enter the incoming packet detection process according to the incoming packet detection enable control field; If the judgment result is yes, obtaining a target alarm value from the message according to the alarm offset, the alarm length and the alarm mask; When the target alarm value is consistent with the alarm expected value, an incoming packet detection alarm corresponding to the alarm expected value is generated.
8. The method according to claim 7, characterized in that After generating an incoming packet detection alarm corresponding to the alarm expected value, the method further includes: Acquire a corresponding alarm elimination period and an alarm elimination multiple from a target session table according to the detection type field, wherein the target session table is configured based on a session number of the message; Determine the product of the alarm elimination period and the alarm elimination multiple as the elimination time of the incoming packet detection alarm; When no message corresponding to the incoming packet detection alarm is received within the cancellation time of the incoming packet detection alarm, the incoming packet detection alarm is cancelled.
9. The method according to claim 1, characterized in that: In the case where the enable control type field includes a polling detection enable control field or an alarm elimination enable control field, the detection configuration field includes: an operation code offset, an operation code length, and an operation code expected value.
10. The method according to claim 9, characterized in that Determining a target detection result according to the enable control type field and the detection configuration field includes: Determine whether to enter the polling detection process according to the polling detection enable control field; If the result of the judgment is yes, obtaining a target operation code value from the message according to the operation code offset and the operation code length; In the case that the target operation code value is consistent with the operation code expected value, polling detection is performed according to the target operation code value, and a polling detection result corresponding to the message is obtained.
11. The method according to claim 10, characterized in that When the target operation code value is consistent with the operation code expected value, performing polling detection according to the target operation code value and obtaining a polling detection result corresponding to the message includes: Acquire a corresponding polling period and a polling multiple from a target session table according to the detection type field, wherein the target session table is configured based on a session number of the message; Determine the product of the polling cycle and the polling multiple as the generation time of the polling detection alarm; If the target message corresponding to the target operation code value is not received within the generation time of the polling detection alarm, a polling detection alarm corresponding to the target message is generated.
12. The method according to claim 11, characterized in that After generating a polling detection alarm corresponding to the target message, the method further includes: Acquire a corresponding polling alarm elimination period and a polling alarm elimination multiple from the target session table according to the detection type field; Determine the product of the polling alarm elimination period and the polling alarm elimination multiple as the elimination time of the polling detection alarm; After waiting for the elimination time of the polling detection alarm, the polling detection alarm corresponding to the target message is eliminated.
13. An OAM alarm detection device, characterized in that: The device comprises: A detection module, configured to enter an OAM detection process corresponding to a detection type field of a message according to the detection type field, wherein the OAM detection process includes a preset custom detection process; An acquisition module, configured to acquire, when the OAM detection process is the custom detection process, an enabling control type field and a detection configuration field corresponding to the detection type field; A determination module is used to determine a target detection result according to the enable control type field and the detection configuration field.
14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program executes the method described in any one of claims 1 to 12 when executed by a processor.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 12.