Remote management method, device, server and storage medium for device WEB

By establishing a reverse SSH tunnel between the cloud management server and the proxy server, the problems of high cost and low operation efficiency of remote management network equipment in the prior art are solved, and efficient remote access to the management page of network equipment is achieved.

CN115883312BActive Publication Date: 2025-05-27MAIPU COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211493392.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2025-05-27
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

In the prior art, the method of remotely managing network devices requires configuring each device with remote control software, and it is necessary to ensure that the local computer is turned on at any time, resulting in high hardware and software costs and low operating efficiency.

Method used

Through the communication connection between the cloud management server, the proxy server and the target network device, the remote access request of the remote control device is received, the listening port of the target network device is obtained, and the tunnel creation information is sent to establish a reverse SSH tunnel. The proxy server returns the page jump information, so that the remote control device can access the management page of the target network device.

Benefits of technology

Remote access to the target management page of the remote control device is realized by remotely controlling the device, improving access efficiency and saving costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883312B_ABST
    Figure CN115883312B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, server, and storage medium for remote management of a device WEB. The remote control device, proxy server, cloud management server, and target network device are sequentially communicatively connected. After receiving a remote access request sent by the remote control device through the proxy server, the cloud management server obtains the listening port corresponding to the target network device. Then, it sends tunnel creation information including the listening port to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on this information. Then, it returns page jump information to the remote control device through the proxy server so that the remote control device accesses the target management page of the target network device based on the page jump information. Compared with the prior art, in this way, the use of the reverse SSH tunnel can realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency while saving costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular, to a method, apparatus, server, and storage medium for remotely managing a device WEB. Background Art

[0002] In an actual data center network scenario, there are a large number of network devices such as switches, routers, and gateways. How to configure and manage a large number of network devices is a core issue. There are two existing methods, as described below.

[0003] One method is that managers need to go to the site of each network device for configuration management, which requires a large amount of manpower. If the configuration of the network device needs to be repeatedly debugged and modified before and after, the configuration personnel need to repeat going to the site for configuration modification, consuming even more manpower.

[0004] Another method is to use remote control software and a computer for configuration modification, that is: if a certain network device needs to be configured, a local computer needs to be connected to the network device and be able to access the Internet, and then remote control software needs to be installed on both the local computer and the remote computer. In this way, the remote computer can remotely control the local computer: control the browser of the local computer to open the WEB management page of the network device, and then use the username and password to log in to the management page, and remotely perform various configuration management on the network device in this management page.

[0005] However, this method requires a local computer equipped with remote control software to be configured for each network device, and it is necessary to ensure that the local computer is always powered on to remotely configure the network device. Therefore, both the hardware cost and the software cost are particularly high, and it is also very difficult to operate the local computer to be always powered on, resulting in low operation efficiency. Summary of the Invention

[0006] The purpose of the present invention is to provide a method, apparatus, server, and storage medium for remotely managing a device WEB to improve the problems existing in the prior art.

[0007] The embodiments of the present invention can be implemented as follows:

[0008] In a first aspect, the present invention provides a method for remotely managing a device WEB, which is applied to a cloud management server. The cloud management server is communicatively connected to a proxy server and a target network device, and the proxy server is also communicatively connected to a remote control device; the method includes:

[0009] Receiving a remote access request sent by the remote control device through the proxy server, where the remote access request is used to request to enable the remote WEB function of the target network device;

[0010] Obtain the listening port corresponding to the target network device;

[0011] Send tunnel creation information to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on the tunnel creation information; wherein, the tunnel creation information includes the listening port;

[0012] Return page jump information to the remote control device through the proxy server, so that the remote control device accesses the target management page of the target network device based on the page jump information.

[0013] In an alternative embodiment, the step of obtaining the listening port corresponding to the target network device includes:

[0014] Determine the port allocation range to which the target network device belongs according to the remote access request;

[0015] Select an idle port from the port allocation range as the listening port.

[0016] In an alternative embodiment, when the remote control device initiates the remote access request for the first time, the method further includes:

[0017] Receive a page access request sent by the remote control device through the proxy server, where the page access request is used to request the target static page resource of the target management page; the page access request is forwarded to the cloud management server when the proxy server fails to find the target static page resource; the page access request is automatically generated by the remote control device based on the page jump information; obtain the target static page resource based on the page access request;

[0018] Send the target static page resource to the proxy server, so that the proxy server caches the target static page resource and returns the target static page resource to the remote control device; the target static page resource is used to render the target management page.

[0019] In a second aspect, the present invention provides a method for remotely managing a device WEB, which is applied to a proxy server, and the proxy server is communicatively connected to a remote control device and a cloud management server, and the cloud management server is communicatively connected to a target network device; the method includes:

[0020] Receive a remote access request sent by the remote control device, where the remote access request is used to request to enable the remote WEB function of the target network device;

[0021] Forward the remote access request to the cloud management server, so that the cloud management server obtains the listening port corresponding to the target network device and sends tunnel creation information to the target network device; wherein, the tunnel creation information includes the listening port; the tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server;

