Layer 2 service status detection method, communication equipment, and storage medium

By monitoring the changes and quantity of session numbers for Layer 2 services and combining them with preset threshold comparisons, the problem of low efficiency in Layer 2 service status detection and high operation and maintenance costs in communication equipment is solved, achieving efficient fault location and low-cost detection.

CN114363223BActive Publication Date: 2025-09-09ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011034818.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-27
Publication Date
2025-09-09
Estimated Expiration
2040-09-27

AI Technical Summary

Technical Problem

In the existing technology, communication equipment cannot effectively detect the status of Layer 2 services, resulting in high operation and maintenance costs and low efficiency. It relies on fault reporting and statistical alarms from the client or upper-layer server for judgment.

Method used

By monitoring the changes and number of session numbers of Layer 2 services and comparing the number of sessions with the preset threshold, it is determined whether the Layer 2 service status is abnormal and an abnormal warning message is sent to achieve efficient detection and fault location of Layer 2 protocol interactions.

Benefits of technology

It achieves effective detection and efficient positioning of Layer 2 service status, reduces operation and maintenance costs, and improves detection compatibility and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363223B_ABST
    Figure CN114363223B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a method for detecting the status of a Layer 2 service, a communication device, and a storage medium, belonging to the field of communication technology. The method includes: determining the number of sessions corresponding to a session number of a Layer 2 service, and determining whether the status of the Layer 2 service is abnormal based on the number of sessions; if the status of the Layer 2 service is determined to be abnormal, sending an abnormality warning message, thereby monitoring the changes and number of session numbers in Layer 2 protocol interactions to determine the Layer 2 protocol interactions, and combining the number of protocol interaction messages to characterize and determine the fault, thereby achieving effective detection and efficient positioning of the Layer 2 service status in point-to-multipoint network devices, and achieving low detection costs and high compatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a layer 2 service status detection method, communication equipment, and storage medium. Background Art

[0002] Layer 2 service protocols include the Point-to-Point Protocol over Ethernet (PPPOE) and the Dynamic Host Configuration Protocol (DHCP), and are typically exchanged between a client (CLIENT) and a server (SERVER). The CLIENT is typically located on a communications device, specifically the User Network Interface (UNI) of a PON (Passive Optical Network) device. The SERVER is also typically located on a communications device, specifically the Service Node Interface (SNI) of a PON device. Point-to-multipoint network devices (PON devices) aggregate multiple clients through the UNI and connect to the server through the SNI.

[0003] Because communications equipment itself does not initiate or terminate Layer 2 protocol services, it lacks direct perception and judgment of service status, making it impossible to detect and determine the location and scope of faults. Existing methods rely on client fault reports or statistical alarms from upper-layer servers, which is not only inefficient but also leads to high operation and maintenance costs. Summary of the Invention

[0004] The embodiment of the present invention provides a second-layer service status detection method, communication equipment and storage medium to solve the problem that the existing judgment relies on the user CLIENT's fault report or the upper-layer SERVER's statistical alarm, which is not only inefficient but also leads to high operation and maintenance costs.

[0005] To achieve the above object, an embodiment of the present invention provides a method for detecting a Layer 2 service state, the method comprising:

[0006] Determine the number of sessions corresponding to the session number of the Layer 2 service, and determine whether the status of the Layer 2 service is abnormal based on the number of sessions;

[0007] If it is determined that the state of the layer 2 service is abnormal, an abnormal warning message is sent.

[0008] To achieve the above-mentioned purpose, an embodiment of the present invention further proposes a communication device, comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the aforementioned Layer 2 service status detection method when executing the computer program.

[0009] To achieve the above-mentioned purpose, an embodiment of the present invention also proposes a computer-readable storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the aforementioned Layer 2 service status detection method.

[0010] The embodiment of the present invention discloses a method for detecting the status of a second-layer service, a communication device, and a storage medium. The method determines the number of sessions corresponding to the session number of the second-layer service and determines whether the status of the second-layer service is abnormal based on the number of sessions. If the status of the second-layer service is determined to be abnormal, an abnormal warning message is sent. Thus, by monitoring the changes and number of session numbers in the second-layer protocol interaction, the second-layer protocol interaction is judged, and the fault is characterized and judged in combination with the number comparison of the protocol interaction messages, thereby achieving effective detection and efficient positioning of the second-layer service status in a point-to-multipoint network device, and achieving the effects of low detection cost and high compatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is a schematic flow chart of a method for detecting Layer 2 service status provided by an embodiment of the present invention.

[0012] Figure 2 This is a schematic diagram of the PPPOE service protocol interaction scenario of the present invention.

[0013] Figure 3 It is a schematic diagram of the DHCP service protocol interaction scenario of the present invention.

[0014] Figure 4 This is a schematic flow chart of another Layer 2 service status detection method provided by an embodiment of the present invention.

[0015] Figure 5 A schematic block diagram of the structure of a communication device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the embodiments of the present invention.

