[go: up one dir, main page]

CN105703947A - Method for remotely debugging router, server, and router - Google Patents

Method for remotely debugging router, server, and router Download PDF

Info

Publication number
CN105703947A
CN105703947A CN201610032951.6A CN201610032951A CN105703947A CN 105703947 A CN105703947 A CN 105703947A CN 201610032951 A CN201610032951 A CN 201610032951A CN 105703947 A CN105703947 A CN 105703947A
Authority
CN
China
Prior art keywords
router
server
debugging
log
port number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610032951.6A
Other languages
Chinese (zh)
Inventor
邹强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201610032951.6A priority Critical patent/CN105703947A/en
Publication of CN105703947A publication Critical patent/CN105703947A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a method for remotely debugging a router, a server, and a router. The method comprises steps that the server sends a remote debugging command to a selected router; the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server; and the server, according to the debugging log, determines a fault of the router so that the server may remotely debug the router, acquires and locally analyzes the debugging log, and prevents a case that unimportant log information is acquired.

Description

一种远程调试路由器的方法及服务器、路由器A method for remotely debugging a router, server, and router

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种远程调试路由器的方法及服务器、路由器。The invention relates to the technical field of communication, in particular to a method for remotely debugging a router, a server, and a router.

背景技术Background technique

随着互联网的普及,智能设备开始进入千家万户,智能路由器作为家庭智能设备的访问入口,起到了远程控制中心的作用。然而当路由器出现问题的时候,智能路由器服务器商怎么样进行路由器问题的排查,是一个令人头痛的问题。现有技术中遇到路由器存在故障,只能通过路由器绑定域名,而绑定域名需要用户手动绑定,然后管理员根据域名远程登录路由器,查看路由器的日志模块,但是这个日志信息有一定的长度限制,无法看到所有的日志信息,可能导致重要的日志信息丢失。With the popularization of the Internet, smart devices have begun to enter thousands of households. As the access entrance of home smart devices, smart routers play the role of a remote control center. However, when there is a problem with the router, how the smart router server provider can troubleshoot the router problem is a headache. In the prior art, if the router is faulty, the domain name can only be bound through the router, and the domain name needs to be bound manually by the user. Then the administrator remotely logs in to the router according to the domain name and checks the log module of the router. Due to the length limit, it is impossible to see all the log information, which may lead to the loss of important log information.

发明内容Contents of the invention

本发明实施例提供一种远程调试路由器的方法及服务器、路由器,以解决路由器使用出现问题时,无法对路由器进行远程调试,不能抓取调试日志进行本地分析的问题。Embodiments of the present invention provide a method for remotely debugging a router, a server, and a router, so as to solve the problem that the router cannot be remotely debugged and the debugging log cannot be captured for local analysis when a problem occurs in the use of the router.

一方面,提供了一种远程调试路由器的方法,所述方法包括:On the one hand, a method for remotely debugging a router is provided, the method comprising:

服务器向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器;The server sends a remote debugging command to the selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server;

所述服务器接收所述路由器发送的所述调试日志;The server receives the debugging log sent by the router;

所述服务器根据所述调试日志,确定所述路由器的故障。The server determines the fault of the router according to the debugging log.

优选地,所述服务器向选定的路由器发送远程调试命令之前,所述方法还包括:Preferably, before the server sends the remote debugging command to the selected router, the method also includes:

所述服务器接收所述路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识;The server receives the heartbeat request sent by the router according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router;

所述服务器根据所述路由器的地址、端口号和标识,验证所述路由器的身份;The server verifies the identity of the router according to the address, port number and identification of the router;

若验证通过,所述服务器记录所述路由器的心跳时间;If the verification is passed, the server records the heartbeat time of the router;

所述服务器向所述路由器发送心跳反馈消息。The server sends a heartbeat feedback message to the router.

优选地,所述方法还包括:Preferably, the method also includes:

所述服务器接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。The server receives the user's request for selecting a router on the background management interface and the input remote debugging command.

另一方面,提供了一种远程调试路由器的方法,所述方法包括:On the other hand, a method for remotely debugging a router is provided, the method comprising:

路由器接收服务器发送的远程调试命令;The router receives the remote debugging command sent by the server;

所述路由器执行所述远程调试命令,生成调试日志;The router executes the remote debugging command to generate a debugging log;

所述路由器上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。The router uploads the debugging log to the server, so that the server determines the fault of the router according to the debugging log.

优选地,所述方法还包括:Preferably, the method also includes:

所述路由器根据所述服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份;The router sends a heartbeat request to the server according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router, so that the address, port number and port number of the router of the server and identification, verifying the identity of the router;

所述路由器接收所述服务器发送的心跳反馈消息。The router receives the heartbeat feedback message sent by the server.

又一方面,提供了一种服务器,所述服务器包括:In yet another aspect, a server is provided, and the server includes:

发送单元,用于向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器;A sending unit, configured to send a remote debugging command to a selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server;

接收单元,用于接收所述路由器发送的所述调试日志;a receiving unit, configured to receive the debugging log sent by the router;

分析单元,用于根据所述调试日志,确定所述路由器的故障。An analyzing unit is configured to determine a fault of the router according to the debugging log.

优选地,所述接收单元还用于接收所述路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识;Preferably, the receiving unit is further configured to receive a heartbeat request sent by the router according to the address and port number of the server, the heartbeat request including the address, port number and identification of the router;

所述服务器还包括:The server also includes:

验证单元,用于根据所述路由器的地址、端口号和标识,验证所述路由器的身份;a verification unit, configured to verify the identity of the router according to the address, port number and identification of the router;

记录单元,用于若所述验证单元验证通过,记录所述路由器的心跳时间;a recording unit, configured to record the heartbeat time of the router if the verification unit passes the verification;

所述发送单元还用于向所述路由器发送心跳反馈消息。The sending unit is further configured to send a heartbeat feedback message to the router.

优选地,所述接收单元还用于:Preferably, the receiving unit is also used for:

接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。Receive the user's request to select a router on the background management interface and the input remote debugging command.

又一方面,提供了一种路由器,所述路由器包括:In yet another aspect, a router is provided, and the router includes:

接收单元,用于接收服务器发送的远程调试命令;The receiving unit is used to receive the remote debugging command sent by the server;

执行单元,用于执行所述远程调试命令,生成调试日志;an execution unit, configured to execute the remote debugging command and generate a debugging log;

发送单元,用于上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。A sending unit, configured to upload the debugging log to the server, so that the server can determine the fault of the router according to the debugging log.

优选地,所述发送单元还用于根据所述服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份;Preferably, the sending unit is further configured to send a heartbeat request to the server according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router, so that the server address, port number and identification of the router, and verify the identity of the router;

所述接收单元还用于接收所述服务器发送的心跳反馈消息。The receiving unit is further configured to receive a heartbeat feedback message sent by the server.

实施本发明实施例提供的一种远程调试路由器的方法及服务器、路由器,具有如下有益效果:Implementing a method for remotely debugging a router, a server, and a router provided by an embodiment of the present invention has the following beneficial effects:

服务器向选定的路由器发送远程调试命令,路由器执行远程调试命令,生成调试日志,并上传调试日志给服务器,服务器根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况。The server sends a remote debugging command to the selected router, the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, and the server determines the fault of the router according to the debugging log, so that the server can remotely debug the router and obtain the debugging log Perform local analysis to avoid failure to obtain important log information.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例提供的一种远程调试路由器的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for remotely debugging a router provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种远程调试路由器的方法的流程示意图;FIG. 2 is a schematic flowchart of another method for remotely debugging a router provided by an embodiment of the present invention;

图3为本发明实施例提供的又一种远程调试路由器的方法的流程示意图;FIG. 3 is a schematic flowchart of another method for remotely debugging a router provided by an embodiment of the present invention;

图4为本发明实施例提供的又一种远程调试路由器的方法的流程示意图;FIG. 4 is a schematic flowchart of another method for remotely debugging a router provided by an embodiment of the present invention;

图5为本发明实施例提供的一种服务器的结构示意图;FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present invention;

图6为本发明实施例提供的另一种服务器的结构示意图;FIG. 6 is a schematic structural diagram of another server provided by an embodiment of the present invention;

图7为本发明实施例提供的一种路由器的结构示意图。FIG. 7 is a schematic structural diagram of a router provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

图1为本发明实施例提供的一种远程调试路由器的方法的流程示意图,该方法包括以下步骤:Fig. 1 is a schematic flow chart of a method for remotely debugging a router provided by an embodiment of the present invention, the method comprising the following steps:

S101,服务器向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器。S101. The server sends a remote debugging command to a selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server.

本实施例中,服务器与路由器已建立了通讯连接。当服务器后台管理人员需要对某台路由器进行调试的时候,可以选定该台路由器,服务器向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志,然后上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。In this embodiment, a communication connection has been established between the server and the router. When the background administrator of the server needs to debug a certain router, he can select the router, and the server sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the administrator according to the debugging needs. After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, generates a debugging log, and uploads it to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information.

S102,所述服务器接收所述路由器发送的所述调试日志。S102. The server receives the debugging log sent by the router.

S103,所述服务器根据所述调试日志,确定所述路由器的故障。S103. The server determines a fault of the router according to the debugging log.

由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,服务器根据该调试日志,可以准确地确定路由器的故障所在。Since the debugging log is generated by the router executing the remote debugging command sent by the server, the server can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种远程调试路由器的方法,服务器向选定的路由器发送远程调试命令,路由器执行远程调试命令,生成调试日志,并上传调试日志给服务器,服务器根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况。According to a method for remotely debugging a router provided in an embodiment of the present invention, the server sends a remote debugging command to a selected router, the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, and the server determines the router according to the debugging log. faults, so that the server can remotely debug the router, obtain debug logs for local analysis, and avoid the situation that important log information cannot be obtained.

图2为本发明实施例提供的另一种远程调试路由器的方法的流程示意图,该方法包括以下步骤:FIG. 2 is a schematic flowchart of another method for remotely debugging a router provided by an embodiment of the present invention. The method includes the following steps:

S201,服务器接收路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识。S201. The server receives a heartbeat request sent by a router according to the address and port number of the server, where the heartbeat request includes the address, port number and identifier of the router.

服务器与路由器通过心跳机制建立起通讯连接。具体地,路由器开机启动时读取本地配置文件,获取服务器的IP地址和端口号,然后启动心跳服务。路由器根据服务器的IP地址和端口号,向服务器发送心跳请求,心跳请求周期可以根据需求设定,例如可以一分钟一次。该心跳请求包括路由器的地址、端口号和标识。还可以对该心跳请求进行加密。服务器接收到路由器发送的心跳请求。The server and the router establish a communication connection through the heartbeat mechanism. Specifically, when the router starts up, it reads the local configuration file, obtains the IP address and port number of the server, and then starts the heartbeat service. The router sends a heartbeat request to the server according to the IP address and port number of the server, and the heartbeat request cycle can be set according to requirements, for example, once a minute. The heartbeat request includes the address, port number and identification of the router. This heartbeat request can also be encrypted. The server receives the heartbeat request sent by the router.

S202,所述服务器根据所述路由器的地址、端口号和标识,验证所述路由器的身份。S202. The server verifies the identity of the router according to the address, port number and identifier of the router.

服务器接收到路由器发送的心跳请求后,获取心跳请求所包括的路由器的地址、端口号和标识,若心跳请求被路由器进行了加密,服务器还需根据双方协商的加解密机制对心跳请求进行解密。服务器根据预先存储的路由器信息以及获取的路由器的地址、端口号和标识,验证该路由器是否合法,即是否是该服务器管理的路由器。After receiving the heartbeat request sent by the router, the server obtains the address, port number and identification of the router included in the heartbeat request. If the heartbeat request is encrypted by the router, the server needs to decrypt the heartbeat request according to the encryption and decryption mechanism negotiated by both parties. According to the pre-stored router information and the acquired address, port number and identification of the router, the server verifies whether the router is legitimate, that is, whether it is a router managed by the server.

S203,若验证通过,所述服务器记录所述路由器的心跳时间。S203. If the verification is passed, the server records the heartbeat time of the router.

若验证该路由器是合法的路由器,则记录该路由器的最新的心跳时间,以保证服务器与路由器的通讯正常。If it is verified that the router is a legitimate router, record the latest heartbeat time of the router to ensure normal communication between the server and the router.

S204,所述服务器向所述路由器发送心跳反馈消息。S204. The server sends a heartbeat feedback message to the router.

服务器收到路由器的心跳请求后,并且路由器身份验证通过,向路由器发送心跳反馈消息。若路由器身份验证不通过,则服务器可以直接丢弃心跳数据,不向路由器反馈任何消息。After the server receives the heartbeat request from the router and the authentication of the router passes, the server sends a heartbeat feedback message to the router. If the router authentication fails, the server can directly discard the heartbeat data without feeding back any information to the router.

S205,所述服务器接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。S205. The server receives a request from a user to select a router on a background management interface and an input remote debugging command.

服务器设置有后台管理界面,当服务器后台管理人员需要对某台路由器进行调试的时候,后台管理人员登录服务器,在后台管理界面选择要远程调试的路由器并输入远程调试命令,然后点击发送。The server is equipped with a background management interface. When the server background management personnel need to debug a certain router, the background management personnel log in to the server, select the router to be remotely debugged on the background management interface and enter the remote debugging command, and then click send.

S206,所述服务器向所述选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器。S206. The server sends a remote debugging command to the selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server.

服务器向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志,然后上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。The server sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the administrator according to the debugging needs. After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, generates a debugging log, and uploads it to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information.

S207,所述服务器接收所述路由器发送的所述调试日志。S207. The server receives the debugging log sent by the router.

服务器接收到路由器发送的调试日志后,将其存储至与路由器标识对应的存储目录或存储空间。After receiving the debugging log sent by the router, the server stores it in a storage directory or a storage space corresponding to the router identifier.

S208,所述服务器根据所述调试日志,确定所述路由器的故障。S208. The server determines the fault of the router according to the debugging log.

由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,服务器根据该调试日志,可以准确地确定路由器的故障所在。Since the debugging log is generated by the router executing the remote debugging command sent by the server, the server can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种远程调试路由器的方法,服务器向选定的路由器发送远程调试命令,路由器执行远程调试命令,生成调试日志,并上传调试日志给服务器,服务器根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况;通过心跳机制,路由器与服务器建立起通讯连接;用户可以在服务器的后台管理界面选定待调试的路由器并输入远程调试命令,方便进行人机交互。According to a method for remotely debugging a router provided in an embodiment of the present invention, the server sends a remote debugging command to a selected router, the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, and the server determines the router according to the debugging log. faults, so that the server can remotely debug the router, obtain the debug log for local analysis, and avoid the situation where important log information cannot be obtained; through the heartbeat mechanism, the router establishes a communication connection with the server; the user can use the background management interface of the server Select the router to be debugged and enter the remote debugging command to facilitate human-computer interaction.

图3为本发明实施例提供的又一种远程调试路由器的方法的流程示意图,该方法包括以下步骤:FIG. 3 is a schematic flow chart of another method for remotely debugging a router provided by an embodiment of the present invention. The method includes the following steps:

S301,路由器接收服务器发送的远程调试命令。S301. The router receives the remote debugging command sent by the server.

本实施例中,服务器与路由器已建立了通讯连接。当服务器后台管理人员需要对某台路由器进行调试的时候,可以选定该台路由器,服务器向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。路由器接收该远程调试命令。In this embodiment, a communication connection has been established between the server and the router. When the background administrator of the server needs to debug a certain router, he can select the router, and the server sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the administrator according to the debugging needs. The router receives the remote debugging command.

S302,所述路由器执行所述远程调试命令,生成调试日志。S302. The router executes the remote debugging command to generate a debugging log.

路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志。After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, and generates a debugging log.

S303,所述路由器上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。S303. The router uploads the debugging log to the server, so that the server determines a fault of the router according to the debugging log.

路由器将调试日志上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,服务器根据该调试日志,可以准确地确定路由器的故障所在。The router uploads the debug log to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information. Since the debugging log is generated by the router executing the remote debugging command sent by the server, the server can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种远程调试路由器的方法,路由器通过接收服务器发送的远程调试命令,执行远程调试命令,生成调试日志,并上传调试日志给服务器,使得服务器可以根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况,路由器的故障也能得到及时的诊断。According to a method for remotely debugging a router provided in an embodiment of the present invention, the router receives a remote debugging command sent by a server, executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, so that the server can determine the router according to the debugging log. faults, so that the server can remotely debug the router, obtain debugging logs for local analysis, avoid the situation that important log information cannot be obtained, and the faults of the router can also be diagnosed in a timely manner.

图4为本发明实施例提供的又一种远程调试路由器的方法的流程示意图,该方法包括以下步骤:FIG. 4 is a schematic flow chart of another method for remotely debugging a router provided by an embodiment of the present invention. The method includes the following steps:

S401,路由器根据服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份。S401. The router sends a heartbeat request to the server according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router, so that the server sends the address, port number and identification of the router , to verify the identity of the router.

路由器与服务器通过心跳机制建立起通讯连接。具体地,路由器开机启动时读取本地配置文件,获取服务器的IP地址和端口号,然后启动心跳服务。路由器根据服务器的IP地址和端口号,向服务器发送心跳请求,心跳请求周期可以根据需求设定,例如可以一分钟一次。该心跳请求包括路由器的地址、端口号和标识。还可以对该心跳请求进行加密。服务器接收到路由器发送的心跳请求。The router and the server establish a communication connection through the heartbeat mechanism. Specifically, when the router starts up, it reads the local configuration file, obtains the IP address and port number of the server, and then starts the heartbeat service. The router sends a heartbeat request to the server according to the IP address and port number of the server, and the heartbeat request cycle can be set according to requirements, for example, once a minute. The heartbeat request includes the address, port number and identification of the router. This heartbeat request can also be encrypted. The server receives the heartbeat request sent by the router.

服务器接收到路由器发送的心跳请求后,获取心跳请求所包括的路由器的地址、端口号和标识,若心跳请求被路由器进行了加密,服务器还需根据双方协商的加解密机制对心跳请求进行解密。服务器根据预先存储的路由器信息以及获取的路由器的地址、端口号和标识,验证该路由器是否合法,即是否是该服务器管理的路由器。若验证该路由器是合法的路由器,则记录该路由器的最新的心跳时间,以保证服务器与路由器的通讯正常。After receiving the heartbeat request sent by the router, the server obtains the address, port number and identification of the router included in the heartbeat request. If the heartbeat request is encrypted by the router, the server needs to decrypt the heartbeat request according to the encryption and decryption mechanism negotiated by both parties. According to the pre-stored router information and the acquired address, port number and identification of the router, the server verifies whether the router is legitimate, that is, whether it is a router managed by the server. If it is verified that the router is a legitimate router, record the latest heartbeat time of the router to ensure normal communication between the server and the router.

S402,所述路由器接收所述服务器发送的心跳反馈消息。S402. The router receives the heartbeat feedback message sent by the server.

服务器收到路由器的心跳请求后,并且路由器身份验证通过,向路由器发送心跳反馈消息。若路由器身份验证不通过,则服务器可以直接丢弃心跳数据,不向路由器反馈任何消息。路由器接收服务器发送的心跳反馈消息,以确认与服务器的通讯正常。After the server receives the heartbeat request from the router and the authentication of the router passes, the server sends a heartbeat feedback message to the router. If the router authentication fails, the server can directly discard the heartbeat data without feeding back any information to the router. The router receives the heartbeat feedback message sent by the server to confirm that the communication with the server is normal.

S403,所述路由器接收所述服务器发送的远程调试命令。S403. The router receives the remote debugging command sent by the server.

服务器向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。The server sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the administrator according to the debugging needs.

S404,所述路由器执行所述远程调试命令,生成调试日志。S404. The router executes the remote debugging command to generate a debugging log.

路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志。After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, and generates a debugging log.

S405,所述路由器上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。S405. The router uploads the debugging log to the server, so that the server determines the fault of the router according to the debugging log.

路由器上传调试日志给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。服务器接收到路由器发送的调试日志后,将其存储至与路由器标识对应的存储目录或存储空间。由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,服务器根据该调试日志,可以准确地确定路由器的故障所在。The router uploads the debug log to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information. After receiving the debugging log sent by the router, the server stores it in a storage directory or a storage space corresponding to the router identifier. Since the debugging log is generated by the router executing the remote debugging command sent by the server, the server can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种远程调试路由器的方法,路由器通过接收服务器发送的远程调试命令,执行远程调试命令,生成调试日志,并上传调试日志给服务器,使得服务器可以根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况,路由器的故障也能得到及时的诊断;通过心跳机制,路由器与服务器建立起通讯连接。According to a method for remotely debugging a router provided in an embodiment of the present invention, the router receives a remote debugging command sent by a server, executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, so that the server can determine the router according to the debugging log. faults, so that the server can remotely debug the router, obtain debugging logs for local analysis, avoid the situation where important log information cannot be obtained, and the faults of the router can also be diagnosed in a timely manner; through the heartbeat mechanism, the router and the server establish communication connect.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because according to the present invention, certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

图5为本发明实施例提供的一种服务器的结构示意图,该服务器1000包括:FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present invention. The server 1000 includes:

发送单元11,用于向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器。The sending unit 11 is configured to send a remote debugging command to a selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server.

本实施例中,服务器与路由器已建立了通讯连接。当服务器后台管理人员需要对某台路由器进行调试的时候,可以选定该台路由器,发送单元11向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志,然后上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。In this embodiment, a communication connection has been established between the server and the router. When the background manager of the server needs to debug a certain router, the router can be selected, and the sending unit 11 sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the manager according to the debugging needs. After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, generates a debugging log, and uploads it to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information.

接收单元12,用于接收所述路由器发送的所述调试日志。The receiving unit 12 is configured to receive the debugging log sent by the router.

分析单元13,用于根据所述调试日志,确定所述路由器的故障。The analyzing unit 13 is configured to determine the fault of the router according to the debugging log.

由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,分析单元13根据该调试日志,可以准确地确定路由器的故障所在。Since the debugging log is generated by the router executing the remote debugging command sent by the server, the analysis unit 13 can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种服务器,服务器向选定的路由器发送远程调试命令,路由器执行远程调试命令,生成调试日志,并上传调试日志给服务器,服务器根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况。According to a server provided by an embodiment of the present invention, the server sends a remote debugging command to a selected router, the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, and the server determines the fault of the router according to the debugging log, thereby The server can remotely debug the router, obtain the debug log for local analysis, and avoid the situation that important log information cannot be obtained.

图6为本发明实施例提供的另一种服务器的结构示意图,该服务器2000包括:FIG. 6 is a schematic structural diagram of another server provided by an embodiment of the present invention. The server 2000 includes:

接收单元21,用于接收路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识。The receiving unit 21 is configured to receive a heartbeat request sent by the router according to the address and port number of the server, where the heartbeat request includes the address, port number and identification of the router.

服务器与路由器通过心跳机制建立起通讯连接。具体地,路由器开机启动时读取本地配置文件,获取服务器的IP地址和端口号,然后启动心跳服务。路由器根据服务器的IP地址和端口号,向服务器发送心跳请求,心跳请求周期可以根据需求设定,例如可以一分钟一次。该心跳请求包括路由器的地址、端口号和标识。还可以对该心跳请求进行加密。接收单元21接收到路由器发送的心跳请求。The server and the router establish a communication connection through the heartbeat mechanism. Specifically, when the router starts up, it reads the local configuration file, obtains the IP address and port number of the server, and then starts the heartbeat service. The router sends a heartbeat request to the server according to the IP address and port number of the server, and the heartbeat request cycle can be set according to requirements, for example, once a minute. The heartbeat request includes the address, port number and identification of the router. This heartbeat request can also be encrypted. The receiving unit 21 receives the heartbeat request sent by the router.

验证单元22,用于根据所述路由器的地址、端口号和标识,验证所述路由器的身份。The verification unit 22 is configured to verify the identity of the router according to the address, port number and identification of the router.

接收单元21接收到路由器发送的心跳请求后,获取心跳请求所包括的路由器的地址、端口号和标识,若心跳请求被路由器进行了加密,服务器还需根据双方协商的加解密机制对心跳请求进行解密。验证单元22根据预先存储的路由器信息以及获取的路由器的地址、端口号和标识,验证该路由器是否合法,即是否是该服务器管理的路由器。After the receiving unit 21 receives the heartbeat request sent by the router, it obtains the address, port number and identification of the router included in the heartbeat request. If the heartbeat request is encrypted by the router, the server also needs to perform encryption and decryption on the heartbeat request according to the encryption and decryption mechanism negotiated by both parties. decrypt. The verification unit 22 verifies whether the router is legal, that is, whether it is a router managed by the server, according to the pre-stored router information and the acquired address, port number and identification of the router.

记录单元23,用于若所述验证单元验证通过,记录所述路由器的心跳时间。The recording unit 23 is configured to record the heartbeat time of the router if the verification unit passes the verification.

若所述验证单元22验证该路由器是合法的路由器,则记录单元23记录该路由器的最新的心跳时间,以保证服务器与路由器的通讯正常。If the verification unit 22 verifies that the router is a legitimate router, the recording unit 23 records the latest heartbeat time of the router to ensure normal communication between the server and the router.

发送单元24,用于向所述路由器发送心跳反馈消息。The sending unit 24 is configured to send a heartbeat feedback message to the router.

接收单元21收到路由器的心跳请求后,并且路由器身份验证通过,发送单元24向路由器发送心跳反馈消息。若路由器身份验证不通过,则服务器可以直接丢弃心跳数据,不向路由器反馈任何消息。After the receiving unit 21 receives the heartbeat request from the router, and the router identity verification is passed, the sending unit 24 sends a heartbeat feedback message to the router. If the router authentication fails, the server can directly discard the heartbeat data without feeding back any information to the router.

所述接收单元21还用于接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。The receiving unit 21 is also configured to receive a user's request for selecting a router on the background management interface and an input remote debugging command.

服务器设置有后台管理界面,当服务器后台管理人员需要对某台路由器进行调试的时候,后台管理人员登录服务器,在后台管理界面选择要远程调试的路由器并输入远程调试命令,然后点击发送。The server is equipped with a background management interface. When the server background management personnel need to debug a certain router, the background management personnel log in to the server, select the router to be remotely debugged on the background management interface and enter the remote debugging command, and then click send.

所述发送单元24还用于向所述选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器。The sending unit 24 is further configured to send a remote debugging command to the selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server.

发送单元24向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。路由器接收到远程调试命令后,解析该远程调试命令,并执行该远程调试命令,生成调试日志,然后上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。The sending unit 24 sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the administrator according to the debugging needs. After receiving the remote debugging command, the router parses the remote debugging command, executes the remote debugging command, generates a debugging log, and uploads it to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information.

所述接收单元21还用于接收所述路由器发送的所述调试日志。The receiving unit 21 is also configured to receive the debugging log sent by the router.

接收单元21接收到路由器发送的调试日志后,将其存储至与路由器标识对应的存储目录或存储空间。After receiving the debugging log sent by the router, the receiving unit 21 stores it in a storage directory or a storage space corresponding to the router identifier.

分析单元25,用于根据所述调试日志,确定所述路由器的故障。The analysis unit 25 is configured to determine the fault of the router according to the debugging log.

由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,分析单元25根据该调试日志,可以准确地确定路由器的故障所在。Since the debugging log is generated by the router executing the remote debugging command sent by the server, the analysis unit 25 can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种服务器,服务器向选定的路由器发送远程调试命令,路由器执行远程调试命令,生成调试日志,并上传调试日志给服务器,服务器根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况;通过心跳机制,路由器与服务器建立起通讯连接;用户可以在服务器的后台管理界面选定待调试的路由器并输入远程调试命令,方便进行人机交互。According to a server provided by an embodiment of the present invention, the server sends a remote debugging command to a selected router, the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, and the server determines the fault of the router according to the debugging log, thereby The server can remotely debug the router, obtain the debug log for local analysis, and avoid the situation that important log information cannot be obtained; through the heartbeat mechanism, the router establishes a communication connection with the server; the user can select to be debugged on the background management interface of the server router and input remote debugging commands to facilitate human-computer interaction.

图7为本发明实施例提供的一种路由器的结构示意图,该路由器3000包括:FIG. 7 is a schematic structural diagram of a router provided by an embodiment of the present invention. The router 3000 includes:

接收单元31,用于接收服务器发送的远程调试命令。The receiving unit 31 is configured to receive the remote debugging command sent by the server.

本实施例中,路由器与服务器已建立了通讯连接。当服务器后台管理人员需要对某台路由器进行调试的时候,可以选定该台路由器,服务器向选定的路由器发送远程调试命令,该远程调试命令也是管理人员可以根据调试需要编程的。接收单元31接收该远程调试命令。In this embodiment, the router has established a communication connection with the server. When the server background management personnel need to debug a certain router, they can select the router, and the server sends a remote debugging command to the selected router, and the remote debugging command can also be programmed by the management personnel according to the debugging needs. The receiving unit 31 receives the remote debugging command.

若路由器与服务器尚未建立通讯连接,路由器与服务器之间通过心跳机制建立通讯连接。具体地:If the router has not established a communication connection with the server, a communication connection is established between the router and the server through a heartbeat mechanism. specifically:

发送单元33,用于根据服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份。The sending unit 33 is configured to send a heartbeat request to the server according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router, so that the address, port number and port number of the router of the server number and ID to verify the identity of the router.

路由器与服务器通过心跳机制建立起通讯连接。具体地,路由器开机启动时读取本地配置文件,获取服务器的IP地址和端口号,然后启动心跳服务。路由器根据服务器的IP地址和端口号,向服务器发送心跳请求,心跳请求周期可以根据需求设定,例如可以一分钟一次。该心跳请求包括路由器的地址、端口号和标识。还可以对该心跳请求进行加密。服务器接收到路由器发送的心跳请求。The router and the server establish a communication connection through the heartbeat mechanism. Specifically, when the router starts up, it reads the local configuration file, obtains the IP address and port number of the server, and then starts the heartbeat service. The router sends a heartbeat request to the server according to the IP address and port number of the server, and the heartbeat request cycle can be set according to requirements, for example, once a minute. The heartbeat request includes the address, port number and identification of the router. This heartbeat request can also be encrypted. The server receives the heartbeat request sent by the router.

服务器接收到路由器发送的心跳请求后,获取心跳请求所包括的路由器的地址、端口号和标识,若心跳请求被路由器进行了加密,服务器还需根据双方协商的加解密机制对心跳请求进行解密。服务器根据预先存储的路由器信息以及获取的路由器的地址、端口号和标识,验证该路由器是否合法,即是否是该服务器管理的路由器。若验证该路由器是合法的路由器,则记录该路由器的最新的心跳时间,以保证服务器与路由器的通讯正常。After receiving the heartbeat request sent by the router, the server obtains the address, port number and identification of the router included in the heartbeat request. If the heartbeat request is encrypted by the router, the server needs to decrypt the heartbeat request according to the encryption and decryption mechanism negotiated by both parties. According to the pre-stored router information and the acquired address, port number and identification of the router, the server verifies whether the router is legitimate, that is, whether it is a router managed by the server. If it is verified that the router is a legitimate router, record the latest heartbeat time of the router to ensure normal communication between the server and the router.

所述接收单元31还用于接收所述服务器发送的心跳反馈消息。The receiving unit 31 is also configured to receive the heartbeat feedback message sent by the server.

服务器收到路由器的心跳请求后,并且路由器身份验证通过,向路由器发送心跳反馈消息。若路由器身份验证不通过,则服务器可以直接丢弃心跳数据,不向路由器反馈任何消息。路由器接收服务器发送的心跳反馈消息,以确认与服务器的通讯正常。After the server receives the heartbeat request from the router and the authentication of the router passes, the server sends a heartbeat feedback message to the router. If the router authentication fails, the server can directly discard the heartbeat data without feeding back any information to the router. The router receives the heartbeat feedback message sent by the server to confirm that the communication with the server is normal.

执行单元32,用于执行所述远程调试命令,生成调试日志。The execution unit 32 is configured to execute the remote debugging command and generate a debugging log.

接收单元31接收到远程调试命令后,执行单元32解析该远程调试命令,并执行该远程调试命令,生成调试日志。After the receiving unit 31 receives the remote debugging command, the executing unit 32 parses the remote debugging command, executes the remote debugging command, and generates a debugging log.

发送单元33,用于上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。The sending unit 33 is configured to upload the debugging log to the server, so that the server can determine the fault of the router according to the debugging log.

路由器将调试日志上传给服务器。由于调试日志是执行远程调试命令生成的,执行完后即上传给服务器,不会使服务器获取不到重要的日志信息。由于该调试日志是路由器执行服务器特定发送的远程调试命令生成的,服务器根据该调试日志,可以准确地确定路由器的故障所在。The router uploads the debug log to the server. Since the debug log is generated by executing the remote debugging command, it will be uploaded to the server after execution, so that the server will not fail to obtain important log information. Since the debugging log is generated by the router executing the remote debugging command sent by the server, the server can accurately determine the fault of the router according to the debugging log.

根据本发明实施例提供的一种路由器,路由器通过接收服务器发送的远程调试命令,执行远程调试命令,生成调试日志,并上传调试日志给服务器,使得服务器可以根据调试日志,确定路由器的故障,从而服务器可以对路由器进行远程调试,获取调试日志进行本地分析,避免获取不到重要的日志信息的情况,路由器的故障也能得到及时的诊断。According to a router provided in an embodiment of the present invention, the router receives a remote debugging command sent by a server, executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server, so that the server can determine the fault of the router according to the debugging log, thereby The server can remotely debug the router, obtain the debug log for local analysis, avoid the situation that important log information cannot be obtained, and the fault of the router can also be diagnosed in time.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(RandomAccessMemory,RAM)、只读存储器(Read-OnlyMemory,ROM)、电可擦可编程只读存储器(ElectricallyErasableProgrammableRead-OnlyMemory,EEPROM)、只读光盘(CompactDiscRead-OnlyMemory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(DigitalSubscriberLine,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the above description of the implementation manners, those skilled in the art can clearly understand that the present invention can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Take this as an example but not limited to: the computer-readable medium may include Random Access Memory (Random Access Memory, RAM), Read-Only Memory (Read-Only Memory, ROM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM) , CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage medium or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be stored by a computer any other medium. also. Any connection can suitably be a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair wire, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the same Coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, wireless, and microwave are included in the fixation of the respective media. As used herein, Disk and disc include compact disc (CD), laser disc, compact disc, digital versatile disc (DVD), floppy disc, and Blu-ray disc, where discs usually reproduce data magnetically, and discs Lasers are used to optically reproduce the data. Combinations of the above should also be included within the scope of computer-readable media.

总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In a word, the above descriptions are only preferred embodiments of the technical solutions of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种远程调试路由器的方法,其特征在于,所述方法包括:1. A method for remote debugging router, characterized in that, the method comprises: 服务器向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器;The server sends a remote debugging command to the selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server; 所述服务器接收所述路由器发送的所述调试日志;The server receives the debugging log sent by the router; 所述服务器根据所述调试日志,确定所述路由器的故障。The server determines the fault of the router according to the debugging log. 2.如权利要求1所述的方法,其特征在于,所述服务器向选定的路由器发送远程调试命令之前,所述方法还包括:2. The method according to claim 1, wherein, before the server sends the remote debugging command to the selected router, the method further comprises: 所述服务器接收所述路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识;The server receives the heartbeat request sent by the router according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router; 所述服务器根据所述路由器的地址、端口号和标识,验证所述路由器的身份;The server verifies the identity of the router according to the address, port number and identification of the router; 若验证通过,所述服务器记录所述路由器的心跳时间;If the verification is passed, the server records the heartbeat time of the router; 所述服务器向所述路由器发送心跳反馈消息。The server sends a heartbeat feedback message to the router. 3.如权利要求1或2所述的方法,其特征在于,所述方法还包括:3. the method as claimed in claim 1 or 2, is characterized in that, described method also comprises: 所述服务器接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。The server receives the user's request for selecting a router on the background management interface and the input remote debugging command. 4.一种远程调试路由器的方法,其特征在于,所述方法包括:4. A method for remote debugging router, characterized in that, the method comprises: 路由器接收服务器发送的远程调试命令;The router receives the remote debugging command sent by the server; 所述路由器执行所述远程调试命令,生成调试日志;The router executes the remote debugging command to generate a debugging log; 所述路由器上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。The router uploads the debugging log to the server, so that the server determines the fault of the router according to the debugging log. 5.如权利要求4所述的方法,其特征在于,所述方法还包括:5. The method of claim 4, further comprising: 所述路由器根据所述服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份;The router sends a heartbeat request to the server according to the address and port number of the server, and the heartbeat request includes the address, port number and identification of the router, so that the address, port number and port number of the router of the server and identification, verifying the identity of the router; 所述路由器接收所述服务器发送的心跳反馈消息。The router receives the heartbeat feedback message sent by the server. 6.一种服务器,其特征在于,所述服务器包括:6. A server, characterized in that the server comprises: 发送单元,用于向选定的路由器发送远程调试命令,以使所述路由器执行所述远程调试命令,生成调试日志,并上传所述调试日志给所述服务器;A sending unit, configured to send a remote debugging command to a selected router, so that the router executes the remote debugging command, generates a debugging log, and uploads the debugging log to the server; 接收单元,用于接收所述路由器发送的所述调试日志;a receiving unit, configured to receive the debugging log sent by the router; 分析单元,用于根据所述调试日志,确定所述路由器的故障。An analyzing unit is configured to determine a fault of the router according to the debugging log. 7.如权利要求6所述的服务器,其特征在于:7. The server according to claim 6, characterized in that: 所述接收单元还用于接收所述路由器根据所述服务器的地址和端口号发送的心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识;The receiving unit is further configured to receive a heartbeat request sent by the router according to the address and port number of the server, the heartbeat request including the address, port number and identification of the router; 所述服务器还包括:The server also includes: 验证单元,用于根据所述路由器的地址、端口号和标识,验证所述路由器的身份;a verification unit, configured to verify the identity of the router according to the address, port number and identification of the router; 记录单元,用于若所述验证单元验证通过,记录所述路由器的心跳时间;a recording unit, configured to record the heartbeat time of the router if the verification unit passes the verification; 所述发送单元还用于向所述路由器发送心跳反馈消息。The sending unit is further configured to send a heartbeat feedback message to the router. 8.如权利要求6或7所述的服务器,其特征在于,所述接收单元还用于:8. The server according to claim 6 or 7, wherein the receiving unit is further used for: 接收用户在后台管理界面选定路由器的请求以及输入的远程调试命令。Receive the user's request to select a router on the background management interface and the input remote debugging command. 9.一种路由器,其特征在于,所述路由器包括:9. A router, characterized in that, the router comprises: 接收单元,用于接收服务器发送的远程调试命令;The receiving unit is used to receive the remote debugging command sent by the server; 执行单元,用于执行所述远程调试命令,生成调试日志;an execution unit, configured to execute the remote debugging command and generate a debugging log; 发送单元,用于上传所述调试日志给所述服务器,以使所述服务器根据所述调试日志,确定所述路由器的故障。A sending unit, configured to upload the debugging log to the server, so that the server can determine the fault of the router according to the debugging log. 10.如权利要求9所述的路由器,其特征在于:10. The router according to claim 9, characterized in that: 所述发送单元还用于根据所述服务器的地址和端口号,向所述服务器发送心跳请求,所述心跳请求包括所述路由器的地址、端口号和标识,以使所述服务器所述路由器的地址、端口号和标识,验证所述路由器的身份;The sending unit is further configured to send a heartbeat request to the server according to the address and port number of the server, the heartbeat request includes the address, port number and identification of the router, so that the server and the router address, port number and identification, verifying the identity of said router; 所述接收单元还用于接收所述服务器发送的心跳反馈消息。The receiving unit is further configured to receive a heartbeat feedback message sent by the server.
CN201610032951.6A 2016-01-18 2016-01-18 Method for remotely debugging router, server, and router Pending CN105703947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610032951.6A CN105703947A (en) 2016-01-18 2016-01-18 Method for remotely debugging router, server, and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610032951.6A CN105703947A (en) 2016-01-18 2016-01-18 Method for remotely debugging router, server, and router

Publications (1)

Publication Number Publication Date
CN105703947A true CN105703947A (en) 2016-06-22

Family

ID=56226525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610032951.6A Pending CN105703947A (en) 2016-01-18 2016-01-18 Method for remotely debugging router, server, and router

Country Status (1)

Country Link
CN (1) CN105703947A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933185A (en) * 2016-06-24 2016-09-07 上海连尚网络科技有限公司 Method and device for determining connection abnormity type of router
CN106506644A (en) * 2016-11-07 2017-03-15 深圳市共进电子股份有限公司 Terminal Debugging message collection method and system
CN107688300A (en) * 2017-09-08 2018-02-13 深圳市盛路物联通讯技术有限公司 The control method and associated server of a kind of equipment
CN107800791A (en) * 2017-10-24 2018-03-13 海信集团有限公司 A kind of method and apparatus debugged
CN107888693A (en) * 2017-11-21 2018-04-06 海信集团有限公司 NB IOT apparatus debugging methods and server
CN109862583A (en) * 2019-01-04 2019-06-07 新华三技术有限公司 A kind of method and device reporting exception information
CN110278092A (en) * 2018-03-13 2019-09-24 成都市共维科技有限公司 Router long-range control method and system based on MQTT agreement
WO2020217157A1 (en) * 2019-04-26 2020-10-29 International Business Machines Corporation On-premise and off-premise debugging
CN112311576A (en) * 2019-07-31 2021-02-02 中兴通讯股份有限公司 OTA upgrade diagnosis method and device, wireless routing equipment and terminal equipment
CN116633773A (en) * 2023-06-16 2023-08-22 北京自如信息科技有限公司 Method and system for remote debugging router

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216895A1 (en) * 2004-03-23 2005-09-29 Tran Hieu T Method and apparatus for remote debugging of kernel and application software
US20070067675A1 (en) * 2005-09-21 2007-03-22 Cisco Technology, Inc. Method and system for managing failure information
CN104243210A (en) * 2014-09-17 2014-12-24 湖北盛天网络技术股份有限公司 Method and system for remotely having access to administrative web pages of routers
CN105007230A (en) * 2015-08-11 2015-10-28 上海斐讯数据通信技术有限公司 System and method for testing multiple wireless routers
CN105049217A (en) * 2015-06-17 2015-11-11 上海斐讯数据通信技术有限公司 Method and system for controlling debugging interface of intelligent network equipment
CN105099814A (en) * 2015-06-19 2015-11-25 百度在线网络技术(北京)有限公司 Intelligent router fault detection method and device
CN105187262A (en) * 2015-10-27 2015-12-23 上海斐讯数据通信技术有限公司 Router upgrading method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216895A1 (en) * 2004-03-23 2005-09-29 Tran Hieu T Method and apparatus for remote debugging of kernel and application software
US20070067675A1 (en) * 2005-09-21 2007-03-22 Cisco Technology, Inc. Method and system for managing failure information
CN104243210A (en) * 2014-09-17 2014-12-24 湖北盛天网络技术股份有限公司 Method and system for remotely having access to administrative web pages of routers
CN105049217A (en) * 2015-06-17 2015-11-11 上海斐讯数据通信技术有限公司 Method and system for controlling debugging interface of intelligent network equipment
CN105099814A (en) * 2015-06-19 2015-11-25 百度在线网络技术(北京)有限公司 Intelligent router fault detection method and device
CN105007230A (en) * 2015-08-11 2015-10-28 上海斐讯数据通信技术有限公司 System and method for testing multiple wireless routers
CN105187262A (en) * 2015-10-27 2015-12-23 上海斐讯数据通信技术有限公司 Router upgrading method and system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933185A (en) * 2016-06-24 2016-09-07 上海连尚网络科技有限公司 Method and device for determining connection abnormity type of router
CN106506644A (en) * 2016-11-07 2017-03-15 深圳市共进电子股份有限公司 Terminal Debugging message collection method and system
CN107688300A (en) * 2017-09-08 2018-02-13 深圳市盛路物联通讯技术有限公司 The control method and associated server of a kind of equipment
CN107800791B (en) * 2017-10-24 2021-08-17 海信集团有限公司 Debugging method and device
CN107800791A (en) * 2017-10-24 2018-03-13 海信集团有限公司 A kind of method and apparatus debugged
CN107888693A (en) * 2017-11-21 2018-04-06 海信集团有限公司 NB IOT apparatus debugging methods and server
CN110278092A (en) * 2018-03-13 2019-09-24 成都市共维科技有限公司 Router long-range control method and system based on MQTT agreement
CN109862583A (en) * 2019-01-04 2019-06-07 新华三技术有限公司 A kind of method and device reporting exception information
WO2020217157A1 (en) * 2019-04-26 2020-10-29 International Business Machines Corporation On-premise and off-premise debugging
GB2597867A (en) * 2019-04-26 2022-02-09 Ibm On-premise and off-premise debugging
GB2597867B (en) * 2019-04-26 2022-11-02 Ibm On-premise and off-premise debugging
CN112311576A (en) * 2019-07-31 2021-02-02 中兴通讯股份有限公司 OTA upgrade diagnosis method and device, wireless routing equipment and terminal equipment
CN112311576B (en) * 2019-07-31 2023-11-24 中兴通讯股份有限公司 OTA upgrade diagnosis method, device, wireless routing equipment and terminal equipment
CN116633773A (en) * 2023-06-16 2023-08-22 北京自如信息科技有限公司 Method and system for remote debugging router

Similar Documents

Publication Publication Date Title
CN105703947A (en) Method for remotely debugging router, server, and router
CN108881308B (en) User terminal and authentication method, system and medium thereof
CN107317695A (en) Mthods, systems and devices for debugging network node Intranet failure
WO2021238990A1 (en) Authentication method and apparatus, electronic device, server, program, and storage medium
TW201509151A (en) A method and computer program product for providing a remote diagnosis with a secure connection for an appliance and an appliance performing the method
CN110213284A (en) Detection method, system and the relevant apparatus of SSH server weak passwurd loophole
CN117857131A (en) Method and system for remote management of wide area network intelligent gateway equipment based on web
CN108289074B (en) User account login method and device
CN108337163A (en) Method and apparatus for link aggregation
CN103560918A (en) Method and system for managing CPE port
JP5771741B2 (en) Communications system
CN111130976B (en) Method, equipment and medium for configuring virtual local area network of white box switch
WO2021098213A1 (en) Trusted state monitoring method, device, and medium
CN108694489B (en) Method and system for auditing assessment platform
CN111294276A (en) Mailbox-based remote control method, system, device and medium
CN118101454A (en) A method and device for automatic configuration of network equipment
CN112468356B (en) Router interface test methods, devices, electronic equipment and storage media
CN114285809A (en) Method and device for isolating switch port
CN115396165B (en) File management method, device, electronic equipment and storage medium
CN115484142A (en) Network fault diagnosis method, device, medium and network equipment
CN116599751B (en) Private cloud service authentication methods, server-side components, systems, and electronic devices
CN111131152A (en) Automatic verification method and system for cross-platform remote login protection system
CN118646595B (en) Method, equipment and storage medium for repairing server to avoid secret mutual trust
CN116208476B (en) Method and device for automatically configuring route by virtual machine, electronic equipment and storage medium
CN113868632B (en) A method for checking weak application passwords, a host, a control terminal, a system and a medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160622