[0022] Receive the page jump information returned by the cloud management server, and send the page jump information to the remote control device, so that the remote control device accesses the target management page of the target network device based on the page jump information.

[0023] In an alternative embodiment, the proxy server pre-stores static page resources corresponding to different port allocation ranges, and each port allocation range corresponds to a device type; the method further includes:

[0024] Receive a page access request sent by the remote control device, where the page access request is used to request access to the target management page of the target network device; the page access request includes the listening port; the page access request is automatically generated by the remote control device based on the page jump information;

[0025] Based on the listening port, determine whether there is a target static page resource corresponding to the target management page;

[0026] If there is a target static page resource corresponding to the target management page, obtain the target static page resource and return the target static page resource to the remote control device, so that the remote control device renders the target management page based on the target static page resource.

[0027] In an alternative embodiment, the method further includes:

[0028] If there is no target static page resource, send the page access request to the cloud management server, so that the cloud management server obtains the target static page resource based on the page access request;

[0029] Receive the target static page resource returned by the cloud management server, and store the target static page resource;

[0030] Return the target static page resource to the remote control device, so that the remote control device renders the target management page based on the target static page resource.

[0031] In a third aspect, the present invention provides a remote management device for device WEB, which is applied to a cloud management server. The cloud management server is communicatively connected to a proxy server and a target network device, and the proxy server is also communicatively connected to a remote control device; the device includes:

[0032] A request receiving module, configured to receive a remote access request sent by the remote control device through the proxy server, where the remote access request is used to request to enable the remote WEB function of the target network device;

[0033] A data acquisition module, configured to obtain a listening port corresponding to the target network device;

[0034] A data sending module, configured to send tunnel creation information to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on the tunnel creation information; wherein, the tunnel creation information includes the listening port;

[0035] The data sending module is further configured to return page jump information to the remote control device through the proxy server, so that the remote control device accesses a target management page of the target network device based on the page jump information.

[0036] In a fourth aspect, the present invention provides a remote management device for device WEB, which is applied to a proxy server. The proxy server is communicatively connected to a remote control device and a cloud management server, and the cloud management server is communicatively connected to a target network device; the device includes:

[0037] A receiving module, configured to receive a remote access request sent by the remote control device, where the remote access request is used to request to enable the remote WEB function of the target network device;

[0038] A sending module, configured to forward the remote access request to the cloud management server, so that the cloud management server obtains a listening port corresponding to the target network device and sends tunnel creation information to the target network device; wherein, the tunnel creation information includes the listening port; the tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server;

[0039] The receiving module is further configured to receive page jump information returned by the cloud management server;

[0040] The sending module is further configured to send the page jump information to the remote control device, so that the remote control device accesses a target management page of the target network device based on the page jump information.

[0041] Fifth aspect, the present invention provides a server, including: a memory and a processor, the memory stores machine-readable instructions executable by the processor, and when the server runs, the processor executes the machine-readable instructions to implement the remote management method of the device WEB as described in any one of the foregoing embodiments.

[0042] Sixth aspect, the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the remote management method of the device WEB as described in any one of the foregoing embodiments.

[0043] Compared with the prior art, the embodiments of the present invention provide a remote management method, device, server and storage medium for a device WEB. The remote control device, proxy server, cloud management server and target network device are sequentially communicatively connected. After the cloud management server receives a remote access request sent by the remote control device through the proxy server, it obtains the listening port corresponding to the target network device. Then it sends tunnel creation information including the listening port to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on this information, and then returns page jump information to the remote control device through the proxy server so that the remote control device accesses the target management page of the target network device based on the page jump information. Compared with the prior art, in this way, the use of the reverse SSH tunnel can realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency and saving costs at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0045] Figure 1 It is a schematic diagram of an application scenario in the prior art.

[0046] Figure 2 It is a schematic diagram of an application scenario provided by an embodiment of the present invention.

[0047] Figure 3 It is one of the flow diagrams of the remote management method of the device WEB provided by the embodiment of the present invention.

[0048] Figure 4 It is the second flow diagram of the remote management method of the device WEB provided by the embodiment of the present invention.

[0049] Figure 5 It is the third flowchart diagram of a method for remote management of device WEB provided by an embodiment of the present invention.

[0050] Figure 6 It is a signaling interaction diagram provided by an embodiment of the present invention.

[0051] Figure 7 It is one of the structural diagrams of a device WEB remote management device provided by an embodiment of the present invention.

[0052] Figure 8 It is the second structural diagram of a device WEB remote management device provided by an embodiment of the present invention.

[0053] Figure 9 It is the structural diagram of a server provided by an embodiment of the present invention. Detailed implementation manners

[0054] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0056] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0057] It should be noted that, without conflict, the features in the embodiments of the present invention can be combined with each other.

[0058] First, the terms or keywords related to the present application are introduced.

[0059] 1. SSH (Secure Shell) Tunnel: An SSH tunnel is an encrypted tunnel created through an SSH protocol connection. SSH tunnels can be used to transmit unencrypted traffic over a network through an encrypted channel. There are three port forwarding mechanisms for SSH tunnels: local port forwarding, remote port forwarding, and dynamic port forwarding. Using an SSH tunnel, some proxy functions or the function of penetrating the internal network can be achieved. This solution will use the remote port forwarding function among them.