[0017] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0018] The embodiment of the present invention provides a layer 2 service status detection method, a base station, a calling system and a storage medium.

[0019] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments of the invention and the features in the embodiments of the invention can be combined with each other.

[0020] See also Figure 1 , Figure 1 This is a schematic flow chart of a method for detecting Layer 2 service status provided by an embodiment of the present invention.

[0021] like Figure 1 As shown, this embodiment provides a method for detecting a Layer 2 service state, the method comprising the following steps:

[0022] Step S110: determining the number of sessions corresponding to the session number of the layer 2 service, and determining whether the state of the layer 2 service is abnormal based on the number of sessions.

[0023] Layer 2 services include the PPPoE and DHCP service protocols, as well as other services that include an ID field to uniquely define a protocol completion process. Layer 2 services are data link layer services. The session ID of the Layer 2 service is obtained and the number of sessions corresponding to the session ID is determined based on the session ID. For example, the number of sessions corresponding to the session ID is counted, and the counted number is used as the number of sessions. This number of sessions is then compared with a preset threshold to determine whether the Layer 2 service status is abnormal.

[0024] For example, the Layer 2 service is the PPPoE protocol. The PPPoE protocol has two distinct phases: the discovery phase and the PPP session phase. When a host wishes to initiate a PPPoE session, it must first perform the discovery phase to identify the peer's physical address, such as the Ethernet MAC address, and establish a session ID, such as the PPPoE SESSION_ID. During the discovery phase, based on the network topology, the client can discover multiple servers, where clients include hosts and servers include access concentrators. The discovery phase allows the host to discover all access concentrators and then select one. Upon successful completion of the discovery phase, both the host and the selected access concentrator have the information needed to establish a link control protocol, Point-to-Point Transport Protocol (PPP), connection over Ethernet. The discovery phase remains stateless until the PPP session is established. Once the PPP session is established, both the host and the access concentrator must allocate resources for the PPP virtual interface. The PPPoE frame format defines a 16-bit SESSION_ID field, an unsigned value in network order. This value is constant within a given PPP session and, together with the source and destination addresses, defines a PPP session. When PPPoE is re-established, the SESSION_ID will be reallocated, that is, the SESSION_ID will uniquely define a PPPoE session.

[0025] Alternatively, the Layer 2 service protocol is the DHCP service protocol, the predecessor of DHCP being the Bootstrap Protocol (BOOTP). DHCP itself is a dynamic host IP configuration protocol that expands upon BOOTP in two ways: 1) DHCP enables a computer to obtain all required configuration information using a single message, i.e., a protocol for transmitting configuration information; and 2) DHCP allows computers to quickly and dynamically obtain IP addresses, i.e., a mechanism for dynamically allocating IP addresses. DHCP uses the BOOTP message format but modifies the content and meaning of some fields. The "Transaction ID" is a random number selected by the client device each time it sends a DHCP request message. It is used to match the server's response message to the request message to which it is responding. The client discards response messages with mismatched transaction IDs. When DHCP restarts to obtain an IP address, its transaction ID is also unique, meaning that the transaction ID uniquely defines a single DHCP interaction.

[0026] In one embodiment, determining the number of layer 2 service sessions includes: detecting a protocol message of a specific layer 2 service, obtaining a session number in the protocol message; and determining the number of sessions of the session number based on the session number and a previously recorded session number.

[0027] After detecting a Layer 2 service protocol message, extract the session number recorded in the message and compare it with a previously recorded session number to determine whether it matches the previously recorded session number. If the session number does not match the previously recorded session number, determine the number of sessions associated with the session number. This number represents the number of valid session numbers, such as a non-zero session number in the PPPoE protocol, such as SessionID = 0x0000. Record the session number in each Layer 2 service protocol message and the number of sessions N associated with that session number. For example, if the session number detected in a Layer 2 service protocol message is an initialization session number, set the initialization session number N for that session number to 0. If the obtained session number matches the previously recorded session number, determine the number of sessions associated with that session number to be N+1.

[0028] For example, when the Layer 2 service is the PPPoE service protocol, the Session ID recorded in the confirmation packet message (PPPoE Active Discovery Session-confirmation, PADS message) is obtained. The PADS message with Ethernet type = 0x8863, CODE = 0x65 of the protocol is identified through the Access Control List (ACL) or other reporting rules, and the Session ID is identified and recorded according to the message format. Among them, detecting the PADS message includes the following: Figure 2As shown, the discovery phase of the PPPOE service includes four steps. When this discovery phase is completed, the communicating PPPOE CLIENT (PPPOE client) and PPPOE SERVER (PPPOE server) obtain the PPPOE SESSION_ID and Ethernet address. The PPPOE SESSION_ID and Ethernet address together uniquely define the PPPOE session. These steps include: 201. The PPPOE client broadcasts a PPPOE initiation packet message PPPOE Active Discovery Initiation (CODE=0x09, Session ID (SESSION-ID)=0x0000), referred to as a PADI message; 202. One or more PPPOE servers send a PPPOE offer packet message PPPOE Active Discovery Offer (CODE=0x07, Session ID (SESSION-ID)=0x0000), referred to as a PADO message; 203. The PPPOE client sends a unicast session request packet message PPPOE Active Discovery Request (CODE=0x19, Session ID (SESSION-ID)=0x0000), referred to as a PADR message; 204. The corresponding PPPOE server sends a confirmation packet message PPPOE Active Discovery Session-confirmation (CODE=0x65, the session ID (SESSION ID) generates a unique PPPOE session identification code), referred to as a PADS message.

