Data detection method and apparatus, EasyMesh network system, communication device, and storage medium
By receiving and processing loop detection messages in the EasyMesh network, judging the sending device identification and receiving port type, and determining the detection results, the loop detection gap in the EasyMesh network is solved and the network is unobstructed.
Patent Information
- Application Number
- CN202310647479.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-06-02
AI Technical Summary
In the EasyMesh scenario, existing technologies do not have an effective method to detect whether a loop occurs in the network, causing network paralysis.
By receiving each loop detection message, generating a loop detection message according to the sending device identifier in each loop detection message, obtaining the receiving device identifier, judging the receiving condition, obtaining the receiving port type, determining the interface type, and determining the detection result.
The patent implements a loop detection method by using preset receiving conditions and the sending device identifier in the loop detection message, which expands the scope of use of loop detection and solves the loop phenomenon detection in the EasyMesh scenario.
Smart Images

Figure CN116566854B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and in particular to a data detection method and device, an EasyMesh network, a communication device, a storage medium and a computer program product. BACKGROUND
[0002] At present, a home network generally adopts an EasyMesh (a wireless mesh network system based on a wireless fidelity network) specification to ensure intercommunication between wireless products. However, when a user misoperation or self-switching of an uplink mode of an AP (wireless access point) product occurs, a loop phenomenon occurs in a LAN (local area network) and a WiFi (wireless fidelity), and further causes paralysis of the entire network.
[0003] In order to ensure smoothness of the network, it is necessary to detect whether the loop phenomenon occurs in the home network in the EasyMesh scenario, so as to avoid causing paralysis of the entire network. However, at present, there is no method for detecting whether the loop phenomenon occurs in the network in the EasyMesh scenario. SUMMARY
[0004] Embodiments of the present application provide a data detection method and device, an EasyMesh network, a communication device, a storage medium and a computer program product, and implement detection of the loop phenomenon in the EasyMesh scenario.
[0005] In a first aspect, the present application provides a data detection method. The method comprises:
[0006] receiving each loop detection message, and for each loop detection message, judging whether the loop detection message meets a preset receiving condition according to a sending device identifier contained in the loop detection message;
[0007] if the loop detection message meets the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection message;
[0008] determining a detection result based on a sending port type in the loop detection message and the receiving port type.
[0009] In one of the embodiments, before the receiving each loop detection message, and for each loop detection message, judging whether the loop detection message meets a preset receiving condition according to a sending device identifier contained in the loop detection message, the method further comprises:
[0010] generating a first communication message according to the sending device identifier, a sending port type, a sending port rate and a sending port number;
[0011] constructing a loop detection packet according to the loop detection identifier and the first communication packet;
[0012] sending the loop detection packet to a wireless port and a wired port corresponding to the proxy gateway device according to a preset time period.
[0013] In one embodiment, the method further comprises:
[0014] obtaining a first device identifier of the proxy gateway device;
[0015] analyzing each loop detection packet to obtain a sending device identifier contained in the loop detection packet;
[0016] determining whether the first device identifier and the sending device identifier are the same;
[0017] if the first device identifier and the sending device identifier are the same, determining that the loop detection packet meets a preset receiving condition;
[0018] if the first device identifier and the sending device identifier are not the same, determining that the loop detection packet does not meet the receiving condition.
[0019] In one embodiment, the method further comprises:
[0020] if the loop detection packet does not meet the receiving condition, discarding the loop detection packet;
[0021] if none of the loop detection packets meets the receiving condition within a preset time period, determining that the proxy gateway device does not have a loop, and obtaining a detection result.
[0022] In one embodiment, the method further comprises:
[0023] determining whether the receiving port type and the sending port type in the loop detection packet are of the same type;
[0024] if the receiving port type and the sending port type are of the same type, determining that the proxy gateway device does not have a loop, and obtaining a detection result;
[0025] If the receiving port type and the sending port type are not the same type, it is determined that the proxy gateway device has a loop, and a detection result is obtained.
[0026] In one of the embodiments, after the detection result is determined based on the sending port type and the receiving port type in the loop detection packet, the method further comprises:
[0027] If the detection result is that the proxy gateway device has a loop, the port rate of a wired port and the port rate of a wireless port corresponding to the proxy gateway device are obtained respectively;
[0028] Based on the port rate of the wired port and the port rate of the wireless port, a port to be closed is determined.
[0029] In a second aspect, the application further provides a data detection device, which comprises:
[0030] A judging module is configured to receive each loop detection packet, and for each loop detection packet, determine whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet.
[0031] An obtaining module is configured to, if the loop detection packet meets the receiving condition, obtain a receiving port type corresponding to a receiving port receiving the loop detection packet.
[0032] A determining module is configured to determine a detection result based on a sending port type in the loop detection packet and the receiving port type.
[0033] In a third aspect, the application provides an EasyMesh network, which comprises a master gateway device and a plurality of proxy gateway devices.
[0034] The master gateway device is configured to receive loop detection packets sent by each of the proxy gateway devices, and broadcast the loop detection packets to each of the proxy gateway devices.
[0035] The proxy gateway device is configured to receive each loop detection packet, and for each loop detection packet, determine whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet. If the loop detection packet meets the receiving condition, a receiving port type corresponding to a receiving port receiving the loop detection packet is obtained. A detection result is determined based on a sending port type in the loop detection packet and the receiving port type.
[0036] In a fourth aspect, the present application provides a communication device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0037] receiving each loop detection packet, and for each loop detection packet, judging whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet;
[0038] if the loop detection packet meets the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection packet;
[0039] determining a detection result based on the sending port type in the loop detection packet and the receiving port type.
[0040] In a fifth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0041] receiving each loop detection packet, and for each loop detection packet, judging whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet;
[0042] if the loop detection packet meets the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection packet;
[0043] determining a detection result based on the sending port type in the loop detection packet and the receiving port type.
[0044] In a sixth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to implement the following steps:
[0045] receiving each loop detection packet, and for each loop detection packet, judging whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet;
[0046] if the loop detection packet meets the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection packet;
[0047] determining a detection result based on the sending port type in the loop detection packet and the receiving port type.
[0048] The data detection method, device, communication device, storage medium and computer program product receive loop detection messages, and for each loop detection message, determine whether the loop detection message meets a preset receiving condition according to a sending device identifier contained in the loop detection message; if the loop detection message meets the receiving condition, obtain a receiving port type corresponding to a receiving port receiving the loop detection message; and determine a detection result based on a sending port type in the loop detection message and the receiving port type. The method detects each loop detection message through the preset receiving condition and the sending port type in the loop detection message, and obtains a detection result, which can reflect whether a loop phenomenon occurs in the proxy gateway device, thereby achieving detection of the loop phenomenon in an EasyMesh scenario. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 An application environment diagram of a data detection method in an embodiment;
[0050] Figure 2 A flowchart of a data detection method in an embodiment;
[0051] Figure 3 A flowchart of a step of sending a loop detection message in an embodiment;
[0052] Figure 4 A flowchart of a step of determining that a loop detection message meets a receiving condition in an embodiment;
[0053] Figure 5 A flowchart of a step of determining that a loop detection message does not meet a receiving condition in an embodiment;
[0054] Figure 6 A flowchart of a step of determining a detection result in an embodiment;
[0055] Figure 7 A flowchart of a step of determining a port to be closed in an embodiment;
[0056] Figure 8 A diagram of reasons for loop formation in a network in an embodiment;
[0057] Figure 9 A flowchart of a step of transmitting and receiving messages in a data detection process in an embodiment;
[0058] Figure 10 A block diagram of a data detection device in an embodiment;
[0059] Figure 11 An internal structure diagram of a data detection device in an embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0061] Figure 1 This is a schematic diagram of an application scenario of data detection provided by an embodiment of the present application. Figure 1 As shown, the scenario is an EasyMesh network 100, which includes multiple proxy gateway devices 110 and a master gateway device 120. Data is transmitted between the proxy gateway device 110 and the master gateway device 120 through the network, and data is transmitted between the multiple proxy gateway devices 110 through the network.
[0062] The master gateway device 120 (Controller) in the EasyMesh network provides other EasyMesh-enabled devices with access to its network. The master gateway device 120 receives network metrics and device capability information, and through certain analysis and calculations, unifies the operation of the entire Mesh network functions, such as channels, topology, and client roaming. The master gateway device 120 also sends control commands to the proxy gateway device 110 to improve load balancing in the network or control the management of other functions.
[0063] In the EasyMesh network, there are multiple agent gateway devices 110 (Agents), which need to execute commands sent by the master gateway device 120 and periodically report network metrics and capability information to the master gateway device 120. A certain agent gateway device 110 also provides a wireless access interface relative to other agent gateway devices 110, that is, other agent gateway devices 110 connect to the master gateway device 120 through this agent gateway device 110.
[0064] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0065] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0066] In one embodiment, Figure 2 As shown, a data detection method is provided, which is applied toFigure 1 The proxy gateway device 110 in the network shown in FIG. 1 (hereinafter referred to as the proxy gateway device) is taken as an example for illustration, and includes the following steps:
[0067] In step 202, each loop detection packet is received, and for each loop detection packet, it is determined whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet.
[0068] The loop detection packet contains a sending device identifier of a device sending the loop detection packet. The proxy gateway device is preset with the receiving condition.
[0069] In implementation, within a preset time period, the proxy gateway device receives multiple loop detection packets. Then, the proxy gateway device determines, for each of the loop detection packets, whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet and a first device identifier corresponding to the proxy gateway device.
[0070] In an optional embodiment, the proxy gateway device guarantees the priority processing of the loop detection packet based on QoS (Quality of Service).
[0071] In step 204, if the loop detection packet meets the receiving condition, a receiving port type corresponding to a receiving port receiving the loop detection packet is obtained.
[0072] In implementation, in the case where the loop detection packet meets the receiving condition, the proxy gateway device obtains a receiving port type corresponding to a receiving port receiving the loop detection packet.
[0073] In step 206, a detection result is determined based on the sending port type and the receiving port type in the loop detection packet.
[0074] In implementation, the proxy gateway device determines whether the sending port type and the receiving port type in the loop detection packet are of the same type to obtain a determination result. Then, the proxy gateway device determines the detection result based on the determination result.
[0075] In the above data detection method, each loop detection packet is detected through the preset receiving condition and the sending port type in the loop detection packet to obtain a detection result, which can reflect whether the proxy gateway device has a loop phenomenon, and the detection of the loop phenomenon in the EasyMesh scenario is realized.
[0076] In an embodiment, before receiving each loop detection packet, the proxy gateway device needs to send a loop detection device first. As shown in FIG. 2, before step 202 is performed, the specific processing process of the data detection method further includes: Figure 3
[0077] In step 302, a first communication message is generated according to the sending device identifier, the sending port type, the sending port rate and the sending port number.
[0078] The sending device identifier is the device identifier of the proxy gateway device. The sending port type is the port type of the sending port for sending the loop detection message. The sending port number is the port number of the sending port for sending the loop detection message. The sending port rate is the maximum rate of the sending port for transmitting data.
[0079] In implementation, the proxy gateway device generates the first communication message based on the sending device identifier, the sending port type, the sending port rate and the sending port number.
[0080] Optionally, the sending device identifier can be the MAC address of the proxy gateway device or the SN of the proxy gateway device, and the present embodiment does not limit the sending device identifier.
[0081] Optionally, the first communication message can include but is not limited to the sending device identifier, the sending port type, the sending port rate and the sending port number, and the present embodiment does not limit the quantity and content of the information included in the first communication message.
[0082] In step 304, a loop detection message is constructed according to the loop detection identifier and the first communication message.
[0083] The loop detection identifier is the Relay Indicator bit defined in the P1905.1 protocol of the Easymesh, and the value of the Relay Indicator bit is 1.
[0084] In implementation, the proxy gateway device constructs the loop detection message according to the loop detection identifier, the octet number in the TLV (Tag-Length-Value) and the first communication message in the message format of the TLV.
[0085] In step 306, the loop detection message is sent to the wireless port and the wired port corresponding to the proxy gateway device according to a preset time period.
[0086] In practice, a time period is pre-set in the proxy gateway device. The proxy gateway device sends a loop detection message to the wireless port and wired port corresponding to the proxy gateway device according to the preset time period, and then sends the loop detection message to the master gateway device via the wireless port or wired port. The wireless port is a WiFi (Wireless Fidelity) port, and the wired port is a LAN port (Local Area Network interface) or an Ethernet port (Ethernet interface).
[0087] Optionally, the time period is determined based on the properties and detection requirements of the proxy gateway device, and the embodiment of the present application does not limit the time period.
[0088] In this embodiment, a loop detection message is constructed and sent based on the sending device identifier, the sending port type, and the loop detection identifier. Based on the form of the loop detection message, the loop detection message is sent through the WiFi port, which can implement loop detection in wireless scenarios and expand the scope of application of the loop detection method.
[0089] In one embodiment, Figure 4 As shown, the specific processing process of determining whether the loop detection message meets the preset receiving condition for each loop detection message in step 202 according to the sending device identifier contained in the loop detection message includes:
[0090] Step 402: Obtain a first device identifier of the proxy gateway device.
[0091] In an implementation, the proxy gateway device obtains the first device identification of the proxy gateway device.
[0092] Optionally, the first device identifier may be a MAC address of the proxy gateway device or a SN of the proxy gateway device. The embodiment of the present application does not limit the first device identifier.
[0093] Step 404: parse each loop detection message to obtain the sending device identifier contained in the loop detection message.
[0094] In implementation, the proxy gateway device parses each loop detection message in each loop detection message to obtain the sending device identifier contained in the loop detection message.
[0095] Step 406: Determine whether the first device identifier and the sending device identifier are the same.
[0096] In an implementation, the proxy gateway device determines whether the first device identifier and the sending device identifier are the same.
[0097] In an optional embodiment, the first device identifier is a first MAC address of the proxy gateway device, and the sending device identifier is a sending MAC address of the proxy gateway device sending the loop detection message. The proxy gateway device determines whether the first MAC address and the sending MAC address are the same.
[0098] Step 408: If the first device identifier and the sending device identifier are the same, it is determined that the loop detection message meets the preset receiving condition.
[0099] In the embodiment, if the first device identifier and the sending device identifier are the same, the proxy gateway device determines that the loop detection message meets the preset receiving condition.
[0100] In the embodiment, if the first device identifier and the sending device identifier are the same, the proxy gateway device determines that the loop detection message meets the preset receiving condition.
[0101] Step 410: If the first device identifier and the sending device identifier are not the same, it is determined that the loop detection message does not meet the receiving condition.
[0102] In the embodiment, if the first device identifier and the sending device identifier are not the same, the proxy gateway device determines that the loop detection message does not meet the receiving condition.
[0103] In the embodiment, whether the loop detection message meets the receiving condition is determined by the sending device identifier in the loop detection message and the first device identifier of the proxy gateway device, which realizes the determination of whether the loop detection message is sent by the proxy gateway device, and facilitates the subsequent determination of whether the proxy gateway device has a loop.
[0104] In an embodiment, if the loop detection message does not meet the receiving condition, the loop detection message is discarded, and whether the proxy gateway device has a loop is determined within a preset time period. As shown in FIG. 2, after step 202 is performed, the specific processing process of the data detection method further includes: Figure 5
[0105] Step 502: If the loop detection message does not meet the receiving condition, the loop detection message is discarded.
[0106] In the embodiment, if the loop detection message does not meet the preset receiving condition, the proxy gateway device discards the loop detection message.
[0107] Step 504: If none of the loop detection messages meets the receiving condition within the preset time period, it is determined that the proxy gateway device does not have a loop, and a detection result is obtained.
[0108] In the implementation, the proxy gateway device receives multiple loop detection packets in a preset time period. If none of the loop detection packets satisfies the preset receiving condition, the proxy gateway device determines that there is no loop in the transmission path to which the proxy gateway device belongs.
[0109] In the embodiment, the loop detection packet is discarded when the loop detection packet does not satisfy the receiving condition, so that the processing rate of the data detection method is improved. In addition, when none of the loop detection packets satisfies the receiving condition in the preset time period, it is determined that the proxy gateway device has no loop, so that the loop phenomenon in the EasyMesh scenario is detected.
[0110] In one embodiment, as shown in FIG. 2, the specific processing process of step 206 includes the following steps. Figure 6
[0111] Step 602: Determine whether the receiving port type and the sending port type in the loop detection packet are of the same type.
[0112] In the implementation, the proxy gateway device determines whether the receiving port type and the sending port type in the loop detection packet are of the same type.
[0113] Step 604: If the receiving port type and the sending port type are of the same type, it is determined that the proxy gateway device has no loop, and a detection result is obtained.
[0114] In the implementation, if the receiving port type and the sending port type are of the same type, the proxy gateway device determines that there is no loop in the transmission path to which the proxy gateway device belongs, and takes that the proxy gateway device has no loop as the detection result.
[0115] Step 606: If the receiving port type and the sending port type are not of the same type, it is determined that the proxy gateway device has a loop, and a detection result is obtained.
[0116] In the implementation, if the receiving port type and the sending port type are not of the same type, the proxy gateway device determines that there is a loop in the transmission path to which the proxy gateway device belongs, and takes that the proxy gateway device has a loop as the detection result.
[0117] In the embodiment, when the loop detection packet satisfies the receiving condition, the detection result is determined based on the receiving port type and the sending port type in the loop detection packet, so that the loop phenomenon in the EasyMesh scenario is detected.
[0118] In one embodiment, if the detection result is that the proxy gateway device has a loop, the port to be closed needs to be determined according to the port rate of the wired port and the wireless port of the proxy gateway. As shown in FIG. 2, after step 206 is executed, the specific processing process of the data detection method further includes the following steps. Figure 7
[0119] In step 702, if the detection result is that the proxy gateway device has a loop, the port rate of the wired port and the port rate of the wireless port corresponding to the proxy gateway device are obtained respectively.
[0120] In implementation, if the detection result is that the proxy gateway device has a loop, the proxy gateway device determines the transmission path of the loop detection message according to the loop detection message. Then, the proxy gateway device obtains the port rate of the wired port and the wireless port corresponding to each proxy gateway device on the transmission path.
[0121] In step 704, based on the port rate of the wired port and the port rate of the wireless port, the port to be closed is determined.
[0122] In implementation, the proxy gateway device determines the port to be closed according to the port rate of the wired port and the port rate of the wireless port.
[0123] In an optional embodiment, the proxy gateway device determines the target closing port with the highest port rate among the wired port and the wireless port. Then, the proxy gateway device closes the target closing port.
[0124] In an optional embodiment, the proxy gateway device determines the wired port and the wireless port corresponding to each proxy gateway device on the transmission path as the port to be closed. Then, the proxy gateway device constructs feedback information according to the port to be closed and the port rate of the port to be closed, and feeds back the feedback information to the target user. In response to the determination closing operation of the target user, the target closing port is obtained, and the target closing port is closed.
[0125] In this embodiment, in the case of loop, the port to be closed is determined based on the rate of the wired port and the rate of the wireless port, which facilitates subsequent closing of the target closing port in the port to be closed, and solves the loop phenomenon in the EasyMesh scenario.
[0126] In an embodiment, a network 100 is provided, which includes a master gateway device 120 and a plurality of proxy gateway devices 110.
[0127] The master gateway device 120 is configured to receive the loop detection message sent by each proxy gateway device, and broadcast the loop detection message to each proxy gateway device.
[0128] In implementation, the master gateway device 120 receives the loop detection message sent by each proxy gateway device 110 after completing the election of the master proxy gateway device. Then, the master gateway device 120 broadcasts the loop detection message.
[0129] In an optional embodiment, before the proxy gateway devices 110 in the network 100 execute the data detection method, the master gateway device needs to elect a master proxy gateway device from among the proxy gateway devices 110 .
[0130] The proxy gateway device 110 is used to receive each loop detection message and, for each loop detection message, determine whether the loop detection message meets a preset receiving condition based on the sending device identifier contained in the loop detection message; if the loop detection message meets the receiving condition, obtain the receiving port type corresponding to the receiving port that receives the loop detection message; and determine the detection result based on the sending port type and the receiving port type in the loop detection message.
[0131] In practice, the specific processing process of the proxy gateway device 110 has been specifically described in each embodiment of the above-mentioned data detection method, and will not be repeated here in the embodiment of the present application.
[0132] In this embodiment, the master gateway device broadcasts a loop detection message, and then the proxy gateway device receives and detects each loop detection message through the preset receiving conditions and the sending port type in the loop detection message to obtain a detection result. The detection result can reflect whether a loop phenomenon occurs in the proxy gateway device, thereby realizing the detection of loop phenomena in the EasyMesh scenario.
[0133] In one embodiment, Figure 8 As shown, Figure 8 This is a diagram showing the causes of loops in a network. Figure 8 In this example, controller is the master gateway device, agent is the proxy gateway device, eth is the wired network port, Wi-Fi is the wireless network port, and AP is the access point (proxy gateway device). When both eth and Wi-Fi are connected to the master gateway device, a loop occurs between the AP and the master gateway device, leading to a broadcast storm and making the entire network unavailable.
[0134] In one embodiment, Figure 9 As shown, Figure 9 This diagram illustrates the message sending and receiving process during data detection. The Controller is the master gateway device, the Agent is the proxy gateway device, and the P1905 ringcheck bpdu is the loop detection message. The master gateway device elects a master proxy gateway device from among the proxy gateway devices. After the election, the proxy gateway devices send P1905.1 loop detection messages (loop detection messages) to the wireless and wired ports at a preset interval. These messages then transmit loop detection information to the master gateway device through the wired and wireless ports. The master gateway device then broadcasts the loop detection message to each proxy gateway device based on the loop detection identifier in the message.
[0135] It should be understood that although Figures 2 to 7 The steps in the flowchart of FIG. 10 are not necessarily performed in the order indicated by the arrows. Unless specifically stated, the order of performance of the steps can be modified, and the steps can be performed in an order other than that shown. Moreover, Figures 2 to 7 At least some of the steps in the flowchart of FIG. 10 can include multiple steps or multiple stages, which can not necessarily be performed in the same order as shown, and can be performed at least in part concurrently or in different orders.
[0136] In one embodiment, as shown in FIG. 10, a data detection apparatus 1000 is provided, comprising: a judging module 1001, an obtaining module 1002, and a determining module 1003, wherein: Figure 10
[0137] The judging module 1001 is configured to receive loop detection packets, and for each loop detection packet, judge whether the loop detection packet satisfies a preset receiving condition according to a sending device identifier contained in the loop detection packet.
[0138] The obtaining module 1002 is configured to, if the loop detection packet satisfies the receiving condition, obtain a receiving port type corresponding to a receiving port of the received loop detection packet.
[0139] The determining module 1003 is configured to determine a detection result based on a sending port type and the receiving port type in the loop detection packet.
[0140] In an example embodiment, before the judging module 1001 is executed, the data detection apparatus 1000 further comprises:
[0141] A generating module is configured to generate a first communication packet according to the sending device identifier, the sending port type, a sending port rate, and a sending port number.
[0142] A first constructing module is configured to construct the loop detection packet according to a loop detection identifier and the first communication packet.
[0143] A sending module is configured to send the loop detection packet to a wireless port and a wired port corresponding to the proxy gateway device according to a preset time period.
[0144] In an example embodiment, the judging module 1001 comprises a first obtaining sub-module and a first judging sub-module. The judging sub-module comprises:
[0145] A second obtaining sub-module is configured to obtain a first device identifier of the proxy gateway device.
[0146] The parsing sub-module is configured to parse the loop detection packet to obtain a sending device identifier contained in the loop detection packet.
[0147] The second judging sub-module is configured to judge whether the first device identifier and the sending device identifier are the same.
[0148] The first determining sub-module is configured to determine that the loop detection packet meets the preset receiving condition if the first device identifier and the sending device identifier are the same.
[0149] The second determining sub-module is configured to determine that the loop detection packet does not meet the receiving condition if the first device identifier and the sending device identifier are not the same.
[0150] In an example embodiment, after the judging module 1001 is executed, the data detection apparatus 1000 further comprises:
[0151] The discarding sub-module is configured to discard the loop detection packet if the loop detection packet does not meet the receiving condition.
[0152] The second determining module is configured to determine that the proxy gateway device does not have a loop and obtain a detection result if each loop detection packet does not meet the receiving condition within a preset time period.
[0153] In an example embodiment, the determining module 1003 comprises:
[0154] The third judging sub-module is configured to judge whether the receiving port type and the sending port type in the loop detection packet are the same type.
[0155] The third determining sub-module is configured to determine that the proxy gateway device does not have a loop and obtain a detection result if the receiving port type and the sending port type are the same type.
[0156] The fourth determining sub-module is configured to determine that the proxy gateway device has a loop and obtain a detection result if the receiving port type and the sending port type are not the same type.
[0157] In an example embodiment, after the determining module 1003 is executed, the data detection apparatus 1000 further comprises:
[0158] The second obtaining module is configured to obtain a port rate of a wired port and a port rate of a wireless port corresponding to the proxy gateway device respectively if the detection result is that the proxy gateway device has a loop.
[0159] The third determining module is configured to determine a to-be-closed port based on the port rate of the wired port and the port rate of the wireless port.
[0160] In an example embodiment, a network is provided, which includes a master gateway device and a plurality of proxy gateway devices:
[0161] The master gateway device is configured to receive loop detection packets sent by each proxy gateway device and broadcast the loop detection packets to each proxy gateway device.
[0162] The proxy gateway device is configured to receive each loop detection packet and, for each loop detection packet, determine whether the loop detection packet satisfies a preset receiving condition according to a sending device identifier contained in the loop detection packet; if the loop detection packet satisfies the receiving condition, obtain a receiving port type corresponding to a receiving port of the loop detection packet; and determine a detection result based on a sending port type and the receiving port type in the loop detection packet.
[0163] The specific limitations of the data detection apparatus can refer to the limitations of the data detection method described above, which will not be repeated here. Each module in the above data detection apparatus can be realized by software, hardware and their combination in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in the form of software, so as to call and execute the operations corresponding to the above modules by the processor.
[0164] Figure 11 The access network device provided in the embodiment of the present application is shown in a structural schematic diagram. The access network device can include a receiver 1101, a memory 1102, a processor 1103, at least one communication bus 1104, and a transmitter 1105. The communication bus 1104 is used to realize the communication connection between the elements. The memory 1102 can contain a high-speed RAM memory and can also include a non-volatile storage NVM, such as at least one disk memory. The memory 1102 can store various programs for completing various processing functions and implementing the method steps of the embodiment. In the embodiment, the transmitter 1105 can be a radio frequency processing module or a baseband processing module in the access network device, and the receiver 1101 can also be a radio frequency processing module or a baseband processing module in the access network device. The transmitter 1105 and the receiver 1101 can be integrated together to realize a transceiver. The transmitter 1105 and the receiver 1101 can be coupled to the processor 1103, which can realize the receiving or transmitting action under the indication or control action of the processor 33.
[0165] In the embodiment, the transmitter 1105 is configured to send loop detection packets.
[0166] The receiver 1101 is configured to receive each loop detection packet.
[0167] The processor 1103 is configured to, for each loop detection packet, determine whether the loop detection packet meets a preset receiving condition according to a sending device identifier contained in the loop detection packet; if the loop detection packet meets the receiving condition, obtain a receiving port type corresponding to a receiving port receiving the loop detection packet; and determine a detection result based on a sending port type and the receiving port type in the loop detection packet.
[0168] In an embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0169] In an embodiment, a computer program product is provided, and the computer program product includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0170] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the computer program can include the processes in the above method embodiments. Any reference to a memory, storage, database or other medium in each embodiment provided in the present application can include at least one of a non-volatile memory and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory or an optical memory. The volatile memory can include a random access memory (RAM) or an external cache memory. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM).
[0171] Each technical feature of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist, it should be considered that the combinations are within the scope of the present application.
[0172] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific and detailed manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are all within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.
Claims
1. A data detection method characterized by, The data detection method is applied to a proxy gateway device in an EasyMesh network system, and the method comprises: generating a first communication message according to a sending device identifier, a sending port type, a sending port rate, and a sending port number; constructing a loop detection message according to a loop detection identifier and the first communication message; sending the loop detection message to a wireless port and a wired port corresponding to the proxy gateway device according to a preset time period; receiving each loop detection message, and for each loop detection message, judging whether the loop detection message meets a preset receiving condition according to a sending device identifier contained in the loop detection message; if the loop detection message meets the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection message; determining a detection result based on a sending port type in the loop detection message and the receiving port type. The method further comprises: if the loop detection message does not meet the receiving condition, discarding the loop detection message; if none of the loop detection messages meets the receiving condition within a preset time period, determining that the proxy gateway device does not have a loop, and obtaining a detection result. The sending device identifier is a media access control address of the proxy gateway device or a product serial number of the proxy gateway device. The method further comprises: if the loop detection message does not meet the receiving condition, discarding the loop detection message; if none of the loop detection messages meets the receiving condition within a preset time period, determining that the proxy gateway device does not have a loop, and obtaining a detection result. The sending device identifier is a media access control address of the proxy gateway device or a product serial number of the proxy gateway device. The method further comprises: if the loop detection message does not meet the receiving condition, discarding the loop detection message; 2. The method of claim 1, wherein, if none of the loop detection messages meets the receiving condition within a preset time period, determining that the proxy gateway device does not have a loop, and obtaining a detection result.
3. The method of claim 1, wherein, The value of the loop detection identifier is 1. The method further comprises:
4. The method of claim 1, wherein, if the loop detection message does not meet the receiving condition, discarding the loop detection message; 5. The method of claim 1, wherein, if none of the loop detection messages meets the receiving condition within a preset time period, determining that the proxy gateway device does not have a loop, and obtaining a detection result. 6. The method of claim 1, wherein, The method further includes, after determining the detection result based on the sending port type and the receiving port type in the loop detection message: If the detection result is that the proxy gateway device has a loop, the port rate of the wired port and the port rate of the wireless port corresponding to the proxy gateway device are acquired respectively; Based on the port rate of the wired port and the port rate of the wireless port, a to-be-closed port is determined.
7. A data detection device characterized by comprising: The data detection device is applied to a proxy gateway device in an EasyMesh network system, and the device includes: A generation module is configured to generate a first communication message according to a sending device identifier, a sending port type, a sending port rate, and a sending port number; A first construction module is configured to construct a loop detection message according to a loop detection identifier and the first communication message; A sending module is configured to send the loop detection message to a wireless port and a wired port corresponding to the proxy gateway device according to a preset time period; A judgment module is configured to receive each loop detection message and, for each loop detection message, judge whether the loop detection message meets a preset receiving condition according to a sending device identifier contained in the loop detection message; An acquisition module is configured to acquire a receiving port type corresponding to a receiving port receiving the loop detection message if the loop detection message meets the receiving condition; A determination module is configured to determine a detection result based on the sending port type in the loop detection message and the receiving port type; The judgment module is specifically configured to acquire a first device identifier of the proxy gateway device, analyze the loop detection message to obtain a sending device identifier contained in the loop detection message for each loop detection message, judge whether the first device identifier and the sending device identifier are the same, determine that the loop detection message meets a preset receiving condition if the first device identifier and the sending device identifier are the same, and determine that the loop detection message does not meet the receiving condition if the first device identifier and the sending device identifier are not the same. The determination module is specifically configured to judge whether the receiving port type and the sending port type in the loop detection message are the same type, determine that the proxy gateway device does not have a loop and obtain a detection result if the receiving port type and the sending port type are the same type, and determine that the proxy gateway device has a loop and obtain a detection result if the receiving port type and the sending port type are not the same type.
8. An EasyMesh network system, characterized by, The EasyMesh network system includes a master gateway device and a plurality of proxy gateway devices; The master gateway device is configured to receive loop detection messages sent by each proxy gateway device and broadcast the loop detection messages to each proxy gateway device; The proxy gateway device is configured to generate a first communication message according to a sending device identifier, a sending port type, a sending port rate, and a sending port number; A loop detection message is constructed according to a loop detection identifier and the first communication message; sending the loop detection message to a wireless port and a wired port corresponding to the proxy gateway device according to a preset time period; receiving each loop detection message, and judging, for each loop detection message, whether the loop detection message satisfies a preset receiving condition according to a sending device identifier contained in the loop detection message; if the loop detection message satisfies the receiving condition, obtaining a receiving port type corresponding to a receiving port receiving the loop detection message; determining a detection result based on a sending port type in the loop detection message and the receiving port type; the judging, for each loop detection message, whether the loop detection message satisfies the preset receiving condition according to the sending device identifier contained in the loop detection message, comprises: obtaining a first device identifier of the proxy gateway device; for each loop detection message, analyzing the loop detection message to obtain the sending device identifier contained in the loop detection message; judging whether the first device identifier and the sending device identifier are the same; if the first device identifier and the sending device identifier are the same, determining that the loop detection message satisfies the preset receiving condition; if the first device identifier and the sending device identifier are not the same, determining that the loop detection message does not satisfy the receiving condition; the determining the detection result based on the sending port type in the loop detection message and the receiving port type, comprises: judging whether the receiving port type and the sending port type in the loop detection message are the same type; if the receiving port type and the sending port type are the same type, determining that the proxy gateway device does not exist loop, and obtaining the detection result; if the receiving port type and the sending port type are not the same type, determining that the proxy gateway device exists loop, and obtaining the detection result.
9. A communication device comprising a memory and a processor, the memory storing a computer program, characterized in that, the processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, the computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
Citation Information
Patent Citations
VLAN-based whole network loop detection method and loop detection equipment
CN101534226A
Return mode management method in EasyMesh networking
CN115278734A