[0060] 2. Remote Port Forwarding: Encrypts the communication data between the SSH Client and the SSH Server. Using the SSH protocol, it can break through the limitations of the firewall to complete some TCP connections that could not be established before. After establishing an SSH tunnel, the port on the server side can be mapped to the local port on the client side. External devices can access the local port on the client side by accessing the port on the server side.

[0061] 3. Nginx: A high-performance Web and reverse proxy service.

[0062] In the prior art, there is also a way to use the remote port forwarding method of SSH tunnel technology to achieve the function of directly accessing the WEB management page of a certain network device managed by the cloud management server on the user's WEB side. Please refer to Figure 1 , Figure 1 which is a schematic diagram of an application scenario in the prior art.

[0063] Among them, the cloud management server can manage multiple network devices to achieve the management of each network device. The WEB server can store the static page resources of the WEB management page corresponding to each network device, and can process requests from clients such as browsers and return the corresponding static page resources.

[0064] Suppose that at this time, it is necessary to request access to the WEB management page of Network Device 1 on the user's WEB side (which can be a browser). After establishing a reverse SSH tunnel between Network Device 1 and the cloud management server, the user's WEB side automatically generates a page access request with a port and sends it to the cloud management server. Using the remote port forwarding method of SSH tunnel technology, the cloud management server will forward this page access request to the WEB server.

[0065] Since the WEB server may also receive page access requests for other network devices at this time, the WEB server can only process the received requests serially in order, which leads to serious queuing for downloading static page resources and slow response when the user accesses the WEB management page of Network Device 1 on the WEB side. If some static page resources are relatively large (for example, more than 1MB), it will further increase the response time of subsequent requests.

[0066] Based on the discovery of the above technical problems, the inventors have proposed the following technical solutions through creative labor to solve or improve the above problems. It should be noted that the defects existing in the above solutions in the prior art are all the results obtained by the inventors through practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed in the embodiments of the present application below for the above problems should be the contributions made by the inventors to the present application during the invention creation process, and should not be understood as the technical content known to those skilled in the art.

[0067] In view of this, an embodiment of the present invention provides a method for remotely managing a device WEB, adding a proxy server as a "transfer station". Using a reverse SSH tunnel, it is possible to remotely access the target management page of the target network device by the remote control device, improving the access efficiency and saving costs at the same time. The following is a detailed description through embodiments and in conjunction with the accompanying drawings.

[0068] Here, please refer to Figure 2 , and first introduce the application scenario of the embodiment of the present invention. In the intranet, the cloud management server is communicatively connected to the proxy server and the WEB server. The cloud management server manages Network Devices 1 to n and can manage each network device.

[0069] Among them, the configuration personnel can log in to the user login page of a certain network device through the browser of the remote control device to initiate a remote access request for the network device and wait for the response data to return.

[0070] The proxy server can be responsible for proxying and forwarding various requests and returning the corresponding data.

[0071] The WEB server can store the static page resources corresponding to the WEB management page of each network device, and can process requests from clients such as browsers and return the corresponding static page resources.

[0072] The cloud management server is responsible for the allocation and recycling of listening ports, and the creation and destruction of tunnels.

[0073] It can be understood that the remote control device can be, but is not limited to, a mobile phone, a laptop, a tablet, etc. The proxy server can be an Nginx reverse proxy server; the WEB server can be a physical machine or a virtual machine.

[0074] It should be noted that the device types to which different network devices belong can be different. The device types can include routers, switches, gateways, etc. For example: Network device 1 can be a router, and network device 2 can be a switch.

[0075] Taking network device 1 as the target network device as an example, the following introduces the remote management method of the device WEB in the embodiments of the present invention. That is, the process of the user remotely accessing the WEB management page of network device 1 is introduced.

[0076] Please refer to Figure 3 , Figure 3 FIG. is a schematic flow chart of a remote management method for a device WEB provided by an embodiment of the present invention. The execution subject of this method is the above-mentioned cloud management server, which is communicatively connected to the proxy server and the target network device, and the proxy server is also communicatively connected to the remote control device. This method includes the following steps S110 to S140:

[0077] S110. Receive a remote access request sent by the remote control device through the proxy server.

[0078] It can be understood that the remote access request can be generated by the remote control device when the configuration personnel log in to the user login page of the target network device in the browser of the remote control device. Since the cloud management server manages the target network device, the remote control device can then send the remote access request to the cloud management server through the proxy server. This remote access request is used to request to enable the remote WEB function of the target network device.

[0079] S120. Obtain the listening port corresponding to the target network device.

[0080] In this embodiment, the listening port can be the remote port specified by the subsequent target network device when establishing a reverse SSH tunnel, that is, the port that the cloud management server needs to listen on. The port allocation ranges corresponding to network devices of different device types are different. Here, the listening port can be located within the port allocation range corresponding to the device type to which the target network device belongs.

[0081] It can be understood that after the configuration personnel successfully access the target management page of the target network device, configuration operations can be performed on the target network device through the target management page. In this way, the cloud management server will forward the corresponding configuration information received on this listening port to the specified port corresponding to the target network device.

[0082] S130. Send the tunnel creation information to the target network device so that the target network device can establish a reverse SSH tunnel to the cloud management server based on the tunnel creation information.

[0083] In this embodiment, the tunnel creation information may include port information and the authentication information of the cloud management server itself. The port information may include the obtained listening port and the mapped port corresponding to the target network device. The authentication information may include the username and password information of the cloud management server. The cloud management server can announce the tunnel creation information to the target network device through the tr069 channel.

[0084] Among them, the mapped port can be specified by the configurator and included in the remote access request, or it can be not specified and directly default to use port 80, and port 80 is the access port of the WEB server corresponding to the target network device.

[0085] When the target network device receives the tunnel creation information, it will establish a reverse SSH tunnel with the function of remote port forwarding, and after the establishment is successful, it will feedback to the cloud management server that the reverse SSH tunnel is created successfully. Then the cloud management server will save the relevant information of the reverse SSH tunnel, including the mapping relationship between the listening port, the mapped port, the own IP of the cloud management server, and the identity identifier of the target network device.

[0086] S140. Return page jump information to the remote control device through the proxy server so that the remote control device can access the target management page of the target network device based on the page jump information.

[0087] In this embodiment, the page jump information may include the listening port and the own IP of the cloud management server. It can be understood that the remote control device can automatically generate a page access request based on the page jump information, and then can access the target management page of the target network device through the reverse SSH tunnel.

[0088] For the remote management method of the device WEB provided by the embodiment of the present invention, after the cloud management server receives the remote access request sent by the remote control device through the proxy server, it obtains the listening port corresponding to the target network device. Then it sends the tunnel creation information including the listening port to the target network device so that the target network device can establish a reverse SSH tunnel to the cloud management server based on this information, and then returns page jump information to the remote control device through the proxy server so that the remote control device can access the target management page of the target network device based on the page jump information. Compared with the prior art, in this way, the reverse SSH tunnel can be used to realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency and saving costs at the same time.

[0089] In an alternative embodiment, the cloud management server can be responsible for port allocation by itself, and at the same time, the cloud management server can reserve ports in different port allocation ranges for network devices of different device types. Correspondingly, the sub-steps of the above step S120 may include:

[0090] S121. Determine the port allocation range to which the target network device belongs according to the remote access request.

[0091] It can be understood that the port allocation mapping relationship can be pre-stored in the database of the cloud management server, and the port allocation mapping relationship can represent the corresponding relationship between the device serial number or device identity identifier of the network device and the device model and port allocation range to which the network device belongs.

[0092] Correspondingly, the remote access request initiated by the target network device may carry the device serial number or device identity identifier of the target network device. Therefore, in the above step S120, the cloud management server can search for the port allocation range corresponding to the device model to which the target network device belongs from the database based on the device serial number or device identity identifier of the target network device.

[0093] S122. Select an idle port from the port allocation range as the listening port.

[0094] In an alternative example: for the three device types of routers, switches, and gateways, the port allocation ranges set by the cloud management server for them can be: 20000 - 21000, 21001 - 22000, 22001 - 23000 respectively.

[0095] When the device model to which the target network device belongs is a router, the cloud management server can scan the port allocation range of 20000 - 21000 to determine an unused idle port as the listening port corresponding to the target network device. When the device model to which the target network device belongs is a switch or a gateway, the method for the cloud management server to determine the listening port is similar and will not be elaborated here. It should be noted that this example is only for illustration, and the port allocation ranges reserved by the cloud management server for different device types are subject to the actual application situation.

[0096] In an alternative embodiment, the management pages corresponding to network devices of the same device type can be the same. For network devices of a certain device type, during the first remote access to its WEB management page, the above proxy server can cache the static page resources of the WEB management page.

[0097] Therefore, the proxy server can pre-store the static page resources corresponding to different port allocation ranges, and each port allocation range corresponds to a device type of the network device.

[0098] The remote control device can automatically generate a page access request based on the page jump information returned by the cloud management server. The page access request can include the page jump information, and then the page access request is sent to the proxy server.

[0099] The proxy server can determine the port allocation range to which the listening port in the page access request belongs based on the listening port, and further find the static page resource corresponding to the port allocation range, which is the target static page resource of the target network device.

[0100] It can be understood that if the proxy server fails to find the target static page resource corresponding to the page access request, the page access request needs to be forwarded to the cloud management server, and the target static page resource is requested from the WEB server using the reverse SSH tunnel. Correspondingly, the remote management method of device WEB with the cloud management server as the execution entity can further include the following steps S150 to S170.

[0101] S150. Receive the page access request sent by the remote control device through the proxy server.

[0102] In this embodiment, the page access request can be used to request the target static page resource of the target management page, and the page access request can include the page jump information.

[0103] S160. Obtain the target static page resource based on the page access request.

[0104] In this embodiment, the cloud management server can use the remote port forwarding function of the reverse SSH tunnel to send the page access request to the WEB server, and the WEB server downloads the corresponding target static page resource and feeds it back to the cloud management server.

[0105] S170. Send the target static page resource to the proxy server so that the proxy server caches the target static page resource and returns the target static page resource to the remote control device.

[0106] It can be understood that the target static page resource can be used to render the target management page. The cloud management server can feedback the obtained target static page resource to the remote control device through the proxy server so that the remote control device renders the target management page based on the target static page resource. At the same time, the proxy server will cache the target static page resource during this process and establish a mapping relationship between the target static page resource and the port allocation range corresponding to the device type of the target network device.

[0107] It should be noted that the prerequisite for the above reverse SSH tunnel to be able to use its remote port forwarding function normally is that both the cloud management server and the target network device have enabled the SSH GatewayPorts configuration. Because usually, this configuration is turned off by default, that is, it only supports local forwarding and does not support forwarding to other network segments. Taking the server side as an example, the way to enable the GatewayPorts configuration can be as follows:

[0108] (1). Open the SSH configuration file on the server side through the following command:

[0109] vim / etc / ssh / sshd_config

[0110] (2). Modify the GatewayPorts configuration:

[0111] Uncomment (or add a comment): GatewayPorts yes

[0112] (3). Use the following command to restart the SSH service to make the configuration modification take effect:

[0113] service sshd restart

[0114] The above-described embodiment of the method for remotely managing the device WEB takes the cloud management server as the execution subject and introduces the process of remotely accessing the target management page of the target network device by the remote control device's request.

[0115] Combined with the above content, the following takes the proxy server as the execution subject and introduces a corresponding method for remotely managing the device WEB. It should be noted that its basic principle and the technical effects produced are the same as or similar to those of the foregoing embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the foregoing embodiments.

[0116] Please refer to Figure 4 , Figure 4 , which is another process schematic diagram of the method for remotely managing the device WEB provided by the embodiment of the present invention. The execution subject of this method is the proxy server, and the proxy server is communicatively connected to the remote control device and the cloud management server, and the cloud management server is communicatively connected to the target network device. This method includes the following steps S210 to S230.

[0117] S210. Receive a remote access request sent by the remote control device.

[0118] The remote access request is used to request to enable the remote WEB function of the target network device.

[0119] S220. Forward the remote access request to the cloud management server so that the cloud management server can obtain the listening port corresponding to the target network device and send tunnel creation information to the target network device.

[0120] Among them, the tunnel creation information includes the listening port, and the listening port is located in the port allocation range corresponding to the target network device. The tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server.

[0121] S230. Receive the page jump information returned by the cloud management server and send the page jump information to the remote control device so that the remote control device can access the target management page of the target network device based on the page jump information.

[0122] In the device WEB remote management method provided by the embodiments of the present invention, the proxy server can receive the remote access request sent by the remote control device and forward it to the cloud management server, so that the cloud management server can obtain the listening port corresponding to the target network device and send tunnel creation information to the target network device, then receive the page jump information returned by the cloud management server, and send the page jump information to the remote control device, so that the remote control device can access the target management page of the target network device based on the page jump information. In this way, the use of the reverse SSH tunnel can realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency and saving costs at the same time.

[0123] In an alternative embodiment, the proxy server may pre-store static page resources corresponding to different port allocation ranges, and each port allocation range corresponds to a device type. Correspondingly, please refer to Figure 5 and the above method may further include steps S240 to S290.

[0124] S240. Receive the page access request sent by the remote control device.

[0125] In this embodiment, the page access request is used to request access to the target management page of the target network device. The page access request is automatically generated based on the received page jump information, and the corresponding page access request may include the page jump information.

[0126] S250. Determine whether there is a target static page resource corresponding to the target management page according to the listening port in the page access request.

[0127] S260. If there is a target static page resource corresponding to the target management page, obtain the target static page resource and return the target static page resource to the remote control device so that the remote control device can render the target management page based on the target static page resource.

[0128] S270. If the target static page resource does not exist, send the page access request to the cloud management server so that the cloud management server obtains the target static page resource based on the page access request;

[0129] S280. Receive the target static page resource returned by the cloud management server and store the target static page resource.

[0130] S290. Return the target static page resource to the remote control device so that the remote control device renders the target management page based on the target static page resource.

[0131] It should be noted that the execution order of each step in the above method embodiments is not limited by the figures shown, and the execution order of each step is subject to the actual application situation.

[0132] Optionally, to better illustrate the implementation manner of the present application, the following provides an interaction implementation manner among a remote control device, a proxy server, a cloud management server, and a target network device in combination with the method flows respectively executed by the cloud management server and the proxy server. Specifically, Figure 6 For the signaling interaction schematic diagram provided by the embodiment of the present invention, see Figure 6 , and the process includes:

[0133] Step 1. The remote control device generates a remote access request including the device model of the target network device;

[0134] Step 2. The remote control device sends the remote access request to the cloud management server through the proxy server;

[0135] Step 3. The cloud management server obtains the listening port corresponding to the target network device;

[0136] Step 4. The cloud management server sends tunnel creation information to the target network device through the tr069 channel;