[0029] Alternatively, when the Layer 2 service is the DHCP service protocol, obtain the Transaction ID in the address confirmation message (DHCPAcknowledgement, DHCP ACK message). Identify the address confirmation message with the protocol port number = 67 / 68 and MESSAGE TYPE = 0x05 through ACL or other reporting rules, and identify and record the Transaction ID according to the message format. Detecting the DHCP ACK message includes the following: Figure 3As shown in Figure 3, the DHCP service IP address request process is as follows: 301. The DHCP client sends a DHCP DISCOVER broadcast packet (Message Type = 0x01) to search for the DHCP server on the network. DISCOVER is a request broadcast packet. When initiating a request, the DHCP client selects a random number as a "Transaction ID" to identify the address request process. 302. The DHCP server sends a DHCP OFFER unicast packet (Message Type = 0x02) to the DHCP client, containing the IP address, MAC address, domain name information, and address lease period. 303. The DHCP client sends a DHCP REQUEST broadcast packet (Message Type = 0x03) to formally request the assigned IP address from the corresponding DHCP server. 304. The DHCP server sends a DHCP ACK message (Message Type = 0x05) to the DHCP client, confirming the DHCP client's request. Only after receiving this DHCP ACK message does the DHCP client actually obtain the IP address and related configuration information. The Transaction ID remains unchanged throughout the DHCP address request process.

[0030] In a real-time example, determining whether the state of the layer 2 service is abnormal based on the number of sessions includes: determining a first preset threshold of the session number; and determining that the state of the layer 2 service is abnormal if the number of sessions is greater than the first preset threshold.

[0031] A threshold is set in advance, and the threshold is determined to be a first preset threshold corresponding to the session number, and the first preset threshold is compared with the number of sessions corresponding to the session number. If the number of sessions is greater than the first preset threshold, it is determined that the state of the Layer 2 service is abnormal. For example, when the Layer 2 service is a PPPOE service, the number of sessions of the SESSION ID is obtained, and the number of sessions of the SESSION ID is compared with the first preset threshold. If the number of sessions of the SESSION ID is greater than the first preset threshold, it is determined that the state of the PPPOE service is abnormal. Alternatively, when the Layer 2 service is a DHCP service, the number of sessions of the Transaction ID is obtained, and the number of sessions of the Transaction ID is compared with the first preset threshold. If the number of sessions of the Transaction ID is greater than the first preset threshold, it is determined that the state of the DHCP service is abnormal.

[0032] The method for determining the first preset threshold value of the session number also includes: obtaining parameters affecting service protocol interaction in a protocol message of a Layer 2 service, wherein the parameters affecting service protocol interaction include the number of optical network unit (ONU) state changes, the number of MAC addresses in a corresponding service virtual local area network (VLAN), and the like. The first preset threshold value corresponding to the session number of the Layer 2 service is determined based on the parameters affecting service protocol interaction. In an exemplary embodiment, the communication device is based on physical ports or logical ports, wherein the physical ports or logical ports include optical line terminals (OLTs), slots, passive optical network ports (PON ports), optical network unit ports (ONU ports), and the like. A first timer is started to determine whether the service is normal based on the first preset threshold value within a certain period based on the physical or logical port. The method includes: extracting the number of current sessions on the corresponding interface; when the number of sessions is less than or equal to the first preset threshold value, determining that the service on the corresponding interface is normal; and when the number of sessions is greater than the first preset threshold value, determining that the service on the corresponding interface is abnormal.

