CN116708046A - Router closing method, system and router - Google Patents

Router closing method, system and router Download PDF

Info

Publication number
CN116708046A
CN116708046A CN202211361870.2A CN202211361870A CN116708046A CN 116708046 A CN116708046 A CN 116708046A CN 202211361870 A CN202211361870 A CN 202211361870A CN 116708046 A CN116708046 A CN 116708046A
Authority
CN
China
Prior art keywords
shutdown
router
slave
designated
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211361870.2A
Other languages
Chinese (zh)
Other versions
CN116708046B (en
Inventor
张军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211361870.2A priority Critical patent/CN116708046B/en
Publication of CN116708046A publication Critical patent/CN116708046A/en
Application granted granted Critical
Publication of CN116708046B publication Critical patent/CN116708046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof

Abstract

The application provides a router closing method, a router closing system and a router, and relates to the technical field of network communication. The method comprises the following steps: receiving a shutdown message sent by a terminal device, wherein the shutdown message is used for indicating a main router to close a designated router selected by a user; determining a shutdown sequence of the designated router selected by the user, and sequentially controlling the designated router selected by the user to shutdown according to the shutdown sequence. The convenience of shutdown operation of the router is improved.

Description

Router closing method, system and router
Technical Field
The present application relates to the field of network communications technologies, and in particular, to a method and a system for closing a router, and a router.
Background
Limited by the wireless transmit power of the routers, it is difficult for one router to meet a wide range of dead-corner-free network coverage. Taking a home router as an example, a coverage area of a home wireless fidelity (Wireless Fidelity, wiFi) can be effectively expanded by a master router collocated with a plurality of slave routers.
When the user does not need to use the router, the router can be closed to reduce wireless radiation, and the purposes of power saving and environmental protection are achieved. However, when the user wants to turn off a specific router, the user needs to walk to the placement position of the router to turn off the power of the router by pressing a key or unplug the power of the router, which is not convenient enough for the shutdown operation of the router.
Disclosure of Invention
The embodiment of the application aims to provide a router closing method, a router closing system and a router, so as to solve the problem that the shutdown operation of the router is not convenient enough. The specific technical scheme is as follows:
according to a first aspect of an embodiment of the present application, there is provided a router shutdown method applied to a master router capable of communicating with at least one slave router; the method comprises the following steps:
receiving a shutdown message sent by a terminal device, wherein the shutdown message is used for indicating the main router to close a designated router selected by a user;
determining a shutdown sequence of a designated router selected by a user;
and sequentially controlling the shutdown of the designated router selected by the user according to the shutdown sequence.
Optionally, the shutdown message includes the identification of a plurality of designated routers selected by the user; the determining the shutdown sequence of the designated router selected by the user comprises the following steps:
acquiring a hierarchy of each designated router of the plurality of designated routers from the master router based on the identification of the plurality of designated routers;
and sequencing the plurality of designated routers according to the sequence from low to high of the hierarchy, and taking the sequencing result as the shutdown sequence of the plurality of designated routers.
Optionally, the method further comprises:
if at least two designated routers with the same hierarchy exist in the plurality of designated routers, sequencing the at least two designated routers according to the sequence from the late to the early of the access time; or alternatively, the process may be performed,
and if at least two designated routers with the same hierarchy exist in the plurality of designated routers, determining that the shutdown orders of the at least two designated routers are the same.
Optionally, the plurality of designated routers includes a slave router; and sequentially controlling the shutdown of the designated router selected by the user according to the shutdown sequence, wherein the method comprises the following steps:
and sending a shutdown instruction to each slave router included in the plurality of designated routers in turn according to the shutdown order, wherein the shutdown instruction is used for indicating the slave router to shutdown.
Optionally, the plurality of designated routers includes a master router and a slave router; and sequentially controlling the shutdown of the execution router for selection according to the shutdown sequence, wherein the shutdown comprises the following steps:
according to the shutdown sequence, sequentially sending a shutdown instruction to each slave router included in the plurality of designated routers, wherein the shutdown instruction is used for indicating the slave routers to shutdown;
and after receiving shutdown results of successful shutdown of all the slave routers in the plurality of designated routers, executing shutdown operation on the master router.
Optionally, the sending, in the shutdown order, a shutdown instruction to each slave router included in the plurality of designated routers sequentially includes:
after a shutdown instruction is sent to one slave router according to the shutdown order, acquiring a shutdown result of the slave router, and after a shutdown result of the slave router, continuing to send the shutdown instruction to the next slave router in the plurality of designated routers according to the shutdown order;
if a shutdown result of shutdown failure of any one slave router is received, stopping sending a shutdown instruction.
Optionally, after the receiving the shutdown message sent by the terminal device, the method further includes:
and if the shutdown message comprises the identification of the master router and does not comprise the identification of the slave router, executing the shutdown operation of the master router.
Optionally, after sending a shutdown instruction to one slave router, obtaining a shutdown result of the slave router includes:
receiving a shutdown execution code sent by the slave router, wherein the shutdown execution code is used for indicating whether the router successfully executes shutdown operation or not;
and determining a shutdown result of the slave router based on the shutdown execution code.
Optionally, the determining the shutdown result of the slave router based on the shutdown execution code includes:
if the shutdown execution code indicates that the shutdown operation is successfully executed, determining that the shutdown result is shutdown success, otherwise, determining that the shutdown result is shutdown failure; or alternatively, the process may be performed,
if the shutdown execution code indicates that the shutdown operation is successfully executed and the heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is shutdown success, otherwise determining that the shutdown result is shutdown failure; or alternatively, the process may be performed,
if the shutdown execution code indicates that the shutdown operation is successfully executed, a notification message for indicating that the wired connection of the slave router is disconnected is received, and a heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is the shutdown success, otherwise, determining that the shutdown result is the shutdown failure.
Optionally, after determining the shutdown result of the slave router based on the shutdown execution code, the method further includes:
and sending a shutdown result of the slave router to the terminal equipment so that the terminal equipment displays the shutdown result, wherein the shutdown result is shutdown success or shutdown failure.
Optionally, in the case that the shutdown execution code indicates shutdown failure and a cause of shutdown failure, the shutdown result includes the cause of shutdown failure.
According to a second aspect of the embodiment of the present application, there is provided a router closing method, applied to a terminal device, the method including:
receiving a shutdown operation of a designated router;
and responding to the shutdown operation, sending a shutdown message to a main router, wherein the shutdown message is used for indicating the main router to shut down the designated router selected by the user, so that the main router determines the shutdown sequence of the designated router selected by the user, and sequentially controls the designated router selected by the user to shutdown according to the shutdown sequence.
Optionally, after the sending the shutdown message to the master router, the method further includes:
receiving a shutdown result of a designated router selected by a user from the main router, wherein the shutdown result is shutdown success or shutdown failure;
and displaying the shutdown result.
Optionally, when the shutdown result is shutdown failure, the shutdown result further includes a reason that shutdown is impossible.
According to a third aspect of embodiments of the present application there is provided a router comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the router to perform the method steps of the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a terminal device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the terminal device to perform the method steps of the second aspect.
According to a fifth aspect of embodiments of the present application, there is provided a router shutdown system, comprising a terminal device, a master router, and at least one slave router capable of communicating with the master router;
the main router is used for realizing the method steps in the first aspect;
the terminal device is configured to implement the method steps described in the second aspect;
the slave router is used for performing shutdown processing under the control of the master router.
According to a sixth aspect of an embodiment of the present application, there is provided a computer readable storage medium, including a stored program, where the program when run controls a device in which the computer readable storage medium is located to perform the method of any one of the first aspect or the second aspect.
According to a seventh aspect of an embodiment of the present application, there is provided a computer program product comprising executable instructions which, when executed on a computer, cause the computer to perform the method of any one of the first or second aspects.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic structural diagram of a router shutdown system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 3 is a block diagram of a router according to an embodiment of the present application;
fig. 4 is a flowchart of a router shutdown method according to an embodiment of the present application;
FIG. 5 is an exemplary schematic diagram of a primary router interface provided by an embodiment of the present application;
fig. 6 is a schematic diagram of a shutdown procedure of a master router according to an embodiment of the present application;
fig. 7 is a schematic diagram of a slave routing shutdown procedure according to an embodiment of the present application;
fig. 8 is a flowchart of another router shutdown method according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first instruction and the second instruction are for distinguishing different user instructions, and the sequence of the instructions is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
It is difficult for one router to satisfy a wide range of dead-angle-free network coverage, for example, in a home scenario, and one router is difficult to satisfy a house type dead-angle-free network coverage above sixty or seventy square meters, and in order to solve the problem, a plurality of routers may be deployed in a mesh (mesh) networking manner. Compared with the traditional relay networking mode, the mesh networking mode can enable the terminal equipment to be connected to the router capable of providing the optimal signal for the terminal equipment, and a user does not need to perform any manual operation.
Taking a home scenario as an example, multiple routers may be distributed in various rooms of a home, even on different floors, and user closing of the various routers is not convenient enough. It should be noted that the above is merely an example, and embodiments of the present application are not limited to a home scenario.
In order to solve the above problems, the embodiment of the present application provides a router shutdown method, which may be applied to a master router, where the master router is located in a router system, and the router system and a terminal device may form a router shutdown system.
The router system is deployed by a mesh networking mode, and the router system can comprise a master router and at least one slave router capable of communicating with the master router.
The connection mode between the master router and the slave router can be wired connection or wireless connection, and the slave routers can also be connected in series.
As shown in fig. 1, fig. 1 exemplarily shows a router shutdown system, which includes a terminal device 10 and a router system deployed by means of mesh networking, wherein the router system includes a master router 20 and a plurality of slave routers, and fig. 1 exemplarily shows 3 slave routers, namely, a slave router 31, a slave router 32 and a slave router 33. In a practical implementation, the number of slave routers is not limited thereto.
The master router 20 accesses the internet through a wired connection, the master router 20 and the slave router 31 are connected through a wired connection, the slave router 31 and the slave router 33 are connected through a wired connection, and the master router 20 and the slave router 32 are connected through a wireless connection.
The terminal device 10 may communicate with the master router 20 via a wireless network.
It should be noted that in some possible implementations, the terminal device may be a tablet, a personal computer (personal computer, PC), a personal digital assistant (personal digital assistant, PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, a robot, smart glasses, a smart television, or other electronic device. The electronic device may also be referred to as a terminal device, a User Equipment (UE), etc., which is not limited by the embodiment of the present application.
As shown in fig. 2, fig. 2 is a schematic diagram of a terminal device according to an embodiment of the present application, where the terminal device shown in fig. 2 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (Universal Serial Bus, USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a key 290, a motor 291, an indicator 292, a camera 293, a display 294, a subscriber identity module (Subscriber Identity Module, SIM) card interface 295, and the like. Among other things, the sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, and a bone conduction sensor 280M, among others.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the application, the terminal device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: processor 210 may include an application processor (Application Processor, AP), a modem processor (modem), a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Processor, ISP), a controller, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and/or a neural-Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 210 may generate operation control signals according to the instruction operation code and the timing signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (Inter-Integrated Circuit, I2C) interface, an integrated circuit built-in audio (Inter-Integrated Circuit Sound, I2S) interface, a pulse code modulation (Pulse Code Modulation, PCM) interface, a universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) interface, a mobile industry processor interface (Mobile Industry Processor Interface, MIPI), a General-Purpose Input/Output (GPIO) interface, and a subscriber identity module (Subscriber Identity Module, SIM) interface.
The I2C interface is a bi-directional synchronous Serial bus, comprising a Serial Data Line (SDA) and a Serial clock Line (Derail Clock Line, SCL). In some embodiments, the processor 210 may contain multiple sets of I2C buses. The processor 210 may be coupled to the touch sensor 280K, charger, flash, camera 293, etc., respectively, through different I2C bus interfaces. For example: the processor 210 may be coupled to the touch sensor 280K through an I2C interface, so that the processor 210 and the touch sensor 280K communicate through an I2C bus interface to implement a touch function of the terminal device.
The I2S interface may be used for audio communication. In some embodiments, the processor 210 may contain multiple sets of I2S buses. The processor 210 may be coupled to the audio module 270 via an I2S bus to enable communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 may communicate audio signals to the wireless communication module 260 through the I2S interface to implement a function of answering a call through a bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 may be coupled by a PCM bus interface. The audio module 270 may transmit the acquired downstream audio stream data and upstream audio stream data to a terminal device wirelessly connected to the terminal device through the wireless communication module 260.
In some embodiments, the audio module 270 may also transmit audio signals to the wireless communication module 260 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 210 with the wireless communication module 260. For example: the processor 210 communicates with a bluetooth module in the wireless communication module 260 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 270 may transmit an audio signal to the wireless communication module 260 through a UART interface, so as to implement a function of obtaining a downstream audio stream through a bluetooth-connected terminal device.
The MIPI interface may be used to connect the processor 210 to peripheral devices such as the display 294, the camera 293, and the like. The MIPI interface includes camera serial interface (Camera Serial Interface, CSI), display serial interface (Display Serial Interface, DSI), and the like. In some embodiments, processor 210 and camera 293 communicate through a CSI interface to implement the photographing function of terminal device 200. The processor 210 and the display 294 communicate via a DSI interface to implement the display function of the terminal device.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is only illustrative, and does not limit the structure of the terminal device. In other embodiments of the present application, the terminal device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
The wireless communication function of the terminal device may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G etc. applied on the first terminal device. In some embodiments, the transmission of call data between two terminal devices may be accomplished by the mobile communication module 250, for example, as a called party device, downstream audio stream data from the calling party device may be obtained, and upstream audio stream data may be transmitted to the calling party device.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (Wireless Local Area Networks, WLAN) (e.g., wireless fidelity (Wireless Fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (Global Navigation Satellite System, GNSS), frequency modulation (Frequency Modulation, FM), near field wireless communication technology (Near Field Communication, NFC), and infrared technology (IR) applied on a terminal device.
In some embodiments, the antenna 1 of the terminal device is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 260 so that the terminal device can communicate with the network and other devices through wireless communication technology. In one embodiment of the present application, the terminal device may implement a local area network connection with another terminal device through the wireless communication module 260. Wireless communication techniques may include global system for mobile communications (Global System for Mobile Communications, GSM), general packet radio service (General Packet Radio Service, GPRS), code Division multiple access (Code Division Multiple Access, CDMA), wideband code Division multiple access (Wideband Code Division Multiple Access, WCDMA), time Division-synchronous code Division multiple access (Time-Division-Synchronous Code Division Multiple Access, TD-SCDMA), long term evolution (Long Term Evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (Global Positioning System, GPS), a global navigation satellite system (Global Navigation Satellite System, GLONASS), a Beidou satellite navigation system (Beidou Navigation Satellite System, BDS), a Quasi zenith satellite system (Quasi-Zenith Satellite System, QZSS), and/or a satellite based augmentation system (Satellite Based Augmentation System, SBAS), among others.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. The display panel may employ a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), an Active-matrix or Active-matrix Organic Light-Emitting Diode (AMOLED), a flexible Light-Emitting Diode (Flex Light-Emitting Diode), a MiniLED, microLED, micro-OLED, a quantum dot Light-Emitting Diode (Quantum dot Light Emitting Diode, QLED), or the like. In some embodiments, the terminal device may include 1 or N displays 294, N being a positive integer greater than 1.
The external memory interface 220 may be used to connect an external memory card, such as a Micro secure digital (Secure Digital Memory, SD) card, to enable expansion of the memory capabilities of the terminal device. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. Files such as music, video, audio files, etc. are stored in an external memory card.
Internal memory 221 may be used to store computer executable program code that includes instructions. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an operating system, and application programs (such as a sound playing function, an image playing function, and a recording function) required for at least one function, etc. The storage data area may store data created during use of the terminal device (such as uplink audio data, downlink audio data, and phonebook), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 210 performs various functional applications of the terminal device and data processing by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor 210.
The terminal device may implement a call collision processing function and the like through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor and the like.
The audio module 270 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 270 may also be used to encode and decode audio signals. In some embodiments, the audio module 270 may be disposed in the processor 210, or some functional modules of the audio module 270 may be disposed in the processor 210.
A receiver 270B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal device picks up a call or voice message, the voice transmitted by the caller device may be heard through the listener 270B.
Microphone 270C, also referred to as a "microphone" or "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can sound near the microphone 270C through the mouth, and input sound signals to the microphone 270C to realize the collection of the upstream.
The pressure sensor 280A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 280A may be disposed on display 294. In some embodiments, the manual answer call function may be implemented when the user clicks an answer key on the display 294, and the manual hang-up call function may be implemented when the user clicks a hang-up key on the display 294.
The touch sensor 280K, also referred to as a "touch device". The touch sensor 280K may be disposed on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, which is also referred to as a "touch screen". The touch sensor 280K is used to detect a touch operation acting on or near it. Touch sensor 280K may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 294. In other embodiments, the touch sensor 280K may also be disposed on a surface of the terminal device at a different location than the display 294.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The terminal device may receive key inputs, generating key signal inputs related to user settings of the terminal device and function control.
The motor 291 may generate a vibration alert. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 291 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display 294. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to enable contact and separation from the terminal apparatus. The terminal device may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 295 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 295 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 295 may also be compatible with different types of SIM cards. The SIM card interface 295 may also be compatible with external memory cards. The terminal equipment interacts with the network through the SIM card to realize the functions of communication, data communication and the like. In some embodiments, the terminal device employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device and cannot be separated from the terminal device.
As shown in fig. 3, fig. 3 is a block diagram of a router according to an embodiment of the present application, where the router includes an application layer, a kernel layer, and a driver layer, and the layers communicate with each other through a software interface.
The application layer may include a web service module, a shutdown processing module, and a configuration service module.
The web service module is used for carrying out information interaction with the terminal equipment, for example, the web service module can be used for receiving a shutdown message sent by the terminal equipment and used for the router.
The shutdown processing module is used for processing a shutdown message sent by the terminal equipment.
The configuration service module is used for calling the kernel layer, so that the kernel layer calls a shutdown interface registered by the driving layer in the kernel layer, and shutdown of the router is realized.
It should be noted that, the structures of the master router and the slave router are the same, and in the embodiment of the present application, the web service module in the application layer of the master router may perform information interaction with the terminal device, and the embodiment of the present application does not involve the use of the web service module in the application layer of the slave router.
On the basis of the above embodiment, the embodiment of the present application provides a router shutdown method, as shown in fig. 4, including:
s401, the terminal equipment receives a shutdown operation of the designated router.
The shutdown operation is an operation triggered by a user in a display interface of the terminal, and the display interface may be a main routing page. Alternatively, the shutdown operation may be a voice command, such as if the electronic device recognizes that the voice "shuts down slave route 1, slave route 3, and slave route 4", it may be determined that a shutdown operation for slave route 1, slave route 3, and slave route 4 is received.
The user can open a main route page through a specified Application (APP) or web page, and the topology structure among the routers in the route system is displayed in the main route page. As an example, as shown in fig. 5, a master router, a slave router 1, a slave router 2, a slave router 3, and a slave router 4 are shown in the master routing page, wherein the connection between the master router and the slave router 1 is a wired connection, the connection between the slave router 1 and the slave router 4 is a wireless connection, the connection between the slave router 1 and the slave router 3 is a wired connection, and the connection between the master router and the slave router 2 is a wireless connection. I.e. in fig. 5 the solid lines between routers represent wired connections and the dashed lines represent wireless connections.
Alternatively, a selection component may be disposed beside the icon of each router, and the user may select the router that needs to be turned off by clicking on the selection component, where the selection components of the slave route 1, the slave route 3, and the slave route 4 in fig. 5 have opposite hooks, which represent that all the routers are selected. After the user selects the router to be closed, clicking the shutdown button can trigger shutdown operations on the slave route 1, the slave route 3 and the slave route 4.
It should be noted that fig. 5 is only an example, and the main routing interface in the embodiment of the present application is not limited to the page shown in fig. 5.
S402, responding to the shutdown operation, and sending a shutdown message to the main router by the terminal equipment. Accordingly, the master router receives the shutdown message sent by the terminal device.
The shutdown message is used for indicating the main router to shut down the designated router selected by the user. The shutdown request message may include an identification of the designated router selected by the user, which may specifically be a media access control (Media Access Control, MAC) address.
Alternatively, the shutdown message may be a post request message in the hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP protocol) that the web service module in the master router may receive.
S403, the main router determines the shutdown sequence of the designated router selected by the user.
And sending a shutdown instruction to the designated router. The shutdown instruction is used for controlling the specified router to shut down.
Optionally, after receiving the shutdown message, the web service module in the master router may execute a lua script of shutdown, where the lua script may forward the shutdown message to a shutdown processing module of the master router, and further the shutdown processing module of the master router determines a shutdown order of the designated router selected by the user based on the shutdown message. Where lua is a scripting language.
S404, the main router sequentially controls the designated router selected by the user to be powered off according to the power-off sequence.
By adopting the method, the main router can receive the shutdown message sent by the terminal equipment, and the shutdown message is used for indicating the main router to shut down the appointed router selected by the user, that is, the user can select the appointed router to be shut down through the terminal equipment, and then the main router can determine the shutdown sequence of the appointed router selected by the user, so that the shutdown of the appointed router selected by the user is controlled according to the shutdown sequence. Therefore, when the user needs to close the designated router, the user does not need to find the geographical position of the designated router and switch off the power supply of the router by pressing a key, and the main router can automatically control the designated router selected by the user to switch off according to the determined switching-off sequence, so that the designated router can be switched off more conveniently and rapidly.
In some embodiments, the shutdown message includes an identification of the primary router, i.e., the shutdown message is used to indicate that the primary router is shutdown. In this case, the shutdown procedure of the master router is as shown in fig. 6.
Firstly, an APP or a web page of the terminal equipment sends a shutdown message to a web service module of the main router, wherein the shutdown message is a shutdown post request.
After receiving the shutdown message, the web service module calls a shutdown lua script, and sends the shutdown message to the shutdown processing module through the shutdown lua script.
And the shutdown processing module processes the shutdown message, and after recognizing that the shutdown message is used for indicating to close the main router, the shutdown processing module can call the configuration service module, and the configuration service module can acquire the file lock.
If the acquisition is successful, returning a shutdown execution code to the shutdown processing module, and executing a shutdown function; if the acquisition fails, returning a shutdown execution code to the shutdown processing module.
If the file lock is successfully obtained, the current shutdown can be performed, and the returned shutdown execution code is used for indicating that the shutdown operation is successfully executed. If the file lock is not obtained, the returned shutdown execution code is used for indicating that shutdown cannot be performed at present. Optionally, if the file lock is not acquired, a current state parameter of the file lock may be acquired, for example, if the state parameter is 01, it indicates that an upgrade is currently performed; if the state parameter is 10, the current restart is indicated; if the status parameter is 11, it indicates that the factory setting is currently being restored. The primary router may determine a shutdown execution code based on the acquired state parameters.
As an example, the specific meaning of the shutdown execution code is shown in table 1.
TABLE 1
Shutdown execution code Meaning of the concrete
0 Successfully executing shutdown operation
100 Can not be shut down and is being upgraded
101 Unable to shut down, restarting
102 Can not be shut down and is recovering from factory setting
Under the condition that the file lock is successfully acquired, the configuration service module can execute a shutdown function, and particularly can call the kernel so that the kernel stores the current application data of the main router, the kernel can call a shutdown interface which is driven to register in the kernel, and the pins corresponding to the GPIO numbers are pulled down according to the general purpose input/output port (General Purpose Input Output, GPIO) numbers corresponding to the shutdown interface, so that the main router can realize power-off shutdown.
Optionally, after the shutdown processing module obtains the shutdown execution code returned by the configuration service module, the shutdown execution code may be returned to the web service module, so that the web service module returns a shutdown result to the terminal device.
In other embodiments, the identity of the slave router is included in the shutdown message, i.e., the shutdown message is used to indicate that the slave router is shutdown. In this case, taking one of the slave routers as an example, the shutdown procedure for the slave router is shown in fig. 7.
Firstly, an APP or a web page of the terminal equipment sends a shutdown message to a web service module of the main router, wherein the shutdown message is a shutdown post request. After receiving the shutdown message, the web service module calls a shutdown lua script, and sends the shutdown message to the shutdown processing module through the shutdown lua script.
And the shutdown processing module processes the shutdown message, and after recognizing that the shutdown message is used for indicating to close the slave router, the shutdown processing module can send a shutdown instruction to the slave router.
After the shutdown processing module of the slave router receives the shutdown instruction, the processing of the shutdown instruction is performed, and the configuration service module can be specifically called, so that the configuration service module can acquire the file lock, and the subsequent specific shutdown process is basically the same as that of the configuration service module of the master router in the above embodiment, and is not described herein. The method is characterized in that after the shutdown processing module of the slave router receives the shutdown execution code, the message execution code is required to be returned to the shutdown processing module of the master router, so that the master router returns a shutdown result to the terminal equipment.
In some embodiments, if the identification of the master router is included in the shutdown message and the identification of the slave router is not included, then a shutdown operation to the master router is performed.
In some embodiments, in the case that the shutdown message includes an identifier designating the slave router, S403 may be implemented as follows: and sending a shutdown instruction to the designated slave router so that the designated slave router performs a shutdown operation in response to the shutdown instruction.
In some embodiments, in the case that the shutdown message includes the identities of the plurality of designated routers selected by the user, S403, the determining, by the master router, the shutdown order of the designated routers selected by the user may be specifically implemented as:
acquiring a hierarchy of each designated router in the plurality of designated routers from the master router based on the identifications of the plurality of designated routers; and ordering the plurality of designated routers according to the order of the hierarchy from low to high, and taking the ordering result as the shutdown order of the plurality of designated routers.
Optionally, if there are at least two designated routers with the same hierarchy in the plurality of designated routers, the at least two designated routers are ordered in the order from late to early access times. Alternatively, the at least two designated routers may be ordered in the order of the access time from early to late, or the shutdown order of the at least two designated routers may be randomly determined. Or the master router may not care about the access time of the designated router, if it is determined that at least two designated routers with the same hierarchy exist in the plurality of designated routers, it is determined that the shutdown orders of the at least two designated routers are the same, and then the shutdown instructions may be sent to the at least two designated routers at the same time.
It may be understood that the plurality of designated routers may be slave routers, or may include a slave router and a master router, where the level of the master router may be determined to be 0 when the plurality of designated routers includes the master router, that is, the shutdown sequence of the master router is arranged at the end, and after shutdown of the plurality of slave routers is completed according to the shutdown sequence, the master router is further required to be shutdown.
In the embodiment of the present application, the level of the designated router may be the hop count between the designated router and the master router, for example, in the scenario of fig. 5, the level of the slave router 1 is 1, the level of the slave router 3 is 2, and the level of the slave router 4 is 2.
Taking the scenario of fig. 5 as an example, the shutdown order determined by the master router is shown in table 2.
TABLE 2
Router Hierarchy level Access time Shutdown sequence
Slave router 1 1 1 3
Slave router 3 2 3 2
Slave router 4 2 4 1
Since the hierarchy of the slave router 1 is lowest, the shutdown order of the slave router 1 is at the end. The slave router 3 and the slave router 4 have the same hierarchy, but the access time of the slave router 4 is later, it may be determined that the slave router 4 is turned off first and then the slave router 3 is turned off.
By adopting the embodiment of the application, as the hop count with the main router is smaller and the hierarchy is lower, the plurality of designated routers are ordered according to the sequence from low to high of the hierarchy, and the ordering result is used as the shutdown sequence of the plurality of designated routers, so that the problem that the routers with low hierarchy cannot receive the shutdown instruction sent by the main router due to the first shutdown of the routers with high hierarchy can be avoided, and the success rate of shutdown of the routers can be improved.
On the basis of the above embodiment, in one case, the plurality of designated routers selected by the user may include a slave router, and in order to enable the slave router in the plurality of designated routers to perform shutdown according to a shutdown order, S404 may be specifically implemented as follows:
and sending a shutdown instruction to each slave router included in the plurality of designated routers in turn according to the shutdown order, wherein the shutdown instruction is used for indicating the slave router to shutdown.
Specifically, after the master router sends a shutdown instruction to one slave router according to the shutdown sequence, acquiring a shutdown result of the slave router, and after acquiring a shutdown result of the slave router, continuing to send a shutdown instruction to the next slave router according to the shutdown sequence; if a shutdown result of shutdown failure of any one slave router is received, stopping sending a shutdown instruction.
For example, according to the shutdown sequence table shown in table 2, the master router may send a shutdown instruction to the slave router 4 first, send a shutdown instruction to the slave router 3 after determining that the slave router 4 is shutdown successfully, and send a shutdown instruction to the slave router 1 after determining that the slave router 3 is shutdown successfully. In this way, it is avoided that router 1 is turned off first, resulting in router 1 not being able to forward a shutdown instruction to router 3 and router 4.
Therefore, the main router can control the specified routers to shut down according to the shutdown sequence, and users do not need to find the geographical positions of the specified routers respectively, so that the method is more convenient and faster.
In another case, if the plurality of designated routers selected by the user include the master router and the slave router, S404 may be specifically implemented as follows:
and sending a shutdown instruction to each slave router included in the plurality of designated routers in turn according to the shutdown order, wherein the shutdown instruction is used for indicating the slave router to shutdown.
And after receiving shutdown results of successful shutdown of all the slave routers in the plurality of designated routers, executing shutdown operation on the master router.
For example, if the shutdown sequence table in table 2 further includes a master router, and the level of the master router is 0, the shutdown operation may be performed on the master router after determining that the shutdown on the slave router 1 is successful according to the shutdown sequence on the slave router.
The shutdown processing module of the master router may call the configuration service module and execute the subsequent shutdown process, and the specific process may refer to the related description in the corresponding embodiment of fig. 6, which is not repeated herein.
By adopting the method, the user can control the plurality of slave routers and the master router to shut down according to the shutdown sequence by triggering the shutdown operation once, and the user does not need to find the geographical positions of the plurality of slave routers and the master router respectively, so that the method is more convenient and faster.
In some embodiments, after the master router sends a shutdown instruction to each slave router, the slave router may also receive a shutdown execution code sent by the slave router, and determine a shutdown result of the slave router based on the shutdown execution code. The shutdown specification code is used to indicate whether the slave router successfully performs the shutdown operation, and the description of the shutdown execution code may refer to the description of table 1 in the above embodiment, which is not repeated herein.
The method comprises the steps of determining a shutdown result of a slave router based on a shutdown execution code, and specifically comprises any one of the following three implementation modes.
The first mode is that if the shutdown execution code indicates that the shutdown operation is successfully executed, the shutdown result is determined to be shutdown success, otherwise, the shutdown result is determined to be shutdown failure. Therefore, the shutdown result can be conveniently and quickly determined.
For example, if the shutdown execution code is 0, it may be determined that shutdown was successful; if the shutdown execution code is not 0, the shutdown failure can be determined.
And if the shutdown execution code indicates that the shutdown operation is successfully executed, and the heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is successful, otherwise, determining that the shutdown result is failed.
For example, the preset duration may be 6 seconds, and if the received shutdown execution code is 0 and the heartbeat packet of the slave router is not received within 6 seconds after the shutdown execution code is received, it may be determined that the slave router is shutdown successfully.
Otherwise, if the shutdown execution code is not 0, or the heartbeat packet from the slave router is received within a preset time period after the shutdown execution code is received, determining that the slave router fails to shutdown.
The slave router can call the shutdown interface to execute shutdown operation while sending the shutdown execution code to the master router, if the shutdown operation is not successfully executed due to abnormal conditions, the slave router can continuously send a heartbeat packet to the master router, after the master router receives the shutdown execution code with the value of 0, if the heartbeat packet from the slave router is received within a preset duration, the slave router can be determined to fail in shutdown. Therefore, the shutdown result of the slave router is comprehensively judged through the shutdown execution code and the heartbeat packet of the slave router, so that the determined shutdown result is more accurate.
And if the shutdown execution code indicates that the shutdown operation is successfully executed, a notification message for indicating that the wired connection of the slave router is disconnected is received, and a heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is successful, otherwise, determining that the shutdown result is failed.
The third mode is applicable to the case that the access mode of the slave router is a wired connection. The notification message for indicating that the wired connection from the router has been disconnected may specifically be a lan down message.
If the master router and the slave router are connected through a wire, after the slave router is powered off and shut down, the driving layer of the master router can recognize that the slave router is powered off, and then the driving layer can report an lan down message to the application layer. The LAN down message is specifically a message which is reported by the portal driver and used for indicating (Local Area Network, LAN) that the portal has been switched to the down state after a router is powered off or the network cable connection is disconnected by a down-hanging router connected by a wire.
By adopting the third mode, whether the specified router is powered off successfully or not can be judged by integrating the power-off execution code, the lan down message and the heartbeat packet, and the determined power-off result can be more accurate.
In some embodiments, after determining the shutdown result of the slave router, the master router may send the shutdown result of the slave router to the terminal device, and then the terminal device displays the shutdown result. The shutdown result may be shutdown success or shutdown failure. And under the condition that the shutdown execution code indicates the shutdown failure and the reason of the shutdown failure, the shutdown result comprises the reason of the shutdown failure.
For example, if the shutdown execution code is 100, the shutdown result is shutdown failure, and the reason why shutdown cannot be performed is that the slave router is being upgraded. If the shutdown execution code is 101, the shutdown result is shutdown failure, and the reason why shutdown cannot be performed is that the slave router is restarting. If the shutdown execution code is 102, the shutdown result is shutdown failure, and the reason why shutdown is impossible is that the slave router is recovering from factory settings.
By adopting the method, the terminal equipment can display the shutdown result, so that a user can intuitively check the shutdown result through the terminal equipment, and if shutdown failure exists, the reason that shutdown cannot be performed can be known, the user experience is better, and the user can manage each router more conveniently.
It should be noted that, a heartbeat mechanism is provided between the master router and the slave router, that is, the slave router sends a heartbeat packet to the master router once every fixed time interval, if the master router does not receive the heartbeat packet of the slave router within a specified time period, the master router determines that the slave router has been disconnected from the power supply.
As an alternative implementation manner, after receiving the shutdown instruction, the slave router may shorten a fixed time interval for sending the heartbeat packet to the master router if it is determined that the shutdown operation can be currently performed by acquiring the file lock. For example, the heartbeat packet may be transmitted from every one minute, and the heartbeat packet may be transmitted at every 2 seconds. Therefore, the master router can timely determine whether the slave router is successfully powered off or not, and timely feed back the power-off result to the terminal equipment, so that a user can quickly know the power-off result, and user experience is improved.
Taking the scenario shown in fig. 5 as an example, a router shutdown method provided by an embodiment of the present application is described, as shown in fig. 8, where the method includes:
s801, the terminal equipment sends a shutdown message to the main router.
In connection with fig. 5, the router that the user selects to be turned off includes the slave router 1, the slave router 3 and the slave router 4, and the identities of the slave router 1, the slave router 3 and the slave router 4 may be included in the shutdown message.
S802, the master router determines a shutdown sequence.
The method for determining the shutdown sequence by the master router may refer to the related description in the above embodiment, and in combination with the scenario of fig. 5, the shutdown sequence determined by the master router may be the slave router 4, the slave router 3, and the slave router 1.
S803, the master router issues a shutdown instruction to the slave router 1 for the slave router 4.
S804, the slave router 1 transmits a shutdown instruction to the slave router 4.
S805, the slave router 4 executes a shutdown instruction.
The process of executing the shutdown instruction from the router may refer to the related description in the above embodiment, and will not be repeated here.
S806, the slave router 4 returns the shutdown execution code to the slave router 1.
It can be understood that, in the process of executing the shutdown instruction by the slave router 4, after the shutdown execution code returned by the configuration service module is obtained from the shutdown processing module of the slave router 4, the slave router 4 can return the shutdown execution code to the slave router 1, and meanwhile, the slave router 4 continues to perform subsequent shutdown processing.
S807, the slave router 1 forwards the shutdown execution code to the master router.
S808, the master router determines that the heartbeat message of the slave router 4 is not received within the preset time period.
S809, the master router determines that the slave router 4 is successfully powered off.
S810, the master router issues a shutdown instruction to the slave router 1 for the slave router 3.
S811, the slave router 1 transmits a shutdown instruction to the slave router 3.
S812, the slave router 3 executes a shutdown instruction.
S813, the slave router 3 returns a shutdown execution code to the slave router 1.
It can be understood that, in the process of executing the shutdown instruction by the slave router 3, after the shutdown execution code returned by the configuration service module is obtained from the shutdown processing module of the slave router 3, the slave router 3 can return the shutdown execution code to the slave router 1, and at the same time, the slave router 3 continues to perform the subsequent shutdown processing.
S814, the slave router 1 forwards the shutdown execution code and the lan down message to the master router.
The slave router 3 and the slave router 1 are connected by a wired connection mode, and after the slave router 3 is shut down, the driving layer of the slave router 1 reports an lan down message to the application layer, and the slave router 1 forwards the lan down message to the master router.
S815, the master router determines that the heartbeat message of the slave router 3 is not received within a preset time period.
S816, the master router determines that the slave router 3 is successfully powered off.
S817, the master router issues a shutdown instruction for the slave router 1.
S818, executing a shutdown instruction from the router 1.
S819, the slave router 1 returns a shutdown execution code to the master router.
It can be understood that, in the process of executing the shutdown instruction, after the shutdown execution code returned by the configuration service module is obtained from the shutdown processing module of the slave router 1, the slave router 1 can return the shutdown execution code to the master router, and meanwhile, the slave router 1 continues to perform subsequent shutdown processing.
S820, the master router receives the lan down message and determines that the heartbeat message of the slave router 1 is not received within a preset duration.
The slave router 1 and the master router are connected by a wired connection mode, so that after the slave router 1 is shut down, the drive layer of the master router can report an lan down message to the application layer.
S821, the master router determines that the slave router 1 is successfully powered off.
S822, the master router returns a shutdown result to the terminal equipment.
Wherein the shutdown result includes shutdown results for the slave router 1, the slave router 3, and the slave router 4.
Alternatively, in another embodiment, the master router may also return the shutdown result of the slave router to the terminal device immediately after determining the shutdown result of the slave router.
S823, the terminal equipment displays a shutdown result.
It will be appreciated that the terminal device may present the shutdown result at the APP or at the main routing interface in the web.
After the router to be closed is selected by the user through the terminal equipment, the terminal equipment sends the closing message to the main router, and the main router further controls each router to be closed according to the closing sequence, so that the user does not need to walk back and forth among a plurality of routers to search for the router to be closed, the user is more convenient and quick, and the closing experience is improved.
The embodiment of the application also provides a router, which comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the router to execute the method steps executed by the main router in the method embodiment.
The embodiment of the application also provides a terminal device, which comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the terminal device to execute the method steps executed by the terminal device in the method embodiment.
The embodiment of the application also provides a router closing system which comprises terminal equipment, a master router and at least one slave router capable of communicating with the master router.
The main router is used for realizing the method steps realized by the main router in the method embodiment;
the terminal equipment is used for realizing the method steps realized by the terminal equipment in the method embodiment;
the slave router is used for receiving a shutdown instruction from the master router and performing shutdown processing.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, where when the program runs, the program controls a device where the computer readable storage medium is located to execute some or all of the steps in the foregoing embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
In a specific implementation, an embodiment of the present application further provides a computer program product, where the computer program product contains executable instructions, where the executable instructions when executed on a computer cause the computer to perform some or all of the steps in the above method embodiments.
Embodiments of the disclosed mechanisms may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the application may be implemented as a computer program or program code that is executed on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (Digital Signal Processor, DSP), microcontroller, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in the present application are not limited in scope by any particular programming language. In either case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy diskettes, optical disks, compact disk Read-Only memories (Compact Disc Read Only Memory, CD-ROMs), magneto-optical disks, read-Only memories (ROMs), random Access Memories (RAMs), erasable programmable Read-Only memories (Erasable Programmable Read Only Memory, EPROMs), electrically erasable programmable Read-Only memories (Electrically Erasable Programmable Read Only Memory, EEPROMs), magnetic or optical cards, flash Memory, or tangible machine-readable Memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) in an electrical, optical, acoustical or other form of propagated signal using the internet. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the drawings of the specification. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the present application, each unit/module mentioned in each device is a logic unit/module, and in physical terms, one logic unit/module may be one physical unit/module, or may be a part of one physical unit/module, or may be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logic unit/module itself is not the most important, and the combination of functions implemented by the logic unit/module is only a key for solving the technical problem posed by the present application. Furthermore, in order to highlight the innovative part of the present application, the above-described device embodiments of the present application do not introduce units/modules that are less closely related to solving the technical problems posed by the present application, which does not indicate that the above-described device embodiments do not have other units/modules.
It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the application.

Claims (15)

1. A router shutdown method, characterized in that it is applied to a master router capable of communicating with at least one slave router; the method comprises the following steps:
receiving a shutdown message sent by a terminal device, wherein the shutdown message is used for indicating the main router to close a designated router selected by a user;
determining a shutdown sequence of a designated router selected by a user;
and sequentially controlling the shutdown of the designated router selected by the user according to the shutdown sequence.
2. The method of claim 1, wherein the shutdown message includes an identification of a plurality of designated routers selected by a user; the determining the shutdown sequence of the designated router selected by the user comprises the following steps:
acquiring a hierarchy of each designated router of the plurality of designated routers from the master router based on the identification of the plurality of designated routers;
and sequencing the plurality of designated routers according to the sequence from low to high of the hierarchy, and taking the sequencing result as the shutdown sequence of the plurality of designated routers.
3. The method according to claim 2, wherein the method further comprises:
if at least two designated routers with the same hierarchy exist in the plurality of designated routers, sequencing the at least two designated routers according to the sequence from the late to the early of the access time; or alternatively, the process may be performed,
And if at least two designated routers with the same hierarchy exist in the plurality of designated routers, determining that the shutdown orders of the at least two designated routers are the same.
4. The method of claim 3, wherein the plurality of designated routers comprises slave routers; and sequentially controlling the shutdown of the designated router selected by the user according to the shutdown sequence, wherein the method comprises the following steps:
and sending a shutdown instruction to each slave router included in the plurality of designated routers in turn according to the shutdown order, wherein the shutdown instruction is used for indicating the slave router to shutdown.
5. The method of claim 3, wherein the plurality of designated routers includes a master router and a slave router; and sequentially controlling the shutdown of the execution router for selection according to the shutdown sequence, wherein the shutdown comprises the following steps:
according to the shutdown sequence, sequentially sending a shutdown instruction to each slave router included in the plurality of designated routers, wherein the shutdown instruction is used for indicating the slave routers to shutdown;
and after receiving shutdown results of successful shutdown of all the slave routers in the plurality of designated routers, executing shutdown operation on the master router.
6. The method according to claim 4 or 5, wherein said sequentially sending a shutdown instruction to each slave router included in the plurality of designated routers in the shutdown order comprises:
after a shutdown instruction is sent to one slave router according to the shutdown order, acquiring a shutdown result of the slave router, and after a shutdown result of the slave router, continuing to send the shutdown instruction to the next slave router in the plurality of designated routers according to the shutdown order;
if a shutdown result of shutdown failure of any one slave router is received, stopping sending a shutdown instruction.
7. The method according to claim 1, wherein after the receiving the shutdown message sent by the terminal device, the method further comprises:
and if the shutdown message comprises the identification of the master router and does not comprise the identification of the slave router, executing the shutdown operation of the master router.
8. The method of claim 6, wherein each time a shutdown command is sent to a slave router, obtaining a shutdown result of the slave router comprises:
receiving a shutdown execution code sent by the slave router, wherein the shutdown execution code is used for indicating whether the router successfully executes shutdown operation or not;
And determining a shutdown result of the slave router based on the shutdown execution code.
9. The method of claim 8, wherein determining a shutdown result for the slave router based on the shutdown execution code comprises:
if the shutdown execution code indicates that the shutdown operation is successfully executed, determining that the shutdown result is shutdown success, otherwise, determining that the shutdown result is shutdown failure; or alternatively, the process may be performed,
if the shutdown execution code indicates that the shutdown operation is successfully executed and the heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is shutdown success, otherwise determining that the shutdown result is shutdown failure; or alternatively, the process may be performed,
if the shutdown execution code indicates that the shutdown operation is successfully executed, a notification message for indicating that the wired connection of the slave router is disconnected is received, and a heartbeat packet from the slave router is not received within a preset time period after the shutdown execution code is received, determining that the shutdown result is the shutdown success, otherwise, determining that the shutdown result is the shutdown failure.
10. The method of claim 9, wherein after said determining a shutdown result for the slave router based on the shutdown execution code, the method further comprises:
And sending a shutdown result of the slave router to the terminal equipment so that the terminal equipment displays the shutdown result, wherein the shutdown result is shutdown success or shutdown failure.
11. The method of claim 9, wherein the shutdown result includes a cause of the inability to shutdown if the shutdown execution code indicates the inability to shutdown and the cause of the inability to shutdown.
12. A router comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the router to perform the method steps of any of claims 1-11.
13. A router shutdown system comprising a terminal device, a master router, and at least one slave router capable of communicating with the master router;
the master router being adapted to implement the method steps of any of claims 1-11;
the terminal equipment is used for receiving the shutdown operation of a user on a designated router and sending a shutdown message to the main router in response to the shutdown operation;
the slave router is used for performing shutdown processing under the control of the master router.
14. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1-11.
15. A computer program product comprising executable instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1-11.
CN202211361870.2A 2022-11-02 2022-11-02 Router closing method, system and router Active CN116708046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211361870.2A CN116708046B (en) 2022-11-02 2022-11-02 Router closing method, system and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211361870.2A CN116708046B (en) 2022-11-02 2022-11-02 Router closing method, system and router

Publications (2)

Publication Number Publication Date
CN116708046A true CN116708046A (en) 2023-09-05
CN116708046B CN116708046B (en) 2024-04-12

Family

ID=87826392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211361870.2A Active CN116708046B (en) 2022-11-02 2022-11-02 Router closing method, system and router

Country Status (1)

Country Link
CN (1) CN116708046B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778765A (en) * 2012-10-25 2014-05-07 华为终端有限公司 Remote control method, remote control equipment and main equipment
CN106331175A (en) * 2016-10-27 2017-01-11 苏州云融信息技术有限公司 Cloud AP (access point) oriented multi-control proxy unified management system and method
CN107948080A (en) * 2017-11-23 2018-04-20 上海斐讯数据通信技术有限公司 A kind of modularization extension router and its control method, control system
CN111505946A (en) * 2019-01-31 2020-08-07 华为终端有限公司 Equipment control method and equipment
CN111965988A (en) * 2020-08-14 2020-11-20 深圳市欧瑞博科技股份有限公司 Control method and device of intelligent equipment, intelligent control switch and storage medium
US20210195516A1 (en) * 2019-12-23 2021-06-24 Sagemcom Broadband Sas Method for switching off a communication network
CN113572886A (en) * 2021-06-08 2021-10-29 荣耀终端有限公司 Router control method, router control device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778765A (en) * 2012-10-25 2014-05-07 华为终端有限公司 Remote control method, remote control equipment and main equipment
CN106331175A (en) * 2016-10-27 2017-01-11 苏州云融信息技术有限公司 Cloud AP (access point) oriented multi-control proxy unified management system and method
CN107948080A (en) * 2017-11-23 2018-04-20 上海斐讯数据通信技术有限公司 A kind of modularization extension router and its control method, control system
CN111505946A (en) * 2019-01-31 2020-08-07 华为终端有限公司 Equipment control method and equipment
US20210195516A1 (en) * 2019-12-23 2021-06-24 Sagemcom Broadband Sas Method for switching off a communication network
CN111965988A (en) * 2020-08-14 2020-11-20 深圳市欧瑞博科技股份有限公司 Control method and device of intelligent equipment, intelligent control switch and storage medium
CN113572886A (en) * 2021-06-08 2021-10-29 荣耀终端有限公司 Router control method, router control device and storage medium

Also Published As

Publication number Publication date
CN116708046B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US11082815B2 (en) Method of operating function and resource of electronic device
WO2021147686A1 (en) Method for guiding intelligent device to access network, and medium, control terminal, and system
US11451946B2 (en) Method for establishing wireless communication connection, and device
CN109788546B (en) Transmission method of timing advance information, network equipment and terminal
CN111052780B (en) SIM card authentication method and terminal
WO2020082307A1 (en) Hybrid automatic repeat request (harq) feedback method and apparatus
CN112840695B (en) Method and device for determining BFD (bidirectional Forwarding detection) resources for beam failure detection and communication equipment
WO2017148354A1 (en) Mobile terminal, computer storage medium and network sharing method
CN111699753A (en) Wake-up signal configuration, wake-up method and device, and storage medium
CN113170470B (en) Beam determining method and device and communication equipment
US11785541B2 (en) Method for executing BFR process, device, terminal, base station, and storage medium
WO2020191633A1 (en) Data transmission method and apparatus
CN116708046B (en) Router closing method, system and router
CN112015359A (en) Display method and electronic equipment
WO2022120649A1 (en) Access control method and apparatus, communication device, and medium
CN114356172A (en) Data transmission method and electronic equipment
CN116325932A (en) Wireless communication method, terminal equipment and network equipment
WO2024031387A1 (en) Information processing method and apparatus, communication device, and storage medium
EP4290950A1 (en) Method and apparatus for determining user paging group, and user equipment and storage medium
WO2023206036A1 (en) Random access method, apparatus and device, and storage medium
WO2023274026A1 (en) Interaction method and apparatus for electronic device
CN115136644A (en) MCG failure related information reporting method and device
JP6160439B2 (en) Portable terminal device and communication control method
CN115707363A (en) Terminal capability reporting method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant