WO2017215268A1 - Method and device for router control, power adapter, and router - Google Patents

Method and device for router control, power adapter, and router Download PDF

Info

Publication number
WO2017215268A1
WO2017215268A1 PCT/CN2017/071532 CN2017071532W WO2017215268A1 WO 2017215268 A1 WO2017215268 A1 WO 2017215268A1 CN 2017071532 W CN2017071532 W CN 2017071532W WO 2017215268 A1 WO2017215268 A1 WO 2017215268A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
network
access
wireless network
restart
Prior art date
Application number
PCT/CN2017/071532
Other languages
French (fr)
Chinese (zh)
Inventor
任斌
高飞
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017215268A1 publication Critical patent/WO2017215268A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • 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/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software

Definitions

  • the present disclosure relates to the field of network communications, for example, to a router control method, apparatus, and power adapter, router.
  • Routers are popular in the workplace and in the home; most routers are now out of the state of wired routers. Most routers have wifi (Wireless-Fidelity) transmitters that can wirelessly route the router's public network.
  • the form of the network is used by a variety of devices that support wireless networks, including laptops, cell phones, tablets, or other devices with wireless network cards.
  • Most routers are installed, and they will not be powered off when they are powered on. They will continue to work all the time. However, the long-term operation of the current routers will have stability problems. Some routers have designed watchdogs. If the system crashes automatically, more routers do not have a watchdog. If the crash occurs, the device can only be manually restarted.
  • a router without a watchdog can only be manually restarted after a problem occurs; even if there is a watchdog router, not all problems will restart the router, and only when the system crashes, the device will be restarted, in the case of non-crash, etc. If, for example, a software module is abnormal, the wifi chip is abnormal. At this time, the watchdog will not restart the device. The user can only manually restart the device after the user finds the problem, and the user experience is very poor.
  • the embodiment of the present invention provides a router control method and device, and a power adapter and a router, which solve the problem that the router cannot automatically restart when a network abnormality occurs in the related art.
  • an embodiment of the present disclosure provides a router control method, including:
  • the router is restarted when it is detected that a network abnormality occurs in the wireless network.
  • an embodiment of the present disclosure further provides a router control apparatus, including:
  • the network monitoring module is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor an operating state of the wireless network;
  • the power control module is configured to control the router to restart when it detects that a network abnormality occurs in the wireless network.
  • an embodiment of the present disclosure further provides a power adapter, including a wireless chip and a controller, where the wireless chip is configured to access a wireless network provided by a router according to an access parameter of a router, and monitor the wireless network. An operating state; the controller is configured to control the router to restart upon detecting a network abnormality in the wireless network.
  • an embodiment of the present disclosure further provides a router, including a router body and a processor, where the processor is configured to access a wireless network provided by a router body according to an access parameter of the router body, and monitor the wireless The network running state of the network, and controlling the router to restart when it is detected that the wireless network has a network abnormality.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • An embodiment of the present disclosure further provides an electronic device, including:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • the present disclosure provides a router control method and device, and a power adapter and a router.
  • the wireless network provided by the router is accessed according to the access parameter of the router, and the running state of the wireless network is monitored.
  • the control router is restarted; You can directly restart the router when the network is abnormal. It does not require manual operation by the user and has a good user experience.
  • FIG. 1 is a flowchart of a router control method according to a first embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a router control apparatus according to a second embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a router according to a third embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a power adapter according to a fourth embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a router according to a fifth embodiment of the present disclosure.
  • FIG. 6 is a signal flow diagram of a router control method according to a sixth embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the disclosure accesses the wireless network provided by the router through the access parameter of the router. If the network is abnormal, that is, the network is unreachable, the control router is restarted, so that the user does not need to manually restart, the fault determination range is large, and the user experience is good.
  • This embodiment provides a router control method. Referring to FIG. 1, the method includes:
  • S102 Monitor an operating state of the wireless network.
  • the router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network.
  • the router will include the SSID (Service Set Identifier) and PASSWORD (password) of the router.
  • the SSID of the router can be regarded as the name of the network provided by the router;
  • the device can access the public network through SSID and PASSWORD. That is, the SSID and PASSWORD of the router are the access parameters of the router. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router include at least the SSID. In some cases, Can include PASSWORD.
  • the router shares the network to other devices through the wireless network through its internal wireless chip; Within a certain range, other devices can access the Internet by accessing the network provided by the router's wireless chip through the access parameters of the router.
  • the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router to share the external network with other devices in the LAN of the router. .
  • the router After the router is started, access the wireless network provided by the router through the access parameters of the router to monitor the running status of the wireless network; it should be noted that the wireless network provided by the access router needs to be within the wireless network coverage of the router; monitoring wireless
  • the operation state of the network is usually a regular access to a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
  • normal communication includes normal uplink and normal downlink; in actual communication, the uplink is based on
  • the operation of the device on the user side determines that the downlink is determined by the operation of the device on the server side; the operation of the device on the user side mainly includes the operation of the router and the connection between the router and the LAN.
  • the operation of the equipment on the network side may include the operation of the base station and the operation of the site server.
  • the network anomaly may be caused by an uplink network failure and/or a downlink network failure.
  • the operation of restarting the router may include controlling the power of the router, that is, disconnecting the power of the router, and then turning on the power, so that the router can be restarted.
  • the network is abnormal, including the network connection is disconnected or the network connection is timed out.
  • the disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
  • the network may be abnormal due to various reasons such as crashes, abnormal programs, memory exhaustion, etc.
  • the restart can often solve most problems, including the wireless chip failure in the router.
  • restarting the router cannot solve the problem.
  • it is judged whether the time interval from the last restart is less than the pre- If the time is less than the preset time, it will not be restarted to prevent the router from restarting under abnormal conditions. The user cannot configure and locate the router. Of course, if it is not less than the preset time, the router is restarted normally.
  • the router control method further includes: obtaining an access parameter of the router according to a preset rule.
  • the preset rules may be multiple.
  • the first one may include the access parameters of the router that are periodically and periodically acquired.
  • the second one may include obtaining the changed access of the router when the access parameters of the router change.
  • the third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed. Timely update the access parameters of the router used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router and monitoring the operating status of the wireless network, thereby causing no The necessary restart.
  • This embodiment provides a router control method, which accesses a wireless network provided by a router according to an access parameter of a router, monitors an operating state of the wireless network, and controls a router to restart when a network abnormality occurs in the wireless network, so that the network can be Restart the router directly when abnormal, without manual operation by the user, and have a good user experience.
  • This embodiment provides a router control apparatus. Referring to FIG. 2, the method includes:
  • the network monitoring module 201 is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor an operating state of the wireless network;
  • the power control module 202 is configured to control the router to restart when it detects that a network abnormality occurs in the wireless network.
  • the router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network.
  • its access parameters include at least the SSID, and in some cases, PASSWORD.
  • the router shares the network to other devices through the wireless network through its internal wireless chip; within a certain range, other devices can access the Internet by accessing the network provided by the router's wireless chip through the access parameters of the router.
  • the access form is not limited, Therefore, it is connected through a wired network, or it can be an access wireless network, and does not affect the router to share the external network to other devices in the router's local area network.
  • the network monitoring module 201 accesses the wireless network provided by the router through the access parameter of the router to monitor the running status of the wireless network; the method of monitoring the running state of the wireless network is usually to periodically access a server on the Internet, such as Google or Baidu or any other server that can be accessed under normal circumstances. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
  • a server on the Internet such as Google or Baidu or any other server that can be accessed under normal circumstances.
  • normal communication includes uplink normal and downlink normal; in actual communication, uplink is based on user-side equipment.
  • the working condition determines that the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router and the connection between the local area network between the router and the terminal;
  • the operation of the device may include the operation of the base station and the operation of the site server.
  • the network abnormality may be caused by an uplink network failure and/or a downlink network failure.
  • the power control module 202 controls the router to restart whenever a network anomaly is detected.
  • the restart operation of the router may include controlling the power of the router, that is, disconnecting the power of the router, and then turning on the power, so that the router can be restarted.
  • the network is abnormal, including the network connection is disconnected or the network connection is timed out.
  • the disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
  • the network may be abnormal due to various reasons such as crashes, abnormal programs, memory exhaustion, etc.
  • the restart can often solve most problems, including the wireless chip in the router. Faults, software failures, system crashes, etc.; if there is a failure on the downlink, such as a failure of the site server, or a failure of the base station, that is, the network exception is not caused by the router itself.
  • restarting the router cannot solve the problem.
  • the network abnormality occurs in the wireless network, it is judged whether the time interval from the last restart is less than the preset time. If it is less than the preset time, it will not be restarted to prevent the router from restarting under abnormal conditions. The user cannot configure and locate the router. Of course, if it is not less than the preset time, the router is restarted normally.
  • the router control device further includes a parameter synchronization module 203 configured to synchronize the access parameters of the router to the network monitoring module 201 according to a preset rule.
  • the preset rules may be multiple.
  • the first one may include the access parameters of the router that are periodically and periodically acquired.
  • the second one may include obtaining the changed access of the router when the access parameters of the router change.
  • the third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed.
  • the parameter synchronization module 203 can also be set on the router, and the parameter synchronization module 203 on the router sends the access parameters of the router to the router in real time.
  • the parameter synchronization module 203 on the device further enables the parameter synchronization module 203 on the router control device to synchronize the access parameters of the router to the network monitoring module 201 in real time; the access parameters of the router are sent from the router to the router control device, and the UART can be passed through the UART.
  • UART Universal Asynchronous Receiver/Transmitter
  • communication which can be a UART interface of TTL level (transistor transistor logic).
  • the embodiment provides a router control device, including a network monitoring module and a power control module.
  • the network monitoring module accesses the wireless network provided by the router according to the access parameter of the router, and monitors the running state of the wireless network.
  • the power control module is in the network. When the monitoring module detects that the network is abnormal in the wireless network, the control router restarts, so that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
  • This embodiment provides a router. Referring to FIG. 3, the method includes:
  • the router body 10 and the processor 30 are configured to access the wireless network provided by the router body 10 according to the access parameters of the router body 10, monitor the running state of the wireless network, and detect a network abnormality in the wireless network. A reboot is performed on the router body 10.
  • the router body 10 allocates the external network to a plurality of terminals in the local area network formed by the router body 10.
  • the terminals can access the public network through the local area network provided by the router body 10, thereby implementing interaction with the public network.
  • the router body 10 may include the SSID and PASSWORD of the router body 10 during configuration.
  • the SSID of the router body 10 may be considered as the name of the network provided by the router body 10; the devices in the local area network formed by the router body 10 may pass the SSID and PASSWORD.
  • Accessing the public network, that is, the SSID and PASSWORD of the router body 10 are access parameters of the router body 10. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router body 10 include at least the SSID. In some cases, It can also include PASSWORD.
  • the router body 10 shares the network to other devices through the wireless network through its internal wireless chip; within a certain range, other devices can access the network provided by the wireless chip of the router body 10 through the access parameters of the router body 10, Thereby access to the Internet.
  • the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router body 10 sharing the external network to the router body 10 Other devices in the LAN.
  • the processor 30 accesses the wireless network provided by the router according to the access parameter of the router body 10, and monitors the running state of the wireless network; the method of monitoring the running state of the wireless network is usually a regular access to a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and no operation is performed; if the access to the server fails, the network is abnormal.
  • the processor 30 accesses the wireless network provided by the router body 10 according to the access parameter, under normal circumstances, the processor 30 can communicate with the Internet; the normal communication includes the uplink normal and the downlink normal; in the actual communication process, the uplink The link is determined according to the working condition of the device on the user side, and the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router body 10, and the router body 10
  • the connection with the processor 30; the operation of the device on the network side may include the operation of the base station and the operation of the site server.
  • the network anomaly may be caused by an uplink network failure and/or a downlink network failure.
  • the router body 10 is controlled to restart.
  • the restarting operation of the router body 10 may include controlling the power of the router body 10, that is, disconnecting the power of the router body 10, and then turning on the power, so that the restart of the router body 10 can be implemented.
  • the network is abnormal, including the network connection is disconnected or the network connection is timed out.
  • the disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
  • the network may be abnormal due to various reasons such as a crash, a program exception, or a memory overflow.
  • the restart may often solve most problems, including wireless in the router. Chip failure, software failure, system crash, etc.; if there is a failure in the downlink, such as a failure of the site server, or a failure of the base station, that is, the network abnormality is not caused by the router body 10, obviously, restarting the router body 10 is If the network is abnormal, the time interval between the last restart is less than the preset time. If the time is less than the preset time, the system does not restart. After the restart is stopped, the user cannot configure and locate the router body 10. Of course, if it is not less than the preset time, the router is restarted normally.
  • the access parameters of the router body 10 are not static; after the access parameters of the router body 10 are changed, the access parameters of the router body 10 used to monitor the running state of the wireless network should also change with the change. Therefore, the router body 10 in this embodiment is further configured to synchronize the access parameters of the router body to the processor 30 according to a preset rule.
  • the preset rules may be multiple, and the first one may include a timing and a period.
  • the second method may include: when the access parameters of the router body 10 change, obtaining the changed access parameters of the router body 10; and third, the combination of the foregoing two solutions may be In addition to obtaining the access parameters of the router body 10 periodically, the changed access parameters may be acquired in time when the access parameters of the router body 10 are changed. Timely updating the access parameters of the router body 10 used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router body 10 and monitoring the operating state of the wireless network, thereby causing Unnecessary restart of the router body 10.
  • the synchronization of the access parameters can be realized by UART communication, which can be a TTL level UART interface, a UART interface is set on the router body 10, and a UART interface is also set on the processor 30, and the router is transmitted in real time through the two interfaces.
  • the access parameters of the ontology 10 are given to the processor 30.
  • the processor in this embodiment may be disposed in the router body or may be disposed outside the router body as a separate device for use with the router.
  • the embodiment provides a router, including a router body and a processor.
  • the processor is configured to access a wireless network provided by the router body according to an access parameter of the router body, and monitor an operation state of the wireless network, and monitor the wireless network.
  • the control router restarts, so that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
  • the embodiment provides a power adapter.
  • the method includes: a wireless chip 403 and a controller 404.
  • the wireless chip 403 is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor the wireless network.
  • the operating state; the controller 404 is configured to control the router to restart upon detecting a network abnormality in the wireless network.
  • the power adapter 40 further includes a power source 401 for powering the router; generally, the working voltage of the router is between 9V and 15V, and the AC power source 401 of the home is 220V. Therefore, the power adapter 40 generally includes The transformer, rectifier, is configured to convert the household 220V AC voltage to a 9V-15V DC voltage for use by the router.
  • the router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network.
  • its access parameters include at least the SSID, and in some cases, PASSWORD.
  • these terminals may include a power adapter 40 of the router.
  • Power adapter 40 is the device that powers the router.
  • the wireless chip 403 and the controller 404 are set, and then the access network of the router and the wireless chip 403 can access the wireless network provided by the router to access the Internet.
  • the wireless chip 403 accesses the wireless network provided by the router through the access parameter of the router to monitor the running state of the wireless network; the method of monitoring the running state of the wireless network is usually to periodically access a server on the Internet, such as Google. Or Baidu or any other server that can be accessed under normal circumstances. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
  • the uplink is based on the user-side device.
  • the working condition determines that the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router and the connection between the router and the local area network of the power adapter 40;
  • the working condition of the side device may be packaged Including the work of the base station and the operation of the site server.
  • the network abnormality may be caused by an uplink network failure and/or a downlink network failure.
  • the controller 404 controls the router to restart.
  • the restart operation of the router may include controlling the power supply 401 of the router, disconnecting the power supply 401 of the router, and then turning on the power supply 401 to implement restarting the router.
  • the network is abnormal, including the network connection is disconnected or the network connection is timed out.
  • the disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
  • the system when the network abnormality of the wireless network is detected, it is determined whether the time interval from the last restart is less than the preset time. If the time is less than the preset time, the system does not restart to prevent the router from restarting under abnormal conditions, and the user cannot Configure and troubleshoot the router. Of course, if it is not less than the preset time, the router is restarted normally.
  • the power adapter in this embodiment 40 also includes a second synchronization interface 52 configured to synchronize the access parameters of the router to the wireless chip 403 in accordance with a preset rule.
  • the preset rules may be multiple.
  • the first one may include the access parameters of the router that are periodically and periodically acquired.
  • the second one may include obtaining the changed access of the router when the access parameters of the router change.
  • the third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed.
  • the access parameter can be obtained through UART communication, that is, the second synchronization interface 52 can be implemented as a TTL level UART interface, and a first synchronization interface, that is, a UART interface, is set on the router, and the router is transmitted in real time through the two interfaces.
  • the access parameters are given to the wireless chip 403 in the power adapter 40.
  • the embodiment provides a power adapter, including a wireless chip and a controller, and the wireless chip is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor the wireless network.
  • the operating state when monitoring the network abnormality of the wireless network, the controller controls the restart of the router, thereby achieving the hungry and directly restarting the router when the network is abnormal, without manual operation by the user, and having a good user experience.
  • This embodiment provides a router.
  • the power adapter 40 includes a power source 401 configured to supply power to the router body 10 .
  • the processor 30 is disposed in the power adapter 40 .
  • the processor 30 is similar to the processor 30 in the above embodiment, and details are not described herein again.
  • the power supply 401 is powered by the router body 10.
  • the power supply 401 is connected to the power interface 4011 of the router body 10 to supply power to the router body 10.
  • the router body 10 allocates the external network to a plurality of terminals in the local area network formed by the router body 10.
  • the terminals can access the public network through the local area network provided by the router body 10, thereby implementing interaction with the public network.
  • the router body 10 may include the SSID and PASSWORD of the router body 10 during configuration.
  • the SSID of the router body 10 may be considered as the name of the network provided by the router body 10; the devices in the local area network formed by the router body 10 may pass the SSID and PASSWORD.
  • Accessing the public network, that is, the SSID and PASSWORD of the router body 10 are access parameters of the router body 10. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router body 10 include at least the SSID. In some cases, It can also include PASSWORD.
  • the router body 10 includes a routing wireless chip 102, a routing controller 101, and a memory 103.
  • the router body 10 shares the network to other devices through the wireless network 102. Within a certain range, other devices can pass through the router body 10.
  • the access parameter accesses the network provided by the routing wireless chip 102 of the router body 10, thereby accessing the Internet.
  • the routing controller 101 in the router body 10 is configured to control various software and hardware in the router body 10 to implement normal operation of the router body 10; the memory 103 is configured to store various parameters of the router body 10, and store the router body. 10 instructions required for work and so on.
  • the above routing wireless chip 102, routing controller 101, and memory 103 all belong to the general structure of the router, and are not described herein again.
  • the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router body 10 sharing the external network to the router body 10 Other devices in the LAN.
  • the power adapter 40 further includes a wireless chip 403 and a controller 404; the processor controls the wireless chip 403
  • the wireless network provided by the router body 10 is accessed according to the access parameter of the router body 10, and the running state of the wireless network is monitored.
  • the wireless chip 403 accesses the network provided by the wireless chip 403 of the router body 10 through the access parameters of the router body 10, thereby accessing the Internet.
  • the usual practice is to periodically access a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and does nothing. If the server fails, the network is abnormal.
  • the network anomaly may be caused by an uplink network failure and/or a downlink network failure, and the controller 404 controls the router body 10 to restart as long as the network abnormality is detected.
  • a switch circuit 402 is further configured to implement control of the power supply 401 of the router body 10, that is, the controller 404 controls the opening and closing of the control switch circuit 402, so that the power supply 401 can be opened and closed, thereby A restart of the router body 10 is achieved.
  • the network may be abnormal due to various reasons such as a crash, a program exception, or a memory overflow.
  • the restart may often solve most problems, including wireless in the router. If the fault occurs on the downlink, such as a failure of the downlink server, or a fault of the base station, that is, the network abnormality is not caused by the router body 10, obviously, restarting the router body 10 If the network is abnormal, it is determined whether the time interval from the last restart is greater than the preset time. If the time is greater than the preset time, the system restarts. If the time is not greater than the preset time, The router body 10 is restarted without being restarted. The router body 10 cannot be configured and faulty.
  • the access parameters of the router body 10 are not static; after the access parameters of the router body 10 are changed, the access parameters of the router body 10 used to monitor the running state of the wireless network should also change with the change. Therefore, the router body 10 in this embodiment further includes a first synchronization interface 51.
  • the power adapter 40 further includes a second synchronization interface 52. The router body 10 and the power adapter 40 pass through the first synchronization interface 51 and the second.
  • the synchronization interface 52 synchronizes the access parameters of the router to the wireless chip 403 in the processor 30 in real time; the access parameter change in the router body 10 is to update the access parameters used by the wireless chip 403 in the processor 30 in time.
  • the network abnormality caused by the inconsistency of the access parameters of the router body 10 and the monitoring of the running state of the wireless network is avoided, thereby causing unnecessary restart of the router body 10.
  • the first synchronization interface 51 and the second synchronization interface 52 can be implemented through a UART interface, and can be a TTL level UART interface, that is, on the road.
  • a UART interface is disposed on the main body 10, and a UART interface is also disposed on the power adapter 40.
  • the access parameters of the router body 10 are transmitted to the wireless chip 403 in the processor 30 in real time through the two interfaces.
  • other interfaces that can implement data transmission can also be used in this embodiment, and are not strictly limited.
  • two sets of cables need to be connected between the power adapter 40 and the router body 10, one is a power supply line of the router body 10, and the other is a TTL level UART interface line.
  • the power line can be a group of two, respectively, positive and negative power lines
  • TTL level UART interface lines are also two, TX (Transmit, transmission) and RX (Receive, receiving); for the user's convenience
  • the two sets of four wires are integrated and connected by a 4PIN (pin) plug, and the form of the plug is not limited.
  • the embodiment provides a router, including a router body and a power adapter.
  • the power adapter includes a power source configured to supply power to the router.
  • the processor is disposed in the power adapter, and the processor accesses the wireless network provided by the router body through the access parameter. And monitoring the network situation, when monitoring the network abnormality, controlling the router body to restart, thereby realizing that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
  • the router includes a router body 10 and a power adapter 40.
  • the method includes:
  • the router body is powered by the power adapter. After the router body is powered on, the router body establishes a wireless network, and the external network is shared by the wireless network to other devices in the wireless network coverage of the router.
  • the router body sends an access parameter to a wireless chip in a processor in the power adapter.
  • the router body includes a first synchronization interface
  • the power adapter includes a second synchronization interface
  • the router body sends the access parameter to the second synchronization interface in the power adapter through the first synchronization interface, and then the second synchronization interface receives the access parameter.
  • the wireless chip Provided to the wireless chip, so that the wireless chip can access the wireless network provided by the router body according to the access parameter; the router body also synchronizes the access parameter to the wireless chip in the processor in the power adapter in real time, that is, the router body is connected After the parameter is changed, the changed access parameter is sent to the second synchronization interface in the power adapter through the first synchronization interface, and the second synchronization interface provides the access parameter to the wireless chip.
  • the wireless chip accesses the wireless network provided by the router body according to the access parameter.
  • the power adapter is provided with a processor, and the processor includes a wireless chip.
  • the wireless chip can access the wireless network provided by the router body according to the access parameter of the router body, and then can access the public network and communicate with the public network.
  • S604 monitoring the running state of the wireless network, determining whether the wireless network has a network abnormality; if a network abnormality occurs, then going to S605, if no network abnormality occurs, proceeding to S604;
  • the wireless chip After the wireless chip accesses the wireless network provided by the router body, it can periodically access a certain server on the Internet, such as Google or Baidu. If the server responds, the network is normal; if the server fails, the network is abnormal, and the network is abnormal. S605.
  • a certain server on the Internet such as Google or Baidu.
  • the controller in the processor in the power adapter controls the power supply in the power adapter, so that the power is first disconnected and then powered on, thereby restarting the router body.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the embodiment of the present disclosure further provides a schematic structural diagram of an electronic device.
  • the electronic device includes:
  • At least one processor 70 which is exemplified by a processor 70 in FIG. 7; and a memory 71, may further include a communication interface 72 and a bus 73.
  • the processor 70, the communication interface 72, and the memory 71 can complete communication with each other through the bus 73.
  • Communication interface 72 can be used for information transfer.
  • Processor 70 can invoke logic instructions in memory 71 to perform the methods of the above-described embodiments.
  • logic instructions in the memory 71 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 71 is a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction/module corresponding to the method in the embodiment of the present disclosure.
  • Processor 70 is running The software program, the instructions, and the modules stored in the memory 71 perform function application and data processing, that is, implement the router control method in the above method embodiment.
  • the memory 71 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 71 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
  • modules or steps of the present disclosure can be implemented by a general computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in a storage medium (ROM/RAM, diskette, optical disk) by a computing device, and in some cases The steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the present disclosure is not limited to any specific combination of hardware and software.
  • the router control method and device, the power adapter and the router provided by the disclosure can directly restart the router when the network is abnormal, without manual operation by the user, and have a good user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided in the present disclosure are a method and device for router control, a power adapter, and a router. A wireless network provided by a router is accessed on the basis of a network parameter of the router; a running state of the wireless network is monitored; when a network anomaly is detected in the wireless network, the router is controlled to reboot. The implementation of the method achieves the direct rebooting of the router in case of a network anomaly, obviates the need for user manual operation, and provides great user experience.

Description

路由器控制方法、装置及电源适配器、路由器Router control method, device and power adapter, router 技术领域Technical field
本公开涉及网络通讯领域,例如涉及一种路由器控制方法、装置及电源适配器、路由器。The present disclosure relates to the field of network communications, for example, to a router control method, apparatus, and power adapter, router.
背景技术Background technique
路由器以及在办公场所和家庭中普及;现在的大部分路由器以及脱离了有线路由器的状态,大部分的路由器都会有wifi(Wireless-Fidelity,无线保真)发射器,可以将路由器的公网以无线网络的形式供各种支持无线网络的设备使用,包括笔记本电脑、手机、平板电脑或者其他带有无线网卡的设备。现在的大多数路由器在安装好之后,开启电源就不会在断电关机,会持续的一直工作,但是目前的路由器的长时间工作都会有稳定性的问题,有一些路由器设计了看门狗,如果系统死机会自动重启,更多的路由器则没有看门狗,如果死机只能手动重启设备。Routers are popular in the workplace and in the home; most routers are now out of the state of wired routers. Most routers have wifi (Wireless-Fidelity) transmitters that can wirelessly route the router's public network. The form of the network is used by a variety of devices that support wireless networks, including laptops, cell phones, tablets, or other devices with wireless network cards. Nowadays, most routers are installed, and they will not be powered off when they are powered on. They will continue to work all the time. However, the long-term operation of the current routers will have stability problems. Some routers have designed watchdogs. If the system crashes automatically, more routers do not have a watchdog. If the crash occurs, the device can only be manually restarted.
没有看门狗的路由器在出现问题后只能手动重启;即使是有看门狗的路由器,也不是所有问题都会重启路由器的,只有在系统死机的情况下才会重启设备,在非死机等情况下,比如某个软件模块异常,wifi芯片异常,这时候看门狗是不会重启设备的,只能在用户发现问题后手动重启设备,用户体验非常的差。A router without a watchdog can only be manually restarted after a problem occurs; even if there is a watchdog router, not all problems will restart the router, and only when the system crashes, the device will be restarted, in the case of non-crash, etc. If, for example, a software module is abnormal, the wifi chip is abnormal. At this time, the watchdog will not restart the device. The user can only manually restart the device after the user finds the problem, and the user experience is very poor.
发明内容Summary of the invention
本公开实施例提供了一种路由器控制方法、装置及电源适配器、路由器,解决了相关技术中路由器出现网络异常时无法自动重启的问题。The embodiment of the present invention provides a router control method and device, and a power adapter and a router, which solve the problem that the router cannot automatically restart when a network abnormality occurs in the related art.
为了解决上述技术问题,本公开实施例提供了一种路由器控制方法,包括:In order to solve the above technical problem, an embodiment of the present disclosure provides a router control method, including:
根据路由器的接入参数,接入路由器提供的无线网络;Access the wireless network provided by the router according to the access parameters of the router;
监测所述无线网络的运行状态;Monitoring an operating state of the wireless network;
在监测到所述无线网络出现网络异常时,控制所述路由器重启。The router is restarted when it is detected that a network abnormality occurs in the wireless network.
此外,本公开实施例还提供了一种路由器控制装置,包括: In addition, an embodiment of the present disclosure further provides a router control apparatus, including:
网络监测模块,被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测所述无线网络的运行状态;The network monitoring module is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor an operating state of the wireless network;
电源控制模块,被配置为当监测到所述无线网络出现网络异常时,控制所述路由器重启。The power control module is configured to control the router to restart when it detects that a network abnormality occurs in the wireless network.
此外,本公开实施例还提供了一种电源适配器,包括无线芯片、控制器,所述无线芯片被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测所述无线网络的运行状态;所述控制器被配置为在监测到无线网络出现网络异常时,控制所述路由器重启。In addition, an embodiment of the present disclosure further provides a power adapter, including a wireless chip and a controller, where the wireless chip is configured to access a wireless network provided by a router according to an access parameter of a router, and monitor the wireless network. An operating state; the controller is configured to control the router to restart upon detecting a network abnormality in the wireless network.
此外,本公开实施例还提供了一种路由器,包括路由器本体和处理器;所述处理器被配置为根据所述路由器本体的接入参数,接入路由器本体提供的无线网络,监测所述无线网络的网络运行状态,并在监测到所述无线网络出现网络异常时,控制所述路由器重启。In addition, an embodiment of the present disclosure further provides a router, including a router body and a processor, where the processor is configured to access a wireless network provided by a router body according to an access parameter of the router body, and monitor the wireless The network running state of the network, and controlling the router to restart when it is detected that the wireless network has a network abnormality.
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
本公开实施例还提供了一种电子设备,包括:An embodiment of the present disclosure further provides an electronic device, including:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
本公开的有益效果如下:The beneficial effects of the present disclosure are as follows:
本公开提供了一种路由器控制方法、装置及电源适配器、路由器,根据路由器的接入参数接入路由器提供的无线网络,监测无线网络的运行状态,当监测到网络异常时,控制路由器重启;这样可以在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。The present disclosure provides a router control method and device, and a power adapter and a router. The wireless network provided by the router is accessed according to the access parameter of the router, and the running state of the wireless network is monitored. When the network abnormality is detected, the control router is restarted; You can directly restart the router when the network is abnormal. It does not require manual operation by the user and has a good user experience.
附图概述BRIEF abstract
图1是本公开第一实施例提供的一种路由器控制方法的流程图; 1 is a flowchart of a router control method according to a first embodiment of the present disclosure;
图2是本公开第二实施例提供的一种路由器控制装置示意图;2 is a schematic diagram of a router control apparatus according to a second embodiment of the present disclosure;
图3是本公开第三实施例提供的一种路由器结构示意图;3 is a schematic structural diagram of a router according to a third embodiment of the present disclosure;
图4是本公开第四实施例提供了一种电源适配器的结构示意图;4 is a schematic structural diagram of a power adapter according to a fourth embodiment of the present disclosure;
图5是本公开第五实施例提供的一种路由器结构示意图;FIG. 5 is a schematic structural diagram of a router according to a fifth embodiment of the present disclosure;
图6是本公开第六实施例提供的一种路由器控制方法信号流图;以及6 is a signal flow diagram of a router control method according to a sixth embodiment of the present disclosure;
图7是本公开实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
本公开通过路由器的接入参数接入路由器提供的无线网络,若无线网络出现网络异常,即网络不通,则控制路由器重启,从而无需用户手动重启,故障判定范围大,有很好的用户体验。The disclosure accesses the wireless network provided by the router through the access parameter of the router. If the network is abnormal, that is, the network is unreachable, the control router is restarted, so that the user does not need to manually restart, the fault determination range is large, and the user experience is good.
下面结合附图对本公开的实施进行说明。The implementation of the present disclosure will be described below with reference to the accompanying drawings.
第一实施例First embodiment
本实施例提供了一种路由器控制方法,请参考图1,包括:This embodiment provides a router control method. Referring to FIG. 1, the method includes:
S101、根据路由器的接入参数,接入路由器提供的无线网络;S101. Access the wireless network provided by the router according to the access parameter of the router.
S102、监测所述无线网络的运行状态;S102. Monitor an operating state of the wireless network.
S103、在监测到所述无线网络出现网络异常时,控制所述路由器重启。S103. Control the restart of the router when detecting that a network abnormality occurs in the wireless network.
路由器将外网分配给路由器形成的局域网内的多个终端,这些终端可以通过路由器所提供的局域网接入公网,从而实现与公网之间的交互。路由器在配置时会包括路由器的SSID(Service Set Identifier,服务集标识)和PASSWORD(密码);其中,通俗的讲,路由器的SSID可以认为是路由器所提供的网络的名称;路由器形成的局域网中的设备可以通过SSID和PASSWORD接入公网,也就是说,路由器的SSID和PASSWORD是路由器的接入参数。值得注意的是,并不是每个路由器都会设置PASSWORD,有些公共路由器,通常是没有设置PASSWORD的,然而这也不影响网络的接入,即路由器的接入参数至少包括SSID,在一些情况下也可以包括PASSWORD。The router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network. The router will include the SSID (Service Set Identifier) and PASSWORD (password) of the router. In general, the SSID of the router can be regarded as the name of the network provided by the router; The device can access the public network through SSID and PASSWORD. That is, the SSID and PASSWORD of the router are the access parameters of the router. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router include at least the SSID. In some cases, Can include PASSWORD.
路由器通过其内部的无线芯片将网络通过无线网络的方式分享给其他设备; 在一定范围内,其他设备可以通过路由器的接入参数接入路由器的无线芯片所提供的网络,从而接入互联网。至于路由器的外网,其接入形式没有限定,可以是通过有线网络的方式接入,也可以是接入的无线网络,并不会影响路由器将该外网分享给路由器的局域网中的其他设备。The router shares the network to other devices through the wireless network through its internal wireless chip; Within a certain range, other devices can access the Internet by accessing the network provided by the router's wireless chip through the access parameters of the router. As for the external network of the router, the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router to share the external network with other devices in the LAN of the router. .
在路由器启动之后,通过路由器的接入参数接入路由器提供的无线网络,监测无线网络的运行状态;需要注意的是,接入路由器提供的无线网络需要在路由器的无线网络覆盖范围内;监测无线网络的运行状态的做法通常是定时访问互联网上的某个服务器,比如Google或者百度,如果服务器有响应,则说明网络正常,不做任何操作,如果访问服务器失败,则说明网络异常。After the router is started, access the wireless network provided by the router through the access parameters of the router to monitor the running status of the wireless network; it should be noted that the wireless network provided by the access router needs to be within the wireless network coverage of the router; monitoring wireless The operation state of the network is usually a regular access to a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
根据接入参数接入路由器提供的无线网络之后,正常情况下,就可以与公网进行通信了;正常通信包括上行链路正常和下行链路正常;在实际通信过程中,上行链路是根据用户侧的设备的工作情况决定的,下行链路则是由服务器侧的设备的工作情况决定的;用户侧的设备的工作情况主要包括路由器的工作情况,以及路由器与终端之间的局域网的连接情况;网络侧的设备的工作情况则可能包括基站的工作情况,以及站点服务器的工作情况。After accessing the wireless network provided by the router according to the access parameter, under normal circumstances, communication with the public network can be performed; normal communication includes normal uplink and normal downlink; in actual communication, the uplink is based on The operation of the device on the user side determines that the downlink is determined by the operation of the device on the server side; the operation of the device on the user side mainly includes the operation of the router and the connection between the router and the LAN. Situation; the operation of the equipment on the network side may include the operation of the base station and the operation of the site server.
也就是说,根据接入参数接入网络之后,网络异常可能是由上行网络故障和/或下行网络故障所导致的。而只要监测到网络异常,就控制路由器重启。可选的,对路由器重启的操作,可以包括控制路由器的电源,即断开路由器的电源,再接通电源,就可以实现对路由器的重启。That is to say, after accessing the network according to the access parameters, the network anomaly may be caused by an uplink network failure and/or a downlink network failure. As long as the network is detected abnormally, the router is restarted. Optionally, the operation of restarting the router may include controlling the power of the router, that is, disconnecting the power of the router, and then turning on the power, so that the router can be restarted.
网络异常,包括网络连接断开或者网络连接超时;网络连接断开表示无法连接网络,可能是路由器端的问题,也可能是服务器端的问题;网络连接超时,则是指在程序默认的等待时间内没有得到服务器的响应,其可能的原因有网络阻塞;网络不稳定;系统可用资源过低;设备连接不稳定;网络注册时系统繁忙,无法回应;网络过慢;感染了恶意软件,计算机病毒,计算机木马等。The network is abnormal, including the network connection is disconnected or the network connection is timed out. The disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
路由器在工作过程中,可能由于死机、程序异常、内存溢出导致内存耗尽等各种原因而造成网络异常;在路由器出现问题时,重启往往就可以解决大部分问题,包括路由器中的无线芯片故障、软件故障、系统死机等问题;如果是下行链路出现了故障,比如站点服务器出现了故障,或者是基站故障,即网络异常并非是路由器本身导致,显然,重启路由器是不能解决该问题的,那么,在监测到无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预 设时间,若小于预设时间,则不重启,防止异常情况下路由器不停的重启,用户无法对路由器进行配置和故障定位。当然,若不小于预设时间,则正常重启路由器。During the working process of the router, the network may be abnormal due to various reasons such as crashes, abnormal programs, memory exhaustion, etc. When there is a problem with the router, the restart can often solve most problems, including the wireless chip failure in the router. Software failure, system crash, etc.; if there is a failure in the downlink, such as a failure of the site server, or a failure of the base station, that is, the network abnormality is not caused by the router itself. Obviously, restarting the router cannot solve the problem. Then, when it is detected that the network is abnormal in the wireless network, it is judged whether the time interval from the last restart is less than the pre- If the time is less than the preset time, it will not be restarted to prevent the router from restarting under abnormal conditions. The user cannot configure and locate the router. Of course, if it is not less than the preset time, the router is restarted normally.
此外,路由器的接入参数并不是一成不变的;而在路由器接入参数变化之后,监测无线网络的运行状态所采用的路由器的接入参数也应该随着其变化而变化,因此,本实施例中的路由器控制方法还包括:按照预设规则获取路由器的接入参数。其中,预设规则可以有多种,其一,可以包括定时的、周期性的获取路由器的接入参数;其二,可以包括在路由器的接入参数发生变化时,获取路由器变化后的接入参数;其三,可以是上述两种方案的结合,即在周期性的获取路由器的接入参数之外,还可以在路由器的接入参数变化时及时获取变化后的接入参数。及时的更新监测无线网络的运行状态所采用的路由器的接入参数,避免因为路由器的接入参数和监测无线网络的运行状态用的接入参数不一致而导致的网络异常,进而导致对路由器的不必要的重启。In addition, the access parameters of the router are not static; after the router access parameter changes, the access parameters of the router used to monitor the running status of the wireless network should also change with the change. Therefore, in this embodiment, The router control method further includes: obtaining an access parameter of the router according to a preset rule. The preset rules may be multiple. The first one may include the access parameters of the router that are periodically and periodically acquired. The second one may include obtaining the changed access of the router when the access parameters of the router change. The third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed. Timely update the access parameters of the router used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router and monitoring the operating status of the wireless network, thereby causing no The necessary restart.
本实施例提供了一种路由器控制方法,根据路由器的接入参数接入路由器提供的无线网络,监测无线网络的运行状态,在监测到无线网络出现网络异常时,控制路由器重启,从而可以在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。This embodiment provides a router control method, which accesses a wireless network provided by a router according to an access parameter of a router, monitors an operating state of the wireless network, and controls a router to restart when a network abnormality occurs in the wireless network, so that the network can be Restart the router directly when abnormal, without manual operation by the user, and have a good user experience.
第二实施例Second embodiment
本实施例提供了一种路由器控制装置,请参考图2,包括:This embodiment provides a router control apparatus. Referring to FIG. 2, the method includes:
网络监测模块201,被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测无线网络的运行状态;The network monitoring module 201 is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor an operating state of the wireless network;
电源控制模块202,被配置为在监测到无线网络出现网络异常时,控制路由器重启。The power control module 202 is configured to control the router to restart when it detects that a network abnormality occurs in the wireless network.
路由器将外网分配给路由器形成的局域网内的多个终端,这些终端可以通过路由器所提供的局域网接入公网,从而实现与公网之间的交互。路由器在配置时,其接入参数至少包括SSID,在一些情况下还可以包括PASSWORD。The router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network. When the router is configured, its access parameters include at least the SSID, and in some cases, PASSWORD.
路由器通过其内部的无线芯片将网络通过无线网络的方式分享给其他设备;在一定范围内,其他设备可以通过路由器的接入参数接入路由器的无线芯片所提供的网络,从而接入互联网。至于路由器的外网,其接入形式没有限定,可 以是通过有线网络的方式接入,也可以是接入的无线网络,并不会影响路由器将该外网分享给路由器的局域网中的其他设备。The router shares the network to other devices through the wireless network through its internal wireless chip; within a certain range, other devices can access the Internet by accessing the network provided by the router's wireless chip through the access parameters of the router. As for the external network of the router, the access form is not limited, Therefore, it is connected through a wired network, or it can be an access wireless network, and does not affect the router to share the external network to other devices in the router's local area network.
在路由器启动之后,网络监测模块201通过路由器的接入参数接入路由器提供的无线网络,监测无线网络的运行状态;监测无线网络的运行状态的做法通常是定时访问互联网上的某个服务器,比如Google或者百度或者其他任何在正常情况下可以访问的服务器,如果服务器有响应,则说明网络正常,不做任何操作,如果访问服务器失败,则说明网络异常。After the router is started, the network monitoring module 201 accesses the wireless network provided by the router through the access parameter of the router to monitor the running status of the wireless network; the method of monitoring the running state of the wireless network is usually to periodically access a server on the Internet, such as Google or Baidu or any other server that can be accessed under normal circumstances. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
根据接入参数接入网络之后,正常情况下,就可以与公网进行通信了;正常通信包括上行链路正常和下行链路正常;在实际通信过程中,上行链路是根据用户侧的设备的工作情况决定的,下行链路则是由服务器侧的设备的工作情况决定的;用户侧的设备的工作情况主要包括路由器的工作情况,以及路由器与终端之间的局域网的连接情况;网络侧的设备的工作情况则可能包括基站的工作情况,以及站点服务器的工作情况。After accessing the network according to the access parameters, under normal circumstances, communication with the public network can be performed; normal communication includes uplink normal and downlink normal; in actual communication, uplink is based on user-side equipment. The working condition determines that the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router and the connection between the local area network between the router and the terminal; The operation of the device may include the operation of the base station and the operation of the site server.
也就是说,网络监测模块201根据接入参数接入网络之后,网络异常可能是由上行网络故障和/或下行网络故障所导致的。而只要监测到网络异常,电源控制模块202就控制路由器重启。可选的,对路由器的重启操作,可以包括控制路由器的电源,即断开路由器的电源,再接通电源,就可以实现对路由器的重启。That is to say, after the network monitoring module 201 accesses the network according to the access parameters, the network abnormality may be caused by an uplink network failure and/or a downlink network failure. The power control module 202 controls the router to restart whenever a network anomaly is detected. Optionally, the restart operation of the router may include controlling the power of the router, that is, disconnecting the power of the router, and then turning on the power, so that the router can be restarted.
网络异常,包括网络连接断开或者网络连接超时;网络连接断开表示无法连接网络,可能是路由器端的问题,也可能是服务器端的问题;网络连接超时,则是指在程序默认的等待时间内没有得到服务器的响应,其可能的原因有网络阻塞;网络不稳定;系统可用资源过低;设备连接不稳定;网络注册时系统繁忙,无法回应;网络过慢;感染了恶意软件,计算机病毒,计算机木马等。The network is abnormal, including the network connection is disconnected or the network connection is timed out. The disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
路由器在工作过程中,可能由于死机、程序异常、内存溢出导致内存耗尽等各种原因而造成的网络异常;在路由器出现问题时,重启往往就可以解决大部分问题,包括路由器中的无线芯片故障、软件故障、系统死机等问题;如果是下行链路出现了故障,比如站点服务器出现了故障,或者是基站故障,即网络异常并非是路由器本身导致,显然,重启路由器是不能解决该问题的,那么,在监测到无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启,防止异常情况下路由器不停的重启,用 户无法对路由器进行配置和故障定位。当然,若不小于预设时间,则正常重启路由器。During the working process of the router, the network may be abnormal due to various reasons such as crashes, abnormal programs, memory exhaustion, etc. When there is a problem with the router, the restart can often solve most problems, including the wireless chip in the router. Faults, software failures, system crashes, etc.; if there is a failure on the downlink, such as a failure of the site server, or a failure of the base station, that is, the network exception is not caused by the router itself. Obviously, restarting the router cannot solve the problem. Then, when the network abnormality occurs in the wireless network, it is judged whether the time interval from the last restart is less than the preset time. If it is less than the preset time, it will not be restarted to prevent the router from restarting under abnormal conditions. The user cannot configure and locate the router. Of course, if it is not less than the preset time, the router is restarted normally.
此外,路由器的接入参数并不是一成不变的;而在路由器的接入参数变化之后,监测无线网络的运行状态所采用的路由器的接入参数也应该随着其变化而变化,因此,本实施例中的路由器控制装置还包括参数同步模块203,被配置为按照预设规则将路由器的接入参数同步至网络监测模块201。其中,预设规则可以有多种,其一,可以包括定时的、周期性的获取路由器的接入参数;其二,可以包括在路由器的接入参数发生变化时,获取路由器变化后的接入参数;其三,可以是上述两种方案的结合,即在周期性的获取路由器的接入参数之外,还可以在路由器的接入参数变化时及时获取变化后的接入参数。及时的更新监测无线网络的运行状态所采用的接入参数,避免因为路由器的接入参数和监测无线网络的运行状态用的接入参数不一致而导致的网络异常,进而导致对路由器的不必要的重启。路由器接入参数的同步除了在路由器控制装置上设置了参数同步模块203之外,在路由器上也可以设置参数同步模块203,路由器上的参数同步模块203将路由器的接入参数实时发送给路由器控制装置上的参数同步模块203,进而使路由器控制装置上的参数同步模块203将路由器的接入参数实时同步给网络监测模块201;将路由器的接入参数从路由器发送给路由器控制装置,可以通过UART(Universal Asynchronous Receiver/Transmitter,通用异步收发传输器)通讯,可以是TTL电平(transistor transistor logic,晶体管-晶体管逻辑电平)的UART接口。In addition, the access parameters of the router are not static; after the access parameters of the router are changed, the access parameters of the router used to monitor the running state of the wireless network should also change according to the change. Therefore, this embodiment The router control device further includes a parameter synchronization module 203 configured to synchronize the access parameters of the router to the network monitoring module 201 according to a preset rule. The preset rules may be multiple. The first one may include the access parameters of the router that are periodically and periodically acquired. The second one may include obtaining the changed access of the router when the access parameters of the router change. The third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed. Timely update the access parameters used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router and monitoring the operating status of the wireless network, thereby causing unnecessary Restart. Synchronization of router access parameters In addition to setting the parameter synchronization module 203 on the router control device, the parameter synchronization module 203 can also be set on the router, and the parameter synchronization module 203 on the router sends the access parameters of the router to the router in real time. The parameter synchronization module 203 on the device further enables the parameter synchronization module 203 on the router control device to synchronize the access parameters of the router to the network monitoring module 201 in real time; the access parameters of the router are sent from the router to the router control device, and the UART can be passed through the UART. (Universal Asynchronous Receiver/Transmitter) communication, which can be a UART interface of TTL level (transistor transistor logic).
本实施例提供了一种路由器控制装置,包括网络监测模块和电源控制模块,网络监测模块根据路由器的接入参数接入路由器提供的无线网络,并监测无线网络的运行状态,电源控制模块在网络监测模块监测到无线网络出现网络异常时,控制路由器重启,从而可以在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。The embodiment provides a router control device, including a network monitoring module and a power control module. The network monitoring module accesses the wireless network provided by the router according to the access parameter of the router, and monitors the running state of the wireless network. The power control module is in the network. When the monitoring module detects that the network is abnormal in the wireless network, the control router restarts, so that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
第三实施例Third embodiment
本实施例提供了一种路由器,请参考图3,包括:This embodiment provides a router. Referring to FIG. 3, the method includes:
路由器本体10和处理器30;处理器30被配置为根据路由器本体10的接入参数,接入路由器本体10提供的无线网络,监测无线网络的运行状态,并在检测到无线网络出现网络异常时,对路由器本体10执行重启。 The router body 10 and the processor 30 are configured to access the wireless network provided by the router body 10 according to the access parameters of the router body 10, monitor the running state of the wireless network, and detect a network abnormality in the wireless network. A reboot is performed on the router body 10.
路由器本体10将外网分配给路由器本体10形成的局域网内的多个终端,这些终端可以通过路由器本体10所提供的局域网接入公网,从而实现与公网之间的交互。路由器本体10在配置时会包括路由器本体10的SSID和PASSWORD;其中,路由器本体10的SSID可以认为是路由器本体10所提供的网络的名称;路由器本体10形成的局域网中的设备可以通过SSID和PASSWORD接入公网,也就是说,路由器本体10的SSID和PASSWORD是路由器本体10的接入参数。值得注意的是,并不是每个路由器都会设置PASSWORD,有些公共路由器,通常是没有设置PASSWORD的,然而这也不影响网络的接入,即路由器本体10的接入参数至少包括SSID,在一些情况下也可以包括PASSWORD。The router body 10 allocates the external network to a plurality of terminals in the local area network formed by the router body 10. The terminals can access the public network through the local area network provided by the router body 10, thereby implementing interaction with the public network. The router body 10 may include the SSID and PASSWORD of the router body 10 during configuration. The SSID of the router body 10 may be considered as the name of the network provided by the router body 10; the devices in the local area network formed by the router body 10 may pass the SSID and PASSWORD. Accessing the public network, that is, the SSID and PASSWORD of the router body 10 are access parameters of the router body 10. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router body 10 include at least the SSID. In some cases, It can also include PASSWORD.
路由器本体10通过其内部的无线芯片将网络通过无线网络的方式分享给其他设备;在一定范围内,其他设备可以通过路由器本体10的接入参数接入路由器本体10的无线芯片所提供的网络,从而接入互联网。至于路由器本体10的外网,其接入形式没有限定,可以是通过有线网络的方式接入,也可以是接入的无线网络,并不会影响路由器本体10将该外网分享给路由器本体10的局域网中的其他设备。处理器30根据路由器本体10的接入参数接入路由器提供的无线网络,并监测无线网络的运行状态;监测无线网络的运行状态的做法通常是定时访问互联网上的某个服务器,比如Google或者百度,如果服务器有响应,则说明网络正常,不做任何操作;如果访问服务器失败,则说明网络异常。The router body 10 shares the network to other devices through the wireless network through its internal wireless chip; within a certain range, other devices can access the network provided by the wireless chip of the router body 10 through the access parameters of the router body 10, Thereby access to the Internet. As for the external network of the router body 10, the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router body 10 sharing the external network to the router body 10 Other devices in the LAN. The processor 30 accesses the wireless network provided by the router according to the access parameter of the router body 10, and monitors the running state of the wireless network; the method of monitoring the running state of the wireless network is usually a regular access to a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and no operation is performed; if the access to the server fails, the network is abnormal.
处理器30根据接入参数接入路由器本体10提供的无线网络之后,正常情况下,就可以与互联网进行通信了;正常通信包括上行链路正常和下行链路正常;在实际通信过程中,上行链路是根据用户侧的设备的工作情况决定的,下行链路则是由服务器侧的设备的工作情况决定的;用户侧的设备的工作情况主要包括路由器本体10的工作情况,以及路由器本体10与处理器30之间的连接情况;网络侧的设备的工作情况则可能包括基站的工作情况,以及站点服务器的工作情况。After the processor 30 accesses the wireless network provided by the router body 10 according to the access parameter, under normal circumstances, the processor 30 can communicate with the Internet; the normal communication includes the uplink normal and the downlink normal; in the actual communication process, the uplink The link is determined according to the working condition of the device on the user side, and the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router body 10, and the router body 10 The connection with the processor 30; the operation of the device on the network side may include the operation of the base station and the operation of the site server.
也就是说,根据接入参数接入网络之后,网络异常可能是由上行网络故障和/或下行网络故障所导致的。而只要监测到网络异常,就控制路由器本体10重启。可选的,对路由器本体10的重启操作,可以包括控制路由器本体10的电源,即断开路由器本体10的电源,再接通电源,就可以实现对路由器本体10的重启。 That is to say, after accessing the network according to the access parameters, the network anomaly may be caused by an uplink network failure and/or a downlink network failure. As long as the network abnormality is detected, the router body 10 is controlled to restart. Optionally, the restarting operation of the router body 10 may include controlling the power of the router body 10, that is, disconnecting the power of the router body 10, and then turning on the power, so that the restart of the router body 10 can be implemented.
网络异常,包括网络连接断开或者网络连接超时;网络连接断开表示无法连接网络,可能是路由器端的问题,也可能是服务器端的问题;网络连接超时,则是指在程序默认的等待时间内没有得到服务器的响应,其可能的原因有网络阻塞;网络不稳定;系统可用资源过低;设备连接不稳定;网络注册时系统繁忙,无法回应;网络过慢;感染了恶意软件,计算机病毒,计算机木马等。The network is abnormal, including the network connection is disconnected or the network connection is timed out. The disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
路由器本体10在工作过程中,可能由于死机、程序异常、内存溢出导致内存耗尽等各种原因而造成网络异常;在路由器出现问题时,重启往往就可以解决大部分问题,包括路由器中的无线芯片故障、软件故障、系统死机等问题;如果是下行链路出现了故障,比如站点服务器出现了故障,或者是基站故障,即网络异常并非是路由器本体10所致,显然,重启路由器本体10是不能解决该问题的,那么,在监测到无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启,防止异常情况下路由器本体10不停的重启,用户无法对路由器本体10进行配置和故障定位。当然,若不小于预设时间,则正常重启路由器。During the working process of the router body 10, the network may be abnormal due to various reasons such as a crash, a program exception, or a memory overflow. When a router has a problem, the restart may often solve most problems, including wireless in the router. Chip failure, software failure, system crash, etc.; if there is a failure in the downlink, such as a failure of the site server, or a failure of the base station, that is, the network abnormality is not caused by the router body 10, obviously, restarting the router body 10 is If the network is abnormal, the time interval between the last restart is less than the preset time. If the time is less than the preset time, the system does not restart. After the restart is stopped, the user cannot configure and locate the router body 10. Of course, if it is not less than the preset time, the router is restarted normally.
此外,路由器本体10的接入参数并不是一成不变的;而在路由器本体10接入参数变化之后,监测无线网络的运行状态所采用的路由器本体10的接入参数也应该随着其变化而变化,因此,本实施例中的路由器本体10还被配置为按照预设规则将路由器本体的接入参数同步至处理器30;其中,预设规则可以有多种,其一,可以包括定时的、周期性的获取路由器本体10的接入参数;其二,可以包括在路由器本体10的接入参数发生变化时,获取路由器本体10变化后的接入参数;其三,可以是上述两种方案的结合,即在周期性的获取路由器本体10的接入参数之外,还可以在路由器本体10的接入参数变化时及时获取变化后的接入参数。及时的更新监测无线网络的运行状态所采用的路由器本体10的接入参数,避免因为路由器本体10的接入参数和监测无线网络的运行状态用的接入参数不一致而导致的网络异常,进而导致对路由器本体10的不必要的重启。接入参数的同步可以通过UART通讯,可以是TTL电平的UART接口来实现,在路由器本体10上设置一个UART接口,在处理器30上也设置一个UART接口,通过这两个接口实时传输路由器本体10的接入参数给处理器30。In addition, the access parameters of the router body 10 are not static; after the access parameters of the router body 10 are changed, the access parameters of the router body 10 used to monitor the running state of the wireless network should also change with the change. Therefore, the router body 10 in this embodiment is further configured to synchronize the access parameters of the router body to the processor 30 according to a preset rule. The preset rules may be multiple, and the first one may include a timing and a period. Obtaining the access parameters of the router body 10; the second method may include: when the access parameters of the router body 10 change, obtaining the changed access parameters of the router body 10; and third, the combination of the foregoing two solutions may be In addition to obtaining the access parameters of the router body 10 periodically, the changed access parameters may be acquired in time when the access parameters of the router body 10 are changed. Timely updating the access parameters of the router body 10 used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router body 10 and monitoring the operating state of the wireless network, thereby causing Unnecessary restart of the router body 10. The synchronization of the access parameters can be realized by UART communication, which can be a TTL level UART interface, a UART interface is set on the router body 10, and a UART interface is also set on the processor 30, and the router is transmitted in real time through the two interfaces. The access parameters of the ontology 10 are given to the processor 30.
本实施例中的处理器,可以设置在路由器本体内,也可以设置在路由器本体之外,作为一个单独的设备与路由器配合使用。 The processor in this embodiment may be disposed in the router body or may be disposed outside the router body as a separate device for use with the router.
本实施例提供了一种路由器,包括路由器本体和处理器,处理器被配置为根据路由器本体的接入参数接入路由器本体提供的无线网络,并监测无线网络的运行状态,在监测到无线网络出现网络异常时,控制路由器重启,从而实现了在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。The embodiment provides a router, including a router body and a processor. The processor is configured to access a wireless network provided by the router body according to an access parameter of the router body, and monitor an operation state of the wireless network, and monitor the wireless network. When a network abnormality occurs, the control router restarts, so that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
第四实施例Fourth embodiment
本实施例提供了一种电源适配器,请参考图4,包括:无线芯片403、控制器404;无线芯片403被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测无线网络的运行状态;控制器404被配置为在监测到无线网络出现网络异常时,控制路由器重启。The embodiment provides a power adapter. Referring to FIG. 4, the method includes: a wireless chip 403 and a controller 404. The wireless chip 403 is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor the wireless network. The operating state; the controller 404 is configured to control the router to restart upon detecting a network abnormality in the wireless network.
当然,电源适配器40中还包括电源401,为路由器供电;一般而言,路由器的工作电压在9V到15V之间的直流电压,而家用的交流电源401是220V,因此,电源适配器40中一般包括变压器,整流器,被配置为将家用的220V交流电压,转换为9V-15V的直流电压,提供给路由器使用。Of course, the power adapter 40 further includes a power source 401 for powering the router; generally, the working voltage of the router is between 9V and 15V, and the AC power source 401 of the home is 220V. Therefore, the power adapter 40 generally includes The transformer, rectifier, is configured to convert the household 220V AC voltage to a 9V-15V DC voltage for use by the router.
路由器将外网分配给路由器形成的局域网内的多个终端,这些终端可以通过路由器所提供的局域网接入公网,从而实现与公网之间的交互。路由器在配置时,其接入参数至少包括SSID,在一些情况下还可以包括PASSWORD。其中,这些终端可以包括路由器的电源适配器40。The router allocates the external network to multiple terminals in the LAN formed by the router. These terminals can access the public network through the LAN provided by the router, thereby realizing interaction with the public network. When the router is configured, its access parameters include at least the SSID, and in some cases, PASSWORD. Among them, these terminals may include a power adapter 40 of the router.
电源适配器40是给路由器供电的器件。在电源适配器40中,设置无线芯片403和控制器404,那么,就可以通过路由器的接入参数,以及无线芯片403,接入路由器提供的无线网络,从而接入互联网。Power adapter 40 is the device that powers the router. In the power adapter 40, the wireless chip 403 and the controller 404 are set, and then the access network of the router and the wireless chip 403 can access the wireless network provided by the router to access the Internet.
在路由器启动之后,无线芯片403通过路由器的接入参数接入路由器提供的无线网络,监测无线网络的运行状态;监测无线网络的运行状态的做法通常是定时访问互联网上的某个服务器,比如Google或者百度或者其他任何正常情况下可以访问的服务器,如果服务器有响应,则说明网络正常,不做任何操作,如果访问服务器失败,则说明网络异常。After the router is started, the wireless chip 403 accesses the wireless network provided by the router through the access parameter of the router to monitor the running state of the wireless network; the method of monitoring the running state of the wireless network is usually to periodically access a server on the Internet, such as Google. Or Baidu or any other server that can be accessed under normal circumstances. If the server responds, the network is normal and no operation is performed. If the access to the server fails, the network is abnormal.
根据接入参数接入网络之后,正常情况下,就可以与公网进行通信了;正常通信包括上行链路正常和下行链路正常,在实际通信过程中,上行链路是根据用户侧的设备的工作情况决定的,下行链路则是由服务器侧的设备的工作情况决定的;用户侧的设备的工作情况主要包括路由器的工作情况,以及路由器与电源适配器40中间的局域网的连接情况;网络侧的设备的工作情况则可能包 括基站的工作情况,以及站点服务器的工作情况。After accessing the network according to the access parameters, under normal circumstances, communication with the public network can be performed; normal communication includes normal uplink and normal downlink, and in actual communication, the uplink is based on the user-side device. The working condition determines that the downlink is determined by the working condition of the device on the server side; the working condition of the device on the user side mainly includes the working condition of the router and the connection between the router and the local area network of the power adapter 40; The working condition of the side device may be packaged Including the work of the base station and the operation of the site server.
也就是说,无线芯片403根据接入参数接入网络之后,网络异常可能是由上行网络故障和/或下行网络故障所导致的。而只要监测到网络异常,控制器404就控制路由器重启。可选的,对路由器的重启操作,可以包括控制路由器的电源401,断开路由器的电源401,再接通电源401,就可以实现对路由器的重启。That is to say, after the wireless chip 403 accesses the network according to the access parameter, the network abnormality may be caused by an uplink network failure and/or a downlink network failure. As long as a network anomaly is detected, the controller 404 controls the router to restart. Optionally, the restart operation of the router may include controlling the power supply 401 of the router, disconnecting the power supply 401 of the router, and then turning on the power supply 401 to implement restarting the router.
网络异常,包括网络连接断开或者网络连接超时;网络连接断开表示无法连接网络,可能是路由器端的问题,也可能是服务器端的问题;网络连接超时,则是指在程序默认的等待时间内没有得到服务器的响应,其可能的原因有网络阻塞;网络不稳定;系统可用资源过低;设备连接不稳定;网络注册时系统繁忙,无法回应;网络过慢;感染了恶意软件,计算机病毒,计算机木马等。The network is abnormal, including the network connection is disconnected or the network connection is timed out. The disconnection of the network indicates that the network cannot be connected. It may be a problem on the router side or a problem on the server side. If the network connection times out, it means that there is no default waiting time in the program. Get the response of the server, the possible reasons are network congestion; the network is unstable; the system available resources are too low; the device connection is unstable; the system is busy when the network is registered, unable to respond; the network is too slow; infected with malware, computer virus, computer Trojans, etc.
可选的,在监测到无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启,防止异常情况下路由器不停的重启,用户无法对路由器进行配置和故障定位。当然,若不小于预设时间,则正常重启路由器。Optionally, when the network abnormality of the wireless network is detected, it is determined whether the time interval from the last restart is less than the preset time. If the time is less than the preset time, the system does not restart to prevent the router from restarting under abnormal conditions, and the user cannot Configure and troubleshoot the router. Of course, if it is not less than the preset time, the router is restarted normally.
此外,路由器的接入参数并不是一成不变的;在路由器的接入参数变化之后,无线芯片403所采用的路由器的接入参数也应该随着其变化而变化,因此,本实施例中的电源适配器40还包括第二同步接口52,被配置为按照预设规则将路由器的接入参数同步至无线芯片403。其中,预设规则可以有多种,其一,可以包括定时的、周期性的获取路由器的接入参数;其二,可以包括在路由器的接入参数发生变化时,获取路由器变化后的接入参数;其三,可以是上述两种方案的结合,即在周期性的获取路由器的接入参数之外,还可以在路由器的接入参数变化时及时获取变化后的接入参数。及时的更新监测无线网络的运行状态所采用的路由器的接入参数,避免因为路由器的接入参数和监测无线网络的运行状态用的接入参数不一致而导致的网络异常,进而导致对路由器的不必要的重启。接入参数的获取可以通过UART通讯,即第二同步接口52可以是TTL电平的UART接口来实现,在路由器上设置一个第一同步接口,也即UART接口,通过这两个接口实时传输路由器的接入参数给电源适配器40中的无线芯片403。In addition, the access parameters of the router are not static; after the access parameter of the router changes, the access parameters of the router used by the wireless chip 403 should also change according to the change. Therefore, the power adapter in this embodiment 40 also includes a second synchronization interface 52 configured to synchronize the access parameters of the router to the wireless chip 403 in accordance with a preset rule. The preset rules may be multiple. The first one may include the access parameters of the router that are periodically and periodically acquired. The second one may include obtaining the changed access of the router when the access parameters of the router change. The third parameter may be a combination of the foregoing two solutions, that is, in addition to periodically acquiring the access parameters of the router, the changed access parameters may be acquired in time when the access parameters of the router are changed. Timely update the access parameters of the router used to monitor the running status of the wireless network, avoiding network anomalies caused by inconsistent access parameters of the router and monitoring the operating status of the wireless network, thereby causing no The necessary restart. The access parameter can be obtained through UART communication, that is, the second synchronization interface 52 can be implemented as a TTL level UART interface, and a first synchronization interface, that is, a UART interface, is set on the router, and the router is transmitted in real time through the two interfaces. The access parameters are given to the wireless chip 403 in the power adapter 40.
本实施例提供了一种电源适配器,包括无线芯片和控制器,无线芯片被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测无线网络的 运行状态;在监测到无线网络出现网络异常时,控制器控制路由器的重启,从而实现饿了在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。The embodiment provides a power adapter, including a wireless chip and a controller, and the wireless chip is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor the wireless network. The operating state; when monitoring the network abnormality of the wireless network, the controller controls the restart of the router, thereby achieving the hungry and directly restarting the router when the network is abnormal, without manual operation by the user, and having a good user experience.
第五实施例Fifth embodiment
本实施例提供了一种路由器,请参考图5,包括路由器本体10和电源适配器40,电源适配器40包括电源401,电源401被配置为给路由器本体10供电;处理器30设置于电源适配器40中;其中,处理器30与以上实施例中的处理器30类似,这里不再赘述。电源401为路由器本体10供电包括:电源401与路由器本体10中的电源接口4011相连,为路由器本体10供电。This embodiment provides a router. Referring to FIG. 5 , the router body 10 and the power adapter 40 are included. The power adapter 40 includes a power source 401 configured to supply power to the router body 10 . The processor 30 is disposed in the power adapter 40 . The processor 30 is similar to the processor 30 in the above embodiment, and details are not described herein again. The power supply 401 is powered by the router body 10. The power supply 401 is connected to the power interface 4011 of the router body 10 to supply power to the router body 10.
路由器本体10将外网分配给路由器本体10形成的局域网内的多个终端,这些终端可以通过路由器本体10所提供的局域网接入公网,从而实现与公网之间的交互。路由器本体10在配置时会包括路由器本体10的SSID和PASSWORD;其中,路由器本体10的SSID可以认为是路由器本体10所提供的网络的名称;路由器本体10形成的局域网中的设备可以通过SSID和PASSWORD接入公网,也就是说,路由器本体10的SSID和PASSWORD是路由器本体10的接入参数。值得注意的是,并不是每个路由器都会设置PASSWORD,有些公共路由器,通常是没有设置PASSWORD的,然而这也不影响网络的接入,即路由器本体10的接入参数至少包括SSID,在一些情况下也可以包括PASSWORD。The router body 10 allocates the external network to a plurality of terminals in the local area network formed by the router body 10. The terminals can access the public network through the local area network provided by the router body 10, thereby implementing interaction with the public network. The router body 10 may include the SSID and PASSWORD of the router body 10 during configuration. The SSID of the router body 10 may be considered as the name of the network provided by the router body 10; the devices in the local area network formed by the router body 10 may pass the SSID and PASSWORD. Accessing the public network, that is, the SSID and PASSWORD of the router body 10 are access parameters of the router body 10. It is worth noting that not every router will set PASSWORD. Some public routers usually do not have PASSWORD set. However, this does not affect the access of the network. That is, the access parameters of the router body 10 include at least the SSID. In some cases, It can also include PASSWORD.
路由器本体10包括路由无线芯片102,路由控制器101,存储器103;路由器本体10通过路由无线芯片102将网络通过无线网络的方式分享给其他设备,在一定范围内,其他设备可以通过路由器本体10的接入参数接入路由器本体10的路由无线芯片102所提供的网络,从而接入互联网。路由器本体10中的路由控制器101则被配置为控制路由器本体10中的各个软硬件,实现路由器本体10的正常工作;存储器103则被配置为存储路由器本体10的各种参数,以及存储路由器本体10工作所需的指令等内容。以上的路由无线芯片102、路由控制器101、存储器103均属于路由器的通用结构,这里不再赘述。The router body 10 includes a routing wireless chip 102, a routing controller 101, and a memory 103. The router body 10 shares the network to other devices through the wireless network 102. Within a certain range, other devices can pass through the router body 10. The access parameter accesses the network provided by the routing wireless chip 102 of the router body 10, thereby accessing the Internet. The routing controller 101 in the router body 10 is configured to control various software and hardware in the router body 10 to implement normal operation of the router body 10; the memory 103 is configured to store various parameters of the router body 10, and store the router body. 10 instructions required for work and so on. The above routing wireless chip 102, routing controller 101, and memory 103 all belong to the general structure of the router, and are not described herein again.
至于路由器本体10的外网,其接入形式没有限定,可以是通过有线网络的方式接入,也可以是接入的无线网络,并不会影响路由器本体10将该外网分享给路由器本体10的局域网中的其他设备。As for the external network of the router body 10, the access form is not limited, and may be accessed through a wired network or an access wireless network, and does not affect the router body 10 sharing the external network to the router body 10 Other devices in the LAN.
电源适配器40还包括无线芯片403和控制器404;处理器控制无线芯片403 根据路由器本体10的接入参数接入路由器本体10提供的无线网络,并监测无线网络的运行状态。在路由器本体10的无线网络覆盖范围内,无线芯片403通过路由器本体10的接入参数接入路由器本体10的无线芯片403所提供的网络,从而接入互联网。而检测网络情况,通常的做法是定时访问互联网上的某个服务器,比如Google或者百度,如果服务器有响应,则说明网络正常,不做任何操作;如果访问服务器失败,则说明网络异常。The power adapter 40 further includes a wireless chip 403 and a controller 404; the processor controls the wireless chip 403 The wireless network provided by the router body 10 is accessed according to the access parameter of the router body 10, and the running state of the wireless network is monitored. Within the wireless network coverage of the router body 10, the wireless chip 403 accesses the network provided by the wireless chip 403 of the router body 10 through the access parameters of the router body 10, thereby accessing the Internet. To detect the network situation, the usual practice is to periodically access a server on the Internet, such as Google or Baidu. If the server responds, the network is normal and does nothing. If the server fails, the network is abnormal.
网络异常可能是由上行网络故障和/或下行网络故障所导致的,而只要监测到网络异常,控制器404就控制路由器本体10重启。可选的,还包括开关电路402,被配置为实现对路由器本体10的电源401的控制,即控制器404控制控制开关电路402的断开和闭合,可以实现电源401的断开和闭合,从而实现了对路由器本体10的重启。The network anomaly may be caused by an uplink network failure and/or a downlink network failure, and the controller 404 controls the router body 10 to restart as long as the network abnormality is detected. Optionally, a switch circuit 402 is further configured to implement control of the power supply 401 of the router body 10, that is, the controller 404 controls the opening and closing of the control switch circuit 402, so that the power supply 401 can be opened and closed, thereby A restart of the router body 10 is achieved.
路由器本体10在工作过程中,可能由于死机、程序异常、内存溢出导致内存耗尽等各种原因而造成网络异常;在路由器出现问题时,重启往往就可以解决大部分问题,包括路由器中的无线芯片403故障、软件故障、系统死机等问题;如果是下行链路出现了故障,比如站点服务器出现了故障,或者是基站故障,即网络异常并非是路由器本体10所致,显然,重启路由器本体10是不能解决该问题的,那么,在监测到无线网络出现网络异常时,判断距离上次重启的时间间隔是否大于预设时间,若大于预设时间,则重启,若不大于预设时间,则不重启,防止异常情况下路由器本体10不停的重启,用户无法对路由器本体10进行配置和故障定位。During the working process of the router body 10, the network may be abnormal due to various reasons such as a crash, a program exception, or a memory overflow. When a router has a problem, the restart may often solve most problems, including wireless in the router. If the fault occurs on the downlink, such as a failure of the downlink server, or a fault of the base station, that is, the network abnormality is not caused by the router body 10, obviously, restarting the router body 10 If the network is abnormal, it is determined whether the time interval from the last restart is greater than the preset time. If the time is greater than the preset time, the system restarts. If the time is not greater than the preset time, The router body 10 is restarted without being restarted. The router body 10 cannot be configured and faulty.
此外,路由器本体10的接入参数并不是一成不变的;而在路由器本体10接入参数变化之后,监测无线网络的运行状态所采用的路由器本体10的接入参数也应该随着其变化而变化,因此,本实施例中的路由器本体10还包括第一同步接口51,相应的,电源适配器40还包括第二同步接口52,路由器本体10和电源适配器40之间通过第一同步接口51和第二同步接口52实时将路由器的接入参数同步至处理器30中的无线芯片403;在路由器本体10的接入参数变化是,及时的更新处理器30中的无线芯片403所采用的接入参数,避免因为路由器本体10的外哦参数和监测无线网络的运行状态用的接入参数不一致而导致的网络异常,进而导致对路由器本体10的不必要的重启。第一同步接口51和第二同步接口52可以通过UART接口实现,可以是TTL电平的UART接口,即在路 由器本体10上设置一个UART接口,在电源适配器40上也设置一个UART接口,通过这两个接口实时传输路由器本体10的接入参数给处理器30中的无线芯片403。当然,也可以是其他能实现数据传输的接口,在本实施例中均可以采用,没有做严格的限定。可选的,电源适配器40和路由器本体10之间有两组线缆需要连接,一组是路由器本体10的供电电源线,另一组是TTL电平的UART接口线。其中,电源线可以是一组两根,分别是正负电源线,TTL电平的UART接口线也分别是两根,TX(Transmit,传输)和RX(Receive,接收);为了用户的使用方便,将这两组四根线集成在一起,由一个4PIN(针)的插头实现连接,而插头的形式不做限制。In addition, the access parameters of the router body 10 are not static; after the access parameters of the router body 10 are changed, the access parameters of the router body 10 used to monitor the running state of the wireless network should also change with the change. Therefore, the router body 10 in this embodiment further includes a first synchronization interface 51. Correspondingly, the power adapter 40 further includes a second synchronization interface 52. The router body 10 and the power adapter 40 pass through the first synchronization interface 51 and the second. The synchronization interface 52 synchronizes the access parameters of the router to the wireless chip 403 in the processor 30 in real time; the access parameter change in the router body 10 is to update the access parameters used by the wireless chip 403 in the processor 30 in time. The network abnormality caused by the inconsistency of the access parameters of the router body 10 and the monitoring of the running state of the wireless network is avoided, thereby causing unnecessary restart of the router body 10. The first synchronization interface 51 and the second synchronization interface 52 can be implemented through a UART interface, and can be a TTL level UART interface, that is, on the road. A UART interface is disposed on the main body 10, and a UART interface is also disposed on the power adapter 40. The access parameters of the router body 10 are transmitted to the wireless chip 403 in the processor 30 in real time through the two interfaces. Of course, other interfaces that can implement data transmission can also be used in this embodiment, and are not strictly limited. Optionally, two sets of cables need to be connected between the power adapter 40 and the router body 10, one is a power supply line of the router body 10, and the other is a TTL level UART interface line. Among them, the power line can be a group of two, respectively, positive and negative power lines, TTL level UART interface lines are also two, TX (Transmit, transmission) and RX (Receive, receiving); for the user's convenience The two sets of four wires are integrated and connected by a 4PIN (pin) plug, and the form of the plug is not limited.
本实施例提供了一种路由器,包括路由器本体和电源适配器,电源适配器包括被配置为给路由器供电的电源,处理器设置于电源适配器中,处理器通过接入参数接入路由器本体提供的无线网络,并监控网络情况,在监控到网络异常时,控制路由器本体重启,从而实现了在网络异常时可以直接重启路由器,不用用户手动操作,有很好的用户体验。The embodiment provides a router, including a router body and a power adapter. The power adapter includes a power source configured to supply power to the router. The processor is disposed in the power adapter, and the processor accesses the wireless network provided by the router body through the access parameter. And monitoring the network situation, when monitoring the network abnormality, controlling the router body to restart, thereby realizing that the router can be directly restarted when the network is abnormal, without manual operation by the user, and has a good user experience.
第六实施例Sixth embodiment
本实施例提供了一种路由器管理方法,请参考图6,路由器包括路由器本体10和电源适配器40,所述方法包括:This embodiment provides a router management method. Referring to FIG. 6, the router includes a router body 10 and a power adapter 40. The method includes:
S601、路由器本体上电;S601, the router body is powered on;
路由器本体通过电源适配器供电;在路由器本体上电后,路由器本体会建立无线网络,通过无线网络的方式将外网分享给路由器无线网络覆盖范围内的其他设备。The router body is powered by the power adapter. After the router body is powered on, the router body establishes a wireless network, and the external network is shared by the wireless network to other devices in the wireless network coverage of the router.
S602、路由器本体发送接入参数给电源适配器中的处理器中的无线芯片;S602. The router body sends an access parameter to a wireless chip in a processor in the power adapter.
路由器本体包括第一同步接口,电源适配器包括第二同步接口,路由器本体通过第一同步接口将接入参数发送给电源适配器中的第二同步接口,然后第二同步接口将接收到的接入参数提供给无线芯片,使无线芯片可以根据该接入参数接入路由器本体提供的无线网络;路由器本体还会实时同步接入参数给电源适配器中的处理器中的无线芯片,即路由器本体会在接入参数更改后及时的通过第一同步接口将更改后的接入参数发送给电源适配器中的第二同步接口,第二同步接口再将该接入参数提供给无线芯片。 The router body includes a first synchronization interface, and the power adapter includes a second synchronization interface, and the router body sends the access parameter to the second synchronization interface in the power adapter through the first synchronization interface, and then the second synchronization interface receives the access parameter. Provided to the wireless chip, so that the wireless chip can access the wireless network provided by the router body according to the access parameter; the router body also synchronizes the access parameter to the wireless chip in the processor in the power adapter in real time, that is, the router body is connected After the parameter is changed, the changed access parameter is sent to the second synchronization interface in the power adapter through the first synchronization interface, and the second synchronization interface provides the access parameter to the wireless chip.
S603、无线芯片根据接入参数接入路由器本体提供的无线网络;S603. The wireless chip accesses the wireless network provided by the router body according to the access parameter.
电源适配器中设置有处理器,处理器包括无线芯片,无线芯片可以根据路由器本体的接入参数接入路由器本体提供的无线网络,进而可以接入公网,与公网进行通信。The power adapter is provided with a processor, and the processor includes a wireless chip. The wireless chip can access the wireless network provided by the router body according to the access parameter of the router body, and then can access the public network and communicate with the public network.
S604、监测无线网络的运行状态,判断无线网络是否出现了网络异常;若出现了网络异常,则转到S605,若未出现网络异常,则继续S604;S604, monitoring the running state of the wireless network, determining whether the wireless network has a network abnormality; if a network abnormality occurs, then going to S605, if no network abnormality occurs, proceeding to S604;
在无线芯片接入路由器本体提供的无线网络之后,可以定时访问互联网上的某个服务器,比如Google或者百度,如果服务器有响应,则说明网络正常;如果访问服务器失败,则说明网络异常,转到S605。After the wireless chip accesses the wireless network provided by the router body, it can periodically access a certain server on the Internet, such as Google or Baidu. If the server responds, the network is normal; if the server fails, the network is abnormal, and the network is abnormal. S605.
S605、重启路由器本体。S605. Restart the router body.
电源适配器中的处理器中的控制器控制电源适配器中的电源,使电源先断开,再接通电源,从而实现对路由器本体的重启。The controller in the processor in the power adapter controls the power supply in the power adapter, so that the power is first disconnected and then powered on, thereby restarting the router body.
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
本公开实施例还提供了一种电子设备的结构示意图。参见图7,该电子设备包括:The embodiment of the present disclosure further provides a schematic structural diagram of an electronic device. Referring to FIG. 7, the electronic device includes:
至少一个处理器(processor)70,图7中以一个处理器70为例;和存储器(memory)71,还可以包括通信接口(Communications Interface)72和总线73。其中,处理器70、通信接口72、存储器71可以通过总线73完成相互间的通信。通信接口72可以用于信息传输。处理器70可以调用存储器71中的逻辑指令,以执行上述实施例的方法。At least one processor 70, which is exemplified by a processor 70 in FIG. 7; and a memory 71, may further include a communication interface 72 and a bus 73. The processor 70, the communication interface 72, and the memory 71 can complete communication with each other through the bus 73. Communication interface 72 can be used for information transfer. Processor 70 can invoke logic instructions in memory 71 to perform the methods of the above-described embodiments.
此外,上述的存储器71中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 71 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器71作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的方法对应的程序指令/模块。处理器70通过运行 存储在存储器71中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的路由器控制方法。The memory 71 is a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction/module corresponding to the method in the embodiment of the present disclosure. Processor 70 is running The software program, the instructions, and the modules stored in the memory 71 perform function application and data processing, that is, implement the router control method in the above method embodiment.
存储器71可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器71可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 71 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 71 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in the embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like. A medium that can store program code, or a transitory storage medium.
显然,本领域的技术人员应该明白,上述本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present disclosure can be implemented by a general computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in a storage medium (ROM/RAM, diskette, optical disk) by a computing device, and in some cases The steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of the modules or steps may be implemented as a single integrated circuit module. Therefore, the present disclosure is not limited to any specific combination of hardware and software.
以上内容是结合实施方式对本公开所作的详细说明,不能认定本公开的实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开实施例范围的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保护范围。The above is a detailed description of the present disclosure in connection with the embodiments, and the implementation of the present disclosure is not limited to the description. It is to be understood by those skilled in the art that the present invention may be construed as a part of the scope of the present disclosure without departing from the scope of the embodiments of the present disclosure.
工业实用性 Industrial applicability
本公开提供的路由器控制方法、装置及电源适配器、路由器可以实现在网络异常时直接重启路由器,无需用户手动操作,有很好的用户体验。 The router control method and device, the power adapter and the router provided by the disclosure can directly restart the router when the network is abnormal, without manual operation by the user, and have a good user experience.