[0033] When the physical port or logical port of the communication device is an ONU port, an average number of service MAC address changes and an average number of ONU state changes corresponding to the ONU interface within a first preset period are obtained, and a threshold value A1 corresponding to each period of the first preset period is obtained based on the average number of service MAC address changes and the average number of ONU state changes, and the threshold value A1 is used as the first preset threshold value corresponding to the ONU port. For example, after obtaining the average number of service MAC address changes and the average number of ONU state changes, the threshold value A1 is obtained using the first threshold calculation formula: threshold value A1 = coefficient 1 × (average number of service MAC address changes + average number of ONU state changes), where coefficient 1 is a quantitative value representing a proportional relationship between the MAC address of the corresponding interface, the number of ONUs, and the number of specific protocols represented by the MAC address. Obtaining the average number of service MAC address changes includes obtaining the number of MAC address changes of the ONU interface within each period of the first preset period, and obtaining the average number of service MAC address changes of each period of the first preset period based on the number of MAC address changes of the ONU interface within each period. For example, the number of cycles in a first preset cycle and the number of MAC address changes on the ONU interface within each cycle of the first preset cycle are obtained using the formula for average service MAC address changes: Average service MAC address changes = Number of MAC address changes on the ONU interface within each cycle × Number of cycles / Extraction strategy startup duration, where the number of cycles is the number of cycles in the first preset cycle, the extraction strategy startup duration is a fixed quantity, and the extraction strategy startup duration is the time from the extraction strategy startup to the present, and is an integer multiple of the first preset cycle. Obtaining the average number of ONU state changes includes obtaining the number of ONU state changes in each cycle of the first preset cycle, adding the number of ONU state changes in each cycle to obtain the total number of ONU state changes in the first preset cycle, and obtaining the average number of ONU state changes based on the total number of ONU state changes in the first preset cycle and the number of cycles in the first preset cycle. For example, the total number of ONU state changes in a first preset period and the number of cycles in the first preset period are obtained, and the average number of ONU state changes is calculated using the formula: Average number of ONU state changes = Total number of ONU state changes × Number of cycles / Extraction strategy startup duration, where the number of cycles is the number of cycles in the first preset period and the extraction strategy startup duration is a fixed value. When a first timer A1 is started via an ONU port, upon expiration of first timer A1, the number of sessions corresponding to the ONU port and ONU index recorded in first timer A1 is extracted. The obtained number of sessions is compared with a threshold A1 corresponding to the ONU port. If the number of sessions is less than or equal to threshold A1, the ONU service corresponding to the ONU port is determined to be normal; if the number of sessions is greater than threshold A1, the ONU service corresponding to the ONU port is determined to be abnormal.

[0034] Alternatively, the physical port or logical port of the communication device is a PON port, and the number of PON port state changes, the number of ONU state changes, the number of MAC addresses in the corresponding service, and the number of online ONUs are obtained for the PON port within a second preset period. A threshold value A2 corresponding to each period of the second preset period is obtained based on the number of PON port state changes, the number of ONU state changes, the number of MAC addresses in the corresponding service, and the number of online ONUs, and the threshold value A2 is used as the first preset threshold value corresponding to the PON port. For example, the number of PON port state changes, the number of ONU state changes, the number of MAC addresses in the corresponding service, and the number of online ONUs are obtained. Based on the number of PON port state changes, the number of ONU state changes, the number of MAC addresses in the corresponding service, and the number of online ONUs, the threshold value A2 is calculated according to the first preset threshold value formula: threshold value A2 = coefficient 2 × (number of PON state changes × number of online ONUs + average number of service MAC address changes + average number of ONU state transitions), where coefficient 2 is a quantitative value and represents the proportional relationship between the MAC address and the number of ONUs on the corresponding interface and the number of specific protocols represented by them. Obtaining the average number of service MAC address changes includes obtaining the number of MAC address changes at the PON port within each period of the second preset period, and obtaining the average number of service MAC address changes at each period of the second preset period based on the number of MAC address changes at the PON port within each period. For example, the number of periods in the second preset period and the number of MAC address changes at the PON port within each period of the second preset period are obtained using the formula for average number of service MAC address changes: Average number of service MAC address changes = Number of MAC address changes at the PON port within each period × Number of periods / Extraction strategy startup duration, where the Number of periods is the number of periods in the second preset period and the Extraction strategy startup duration is a fixed quantity, and the Extraction strategy startup duration refers to the time from the extraction strategy startup to the present, and is an integer multiple of the second preset period. Obtaining the average number of ONU state changes includes obtaining the number of ONU state changes at each period of the second preset period, adding the number of ONU state changes at each period to obtain the total number of ONU state changes at the second preset period, and obtaining the average number of ONU state changes based on the total number of ONU state changes at the second preset period and the number of periods in the second preset period.

[0035] For example, the total number of ONU state changes in the second preset period and the number of cycles in the second preset period are obtained, and the average number of ONU state changes is calculated using the formula: Average number of ONU state changes = Total number of ONU state changes × Number of cycles / Extraction strategy startup duration, where the number of cycles is the number of cycles in the second preset period, and the extraction strategy startup duration is a fixed quantity, which refers to the time from the initiation of the extraction strategy to the present and is an integer multiple of the second preset period. When a first timer A2 is started via a PON port, upon expiration of first timer A2, the number of sessions under the PON port recorded in first timer A2 is extracted. The obtained number of sessions is compared with a threshold A2 corresponding to the PON port. If the number of sessions is less than or equal to threshold A2, the PON service corresponding to the PON port is determined to be normal; if the number of sessions is greater than threshold A2, the PON service corresponding to the PON port is determined to be abnormal.

[0036] Alternatively, the physical port or logical port of the communication device is a PON line card. The sum of relevant parameters corresponding to all PON ports on the PON line card within a third preset period is obtained as SUM(threshold value A2), where the relevant parameters corresponding to each PON port are different. A threshold value A3 corresponding to each period of the third preset period is obtained, and this threshold value A3 is used as the first preset threshold value corresponding to the PON line card. For example, the threshold value A2 corresponding to all PON ports on the PON line card and the number of PON ports are obtained according to the formula: threshold value A3 = coefficient 3 × SUM(threshold value A2), where SUM(threshold value A2) is the sum of relevant parameters corresponding to all PON ports on the PON line card, where the relevant parameters corresponding to each PON port are different, and coefficient 3 is a quantitative value representing the proportional relationship between the MAC address and the number of ONUs on the corresponding interface and the number of specific protocols represented by them. When a first timer A3 is started by the PON line card, upon expiration of the first timer A3, the number of sessions on the PON line card recorded in the first timer A3 is extracted. The obtained number of sessions is compared with the threshold A3 corresponding to the PON line card. If the number of sessions is less than or equal to the threshold A3, it is determined that the PON line card service corresponding to the PON line card is normal; if the number of sessions is greater than the threshold A3, it is determined that the PON line card service corresponding to the PON line card is abnormal.

[0037] Alternatively, the physical port or logical port of the communication device is an OLT. The SUM (threshold A3) of the sum of the relevant parameters corresponding to all PON line cards within the third preset period is obtained, where the relevant parameters corresponding to each PON line card are different. A threshold A4 corresponding to each period of the fourth preset period is obtained, and this A4 is used as the first preset threshold corresponding to the OLT. For example, the threshold A3 of the sum of the relevant parameters corresponding to all PON line cards and the number of PON line cards are calculated according to the formula: threshold A4 = coefficient 4 × SUM (threshold A3), where coefficient 4 is a quantitative value and represents the proportional relationship between the MAC address and the number of ONUs under the corresponding interface and the number of specific protocols represented by them. SUM (threshold A3) is the sum of the relevant parameters corresponding to each PON line card, where the relevant parameters corresponding to each PON line card are different. When the first timer A4 is started by the OLT, upon expiration of the first timer A4, the number of sessions corresponding to the OLT recorded in the first timer A4 is extracted. The obtained number of sessions is compared with the threshold A4 corresponding to the OLT. If the number of sessions is less than or equal to the threshold A4, the OLT service corresponding to the OLT is determined to be normal; if the number of sessions is greater than the threshold A4, the OLT service corresponding to the OLT is determined to be abnormal.

[0038] Step S120: If it is determined that the state of the Layer 2 service is abnormal, an abnormal warning message is sent.

[0039] If the status of the Layer 2 service is determined to be abnormal, an abnormal warning message is sent, wherein the abnormal warning message includes text, images, etc. Examples include: if the Layer 2 service is a PPPOE service, when the status of the PPPOE service is determined to be abnormal, an abnormal warning message containing the PPPOE service is sent; or, if the Layer 2 service is a DHCP service, when the status of the DHCP service is determined to be abnormal, an abnormal warning message containing the DHCP service is sent. Alternatively, the PPPOE service or the DHCP service includes a physical port or logical port involved in the service, and the physical port or logical port includes an OLT, and the OLT includes multiple PON line cards, and the PON line card includes multiple PONs, and the PON is connected to multiple ONUs. When the ONU service is determined to be abnormal, an abnormal warning message containing the ONU service is sent; or, when the PON service is determined to be abnormal, an abnormal warning message containing the PON service is sent; or, when the PON line card service is determined to be abnormal, an abnormal warning message containing the PON line card service is sent; or, when the OLT service is determined to be abnormal, an abnormal warning message containing the OLT service is sent.

[0040] Please refer to Figure 4 , Figure 4 A schematic flow chart of another layer 2 service status detection method provided by an embodiment of the present invention.

[0041] Step S410: Acquire protocol interaction information of the Layer 2 service.

[0042] When the Layer 2 service is a PPPOE service or a DHCP service, protocol interaction information recorded by a physical port or logical interface corresponding to the PPPOE service is obtained, or protocol interaction information recorded by a physical port or logical interface corresponding to the DHCP service is obtained.

[0043] Step S420: Determine the abnormal state type of the Layer 2 service according to the protocol interaction information and the number of sessions.

[0044] When the protocol interaction information is obtained, the type of abnormal state of the PPPOE service protocol or the DHCP service protocol is determined based on the obtained protocol interaction information and the number of sessions. For example, when the difference between the number of protocol interaction protocol start messages and the number of sessions in the protocol interaction information is greater than a second preset threshold, it is determined that the physical or logical port involved in the PPPOE service protocol or the DHCP service protocol has a problem with the carrying and forwarding of the protocol service; or, when the difference between the number of protocol interaction protocol start messages and the number of sessions is less than or equal to the second threshold, it is determined that the physical or logical port involved in the PPPOE service protocol or the DHCP service protocol is carrying the protocol service normally, and the abnormal type is caused by module processing outside the physical or logical port, or by the terminal, link, or external device corresponding to the physical port / logical port.

[0045] In one embodiment, the protocol interaction information includes the number of protocol interaction starting protocol messages, and the determining of the state abnormality type of the second-layer service based on the protocol interaction information and the number of sessions includes: determining the difference between the number of protocol interaction starting protocol messages and the number of sessions, and determining a second preset threshold value of the second-layer service; if the difference is greater than the second preset threshold value, determining that the state abnormality type of the second-layer service carried by the physical or logical port is a service interaction abnormality; if the difference is less than or equal to the second preset threshold value, determining that the layer 2 service interaction carried by the physical or logical port is normal, and the service abnormality type is caused by an abnormality in the software and hardware forwarding module related to the physical port or logical port, or a terminal, link or external device corresponding to the physical port / logical port.

[0046] In an exemplary embodiment, the number of protocol interaction initiation protocol messages and the corresponding number of sessions in the protocol interaction information are obtained, and based on the number of protocol interaction initiation protocol messages and the corresponding number of sessions, the difference between the number of protocol interaction initiation protocol messages and the corresponding number of sessions is determined. Determining a second preset threshold for Layer 2 services includes: starting a second timer, and using the second timer to determine the corresponding second preset threshold. The difference between the number of protocol interaction initiation protocol messages and the corresponding number of sessions is compared with the second preset threshold to determine whether the service on the logical port or physical port is abnormal. If the difference is greater than the second preset threshold, the status anomaly type of the Layer 2 service carried by the physical or logical port is determined to be a service interaction anomaly; if the difference is less than or equal to the second preset threshold, the Layer 2 service carried by the physical or logical port is determined to be normal, and the service status anomaly type is an abnormality of the terminal, link, or peripheral corresponding to the physical port or logical port. For example, for the PPPOE protocol, the number of PADI, PADO, PADR, and PADS messages and the number of sessions (Session IDs) in the protocol interaction information are recorded based on the physical or logical port within a certain period. The relationship between the number of PADIs and the number of Session IDs within a period is compared, and based on a second preset threshold, whether the service on the physical or logical port is normal is determined. For the DHCP protocol, the number of DHCP DISCOVER, DHCPOFFER, DHCP REQUEST, and DHCP ACK messages, as well as the number of sessions (Transaction IDs), are recorded for each physical or logical port within a certain period. The relationship between the number of DHCP DISCOVERs and the number of Transaction IDs within a period is compared, and based on the second preset threshold, whether the service on the physical or logical port is normal is determined.

[0047] In an exemplary embodiment, when an ONU service anomaly occurs, a second timer B1 is activated through the ONU port, and a second preset threshold B1 is determined by the second timer B1. The difference between the number of protocol interaction initiation protocol messages and the number of sessions is determined based on the number of protocol interaction initiation protocol messages in the protocol interaction information recorded by the ONU port. This difference is compared with the second preset threshold B1. If the difference is less than or equal to the second preset threshold B1, the type of the ONU service anomaly is determined to be a service interaction anomaly, and it is determined that the ONU service anomaly is caused by a message interaction failure. If the difference is greater than the second preset threshold B1, the ONU service is determined to be normal, and the ONU terminal corresponding to the ONU port is determined to be abnormal.

[0048] Alternatively, when a PON service anomaly occurs, a second PON port activation timer B2 is used to determine a second preset threshold value B2. The difference between the number of protocol interaction initiation protocol messages and the number of sessions is determined based on the number of protocol interaction initiation protocol messages in the protocol interaction information recorded by the PON port. This difference is compared with the second preset threshold value B2. If the difference is less than or equal to the second preset threshold value B2, the PON service anomaly is determined to be a service interaction anomaly, and the PON service anomaly is determined to be caused by a message interaction failure. If the difference is greater than the second preset threshold value B2, the PON service is determined to be normal, and the ONU terminal or link corresponding to the PON port is determined to be abnormal.

[0049] Alternatively, when the PON line card service is abnormal, the second preset threshold value B3 is determined by the second activation timer B3 of the PON line card. The difference between the number of protocol interaction start protocol messages and the number of sessions is determined by the number of protocol interaction start protocol messages in the protocol interaction information recorded by the PON line card. The difference is compared with the second preset threshold value B3. If the difference is less than or equal to the second preset threshold value B3, it is determined that the type of the PON line card service abnormality is a service interaction abnormality, and it is determined that the PON line card service has a service interaction abnormality caused by a message interaction failure. If the difference is greater than the second preset threshold value B3, it is determined that the PON line card service is normal, and it is determined that the corresponding forwarding module of the PON line card has a common abnormality.

