Network equipment automatic cascade management method based on websocket

The automatic cascade management of network devices using websocket simplifies device control by allowing a single main device to manage multiple devices, reducing complexity and improving user convenience.

CN119135503APending Publication Date: 2024-12-13NANJING BALANCE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310690972.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing network device management methods are complex and inefficient for managing multiple devices, failing to meet the needs of complex network applications.

Method used

A method for automatic cascade management of network devices using websocket, where a main device actively establishes connections with other devices, detecting and managing them, and allowing users to manage only the main device for simplified control.

Benefits of technology

Reduces user management complexity and improves convenience by enabling a single-point management of multiple devices through the main device, enhancing user experience and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135503A_ABST
    Figure CN119135503A_ABST
Patent Text Reader

Abstract

The invention discloses a websocket-based network equipment automatic cascade management method, which comprises the following steps of: automatically detecting whether cascade equipment exists or not, automatically creating a cascade equipment management link, and carrying out network equipment cascade management, so that the equipment management efficiency of a user is improved. According to the method, a user only manages one network device (main device), when other devices exist in the network, the main device actively establishes connection with the other devices, and the main device carries out cascade management between the devices, so that the complexity of user management can be greatly reduced, the individual requirements of the user can be met, the convenience of cascade device management is improved, and the user experience is improved. And the use difficulty of a user is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiment of the present invention relates to the field of communication technology, and in particular to a method for automatic cascading management of network devices based on websocket. Background Art

[0002] With the rapid development of network data, network traffic has surged, various complex network applications have emerged, and the management requirements for network equipment have become increasingly higher.

[0003] In the prior art, users usually control multiple network devices at the terminal, manage each network device, and query the device status information. Users need to know the connection status of each device, and the management is complicated, which can no longer meet the needs of complex network applications for network device management. Therefore, the market urgently needs a more convenient cascade management method. Summary of the invention

[0004] In order to meet the personalized needs of users, improve the convenience of cascade device management, and reduce the difficulty of use for users, the present invention provides a method for automatic cascade management of network devices based on websocket in view of the defects of the prior art. The user only manages one network device (main device). When there are other devices in the network, the main device actively establishes a connection with other devices, and the main device performs cascade management between devices, which can greatly reduce the complexity of user management.

[0005] On one hand, the present invention automatically detects whether a cascade device exists, including: Generate device IP address based on device information (device location, device SN number), send multicast message (carrying device IP address, device status information) to specific multicast group; receive messages in specific multicast group, parse message content to obtain cascade device IP address and status information; save and update main device address information; obtain cascade device information.

[0006] Another aspect of the present invention provides automatic creation of a cascade device management link, including: The master device creates a websocket server; the slave device creates a websocket connection request to the master device based on the device status and device IP address obtained by parsing the multicast message; the master device receives the websocket handshake information of the slave device and saves the websocket connection; if the slave device is not online, the master device receives the websocket disconnection information of the slave device and deletes the corresponding websocket connection; if the slave device updates the master device address obtained by parsing the multicast message, the websocket connection is disconnected and a websocket connection request is created to the new master device.

[0007] Another aspect of the present invention automatically manages cascaded devices. It includes: The user queries the connection status of all devices in the network from the master device; the user sends a device operation command to the master device as needed; the master device receives the operation command, determines that the operation object is itself, processes the message, and returns the user's operation result; the master device receives the operation command, determines that the operation object is other slave devices, forwards the message to the slave device, the slave device performs the corresponding operation and returns the operation result; the master device receives the slave device's operation result and forwards the operation result to the user.

[0008] Compared with the prior art, the technical solution of the present invention has the following significant beneficial effects: 1. The user only manages one network device (master device). When there are other devices in the network, the master device actively establishes connections with other devices and performs cascade management between devices, which can greatly reduce the complexity of user management.

[0009] 2. Meet the personalized needs of users, improve the convenience of cascade device management, and reduce the difficulty of use for users. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 The present invention provides an automatic detection cascade device network connection schematic diagram.

[0011] Figure 2 The present invention provides a flowchart of a method for automatically detecting whether a cascade device exists.

[0012] Figure 3 The present invention provides a flowchart of a method for automatically creating a cascade device management link.

[0013] Figure 4 It is a flow chart of a method for automatic cascading management of network devices based on websocket provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0014] In order to make the purpose and technical solution of the present disclosure more clearly understood, the present disclosure is further elaborated in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0015] Figure 1 A flowchart of a method for automatically detecting whether a cascade device exists is provided in an embodiment of the present invention, such as Figure 1 As shown, the method includes: Step 1: Generate a unique network address based on device information (device location / device serial number).

[0016] Step 2: Encapsulate the network address and device status into a data packet and send a multicast message to the specified multicast group.

[0017] Step 3: Monitor the message of the specified multicast group on the port and determine whether the message is correct.

[0018] Step 4: Parse the received multicast message, obtain the cascade device information, and save the main device address.

[0019] This method only needs to detect the cascade device address and establish a websocket connection to automatically implement cascade device management.

[0020] Figure 2 A flowchart of a method for creating a cascade device management link is provided in an embodiment of the present invention, such as Figure 2 As shown, the method includes: Step 1: The master device creates a websocket server and listens to the port.

[0021] Step 2: After the slave device detects the master device address, if it is the first time to detect the master device address, a websocket client connection is created.

[0022] Step 3: If the master device receives the handshake signal from the slave device, it saves the websocket client link.

[0023] Step 4: If the slave device goes offline, the master device receives the slave device websocket disconnection information and deletes the websocket information.

[0024] Step 5: If the slave device updates the master device address obtained by parsing the multicast message, disconnect the websocket connection and create a websocket connection request to the new master device.

[0025] Figure 3 A flow chart of a method for automatic cascading management of network devices based on websocket provided by an embodiment of the present invention, such as Figure 3 As shown, the method includes: Step 1: Each device is connected to the network, and the user queries the connection status of all devices in the network from the main device.

[0026] Step 2: The user sends a device operation command to the main device as needed.

[0027] Step 3: The master device receives the operation command, determines that the operation object is itself, processes the message, and returns the user operation result.

[0028] Step 4: The master device receives the operation command, determines that the operation object is another slave device, forwards the message to the slave device, and the slave device performs the corresponding operation and returns the operation result.

[0029] Step 5: The master device receives the operation result from the slave device and forwards the operation result to the user.

[0030] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily defined to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone, or in any appropriate combination with other aspects disclosed by the present invention.

[0031] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.

Claims

1. A method for automatic cascading management of network devices based on websocket, It is characterized in that It includes automatic detection of network devices to obtain the address of the master device, automatic establishment of a websocket connection between the master and slave devices, and based on the websocket connection between the master and slave devices, users can conveniently and quickly perform cascade management of network devices. The network device automatically detects whether the cascade device exists; the network device generates a unique device IP address according to the device information, sends a device information message to a specific multicast group, carrying the device IP address and device status, the network device receives the message in the specific multicast group, parses the message content, obtains the master device address information according to the obtained device status and device IP address, and automatically creates a cascade device management link between the master and slave devices; the master device creates a websocket server and listens to the service port, the slave device creates a websocket connection request to the master device according to the master device address obtained by detection, the master device receives the websocket handshake information of the slave device, and saves the websocket connection; If the slave device goes offline, the master device receives the slave device disconnection information and deletes the websocket connection corresponding to the slave device. If the master device address parsed by the slave device is updated, the port is connected and a websocket connection is created to the new master device. Based on the websocket connection between the master and slave devices, the network device cascade management is automatically performed. The user obtains the device connection status in the network from the master device. The user sends a specified device operation command to the master device as needed. The master device receives the message. If the operation is for itself, it processes it and returns the user operation result. If the operation object is other slave devices, the message is forwarded to the slave device. The slave device performs the operation and returns the operation result of the master device. The master device forwards the operation result to the user.

2. According to claim 1, a method for automatic cascading management of network devices based on websocket, It is characterized in that The specific steps of the method are as follows: Step 1: Each device is connected to the network, and the user queries the connection status of all devices in the network from the main device; Step 2: The user sends a device operation command to the main device as needed; Step 3: The master device receives the operation command, determines that the operation object is itself, processes the message, and returns the user operation result; Step 4: The master device receives the operation command, determines that the operation object is another slave device, forwards the message to the slave device, and the slave device performs the corresponding operation and returns the operation result; Step 5: The master device receives the operation result from the slave device and forwards the operation result to the user.

3. According to claim 1, a method for automatic cascading management of network devices based on websocket, It is characterized in that The specific steps of the method for automatically detecting whether a cascade device exists are as follows: Step 1: Generate a unique network address based on device information (device location / device serial number); Step 2: Encapsulate the network address and device status into a data packet and send a multicast message to the specified multicast group; Step 3: Monitor the message of the specified multicast group on the port and determine whether the message is correct; Step 4: Parse the received multicast message, obtain the cascade device information, and save the main device address.

4. According to claim 1, a method for automatic cascading management of network devices based on websocket, It is characterized in that The specific steps of the method for creating a cascade device management link are as follows: Step 1: The master device creates a websocket server and listens to the port; Step 2: After the slave device detects the master device address, if it is the first time to detect the master device address, a websocket client connection is created; Step 3: If the master device receives the handshake signal from the slave device, it saves the websocket client link; Step 4: If the slave device goes offline, the master device receives the slave device websocket disconnection information and deletes the websocket information; Step 5: If the slave device updates the master device address obtained by parsing the multicast message, disconnect the websocket connection and create a websocket connection request to the new master device.