[0137] Step 5. The target network device establishes a reverse SSH tunnel based on the tunnel creation information;

[0138] Step 6. The target network device feeds back a tunnel creation success response to the cloud management server;

[0139] Step 7. The cloud management server stores the relevant information of the reverse SSH tunnel;

[0140] Step 8. The cloud management server sends page jump information to the remote control device through the proxy server;

[0141] Step 9. The remote control device generates a page access request based on the page jump information;

[0142] Step 10. The remote control device sends the page access request to the proxy server;

[0143] Step 11: The proxy server checks whether there is a target static page resource of the target network device.

[0144] Step 12: If it exists, obtain the target static page resource and return the target static page resource to the remote control device.

[0145] Step 13: If it does not exist, send the page access request to the cloud management server. The cloud management server obtains the target static page resource from the WEB server, and the cloud management server returns the target static page resource to the remote control device through the proxy server. At the same time, the proxy server also saves the target static page resource.

[0146] Step 14: The remote control device uses the target static page resource to render the target management page of the target network device.

[0147] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0148] (1) Using the reverse SSH tunnel can realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency and saving costs at the same time.

[0149] (2) The proxy server can cache the static page resources of the WEB management page, which is convenient for the proxy server to directly find the corresponding matching target static page resources and return them to the remote control device during the process of remotely accessing the WEB management page of the target network device, avoiding the serious situation of static page resource download queuing caused by the serial processing of requests received by the WEB server in the prior art, and being able to accelerate the response speed of remotely accessing the WEB management page of the network device.

[0150] (3) Reserve different port allocation intervals for network devices of different device types, so that the proxy server can cache only one static page resource for each device type, reducing the caching pressure. At the same time, it also avoids the error of the proxy server matching static page resources caused by different network devices of different device types being assigned the same listening port.

[0151] In order to execute the corresponding steps in the above method embodiments and various possible implementation manners, the following respectively give two implementation manners of the remote management device of the device WEB applied to the cloud management server and the proxy server.

[0152] Please refer to Figure 7 , Figure 7The structure diagram of the remote management device 100 for device WEB provided by an embodiment of the present invention is shown. The remote management device 100 for device WEB is applied to a cloud management server, and the cloud management server is communicatively connected to a proxy server and a target network device. The proxy server is also communicatively connected to a remote control device. The device includes: a request receiving module 110, a data obtaining module 120, and a data sending module 130.

[0153] The request receiving module 110 is configured to receive a remote access request sent by the remote control device through the proxy server. The remote access request is used to request to enable the remote WEB function of the target network device.

[0154] The data obtaining module 120 is configured to obtain the listening port corresponding to the target network device;

[0155] The data sending module 130 is configured to send tunnel creation information to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on the tunnel creation information; wherein, the tunnel creation information includes the listening port;

[0156] The data sending module 130 is further configured to return page jump information to the remote control device through the proxy server, so that the remote control device accesses the target management page of the target network device based on the page jump information.

[0157] It can be understood that the request receiving module 110 can be used to execute the above steps S110, S150 and their respective sub-steps, the data obtaining module 120 can be used to execute the above steps S120, S160 and their respective sub-steps, and the data sending module 130 can be used to execute the above steps S130, S140, S170.

[0158] Please refer to Figure 8 , Figure 8 The structure diagram of the remote management device 200 for device WEB provided by an embodiment of the present invention is shown. The remote management device 200 for device WEB is applied to a proxy server, and the proxy server is communicatively connected to a remote control device and a cloud management server. The cloud management server is communicatively connected to a target network device. The device includes: a receiving module 210 and a sending module 220.

[0159] The receiving module 210 is configured to receive a remote access request sent by the remote control device. The remote access request is used to request to enable the remote WEB function of the target network device;

[0160] A sending module 220, configured to forward a remote access request to a cloud management server, so that the cloud management server obtains a listening port corresponding to a target network device and sends tunnel creation information to the target network device; wherein, the tunnel creation information includes the listening port; the tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server;

[0161] A receiving module 210 is further configured to receive page jump information returned by the cloud management server;

[0162] The sending module 220 is further configured to send the page jump information to a remote control device, so that the remote control device accesses a target management page of the target network device based on the page jump information.

[0163] It can be understood that the receiving module 210 can also be configured to execute the above steps S240 and S280, and the sending module 220 can also be configured to execute the above steps S270 and S290. The apparatus may further include a processing module 230, which can be configured to execute the above steps S250 and S260.

[0164] Those skilled in the art can clearly understand that for the sake of convenience and brevity of description, the specific working process of the above-described remote management apparatus for two device WEBs can refer to the corresponding process in the foregoing method embodiment, and will not be described herein again.

[0165] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of a server provided by an embodiment of the present invention. The server 300 includes a processor 310, a memory 320, and a bus 330. The processor 310 is connected to the memory 320 through the bus 330.

[0166] The memory 320 can be used to store software programs. For example, Figure 7 the remote management apparatus 100 for device WEB shown, or Figure 8The remote management device 200 of the device WEB shown. Among them, the memory 320 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Flash memory, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc. The processor 310 can be an integrated circuit chip with signal processing capabilities.