Claims (16)

  1. 一种路由器控制方法,包括:A router control method includes:
    根据路由器的接入参数,接入路由器提供的无线网络;Access the wireless network provided by the router according to the access parameters of the router;
    监测所述无线网络的运行状态;Monitoring an operating state of the wireless network;
    在监测到所述无线网络出现网络异常时,控制所述路由器重启。The router is restarted when it is detected that a network abnormality occurs in the wireless network.
  2. 如权利要求1所述的方法,还包括:按照预设规则获取所述路由器的接入参数。The method of claim 1, further comprising: obtaining an access parameter of the router according to a preset rule.
  3. 如权利要求1所述的方法,其中,控制所述路由器重启包括:断开所述路由器的电源,再接通所述电源。The method of claim 1 wherein controlling the router to restart comprises disconnecting power to the router and turning the power on.
  4. 如权利要求1所述的方法,其中,所述网络异常包括网络连接断开或网络连接超时。The method of claim 1 wherein the network anomaly comprises a network connection disconnection or a network connection timeout.
  5. 如权利要求1-4任一项所述的方法,其中,所述控制所述路由器重启还包括:在监测到所述无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启。The method according to any one of claims 1 to 4, wherein the controlling the restart of the router further comprises: determining whether a time interval from the last restart is less than a preset when a network abnormality occurs in the wireless network is detected. Time, if less than the preset time, does not restart.
  6. 一种路由器控制装置,包括:A router control device includes:
    网络监测模块,被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测所述无线网络的运行状态;The network monitoring module is configured to access a wireless network provided by the router according to an access parameter of the router, and monitor an operating state of the wireless network;
    电源控制模块,被配置为在监测到所述无线网络出现网络异常时,控制所述路由器重启。The power control module is configured to control the router to restart when it detects that a network abnormality occurs in the wireless network.
  7. 如权利要求6所述的装置,还包括参数同步模块,被配置为按照预设规则将所述路由器的接入参数同步至所述网络监测模块。The apparatus of claim 6 further comprising a parameter synchronization module configured to synchronize access parameters of said router to said network monitoring module in accordance with a predetermined rule.
  8. 如权利要求6所述的装置,其中,所述控制路由器重启包括:断开所述路由器的电源,再接通所述电源。 The apparatus of claim 6 wherein said controlling the router restart comprises: disconnecting power to said router, and then turning said power on.
  9. 如权利要求6-8任一项所述的装置,其中,电源控制模块还被配置为:在监测到所述无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启。The device of any one of claims 6-8, wherein the power control module is further configured to: determine, when a network abnormality occurs in the wireless network, whether the time interval from the last restart is less than a preset time, If it is less than the preset time, it will not restart.
  10. 一种电源适配器,包括无线芯片、控制器,所述无线芯片被配置为根据路由器的接入参数,接入路由器提供的无线网络,并监测所述无线网络的运行状态;所述控制器被配置为在监测到无线网络出现网络异常时,控制所述路由器重启。A power adapter includes a wireless chip and a controller, the wireless chip configured to access a wireless network provided by a router according to an access parameter of a router, and monitor an operating state of the wireless network; the controller is configured In order to monitor the wireless network when a network abnormality occurs, the router is controlled to restart.
  11. 如权利要求10所述的电源适配器,还包括第二同步接口,被配置为按照预设规则将路由器的接入参数同步至所述无线芯片。The power adapter of claim 10, further comprising a second synchronization interface configured to synchronize the access parameters of the router to the wireless chip in accordance with a predetermined rule.
  12. 如权利要求10或11所述的电源适配器,其中,所述控制器还被配置为在监测到所述无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启。The power adapter according to claim 10 or 11, wherein the controller is further configured to: when it is detected that a network abnormality occurs in the wireless network, determine whether a time interval from the last restart is less than a preset time, if less than The preset time does not restart.
  13. 一种路由器,包括路由器本体和处理器;所述处理器被配置为根据所述路由器本体的接入参数,接入路由器本体提供的无线网络,监测所述无线网络的运行状态,并在监测到所述无线网络出现网络异常时,控制所述路由器重启。A router includes a router body and a processor; the processor is configured to access a wireless network provided by the router body according to an access parameter of the router body, monitor an operating state of the wireless network, and monitor When the wireless network experiences a network abnormality, the router is controlled to restart.
  14. 如权利要求13所述的路由器,其中,所述路由器本体被配置为按照预设规则将路由器本体的接入参数同步至所述处理器。The router of claim 13 wherein said router body is configured to synchronize access parameters of the router body to said processor in accordance with a predetermined rule.
  15. 如权利要求13或14所述的路由器,其中,所述处理器还被配置为在监测到所述无线网络出现网络异常时,判断距离上次重启的时间间隔是否小于预设时间,若小于预设时间,则不重启。The router according to claim 13 or 14, wherein the processor is further configured to: when it is detected that a network abnormality occurs in the wireless network, determine whether a time interval from the last restart is less than a preset time, if less than a preset Set the time, then do not restart.
  16. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。 A non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-5.
PCT/CN2017/071532 2016-06-14 2017-01-18 Method and device for router control, power adapter, and router WO2017215268A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610416538.X 2016-06-14
CN201610416538.XA CN107508693A (en) 2016-06-14 2016-06-14 Router control method, device and power supply adaptor, router

Publications (1)

Publication Number Publication Date
WO2017215268A1 true WO2017215268A1 (en) 2017-12-21

Family

ID=60662979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/071532 WO2017215268A1 (en) 2016-06-14 2017-01-18 Method and device for router control, power adapter, and router

Country Status (2)

Country Link
CN (1) CN107508693A (en)
WO (1) WO2017215268A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651299A (en) * 2020-05-27 2020-09-11 惠州Tcl移动通信有限公司 Wireless chip reset control method and device, storage medium and mobile terminal
CN113992528A (en) * 2021-09-09 2022-01-28 江西台德智慧科技有限公司 Self-adaptive network intelligent interaction system and self-adaptive adjusting method

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108990093A (en) * 2018-09-28 2018-12-11 中电海康集团有限公司 A kind of Backhaul network equipment failure self-test method for restarting
CN109168087B (en) * 2018-10-29 2021-03-16 四川长虹电器股份有限公司 Intelligent television system and method for automatically repairing network and power supply control device
CN110266502A (en) * 2019-06-28 2019-09-20 贵阳研卓电子科技有限公司 Enhanced network intelligence PDU power supply
CN110265888B (en) * 2019-06-28 2021-01-05 贵阳研卓电子科技有限公司 PDU power control system
CN110224877A (en) * 2019-06-28 2019-09-10 贵阳研卓电子科技有限公司 PDU management system based on Ethernet
CN113206752A (en) * 2021-03-25 2021-08-03 厦门才茂通信科技有限公司 Router network communication double-path backup method
CN113067769B (en) * 2021-03-31 2023-03-10 百度在线网络技术(北京)有限公司 Router restarting method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201878332U (en) * 2010-12-07 2011-06-22 上海永大电梯设备有限公司 Automatic sensing device of wireless router
CN102611589A (en) * 2012-04-12 2012-07-25 南京物联传感技术有限公司 Automatic detection device of disconnection of router and working method thereof
CN103326868A (en) * 2012-03-23 2013-09-25 苏州工业园区新宏博通讯科技有限公司 Intelligent power device for wireless base station
CN104202653A (en) * 2014-08-27 2014-12-10 四川长虹电器股份有限公司 Method for optimizing wireless network for smart television
CN204480169U (en) * 2015-01-14 2015-07-15 北京星达天下技术有限公司 A kind of network state Intellectual reset circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201878332U (en) * 2010-12-07 2011-06-22 上海永大电梯设备有限公司 Automatic sensing device of wireless router
CN103326868A (en) * 2012-03-23 2013-09-25 苏州工业园区新宏博通讯科技有限公司 Intelligent power device for wireless base station
CN102611589A (en) * 2012-04-12 2012-07-25 南京物联传感技术有限公司 Automatic detection device of disconnection of router and working method thereof
CN104202653A (en) * 2014-08-27 2014-12-10 四川长虹电器股份有限公司 Method for optimizing wireless network for smart television
CN204480169U (en) * 2015-01-14 2015-07-15 北京星达天下技术有限公司 A kind of network state Intellectual reset circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651299A (en) * 2020-05-27 2020-09-11 惠州Tcl移动通信有限公司 Wireless chip reset control method and device, storage medium and mobile terminal
CN113992528A (en) * 2021-09-09 2022-01-28 江西台德智慧科技有限公司 Self-adaptive network intelligent interaction system and self-adaptive adjusting method
CN113992528B (en) * 2021-09-09 2023-06-13 江西台德智慧科技有限公司 Self-adaptive network intelligent interaction system and self-adaptive adjustment method

