Cutover method, network device, and computer-readable storage medium
By automatically identifying the user's cutover intention and achieving seamless synchronization of old device configuration files, it solves the problem of users manually synchronizing configuration information and improves the convenience and security of cutover.
Patent Information
- Application Number
- CN202210039202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-01-13
AI Technical Summary
In the existing technology, users need to manually operate the mobile phone APP or browser to synchronize the configuration information of the old router to the new router. The technical threshold is high and the operation is difficult, which is difficult to meet the needs of users without technical foundation.
By automatically establishing a communication connection between the old and new devices, identifying the user's cutover intention, and automatically backing up the old device's configuration files to the new device, a cutover process is achieved without the need for manual user operation.
It lowers the technical threshold for cutover operations, improves user experience, simplifies the configuration file synchronization process, and ensures the accuracy and security of cutover.
Smart Images

Figure CN116489007B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a cutover method, a network device, and a computer-readable storage medium. Background Art
[0002] With the development of Internet technology, router technology has also been continuously improved and upgraded. In order to get a better Internet experience, people usually use new routers with richer functions to replace old routers.
[0003] Typically, old routers have been in use for a long time and store a lot of configuration information, such as a whitelist of devices allowed to access, dial-up Internet account numbers and passwords, and usage records generated by other users during the use of the old router. This data is usually stored in the old router in the form of configuration files, making it more convenient and secure for users to access the Internet through the router. However, when a new router is activated, the configuration information in it is usually empty. Therefore, it is necessary to synchronize the configuration information stored in the old router with the new router to ensure the normal use of the new router. Typically, users can access the old and new routers by operating a mobile application (APP) or a browser, and manually back up the configuration information in the old router to the new router to ensure the normal use of the new router.
[0004] However, this manual method of backing up configuration information has a high technical threshold and is difficult to operate for users without technical foundation. Summary of the Invention
[0005] The present application provides a cutover method, apparatus, chip, network device, computer-readable storage medium, and computer program product, which can lower the operational threshold of cutover and have low technical difficulty.
[0006] In a first aspect, a cutover method is provided, which is executed by a first device and includes: receiving a first message sent by a second device, the first message being a message sent when the second device is in a waiting-for-network access state, the waiting-for-network access state being used to characterize a state when a connector at an uplink interface of the second device is in place and the second device is not connected to the network; upon determining that the first device is in a waiting-for-cutover state, establishing a communication connection with the second device in response to the first message, the waiting-for-cutover state being used to characterize a state in which a connector at an uplink interface of the first device is not in place; and sending a configuration file of the first device to the second device via the communication connection to complete the cutover.
[0007] When the connector at the uplink interface is in place and the second device is not connected to the network, the second device can determine that the second device is a new device that needs to be activated, thereby identifying the user's cutover intention. The second device then sends a first message to the first device to establish a communication connection. Upon receiving the first message from the second device, the first device can, based on this first message, confirm the user's cutover intention and establish a communication connection with the second device when the connector at the uplink interface of the first device is not in place. The first and second devices then use this communication connection to transfer configuration files, completing the cutover. This method eliminates the need for users to manually back up configuration files through a mobile app or access the device to be cutover via a website. Instead, the user simply unplugs the connector at the uplink interface of the old device and plugs it into the uplink interface of the new device. The device then automatically and accurately identifies the user's cutover intention and automatically backs up the old device's configuration file to the new device, allowing the new device to access the old device's configuration file and complete the cutover. Therefore, users can perform precise cutover without any technical knowledge. This method offers a low technical barrier to entry and is simple and convenient to operate, enhancing the user experience.
[0008] In some possible implementations, the configuration file is a file associated with the usage history of the first device. The configuration file may include, but is not limited to, dial-up Internet access account and password, a whitelist of connected terminal devices, Internet access history, and other information. This information can be stored in the memory of the first device in the form of a file, making it easy for the first device to access and call it during use.
[0009] In some possible implementations, the method further includes: receiving network access success information; and in response to the network access success information, entering a shutdown mode to save resources.
[0010] In some possible implementations, the method further includes: controlling the first indicator light to display a first state, where the first state is used to indicate that the first device is in an off mode.
[0011] When the user observes that the first indicator light is in the first state, the user can intuitively know that the first device is in the shutdown mode. The user can turn off the power of the first device to complete the operation, thereby avoiding the failure of the cutover caused by premature shutdown of the first device, and avoiding invalid waiting caused by not knowing the result of the cutover.
[0012] In some possible implementations, the network access success information carries the device identification of the device that has successfully accessed the network, and after establishing a communication connection with the second device, it also includes: receiving the identification of the second device sent by the second device through the communication connection; in response to the network access success information, entering the shutdown mode, including: determining that the device identification is the same as the identification of the second device, entering the shutdown mode.
[0013] The aforementioned network access success message may also be sent by another device after it successfully accesses the network. If the first device directly enters shutdown mode after receiving the network access success message, and the network access success message is not sent by a legitimate second device, and the legitimate second device has not yet successfully accessed the network, the cutover may fail. Therefore, after receiving the network access success message, the first device verifies the device that sent it, thereby improving the cutover success rate.
[0014] In some possible implementations, sending the configuration file of the first device to the second device via a communication connection to complete the cutover includes: receiving the link identifier of the uplink of the second device sent by the second device via the communication connection; determining whether the link identifier of the uplink of the second device is the same as the link identifier of the target uplink, the target uplink being the uplink of the first device when the connector at the uplink interface of the first device is in place; if so, sending the configuration file of the first device to the second device via the communication connection to complete the cutover.
[0015] By verifying whether the link identifier of the uplink accessed by the second device is consistent with the link identifier of the target uplink, the first device can determine that the second device has accessed the network accessed by the first device before performing the cutover, thereby avoiding the possible cutover failure caused by the activation of new devices of other users in the surrounding area and the information security problems caused by the mistransmission of configuration files, thereby improving the success rate of the cutover and ensuring the user's information security.
[0016] In some possible implementations, the link identifier includes at least one of an internet protocol (IP) address for interconnection between networks, a physical address of an upstream device, and an interface identifier of an interface of the upstream device for connecting to a downstream device.
[0017] In some possible implementations, sending the configuration file of the first device to the second device via a communication connection to complete the cutover includes: receiving, by the second device, via the communication connection, the current signal strength of the signal transmitted by the first device detected by the second device; determining whether the current signal strength is greater than or equal to the baseline signal strength; and if so, sending the configuration file of the first device to the second device via the communication connection to complete the cutover.
[0018] When the current signal strength of the signal transmitted by the first device detected by the second device is greater than or equal to the baseline signal strength, the configuration file of the first device is sent to the second device to continue the cutover process. This can avoid the cutover failure caused by the second device not being able to obtain the link identifier of the uplink to which it is accessed, thereby improving the success rate of the cutover.
[0019] In some possible implementations, before receiving the first message sent by the second device, it also includes: when determining that the first device is in a state to be cut over, broadcasting a second message, the second message is used to indicate that the first device is in a state to be cut over, the second message carries the network identifier of the first device, and the network identifier of the first device is used by the second device to discover the first device and send the first message to the first device.
[0020] When the first device's uplink connector is not in place, it triggers the broadcast of a second message, which sets the first device's network identifier to an open state, making it easier for other devices to discover it. Therefore, the second device does not need to know the network identifier of the first device to be cutovered in advance. It can discover the first device by scanning in the open network identifier state, making the identity of the first device to be cutover more open and flexible, and this cutover method has a wider range of application scenarios.
[0021] In some possible implementations, when it is determined that the first device is in a state to be cut over, before broadcasting the second message, it also includes: determining that the first device is in a networked state, and the networked state includes: the network traffic within a preset time period exceeds a preset traffic threshold, and at least one of the network connections exists with at least one downstream device.
[0022] If it is determined that the first device is in an online state before the network cable is unplugged, it can be determined that the user's action of unplugging the network cable is an intention to cut over, and therefore it is determined that the first device is in a state to be cut over after the network cable is unplugged. If the connector at the uplink interface of the first device is in place before the network cable is unplugged, that is, the uplink interface is in an up state, but it is not in an online state, it is possible that the network cable is unplugged to test or repair the first device due to a network failure. Therefore, it can be determined that it is not in a state to be cut over after the network cable is unplugged, and it is not necessary to execute the above-mentioned cutover process. When the first device is ensured to be in an online state, if the connector at the uplink interface of the first device is not in place, it is determined that the first device is in a state to be cut over, which more accurately identifies the user's cutover intention and avoids the waste of resources caused by the invalid execution of the cutover process, so that the triggering of the cutover process is more closely matched with the user's intention, thereby improving the user experience.
[0023] In some possible implementations, the network identifier of the first device carried in the second message is a first service set identifier (SSID), and the first SSID is used to indicate that the first device is in a pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in a pending cutover state.
[0024] In some possible implementations, the second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in a pending cutover state.
[0025] In a second aspect, a cutover method is provided, which is executed by a second device, including: when determining that the second device is in a waiting-for-network state, sending a first message to the first device, the first message is used to indicate that the second device is in a waiting-for-network state, and the waiting-for-network state is used to indicate that a connector at an uplink interface of the second device is in place and the second device is not connected to the network; receiving a response message sent by the first device based on the first message; establishing a communication connection with the first device according to the response message; receiving a configuration file sent by the first device through the communication connection, and completing the cutover.
[0026] When the connector at the uplink interface is in place and the second device is not connected to the network, the second device can determine that the second device is a new device that needs to be activated, thereby identifying the user's cutover intention. The second device then sends a first message to the first device to establish a communication connection. Upon receiving the first message from the second device, the first device can, based on this first message, confirm the user's cutover intention and establish a communication connection with the second device when the connector at the uplink interface of the first device is not in place. The first and second devices then use this communication connection to transfer configuration files, completing the cutover. This method eliminates the need for users to manually back up configuration files through a mobile app or access the device to be cutover via a website. Instead, the user simply unplugs the connector at the uplink interface of the old device and plugs it into the uplink interface of the new device. The device then automatically and accurately identifies the user's cutover intention and automatically backs up the old device's configuration file to the new device, allowing the new device to access the old device's configuration file and complete the cutover. Therefore, users can perform precise cutover without any technical knowledge. This method offers a low technical barrier to entry and is simple and convenient to operate, enhancing the user experience.
[0027] In some possible implementations, the configuration file is a file associated with a usage record of the first device.
[0028] The configuration file may include but is not limited to dial-up Internet account and password, white list of connected terminal devices, Internet browsing history and other information. This information can be stored in the memory of the first device in the form of a file to facilitate access and call by the first device during use.
[0029] In some possible implementations, receiving a configuration file sent by the first device through a communication connection and completing the cutover includes: receiving the configuration file through the communication connection and determining whether the configuration file is complete; if so, saving the configuration file and restarting the second device to make the configuration file take effect, thereby completing the cutover.
[0030] By checking the integrity of the configuration file, you can avoid incomplete configuration information transmission caused by incomplete configuration files and avoid cutover failures.
[0031] In some possible implementations, the method further includes: broadcasting network access success information to cause the first device to enter a shutdown mode to save resources.
[0032] In some possible implementations, before broadcasting the successful network access information, it also includes: determining that the network status of the second device is a networked state, and the networked state includes at least one of: the network traffic within a preset time period exceeds a preset traffic threshold, and at least one downstream device has a network connection.
[0033] If it is determined that the first device is in an online state before the network cable is unplugged, it can be determined that the user's action of unplugging the network cable is an intention to cut over, and therefore it is determined that the first device is in a state to be cut over after the network cable is unplugged. If the connector at the uplink interface of the first device is in place before the network cable is unplugged, that is, the uplink interface is in an up state, but it is not in an online state, it is possible that the network cable is unplugged to test or repair the first device due to a network failure. Therefore, it can be determined that it is not in a state to be cut over after the network cable is unplugged, and it is not necessary to execute the above-mentioned cutover process. When the first device is ensured to be in an online state, if the connector at the uplink interface of the first device is not in place, it is determined that the first device is in a state to be cut over, which more accurately identifies the user's cutover intention and avoids the waste of resources caused by the invalid execution of the cutover process, so that the triggering of the cutover process is more closely matched with the user's intention, thereby improving the user experience.
[0034] In some possible implementations, the network access success information carries the device identification of the device that has successfully accessed the network. After establishing a communication connection with the first device according to the response message, it also includes: sending the identification of the second device to the first device through the communication connection, and the identification of the second device is used by the first device to enter the shutdown mode when it determines that the device identification is the same as the identification of the second device.
[0035] The aforementioned network access success message may also be sent by another device after it successfully accesses the network. If the first device directly enters shutdown mode after receiving the network access success message, and the network access success message is not sent by a legitimate second device, and the legitimate second device has not yet successfully accessed the network, this may cause a cutover failure. Therefore, after receiving the network access success message, the first device verifies the sending device using its device identifier, thereby improving the cutover success rate.
[0036] In some possible implementations, the method further includes: controlling the second indicator light to display a second state, the second state being used to represent the uplink of the first device when the second device successfully accesses the uplink interface of the first device and the connector is in place.
[0037] When the second indicator light is in the second state, the user can intuitively know that the second device has successfully joined the network, and the user can use the second device normally, avoiding useless waiting caused by not knowing the result of the cutover.
[0038] In some possible implementations, when it is determined that the second device is in a state waiting to join the network, a first message is sent to the first device, including: when it is determined that the second device is in a state waiting to join the network, receiving a second message broadcast by the first device, the second message carrying the network identifier of the first device, the second message being used to characterize that the first device is in a state waiting to be cut over, and the state waiting to be cut over is used to characterize that the connector at the uplink interface of the first device is not in place; discovering the first device according to the network identifier of the first device, and sending the first message to the first device.
[0039] When the first device's uplink connector is not in place, it triggers the broadcast of a second message, which sets the first device's network identifier to an open state, making it easier for other devices to discover it. Therefore, the second device does not need to know the network identifier of the first device to be cutovered in advance. It can discover the first device by scanning in the open network identifier state, making the identity of the first device to be cutover more open and flexible, and this cutover method has a wider range of application scenarios.
[0040] In some possible implementations, after establishing a communication connection with the first device based on the response message, it also includes: sending the link identifier of the uplink of the second device to the first device through the communication connection, and the link identifier of the uplink of the second device is used by the first device to determine that the uplink of the second device is the target uplink, and the target uplink is the uplink of the first device when the connector at the uplink interface of the first device is in place.
[0041] By verifying whether the link identifier of the uplink accessed by the second device is consistent with the link identifier of the target uplink, the first device can determine that the second device has accessed the network accessed by the first device before performing the cutover, thereby avoiding the possible cutover failure caused by the activation of new devices of other users in the surrounding area and the information security problems caused by the mistransmission of configuration files, thereby improving the success rate of the cutover and ensuring the user's information security.
[0042] In some possible implementations, the link identifier includes at least one of an IP address, a physical address of an upstream device, and an interface identifier of an interface connecting the upstream device to the downstream device.
[0043] In some possible implementations, the network identifier of the first device carried in the second message is a first SSID, and the first SSID is used to indicate that the first device is in a pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in a pending cutover state.
[0044] In some possible implementations, the second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in a pending cutover state.
[0045] In a third aspect, a cutover device is provided, comprising a unit composed of software and / or hardware, wherein the unit is configured to execute any one of the methods in the technical solutions of the first aspect or the second aspect.
[0046] In a fourth aspect, a network device is provided, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the network device executes any one of the methods in the technical solutions of the first aspect or the second aspect.
[0047] In some possible implementations, the network device is a router.
[0048] In a fifth aspect, an embodiment of the present application provides a chip comprising a processor; the processor is used to read and execute a computer program stored in a memory to execute any one of the methods in the technical solutions of the first aspect or the second aspect.
[0049] Optionally, the chip further includes a memory, and the memory is connected to the processor via a circuit or wire.
[0050] Further optionally, the chip also includes a communication interface.
[0051] In a sixth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solutions of the first aspect or the second aspect.
[0052] In a seventh aspect, a computer program product is provided, which includes: a computer program code, which, when running on a network device, enables the network device to execute any one of the methods in the technical solutions of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 1 is a schematic diagram of the structure of a network device 100 provided in an embodiment of the present application;
[0054] Figure 2 is a schematic diagram of a cutover scenario provided in an embodiment of the present application;
[0055] Figure 3 is a schematic diagram of another cutover scenario provided in an embodiment of the present application;
[0056] Figure 4 This is a flowchart of a cutover method provided in an embodiment of the present application;
[0057] Figure 5 This is an interaction diagram of a cutover method provided in an embodiment of the present application;
[0058] Figure 6 is a structural diagram of a cutover device provided in an embodiment of the present application;
[0059] Figure 7 This is a structural diagram of another cutover device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0061] In the following, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include one or more of the features.
[0062] The cutover method provided in the embodiment of the present application can be applied to network devices such as switches and routers. The embodiment of the present application does not impose any restrictions on the specific type of network devices.
[0063] For example, Figure 1 FIG1 is a schematic diagram of a network device 100 according to an embodiment of the present invention. The network device 100 may include a processor 110 , a memory 120 , a power management module 130 , an antenna 140 , and a wireless communication module 150 .
[0064] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the network device 100. In other embodiments of the present application, the network device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0066] The controller may be the nerve center and command center of the network device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0067] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0068] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the network device 100. In other embodiments of the present application, the network device 100 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.
[0069] The power management module 130 is used for inputting power.
[0070] The wireless communication function of the network device 100 can be implemented through the antenna 140, the wireless communication module 150, the modem processor, and the baseband processor.
[0071] The antenna 140 is used to transmit and receive electromagnetic wave signals. Figure 1 The structure of antenna 140 is merely an example. Each antenna in network device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 140 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0072] The wireless communication module 150 can provide wireless communication solutions applied to the network device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 150 can be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via the antenna 140, frequency modulates and filters the electromagnetic wave signals, transmits them to the modulation and demodulation processor for demodulation, and sends the processed signals to the processor 110. The wireless communication module 150 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 140.
[0073] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. In some embodiments, the modem processor may be a standalone device. In other embodiments, the modem processor may be independent of the processor 110 and may be co-located with the wireless communication module 150 or other functional modules.
[0074] The indicator 160 may be an indicator light, which may be used to indicate power status, network status changes, etc.
[0075] For ease of understanding, the following examples of this application will be described with Figure 1 Taking the network device with the structure shown as an example, the cutover method provided in the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.
[0076] The cutover method provided in the embodiment of the present application can be applied to Figure 2 In the cutover scenario shown in Figure 2As shown, in this scenario, a new router 220 is needed to replace the old router 210 to access the network provided by the upstream device 240 and provide a wireless network for the downstream device 230. With the development of Internet technology, network technology and routers have also continued to advance and upgrade. To obtain a better Internet experience, people usually use a new router 220 with richer functions to replace the old router 210. Typically, the old router 210 connects to the Internet by connecting to an upstream device 240, such as a hallway switch, and provides network signals to the downstream devices 230 such as mobile phones and tablets. The hallway switch can also connect to other users' routers 250 and provide network services for them. It should be noted that the upstream device and downstream device mentioned in this application are relative concepts and do not refer to a specific device. That is, the upstream device is the upstream device of its own downstream device. For example, if the downstream device of device A is device B, then the upstream device of device B is device A, and device B accesses the Internet by connecting to device A.
[0077] Since the old router 210 has been in use for a long time, it stores a lot of configuration information, such as a whitelist of downstream devices allowed to access, account numbers and passwords for dial-up Internet access, and usage records generated by the old router 210 during the use of the downstream terminal devices. This data is usually stored in the old router 210 in the form of configuration files, making it more convenient and secure for users to access the Internet through the old router 210. However, when the new router 220 is activated, the configuration information therein is usually empty. This requires synchronizing the configuration information stored in the old router 210 with the new router 220 to ensure the normal use of the new router 220. Users can access the old router 210 and the new router 220 through a mobile phone app or browser, and manually back up the configuration information in the old router 210 to the new router 220 to ensure the use of the new router 220. However, this method of manually backing up configuration information is technically difficult and difficult for users without technical skills.
[0078] Figure 3 Taking the network cutover of a router as an example, the cutover method provided in the embodiment of the present application requires replacing the old router with a new router, that is, after the new router obtains the configuration file of the old router, the new router is used to cut over the old router, thereby completing the router upgrade.
[0079] In the cutover method provided in the embodiment of the present application, when the user needs to replace the old router with a new router, the new router can be powered on (i.e., plugged in), and then the network cable connected to the corridor switch on the old router can be unplugged, and the unplugged network cable can be inserted into the uplink interface of the new router. When the old router detects that the network cable has been unplugged, it can recognize that the user intends to cut over the router, and then starts to back up the configuration file. When the old router detects that a legitimate new router is connected to the network, it establishes a communication connection with the new router and sends the configuration information to the new router through the established communication connection. The new router can thus obtain the configuration information for use, so the configuration information can be automatically backed up without the user having to manually back up the configuration information. The operation is simple and the technical threshold is low, which improves the user experience.
[0080] Figure 4 This is a flow chart of a cutover method provided in an embodiment of the present application. Here, the old device is referred to as the first device, the new device is referred to as the second device, and the process of replacing the old device with the new device is executed. The method includes:
[0081] S401: When determining that a second device is in a waiting-for-network access state, send a first message to a first device. The first message is used to indicate that the second device is in the waiting-for-network access state, where the waiting-for-network access state indicates that a connector on an uplink interface of the second device is in place and the second device is not connected to the network.
[0082] Specifically, when the second device is plugged in and turned on, if it detects that the connector at its own uplink interface is in place and the second device is not connected to the Internet, for example, the second device detects that a network cable is plugged into the network port at its own uplink interface, but it has not yet connected to the network provided by the upstream device (for example, only the network cable is plugged in and there is no dial-up Internet access), then it is determined that the second device may be a new device, and the user intends to use the second device to replace the first device. At this time, the status of the second device is waiting to access the network.
[0083] Optionally, the second device may actively scan for a first device waiting for handover, and if the SSID of the first device is found, the second device may send a first message to the first device; or the second device may broadcast the first message so that devices within a certain range, including the first device, can receive the first message.
[0084] Optionally, when the second device is in the network access waiting state, the second indicator light on the second device may be controlled to display the network access waiting state, for example, display red.
[0085] The first message is used as a connection message to trigger the establishment of a communication connection with the first device.
[0086] S402: When the first device is in a pending cutover state, in response to the first message, the first device sends a response message to the second device. The pending cutover state indicates that a connector on an uplink interface of the first device is not in place.
[0087] Under normal circumstances, the first device is in an online state. When the user unplugs the network cable connecting the upstream device on the first device, the first device detects that the connector at its own uplink interface is unplugged, and is not in place, that is, in a down state. At the same time, the first device will detect that it is disconnected from the network, and then determine that it is in a pending cutover state. When the first device detects that it is in a pending cutover state, if it receives a first message sent by the second device and learns that the second device requests to establish a connection, it can respond to the first message and send a response message to the second device to establish a connection. Optionally, after plugging in the power, the second device can start the Migration Daemon process to monitor the interface status of the uplink interface of the second device, thereby monitoring whether the connector at the uplink interface of the second device is in place.
[0088] S403: The second device receives the response message and establishes a communication connection with the first device according to the response message.
[0089] After the second device receives the response message sent by the first device, it can shake hands with the first device to establish a communication connection. Optionally, the communication connection can be a secure connection, and encryption and other processing can be performed during the connection establishment process to ensure information security during subsequent communication. The embodiments of the present application do not limit the process for establishing the above-mentioned communication connection or the type of communication connection.
[0090] S404: The first device sends the configuration file to the second device through a communication connection.
[0091] After the communication connection is established, the first device may start to back up the configuration file containing the configuration information, for example, by packaging the configuration file and sending it to the second device through the communication connection.
[0092] Optionally, the configuration file may be a file associated with the usage history of the first device during use. When the first device is a router, the configuration file may include, but is not limited to, dial-up Internet access account and password, a whitelist of connected terminal devices, Internet access history, and other information. This information can be stored in the memory of the first device in the form of a file, making it easy for the first device to access and call it during use.
[0093] S405: After receiving the configuration file, the second device completes the cutover.
[0094] After receiving the configuration file, the second device can read the configuration information in the configuration file, allowing it to obtain the configuration information of the first device, thus completing the cutover. After the cutover is complete, the second device can dial up to the Internet using the dial-up account and password in the configuration file. Alternatively, if the terminal device is identified as a device on the whitelist in the configuration file, the second device can be allowed to access the network provided by the second device.
[0095] Optionally, after receiving the configuration file, the second device may first check the integrity of the configuration file. If the received configuration file is incomplete, it may be considered that the cutover may have failed. The second device may then send a request to the first device to resend the configuration file to obtain a complete configuration file. If the request fails, the second device may re-execute the above-described cutover process, namely, upon detecting that the second device is in the waiting state, resend the first message to the first device to obtain the configuration file, thereby completing the cutover.
[0096] Optionally, after receiving the configuration file, the second device may parse the configuration file and then restart the second device to make the configuration file effective, thereby completing the cutover.
[0097] above Figure 4 In the illustrated embodiment, the second device can identify the user's cutover intention by detecting that the connector on the second device's uplink interface is in place and the second device is not connected to the network, thereby determining that the second device is a new device that needs to be activated. The second device then sends a first message to the first device to establish a communication connection. Based on this first message, the first device can confirm the user's cutover intention and establish a communication connection with the second device if the connector on the first device's uplink interface is not in place. The first and second devices then use this communication connection to transfer configuration files, completing the cutover. This method eliminates the need for users to manually back up configuration files through a mobile app or access the device to be cutover via a website. Instead, the user simply unplugs the connector on the old device's uplink interface and plugs it into the new device's uplink interface. The device then automatically and accurately identifies the user's cutover intention and automatically backs up the old device's configuration file to the new device, allowing the new device to access the old device's configuration file, completing the cutover. Therefore, precise cutover can be performed without requiring technical expertise. This method offers a low technical barrier to entry and is simple and convenient to operate, enhancing the user experience.
[0098] In some embodiments, the second device can proactively detect the presence of a first device to be cutover. The first device can also proactively broadcast a second message indicating its presence when in the cutover state. Specifically, when the network cable on the first device's uplink is unplugged, the first device detects that the connector on its uplink interface is not in place, indicating that the first device is in the cutover state. It can then broadcast a second message to inform surrounding devices of its presence. If the second device receives this second message, it can discover the first device. If the second device detects that the network cable is plugged into the uplink but has not yet dialed up to the Internet, it determines that it is in the network access state and can be considered a legitimate new device. Upon receiving the first message, the second device can then send a first message to the first device, requesting a connection. After receiving the first message, if the first device confirms its presence, it can establish a communication connection with the second device to transfer the configuration file and complete the cutover. In some embodiments, if the second device periodically sends the first message but does not receive a response within a period of time, it assumes that there is no nearby first device capable of cutover. In this case, the second device can stop sending the first message to conserve resources. Optionally, the second device may also periodically send the first message again for a period of time after a certain interval to try to establish a communication connection.
[0099] In some embodiments, the first device may periodically broadcast the second message for a period of time after the network cable is unplugged. If the first device does not receive the first message, it assumes that there is no nearby second device capable of performing a cutover. In this case, the first device may stop broadcasting the second message. If the unplugged network cable is reinserted into the first device, the first device terminates the cutover process and reconnects to the network to resume operation.
[0100] Optionally, the second message may carry the network identifier of the first device, referred to as the first SSID. The first SSID is the SSID of the first device when it is in a state to be cutover. When the network cable of the first device has not been unplugged, the SSID of the first device is different from the first SSID and is referred to as the second SSID. The difference between the first SSID and the second SSID can reflect whether the first device is in a state to be cutover. For example, if the second SSID is ABCD, the first SSID can be Migration-ABCD, where "Migration" can be identified as the SSID of a device that can be cutover.
[0101] Optionally, the second message may be in the form of a message, including a preset field indicating that the first device is in a pending cutover state. For example, the preset field may be added to the header or tail of the message before broadcasting.
[0102] In the above embodiment, when the first device's uplink connector is not in place, it triggers the broadcast of a second message, which causes the first device's network identifier to be open, making it easier for other devices to discover it. Therefore, the second device does not need to know the network identifier of the first device to be cutovered in advance; it can discover the first device by scanning when the network identifier is open. This makes the identity of the first device to be cutover more open and flexible, and this cutover method has a wider range of application scenarios.
[0103] In some embodiments, before determining that the first device is in a pending cutover state and broadcasting the second message, the first device may also first determine whether the first device is in a normal network state. If it is determined that the first device was in a network state before unplugging the network cable, it can be determined that the user's action of unplugging the network cable indicates a cutover intention, and therefore the first device is determined to be in a pending cutover state after unplugging the network cable. If the connector on the uplink interface of the first device is in place (i.e., the uplink interface is in an up state) before unplugging the network cable, but not in a network state, it may be due to a network failure. Therefore, it can be determined that the first device is not in a pending cutover state after unplugging the network cable, and the above-mentioned cutover process does not need to be executed. The first device can determine that the first device is in a pending cutover state if the connector on the uplink interface of the first device is not in place when it is ensured to be in a network state. This more accurately identifies the user's cutover intention, avoids the waste of resources caused by ineffective execution of the cutover process, and ensures that the triggering of the cutover process is more closely aligned with the user's intention, thereby improving the user experience.
[0104] Optionally, the manner in which the first device determines that it is in an online state may include one or both of the following two manners:
[0105] Method 1. Determine whether the network traffic within a preset time period exceeds a preset traffic threshold, for example, monitor whether the connector at the uplink interface of the first device is in place or not, and when the connector at the uplink interface of the first device is converted from in place to not in place within a preset time period before the moment when the connector is in place, the uplink and / or downlink network traffic exceeds the preset traffic threshold, wherein the preset time period can be 5 seconds, 10 seconds, etc., and the preset traffic threshold can be 1000GB, 2000GB, etc., which can represent a smooth network, and this application does not impose any restrictions on this.
[0106] Mode 2: There is a network connection with at least one downstream device, that is, the first device is connected to at least one downstream device, indicating that the first device can provide network services normally.
[0107] The first device may use the above-mentioned method 1 and / or method 2 to determine whether it is in a networked state, and the implementation method is flexible.
[0108] In some scenarios, if a user unplugs the network cable from the uplink interface of an old device, and a neighboring user happens to plug another network cable into the uplink interface of a new device, then if the new device simply checks that it is in the waiting-to-join state and initiates the cutover process, the configuration file of the old device may be transferred to the neighboring user's new device, resulting in a cutover failure. There may also be information security issues such as loss of account and password due to mistransmission of the configuration file. Therefore, in order to ensure the normal cutover and the user's information security, the second device can also obtain the link identifier of the second device's uplink after the network cable is plugged into the uplink interface for verification, to ensure that the uplink connected to the second device is the uplink previously connected to the first device, thereby improving the cutover success rate and protecting the user's information security.
[0109] In some embodiments, the uplink of the first device when the connector at the uplink interface of the first device is in place is used as the target uplink, and the target uplink has a link identifier. Optionally, the link identifier includes at least one of an IP address, a physical address of the upstream device (such as a medium access control address, or MAC address), and an interface identifier of an interface of the upstream device used to connect to the downstream device. When the network is a network with a fixed IP address, the link identifier can be an IP address; the link identifier can also be the physical address of the upstream device or the interface identifier of the interface of the upstream device connected to the first device. For example, when the first device is a router, the link identifier of the target uplink can be the MCA address of the corridor switch connected to the router, or the interface name or interface number of the interface of the corridor switch connected to the router. In some embodiments, the link identifier can also be any two or all of the IP address, the physical address of the upstream device, and the interface identifier of the interface of the upstream device used to connect to the downstream device. The second device can flexibly select the type and quantity of appropriate link identifiers as needed to verify the uplink to which it is connected. Specifically, the second device can obtain the link identifier of the uplink it has accessed, for example, by receiving an LLDPDU message sent by the uplink, thereby obtaining the link identifier of the uplink it has accessed. The second device can send the link identifier of the uplink it has accessed to the first device via the established communication connection. When the first device receives the link identifier of the uplink it has accessed, it can compare it with the link identifier of the target uplink it previously accessed. If the two are consistent, the first device can determine that the uplink it has accessed is the uplink it previously accessed, i.e., the second device has accessed the network to which the cutover is to be performed. If the two are inconsistent, the first device can determine that the uplink it has accessed is not the network it previously accessed, and can abort the cutover process. In this method, the first device verifies whether the link identifier of the uplink it has accessed is consistent with the link identifier of the target uplink, and can determine that the second device has accessed the network it previously accessed before performing the cutover. This avoids possible cutover failures caused by the activation of new devices by other users nearby and information security issues caused by mistransmitted configuration files, thereby improving the success rate of the cutover and ensuring user information security.
[0110] Optionally, the first device can also determine whether the second device is a legitimate new device based on the strength of the signal emitted by the first device detected by the second device. Usually, the distance between the old and new devices that need to be cut over is relatively close and they are in the same space, generally not more than 1 meter, and there are no obstacles such as walls between them. The strength of the signal sent by the first device detected by the second device is also strongly related to the distance or whether there are obstacles such as walls in between. Therefore, if the second device detects that the signal of the first device is strong, it can be determined that the distance between the two is close, there are no obstacles such as walls in between, and the second device is a legitimate device used to replace the first device; if the second device detects that the signal of the first device is weak, it can be determined that the distance between the two is far or there is a wall in between that affects signal transmission, and the second device is not a legitimate device to replace the first device.
[0111] Specifically, the second device can detect the current signal strength of the signal emitted by the first device at its current location. The magnitude of the current signal strength can represent the distance between the two devices or whether there are obstacles between them. The second device then sends the current signal strength to the first device through the established communication connection. The first device stores information about the baseline signal strength, which can represent the distance range allowed for handover. After the first device obtains the current signal strength, it can compare it with the baseline signal strength. If the current signal strength is greater than or equal to the baseline signal strength, it is considered that the distance between the two is within the distance range allowed for handover, the second device is a legal device, and the handover process can continue. If the current signal strength is less than the baseline signal strength, it is considered that the distance between the two is beyond the distance range allowed for handover, the second device is an illegal device, and the handover process can be terminated to avoid connecting to other illegal devices, thereby improving the success rate of handover while ensuring the user's information security. In some embodiments, when the first device compares the current signal strength with the baseline signal strength, it can also be when the current signal strength is greater than or equal to ninety percent of the baseline signal strength, then it is considered that the distance between the two is within the distance range allowed for handover, the second device is a legal device, and the handover process can continue. If the current signal strength is less than ninety percent of the baseline signal strength, then it is considered that the distance between the two exceeds the distance range allowed for handover, the second device is an illegal device, and the handover process can be terminated. Optionally, the current signal strength can be compared with 80%, 85% or 95% of the baseline signal strength. The ratio of the comparison between the current signal strength and the baseline signal strength is not limited in this embodiment of the application and can be obtained based on the debugging results.
[0112] In some embodiments, the first device may also first verify the uplink accessed by the second device. If the link identifier of the uplink accessed by the second device is the same as the link identifier of the target uplink, the second device is determined to be a legitimate device, and the cutover process is continued. If the link identifier of the uplink accessed by the second device is different from the link identifier of the target uplink, or the second device cannot detect the link identifier of the uplink accessed by the second device, for example, it cannot receive a Link Layer Discovery Protocol Data Unit (LLDPDU) message, it may continue to detect the current signal strength of the signal transmitted by the first device, and then send the current signal strength to the first device. The first device further determines the legitimacy of the second device based on the relationship between the current signal strength and the baseline signal strength. If the current signal strength is greater than or equal to the baseline signal strength, the second device is determined to be a legitimate device, and the cutover process is continued. If the current signal strength is less than the baseline signal strength, the second device is determined to be an illegal device, and the cutover process can be aborted to avoid cutover failure and mistransmission of configuration files. The verification method of first verifying the link identifier of the uplink and then comparing the current signal strength can avoid the handover failure caused by the second device not being able to obtain the link identifier of the uplink it accesses, thereby improving the success rate of handover.
[0113] In some embodiments, the first device may also first determine the relationship between the current signal strength and the baseline signal strength. If the current signal strength is greater than or equal to the baseline signal strength, the second device is determined to be a legitimate device, and the handover process continues. If the current signal strength is less than the baseline signal strength, it may be that the antenna of the first device or the second device is blocked, resulting in the current signal strength being too low. The second device may continue to verify the uplink accessed by the second device. If the link identifier of the uplink accessed by the second device is the same as the link identifier of the target link, the second device is determined to be a legitimate device, and the handover process continues. If the link identifier of the uplink accessed by the second device is different from the link identifier of the target uplink, the handover process may be aborted, the handover fails, and the configuration file is mistransmitted. The verification method of first comparing the current signal strength and then verifying the link identifier of the uplink can avoid misjudgment of the legitimacy of the second device due to the antenna of the first device or the second device being blocked, thereby improving the success rate of the handover.
[0114] On the basis of the above embodiments, when the second device receives the configuration file and successfully accesses the target uplink, it can also send network access success information to the first device, or broadcast network access success information. The network access success information can be in the form of a message, which carries a field indicating that the sending device has successfully accessed the network, such as a Migration Success message. When the first device receives the network access success information, it knows that the second device has successfully accessed the target uplink, and it considers that the cutover is successful. It can enter shutdown mode, such as turning off the broadcast SSID or entering standby mode, or it can automatically shut down to save resources. Optionally, the second device can broadcast network access success information periodically over a period of time to ensure that the first device receives the network access success information.
[0115] Alternatively, the aforementioned network access success message may be sent by another device after successful network access. If the first device directly enters shutdown mode after receiving the network access success message, and the network access success message is not sent by a legitimate second device, and the legitimate second device has not yet successfully accessed the network, this may result in a cutover failure. Therefore, after receiving the network access success message, the first device can also verify the device that sent the network access success message. For example, in a certain range of two cutover scenarios, the first second device needs to replace the first first device, and the second second device needs to replace the second first device. If the network access success message broadcast by the second second device is received by the first first device, and the first second device has not yet successfully accessed the network, the first first device enters shutdown mode, and the cutover between the first second device and the first first device may fail. To reduce the cutover failure rate, the network access success message can carry the device identifier of the device that successfully accessed the network. After receiving the network access success message, the first device can compare the device identifier of the successfully accessed device carried in the network access success message with the identifier of the second device. Optionally, the second device can use the established communication connection to send the second device's identifier to the first device. If the device identifier in the network access success message matches the second device identifier, the first device determines that the second device has successfully joined the network and can enter shutdown mode. If the device identifier in the network access success message matches the second device identifier, the first device cannot determine that the second device has successfully joined the network. In this case, the first device needs to remain in operation until the second device successfully joins the network, thereby improving the cutover success rate.
[0116] Optionally, after the first device enters shutdown mode, the first indicator light may be controlled to display a first state, such as yellow, indicating that the first device is in shutdown mode. Optionally, the first indicator light may be located on the first device. By observing the first indicator light in the first state, the user can intuitively determine that the first device is in shutdown mode and can power off the first device to complete the operation, thereby avoiding premature shutdown of the first device that could result in a cutover failure and preventing ineffective waiting due to an inability to determine the result of the cutover.
[0117] When the second device receives the configuration file and successfully accesses the target uplink, it can also control the second indicator light to display the second state. When the second indicator light displays the second state, for example, it displays green, it can indicate that the second device has successfully accessed the uplink of the first device when the connector at the uplink interface of the first device is in the in-place state, that is, it has successfully accessed the target uplink, and the second device can provide network for other terminal devices connected to it. By observing that the second indicator light is in the second state, the user can intuitively know that the second device has successfully accessed the network, and the user can use the second device normally, avoiding invalid waiting caused by not knowing the result of the cutover.
[0118] Optionally, if the second device receives the configuration file, checks the integrity of the configuration file, and restarts, and then detects that it cannot access the Internet normally when detecting the uplink, such as an incorrect account or password when dialing to the Internet, it can also broadcast a network access failure message to inform the first device that the cutover failed, and then re-execute the cutover process. Optionally, the first device may not receive a successful network access message for a period of time after sending the configuration file, and it may deem that the cutover has failed, and then re-execute the cutover process. If the second device receives the configuration file, checks the integrity of the configuration file, and restarts, and then detects that it cannot access the Internet normally when detecting the uplink, it can also control the second indicator light to indicate an abnormal state, such as a flashing red light, to remind the user to manually intervene in the cutover, so as to avoid the cutover failure caused by the abnormality of the automatic cutover process and the inability to restart. A comprehensive cutover solution is provided to ensure the success rate of the cutover.
[0119] In order to describe the embodiments of the present application more clearly and specifically, Figure 5 The interaction diagram shown describes the cutover method provided in the embodiment of the present application in more detail.
[0120] S501: After a user unplugs the network cable of an uplink of a first device, the first device detects that it is in a pending cutover state.
[0121] S502: The first device broadcasts a second message so that surrounding devices can discover the first device. The second message is triggered when the first device is in a pending cutover state, indicating that the first device is in a pending cutover state and has the ability to back up configuration files.
[0122] S503: After the user turns on the power of the second device and plugs in the uplink network cable of the second device, the second device detects that it is in a state of waiting to access the network.
[0123] The above S503 may be performed before S501 or S502 or after S501 or S502, which is not limited in this embodiment.
[0124] S504: The second device discovers the first device through the scanned second message and sends the first message to the first device.
[0125] S505: The first device responds to the first message and feeds back a response message to the second device.
[0126] S506: The second device establishes a communication connection with the first device according to the response message.
[0127] S507: The second device sends the identifier of the second device and the link identifier of the uplink to which the second device accesses to the first device through the communication connection.
[0128] S508. The first device verifies the link identifier of the uplink to which the second device accesses, and if it is determined to be the same as the link identifier of the uplink to which the first device accesses when the connector at the uplink interface of the first device is in place, sends the configuration file to the second device through the communication connection.
[0129] S509: The second device checks the integrity of the configuration file and restarts to make the configuration file effective.
[0130] S510: The second device detects and successfully accesses the network.
[0131] S511: The second device broadcasts network access success information and controls the second indicator light to display a second state.
[0132] S512: The first device determines that the device identifier in the network access success information is the identifier of the second device, enters an off mode, and controls the first indicator light to display a first state.
[0133] Figure 5 The detailed implementation and beneficial effects of each step in the illustrated embodiment can be found in the description of the aforementioned embodiment and will not be repeated here.
[0134] The above describes in detail an example of the method provided by the present application. It is understandable that, in order to implement the above functions, the corresponding device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0135] This application can divide the cutover device into functional modules based on the above-described method examples. For example, each function can be divided into separate functional modules, or two or more functions can be integrated into a single module. The integrated modules can be implemented in either hardware or software functional modules. It should be noted that the module division in this application is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used.
[0136] Figure 6 The schematic diagram of the structure of a cutover device provided by the present application is shown. The device 600 includes:
[0137] The first receiving module 601 is used to receive a first message sent by a second device, where the first message is a message sent when the second device is in a waiting-to-connect state. The waiting-to-connect state is used to represent a state when the connector at the uplink interface of the second device is in place and the second device is not connected to the network.
[0138] The first connection module 602 is configured to establish a communication connection with the second device in response to the first message when determining that the first device is in a pending cutover state, wherein the pending cutover state indicates that a connector at an uplink interface of the first device is not in place.
[0139] The first sending module 603 is configured to send the configuration file of the first device to the second device through the communication connection to complete the cutover.
[0140] In some embodiments, the configuration file is a file associated with a usage record of the first device.
[0141] In some embodiments, the apparatus 600 further includes a first control module configured to receive network access success information; and enter a shutdown mode in response to the network access success information.
[0142] In some embodiments, the first control module is further configured to control the first indicator light to display a first state, where the first state is configured to indicate that the first device is in the off mode.
[0143] In some embodiments, the first receiving module 601 is further configured to receive an identification of the second device sent by the second device through the communication connection.
[0144] The first control module is specifically configured to enter the shutdown mode when it is determined that the device identifier is the same as the identifier of the second device.
[0145] In some embodiments, the first sending module 603 is specifically used to receive the link identifier of the uplink of the second device sent by the second device through the communication connection; determine whether the link identifier of the uplink of the second device is the same as the link identifier of the target uplink, and the target uplink is the uplink of the first device when the connector at the uplink interface of the first device is in place; if so, send the configuration file of the first device to the second device through the communication connection to complete the cutover.
[0146] In some embodiments, the link identifier includes at least one of an IP address, a physical address of an upstream device, and an interface identifier of an interface of the upstream device for connecting to a downstream device.
[0147] In some embodiments, the first sending module 603 is specifically used to receive the current signal strength of the signal transmitted by the first device detected by the second device through the communication connection; determine whether the current signal strength is greater than or equal to the baseline signal strength; if so, send the configuration file of the first device to the second device through the communication connection to complete the cutover.
[0148] In some embodiments, the device 600 also includes a first broadcast module, which is used to broadcast a second message when it is determined that the first device is in a state to be cut over. The second message is used to indicate that the first device is in a state to be cut over. The second message carries the network identifier of the first device. The network identifier of the first device is used by the second device to discover the first device and send the first message to the first device.
[0149] In some embodiments, the first broadcast module is further used to determine that the first device is in an online state, and the online state includes at least one of: network traffic within a preset time period exceeds a preset traffic threshold, and there is a network connection with at least one downstream device.
[0150] In some embodiments, the network identifier of the first device carried in the second message is a first SSID, and the first SSID is used to indicate that the first device is in the pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in the pending cutover state.
[0151] In some embodiments, the second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in the pending cutover state.
[0152] Figure 7 The schematic diagram of the structure of a cutover device provided by the present application is shown. The device 700 includes:
[0153] The second sending module 701 is used to send a first message to the first device when it is determined that the second device is in the waiting-to-access state. The first message is used to indicate that the second device is in the waiting-to-access state. The waiting-to-access state is used to indicate that the connector at the uplink interface of the second device is in place and the second device is not connected to the network.
[0154] The second receiving module 702 is configured to receive a response message sent by the first device based on the first message.
[0155] The second connection module 703 is configured to establish a communication connection with the first device according to the response message.
[0156] The third receiving module 704 is configured to receive the configuration file sent by the first device through the communication connection and complete the cutover.
[0157] In some embodiments, the configuration file is a file associated with a usage record of the first device.
[0158] In some embodiments, the third receiving module 704 is specifically configured to receive the configuration file through the communication connection and determine whether the configuration file is complete; if so, save the configuration file and restart the second device to make the configuration file effective, thereby completing the cutover.
[0159] In some embodiments, the apparatus 700 further includes a second broadcast module configured to broadcast network access success information so as to cause the first device to enter a shutdown mode.
[0160] In some embodiments, the second broadcast module is further used to determine that the network status of the second device is a networked state, and the networked state includes at least one of: network traffic within a preset time period exceeds a preset traffic threshold, and at least one downstream device has a network connection.
[0161] In some embodiments, the network access success information carries the device identification of the device that has successfully accessed the network, and the second sending module 701 is also used to send the identification of the second device to the first device through the communication connection. The identification of the second device is used by the first device to enter the shutdown mode when it determines that the device identification is the same as the identification of the second device.
[0162] In some embodiments, the device 700 also includes a second control module for controlling the second indicator light to display a second state, wherein the second state is used to represent the uplink of the first device when the connector at the uplink interface of the second device is in place and the second device successfully accesses the uplink of the first device.
[0163] In some embodiments, the second sending module 701 is specifically used to determine that when the second device is in a state to be connected to the network, receive a second message broadcast by the first device, the second message carries the network identification of the first device, and the second message is used to indicate that the first device is in a state to be cut over, and the state to be cut over is used to indicate that the connector at the uplink interface of the first device is not in place; and discover the first device according to the network identification of the first device, and send the first message to the first device.
[0164] In some embodiments, the second sending module 701 is also used to send the link identifier of the uplink of the second device to the first device through the communication connection, and the link identifier of the uplink of the second device is used by the first device to determine that the uplink of the second device is the target uplink, and the target uplink is the uplink of the first device when the connector at the uplink interface of the first device is in place.
[0165] In some embodiments, the link identifier includes at least one of an IP address, a physical address of an upstream device, and an interface identifier of an interface connecting the upstream device to the downstream device.
[0166] In some embodiments, the network identifier of the first device carried in the second message is a first SSID, and the first SSID is used to indicate that the first device is in the pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in the pending cutover state.
[0167] In some embodiments, the second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in the pending cutover state.
[0168] The specific manner in which the apparatus 600 and the apparatus 700 execute the cutover method and the beneficial effects produced can be found in the relevant description in the method embodiment, which will not be repeated here.
[0169] The embodiment of the present application also provides an electronic device, including the above-mentioned processor. The electronic device provided by this embodiment can be Figure 1 The network device 100 shown is configured to perform the aforementioned cutover method. When integrated, the terminal device may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the network device's operations. For example, it may support the network device in executing steps performed by the display unit, detection unit, and processing unit. The storage module may support the network device in storing program code and data. The communication module may support communication between the network device and other devices.
[0170] The processing module may be a processor or a controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other terminal devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.
[0171] In one embodiment, when the processing module is a processor and the storage module is a memory, the network device involved in this embodiment may be a Figure 1 Device with the structure shown.
[0172] In some embodiments, the aforementioned network device may be a switch.
[0173] In some embodiments, the aforementioned network device may be a router.
[0174] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the cutover method described in any one of the above embodiments.
[0175] The embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the cutover method in the above-mentioned embodiment.
[0176] Among them, the network device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, the replaced units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0178] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0179] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as 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.
[0180] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A cutover method, performed by a first device, characterized in that: include: receiving a first message sent by a second device, where the first message is sent when the second device is in a waiting-for-network access state, where the waiting-for-network access state represents a state in which a connector at an uplink interface of the second device is in place and the second device is not connected to the network; When determining that the first device is in a pending cutover state, establishing a communication connection with the second device in response to the first message, the pending cutover state being used to indicate that a connector at an uplink interface of the first device is not in place; The configuration file of the first device is sent to the second device through the communication connection to complete the cutover.
2. The method according to claim 1, characterized in that The configuration file is a file associated with the usage record of the first device.
3. The method according to claim 1 or 2, characterized in that The method further comprises: Receive network access success information; In response to the network access success information, entering the shutdown mode.
4. The method according to claim 3, characterized in that The method further comprises: The first indicator light is controlled to display a first state, where the first state is used to indicate that the first device is in the off mode.
5. The method according to claim 3, characterized in that The network access success information carries a device identifier of the device that has successfully accessed the network. After establishing a communication connection with the second device, the method further includes: receiving, through the communication connection, an identifier of the second device sent by the second device; The step of entering the shutdown mode in response to the network access success information includes: When it is determined that the device identification is the same as the identification of the second device, the shutdown mode is entered.
6. The method according to claim 1 or 2, characterized in that The sending the configuration file of the first device to the second device through the communication connection to complete the cutover includes: receiving, through the communication connection, a link identifier of an uplink of the second device sent by the second device; Determining whether a link identifier of an uplink of the second device is the same as a link identifier of a target uplink, where the target uplink is an uplink of the first device when a connector at an uplink interface of the first device is in an in-position state; If so, the configuration file of the first device is sent to the second device via the communication connection to complete the cutover.
7. The method according to claim 6, characterized in that The link identifier includes at least one of an IP address of a protocol for interconnection between networks, a physical address of an upstream device, and an interface identifier of an interface of an upstream device for connecting to a downstream device.
8. The method according to claim 1 or 2, characterized in that The sending the configuration file of the first device to the second device through the communication connection to complete the cutover includes: receiving, via the communication connection, a current signal strength of a signal transmitted by the first device as detected by the second device; Determining whether the current signal strength is greater than or equal to the baseline signal strength; If so, the configuration file of the first device is sent to the second device via the communication connection to complete the cutover.
9. The method according to claim 1 or 2, characterized in that Before receiving the first message sent by the second device, the method further includes: When it is determined that the first device is in a state to be cutover, a second message is broadcast, where the second message is used to indicate that the first device is in a state to be cutover, and the second message carries the network identifier of the first device. The network identifier of the first device is used by the second device to discover the first device and send the first message to the first device.
10. The method according to claim 9, characterized in that When determining that the first device is in a state to be cutover, before broadcasting the second message, the method further includes: Determine that the first device is in a networked state, where the networked state includes at least one of: network traffic within a preset time period exceeds a preset traffic threshold, and a network connection exists with at least one downstream device.
11. The method according to claim 9, characterized in that The network identifier of the first device carried in the second message is a first service set identifier SSID, where the first SSID is used to indicate that the first device is in the pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in the pending cutover state.
12. The method according to claim 9, characterized in that The second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in the pending cutover state.
13. A cutover method, performed by a second device, characterized in that: include: When it is determined that the second device is in a waiting-for-network access state, sending a first message to the first device, where the first message is used to indicate that the second device is in the waiting-for-network access state, where the waiting-for-network access state is used to indicate a state in which a connector at an uplink interface of the second device is in place and the second device is not connected to the network; receiving a response message sent based on the first message when the connector at the uplink interface of the first device is not in place; establishing a communication connection with the first device according to the response message; The configuration file sent by the first device is received through the communication connection, and the cutover is completed.
14. The method according to claim 13, characterized in that The configuration file is a file associated with the usage record of the first device.
15. The method according to claim 13 or 14, characterized in that The receiving, through the communication connection, the configuration file sent by the first device and completing the cutover includes: receiving the configuration file via the communication connection, and determining whether the configuration file is complete; If so, save the configuration file and restart the second device to make the configuration file take effect, so as to complete the cutover.
16. The method according to claim 13 or 14, characterized in that The method further comprises: Broadcasting network access success information to enable the first device to enter shutdown mode.
17. The method according to claim 16, characterized in that Before broadcasting the network access success information, the method further includes: Determine that the network status of the second device is a networked state, where the network status includes at least one of: network traffic within a preset time period exceeds a preset traffic threshold, and at least one downstream device has a network connection.
18. The method according to claim 16, characterized in that The network access success information carries a device identifier of the device that has successfully accessed the network, and after establishing a communication connection with the first device according to the response message, the method further includes: The identification of the second device is sent to the first device through the communication connection, and the identification of the second device is used by the first device to enter the shutdown mode when determining that the device identification is the same as the identification of the second device.
19. The method according to claim 16, wherein The method further comprises: The second indicator light is controlled to display a second state, where the second state is used to indicate that the second device is successfully connected to the uplink of the first device when the connector at the uplink interface of the first device is in the in-position state.
20. The method according to claim 13 or 14, characterized in that The sending a first message to the first device when determining that the second device is in a waiting-to-join-network state includes: When it is determined that the second device is in a waiting-for-network-access state, receiving a second message broadcast by the first device, the second message carrying the network identifier of the first device, the second message being used to indicate that the first device is in a waiting-for-cutover state, and the waiting-for-cutover state being used to indicate that a connector at an uplink interface of the first device is not in place; The first device is discovered according to the network identifier of the first device, and the first message is sent to the first device.
21. The method according to claim 20, characterized in that After establishing a communication connection with the first device according to the response message, the method further includes: The link identifier of the uplink of the second device is sent to the first device through the communication connection, and the link identifier of the uplink of the second device is used by the first device to determine that the uplink of the second device is a target uplink, and the target uplink is the uplink of the first device when the connector at the uplink interface of the first device is in place.
22. The method according to claim 21, characterized in that The link identifier includes at least one of an IP address of a protocol for interconnection between networks, a physical address of an upstream device, and an interface identifier of an interface connecting an upstream device to a downstream device.
23. The method according to claim 20, characterized in that The network identifier of the first device carried in the second message is a first service set identifier SSID, where the first SSID is used to indicate that the first device is in the pending cutover state. The first SSID is different from the second SSID, and the second SSID is the SSID of the first device when it is not in the pending cutover state.
24. The method according to claim 20, characterized in that The second message is in the form of a message, and the second message includes a preset field, where the preset field is used to indicate that the first device is in the pending cutover state.
25. A network device, characterized in that: include: processors, memory, and interfaces; The processor, the memory, and the interface cooperate with each other so that the network device executes the method according to any one of claims 1 to 12.
26. The network device according to claim 25, characterized in that The network device is a router.
27. A network device, characterized in that: include: processors, memory, and interfaces; The processor, the memory, and the interface cooperate with each other so that the network device executes the method according to any one of claims 13 to 24.
28. The network device according to claim 27, wherein: The network device is a router.
29. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 24.
30. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a network device, the network device is caused to perform the method according to any one of claims 1 to 24.
Citation Information
Patent Citations
Networking parameter configuration method and device for router, router and storage medium
CN108134693A
Wireless router recommendation method and device, storage medium and computer device
CN110213081A