[0167] The processor 310 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0168] The memory 320 stores machine-readable instructions executable by the processor 310. When the processor 310 executes the machine-readable instructions, it implements the remote management method of the device WEB disclosed in the above embodiments.

[0169] It can be understood that the server 300 can be the above proxy server or cloud management server. Figure 9 The structure shown is only for illustration, and the server 300 can also include more or fewer components than those shown Figure 9 in the figure, or have a different configuration from that shown Figure 9 in the figure. Figure 9 Each component shown in the figure can be implemented by hardware, software, or a combination thereof.

[0170] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the remote management method of the device WEB disclosed in the above embodiment is implemented. The readable storage medium may be, but is not limited to, various media that can store program codes such as USB flash drives, mobile hard disks, ROM, RAM, PROM, EPROM, EEPROM, FLASH magnetic disks, or optical discs.

[0171] In summary, the embodiment of the present invention provides a remote management method, device, server, and storage medium for a device WEB. The remote control device, proxy server, cloud management server, and target network device are sequentially communicatively connected. After receiving a remote access request sent by the remote control device through the proxy server, the cloud management server obtains the listening port corresponding to the target network device. Then, tunnel creation information including the listening port is sent to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on this information. Then, page jump information is returned to the remote control device through the proxy server, so that the remote control device accesses the target management page of the target network device based on the page jump information. Compared with the prior art, the use of the reverse SSH tunnel can realize the remote access of the remote control device to the target management page of the target network device, improving the access efficiency and saving costs at the same time.

[0172] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for remote management of device WEB, characterized in that, applied to a cloud management server, the cloud management server is communicatively connected to a proxy server, a WEB server, and a target network device, and the proxy server is also communicatively connected to a remote control device; the cloud management server pre-stores a port allocation mapping relationship, and the port allocation mapping relationship represents the correspondence between the device serial number or device identity identifier of the network device and the device model and port allocation range to which the network device belongs; the proxy server pre-stores static page resources corresponding to different port allocation ranges, and each of the port allocation ranges corresponds to a device type; the method includes: Receiving a remote access request sent by the remote control device through the proxy server, the remote access request is used to request to enable the remote WEB function of the target network device; Obtaining the device serial number or device identity identifier of the target network device from the remote access request, and based on the device serial number or device identity identifier of the target network device, determining the port allocation range corresponding to the device model to which the target network device belongs from the port allocation mapping relationship; Selecting an idle port from the determined port allocation range as the listening port corresponding to the target network device; Sending tunnel creation information to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on the tunnel creation information; wherein, the tunnel creation information includes the listening port; Returning page jump information to the remote control device through the proxy server; Receiving a page access request sent by the remote control device through the proxy server; the page access request includes the listening port and is used to request the target static page resource of the target management page; the page access request is forwarded to the cloud management server when the proxy server fails to find the target static page resource; the page access request is automatically generated by the remote control device based on the page jump information; wherein, when the proxy server finds the target static page resource corresponding to the port allocation range to which the listening port belongs from all the static page resources stored in itself according to the listening port in the page access request, directly returning the target static page resource to the remote control device; Based on the page access request, using the remote port forwarding function of the reverse SSH tunnel to request the target static page resource from the WEB server; Sending the target static page resource to the proxy server, so that the proxy server caches the target static page resource and returns the target static page resource to the remote control device; the target static page resource is used to render the target management page.

2. A method for remote management of device WEB, characterized in that, Applied to a proxy server, the proxy server is communicatively connected to a remote control device and a cloud management server, and the cloud management server is communicatively connected to a target network device; the proxy server pre-stores static page resources corresponding to different port allocation ranges, and each port allocation range corresponds to a device type; the cloud management server pre-stores a port allocation mapping relationship, and the port allocation mapping relationship represents the correspondence between the device serial number or device identity identifier of the network device and the device model and port allocation range to which the network device belongs; the method includes: Receiving a remote access request sent by the remote control device, the remote access request being used to request to enable the remote WEB function of the target network device; Forwarding the remote access request to the cloud management server so that the cloud management server obtains the listening port corresponding to the target network device and sends tunnel creation information to the target network device; wherein, the tunnel creation information includes the listening port; the tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server; wherein, the way for the cloud management server to obtain the listening port corresponding to the target network device is: obtaining the device serial number or device identity identifier of the target network device from the remote access request, and based on the device serial number or device identity identifier of the target network device, determining the port allocation range corresponding to the device model to which the target network device belongs from the port allocation mapping relationship; selecting an idle port from the determined port allocation range as the listening port corresponding to the target network device; Receiving the page jump information returned by the cloud management server and sending the page jump information to the remote control device; Receiving a page access request sent by the remote control device; the page access request includes the listening port, and is automatically generated by the remote control device based on the page jump information, and is used to request to access the target management page of the target network device; According to the listening port in the page access request, determining whether there is a target static page resource corresponding to the port allocation range to which the listening port belongs among all the static page resources; If it exists, obtaining the target static page resource so that the remote control device renders the target management page based on the target static page resource; If it does not exist, sending the page access request to the cloud management server so that the cloud management server obtains the target static page resource based on the page access request; receiving the target static page resource returned by the cloud management server and storing the target static page resource; returning the target static page resource to the remote control device so that the remote control device renders the target management page based on the target static page resource.