Also Published As

Publication number Publication date
CN107508693A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
WO2017215268A1 (en) Method and device for router control, power adapter, and router
US10693813B1 (en) Enabling and disabling links of a networking switch responsive to compute node fitness
US10715411B1 (en) Altering networking switch priority responsive to compute node fitness
CN108713308B (en) Method and system for restarting one or more components of a network device based on conditions
US10530636B2 (en) Link management method, device and system in virtual machine environment
US11223555B2 (en) Link health forecast—predictive Ethernet link monitoring using DOM with ELOAM
US9819640B2 (en) Method for keeping remote connection, electronic device and server
US9210059B2 (en) Cluster system
US10440125B2 (en) Method for maintaining transmission control protocol connection and computer system using the method
CN112771754B (en) System and method for providing network connection flexibility in power supply device
WO2014050493A1 (en) Backup device, main device, redundancy configuration system, and load dispersion method
CN105763442A (en) PON system and method avoiding interruption of LACP aggregation link in main-standby switching process
US8965993B2 (en) Entrusted management method for a plurality of rack systems
WO2017215672A1 (en) Power supply method and power supply device in poe system
CN115733729B (en) Communication fault processing method, system and equipment
CN104572402B (en) A kind of server and the method for realizing server energy consumption management
KR102032898B1 (en) Method for remote power control using power over ethernet line and the apparatus thereof
US9118540B2 (en) Method for monitoring a plurality of rack systems
TWM574793U (en) Network device capable of detecting state of external device
TW201909595A (en) Device management technology
US20130138803A1 (en) Method for monitoring a plurality of rack systems
CN107423113B (en) Method for managing virtual equipment, out-of-band management equipment and standby virtual equipment
TWI493922B (en) Network device and operating method thereof
CN114286452A (en) Network connection holding method and device, storage medium, and electronic device
CN107920347B (en) Data processing method, system and equipment of terminal equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17812386

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17812386

Country of ref document: EP

Kind code of ref document: A1