[0050] Alternatively, when an OLT service anomaly occurs, the OLT activates a second timer B4, and determines a second preset threshold value B4 using the second timer B4. The difference between the number of protocol interaction initiation protocol messages and the number of sessions is determined based on the number of protocol interaction initiation protocol messages in the protocol interaction information recorded by the OLT. This difference is compared with the second preset threshold value B4. If the difference is less than or equal to the second preset threshold value B4, the OLT service anomaly is determined to be a service interaction anomaly, and the OLT service anomaly is determined to be caused by a message interaction failure. If the difference is greater than the second preset threshold value B4, the OLT service is determined to be normal, and an abnormality is determined in the external device corresponding to the OLT.

[0051] In one embodiment, the service interaction abnormality includes abnormal packet loss, and the abnormal packet loss includes abnormal uplink packet loss and abnormal downlink packet loss; determining that the state abnormality type of the second-layer service is a service interaction abnormality includes: obtaining the number of adjacent uplink packets and the number of downlink packets in the protocol interaction information; and determining whether the abnormal packet loss of the second-layer service is abnormal uplink packet loss or abnormal downlink packet loss based on the number of uplink packets and the number of downlink packets.

[0052] The demonstration example is to obtain the adjacent uplink message information and downlink message information in the protocol interaction information, and determine whether the service interaction anomaly of the second-layer service is an abnormal message loss based on the obtained uplink message information and downlink message information. After obtaining the number of uplink messages in the adjacent uplink message information and the number of downlink messages in the downlink message information, by comparing the number of uplink messages and the number of downlink messages, it is determined whether the uplink message loss is abnormal or the downlink message loss is abnormal. Among them, the number of uplink messages is the number of adjacent uplink messages in the protocol interaction information, and the number of downlink messages is the number of adjacent downlink messages in the protocol interaction information. For example, compare the difference between the number of PADI and PADO messages, the difference between the number of PADO messages and PADR messages, and the difference between the number of PADR messages and PADS messages in the PPPOE protocol interaction messages, and find the group of messages with the largest difference. If the number of PADI or PADR messages in this group of messages is small, it is determined that the uplink message is lost; if the number of PADO or PADS messages in this group of messages is small, it is determined that the downlink message is lost.

[0053] Alternatively, the difference between the number of DCHP DISCOVERY and DCHP OFFER messages, the difference between the number of DHCP OFFER and DHCP REQUEST messages, and the difference between the number of DHCP REQUEST and DHCP ACK messages in the DHCP protocol interaction messages are compared respectively to determine the group of messages with the largest difference. If there are fewer DCHP DISCOVERY or DCHP REQUEST messages in this group of messages, it is determined that uplink packets are lost; if there are fewer DCHP OFFER or DHCP ACK messages in this group of messages, it is determined that downlink packets are lost.

[0054] When it is determined that the abnormal ONU service interaction is caused by abnormal service interaction, the number of adjacent upstream and downstream messages in the protocol interaction information corresponding to the ONU port is obtained and the number of upstream and downstream messages is compared. If the number of downstream messages is greater than the number of upstream messages, it is determined that the ONU upstream message is abnormally lost; if the number of upstream messages is greater than the number of downstream messages, it is determined that the ONU downstream message is abnormally lost.

[0055] Alternatively, when it is determined that the abnormal service interaction is caused by the PON service, the number of adjacent upstream and downstream messages in the protocol interaction information corresponding to the PON port is obtained, and the number of upstream messages is compared with the number of downstream messages. If the number of downstream messages is greater than the number of upstream messages, it is determined that the PON upstream message is abnormally lost; if the number of upstream messages is greater than the number of downstream messages, it is determined that the PON downstream message is abnormally lost.

[0056] Alternatively, when it is determined that the abnormal service interaction is caused by the PON line card service abnormality, the number of adjacent uplink messages and downlink messages in the protocol interaction information corresponding to the PON line card is obtained, and the number of uplink messages is compared with the number of downlink messages. If the number of downlink messages is greater than the number of uplink messages, it is determined that the PON line card has abnormal uplink message loss; if the number of uplink messages is greater than the number of downlink messages, it is determined that the PON line card has abnormal downlink message loss.

[0057] Alternatively, when it is determined that the abnormal service interaction is caused by the OLT service abnormality, the number of adjacent upstream messages and downstream messages in the protocol interaction information corresponding to the OLT is obtained, and the number of upstream messages is compared with the number of downstream messages. If the number of downstream messages is greater than the number of upstream messages, it is determined that the OLT upstream message is abnormally lost; if the number of upstream messages is greater than the number of downstream messages, it is determined that the OLT downstream message is abnormally lost.

[0058] In this embodiment of the present invention, the abnormality of a service is determined by the number of sessions associated with the service's session number. The type of service anomaly and the cause of the anomaly are then determined based on the protocol interaction information recorded by the physical or logical port. This allows for the identification of Layer 2 protocol interactions by monitoring the changes and number of session numbers. Furthermore, the fault is characterized and diagnosed by comparing the number of protocol interaction messages. This effectively detects and efficiently locates Layer 2 service status in point-to-multipoint network devices, while achieving low detection costs and high compatibility.

[0059] See also Figure 5 , Figure 5 This is a schematic block diagram of the structure of a communication device provided by an embodiment of the present invention.