3. A remote management device for device WEB Characterized in that Applied to a cloud management server, the cloud management server is communicatively connected to a proxy server and a target network device, and the proxy server is also communicatively connected to a remote control device; the cloud management server pre-stores a port allocation mapping relationship, and the port allocation mapping relationship represents the correspondence between the device serial number or device identity identifier of a network device and the device model and port allocation range to which the network device belongs; The proxy server pre-stores static page resources corresponding to different port allocation ranges, and each of the port allocation ranges corresponds to a device type; the device includes: A request receiving module, configured to receive a remote access request sent by the remote control device through the proxy server, where the remote access request is used to request to enable the remote WEB function of the target network device; A data acquisition module, configured to: obtain the device serial number or device identity identifier of the target network device from the remote access request, and based on the device serial number or device identity identifier of the target network device, determine the port allocation range corresponding to the device model to which the target network device belongs from the port allocation mapping relationship; select an idle port from the determined port allocation range as the listening port corresponding to the target network device; A data sending module, configured to send tunnel creation information to the target network device, so that the target network device establishes a reverse SSH tunnel to the cloud management server based on the tunnel creation information; wherein, the tunnel creation information includes the listening port; The data sending module is further configured to return page jump information to the remote control device through the proxy server; The request receiving module is further configured to receive a page access request sent by the remote control device through the proxy server; the page access request includes the listening port and is used to request the target static page resource of the target management page; the page access request is forwarded to the cloud management server when the proxy server fails to find the target static page resource; the page access request is automatically generated by the remote control device based on the page jump information; wherein, when the proxy server finds the target static page resource corresponding to the port allocation range to which the listening port belongs from all the static page resources stored in itself according to the listening port in the page access request, it directly returns the target static page resource to the remote control device; The data acquisition module is further configured to request the target static page resource from the WEB server based on the page access request by using the remote port forwarding function of the reverse SSH tunnel; The data sending module is further configured to send the target static page resource to the proxy server, so that the proxy server caches the target static page resource and returns the target static page resource to the remote control device; the target static page resource is used to render the target management page.

4. A remote management device for device WEB Characterized in that Applied to a proxy server, the proxy server is communicatively connected to a remote control device and a cloud management server, and the cloud management server is communicatively connected to a target network device; the proxy server pre-stores static page resources corresponding to different port allocation ranges, and each port allocation range corresponds to a device type; the cloud management server pre-stores a port allocation mapping relationship, and the port allocation mapping relationship represents the correspondence between the device serial number or device identity identifier of the network device and the device model and port allocation range to which the network device belongs; The device includes: A receiving module, configured to receive a remote access request sent by the remote control device, where the remote access request is used to request to enable the remote WEB function of the target network device; A sending module, configured to forward the remote access request to the cloud management server, so that the cloud management server obtains the listening port corresponding to the target network device and sends tunnel creation information to the target network device; wherein, the tunnel creation information includes the listening port; the tunnel creation information is used for the target network device to establish a reverse SSH tunnel to the cloud management server; wherein, the way for the cloud management server to obtain the listening port corresponding to the target network device is: obtaining the device serial number or device identity identifier of the target network device from the remote access request, and based on the device serial number or device identity identifier of the target network device, determining the port allocation range corresponding to the device model to which the target network device belongs from the port allocation mapping relationship; selecting an idle port from the determined port allocation range as the listening port corresponding to the target network device; The receiving module is further configured to receive page jump information returned by the cloud management server; The sending module is further configured to send the page jump information to the remote control device, so that the remote control device accesses the target management page of the target network device based on the page jump information; The receiving module is further configured to receive a page access request sent by the remote control device; the page access request includes the listening port, and is automatically generated by the remote control device based on the page jump information, and is used to request to access the target management page of the target network device; A processing module, configured to determine whether there is a target static page resource corresponding to the port allocation range to which the listening port belongs among all static page resources according to the listening port in the page access request; If it exists, the processing module is further configured to obtain the target static page resource and return the target static page resource to the remote control device, so that the remote control device renders the target management page based on the target static page resource; If not, the sending module is further configured to send the page access request to the cloud management server, so that the cloud management server obtains the target static page resource based on the page access request; the receiving module is further configured to receive the target static page resource returned by the cloud management server and store the target static page resource; the sending module is further configured to return the target static page resource to the remote control device, so that the remote control device renders the target management page based on the target static page resource.

5. A server characterized in that it includes: a memory and a processor, the memory stores machine-readable instructions executable by the processor, and when the server runs, the processor executes the machine-readable instructions to implement the remote management method of device WEB as described in claim 1 or 2.

6. A computer-readable storage medium characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the remote management method of device WEB as described in claim 1 or 2.

Citation Information

Patent Citations

  • Method and system for remotely having access to administrative web pages of routers

    CN104243210A