[0060] The communication equipment includes a second-layer communication equipment, which includes a PON OLT device. The PON OLT device includes an OLT (Optical Line Terminal), an ODN (Optical Distribution Network), and an ONU (ONT Optical Network Unit, or Optical Network Terminal). The number of ONUs can be multiple.

[0061] Exemplarily, the base station further includes a processor and a memory, where the memory is used to store computer programs.

[0062] The processor is configured to execute a computer program and implement the aforementioned layer 2 service status detection method provided by an embodiment of the present invention when executing the computer program.

[0063] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0064] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor implements any one of the layer 2 service status detection methods provided in the embodiments of the present invention.

[0065] It will be understood by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0066] As is well known to those skilled in the art, the term computer-readable storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically contains computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0067] For example, the computer-readable storage medium may be an internal storage unit of the electronic device of the aforementioned embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the electronic device.

[0068] The electronic devices and computer-readable storage media provided in the aforementioned embodiments convert the acquired artificial intelligence model into a contract to obtain a corresponding smart contract, which is then deployed on a blockchain. By converting the artificial intelligence model into a smart contract, the embodiments of the present invention can smoothly deploy the smart contract on a blockchain network, completing the deployment of the artificial intelligence model into a smart contract on the blockchain. This ensures the automation of the data inference process, making the entire process traceable and verifiable, while also ensuring the security of data, models, and transactions between two or more users.

[0069] The above are only specific implementations of the embodiments of the present invention, but the scope of protection of the embodiments of the present invention is not limited to them. Any person skilled in the art can easily conceive of various equivalent modifications or replacements within the technical scope disclosed in the embodiments of the present invention, and such modifications or replacements should be included in the scope of protection of the embodiments of the present invention. Therefore, the scope of protection of the embodiments of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for detecting a Layer 2 service state, the method comprising: Determine the number of sessions corresponding to the session number of the Layer 2 service, and determine whether the status of the Layer 2 service is abnormal based on the number of sessions; If it is determined that the state of the layer 2 service is abnormal, an abnormal warning message is sent; The determining, according to the number of sessions, whether the state of the layer 2 service is abnormal includes: Determining a first preset threshold value of the session number; If the number of sessions is greater than the first preset threshold, determining that the state of the layer 2 service is abnormal; The determining of the first preset threshold of the session number includes: Obtaining service protocol interaction parameters for the Layer 2 service, the service protocol interaction parameters including the number of service MAC address changes and the number of ONU state changes; A first preset threshold value of the session number is determined according to the service protocol interaction parameter.

2. The method for detecting layer 2 service status according to claim 1, wherein: After determining that the state of the layer 2 service is abnormal, the method further includes: Obtaining protocol interaction information of the layer 2 service; Determine the abnormal state type of the layer 2 service according to the protocol interaction information and the number of sessions.

3. The method for detecting layer 2 service status according to claim 2, wherein: The protocol interaction information includes the number of protocol interaction start protocol messages, and determining the abnormal state type of the layer 2 service according to the protocol interaction information and the number of sessions includes: Determining a difference between the number of protocol interaction start protocol messages and the number of sessions, and determining a second preset threshold for the layer 2 service; If the difference value is greater than the second preset threshold, determining that the state abnormality type of the layer 2 service is a service interaction abnormality; If the difference value is less than or equal to the second preset threshold, it is determined that the state abnormality type of the two-layer service is an abnormality of the hardware and software forwarding module related to the physical port / logical port or the terminal, link or external device corresponding to the physical port / logical port.

4. The method for detecting layer 2 service status according to claim 3, wherein: The service interaction abnormality includes abnormal packet loss, and the abnormal packet loss includes abnormal uplink packet loss and abnormal downlink packet loss; The determining that the abnormal state type of the layer 2 service is the service interaction abnormality includes: Obtaining the number of adjacent uplink messages and downlink messages in the protocol interaction information; According to the number of uplink messages and the number of downlink messages, it is determined whether the abnormal packet loss of the layer 2 service is abnormal uplink packet loss or abnormal downlink packet loss.

5. The method for detecting layer 2 service status according to claim 2, wherein: Different types of abnormal status correspond to different abnormal warning information, and sending abnormal warning information includes: Determine corresponding abnormal warning information according to the abnormal state type, and send the corresponding abnormal warning information.

6. The method for detecting layer 2 service status according to claim 1, wherein: Determining the number of Layer 2 service sessions includes: Detecting a protocol message of a layer 2 service and obtaining a session number in the protocol message; The number of sessions associated with the session number is determined based on the session number and previously recorded session numbers.

7. A communication device comprising a memory and a processor, wherein the memory is used to store a computer program; The processor is configured to execute the computer program and implement the steps of the layer 2 service status detection method according to any one of claims 1 to 6 when executing the computer program.

8. A computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the Layer 2 service status detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Link detection message processing method, apparatus and device, and storage medium

    CN109672545A