Method, device and equipment for determining home networking routing equipment
By monitoring the network interface and obtaining IP address or connection status information, and sending broadcast packets to independently determine the role of the wireless routing device, it solves the problem of being unable to autonomously switch between the main routing and sub-routing devices in the existing technology, and improves the wireless network usage experience and equipment. uniqueness.
Patent Information
- Application Number
- CN202011579917.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-12-28
AI Technical Summary
Existing home wireless routing devices cannot autonomously switch the roles of main routing and sub-routing devices, which affects the user experience of the wireless network.
By monitoring the connection between the network communication interface and the target server, it obtains the IP address or connection status information, sends broadcast packets and receives response messages, independently determines the role of the routing device, and ensures the uniqueness of the main routing device.
It simplifies the process of determining the main routing device and sub-routing devices, improves the wireless network usage experience, and ensures the uniqueness of the main routing device in home networking.
Smart Images

Figure CN114698050B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the wireless field, and in particular, relates to a method, device and equipment for determining a home networking routing device. Background Art
[0002] With the rapid development of network technology, the Internet has now become an indispensable part of our lives. In particular, the popularization of home broadband Internet access has made our daily lives more and more convenient. For example, devices such as smart homes and handheld terminals can access the Internet through Wireless Fidelity (WiFi), and people can control home appliances through handheld terminal devices without having to operate home appliances in person.
[0003] At present, home wireless routers are networked through wireless networks. When the routers leave the factory, the roles of the main router and the sub-router are set in advance, and the upper gateway device is connected to the main router via wired or wireless. Based on the distributed networking communication system and judgment mechanism composed of the main router and the sub-router, the main router and the sub-router roles cannot be switched autonomously, which affects the user experience of the wireless network. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, and device for determining a home networking routing device, which can autonomously switch between a main routing device and a sub-routing device, simplify the determination process of the main routing device and the sub-routing device, and improve the user experience of the wireless network.
[0005] In a first aspect, an embodiment of the present application provides a method for determining a home networking routing device, the method comprising:
[0006] The first routing device monitors a network communication interface, which is connected to a target server;
[0007] When the first routing device detects the target server, it obtains the Internet Protocol IP address assigned by the upper-level device;
[0008] According to the IP address, the first routing device sends a first broadcast packet to at least one second routing device in the home network; or,
[0009] When the first routing device fails to detect the target server, obtaining connection status information between the static IP address and the gateway address of the first routing device;
[0010] When the connection status information indicates that the connection is successful, the first routing device sends a first broadcast packet to at least one second routing device in the home network;
[0011] When the first routing device fails to receive the first response message for a first preset number of times in a row, it is determined that the first routing device is the main routing device, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
[0012] In a possible implementation manner, when the connection status information indicates connection failure for a second preset number of consecutive times, the first routing device is determined to be the main routing device.
[0013] In a possible implementation, the target server includes a Dynamic Host Configuration Protocol (DHCP) server; after determining that the first routing device is the main routing device, when at least one second routing device in the home network detects the DHCP server, receiving a second broadcast packet sent by at least one second routing device in the home network;
[0014] A second response message is sent to at least one second routing device in the home network, where the second response message is a message that the first routing device responds to according to the second broadcast packet, so that at least one second routing device in the home network can determine that at least one second routing device in the home network is a sub-routing device according to the second response message.
[0015] In a possible implementation, the configuration information of the main routing device is periodically detected;
[0016] When a configuration information update is detected, the updated configuration information is synchronized to the sub-routing device.
[0017] In one possible implementation, the method also includes: when at least two first routing devices detect the target server, or when at least two first routing devices do not detect the target server, and the connection status information between the static IP addresses and the gateway addresses of at least two first routing devices is a successful connection, determining that the first routing device that sends broadcast packets to other first routing devices and at least one second routing device in the home network for a first preset number of times in a row is the main routing device.
[0018] In a second aspect, an embodiment of the present application provides a device for determining a home networking routing device, the device comprising:
[0019] A monitoring module, used for the first routing device to monitor a network communication interface, the network communication interface being connected to a target server;
[0020] An acquisition module, used for acquiring an Internet Protocol IP address assigned by an upper-level device when the first routing device detects a target server;
[0021] a sending module, configured to send a first broadcast packet from a first routing device to at least one second routing device in a home network according to the IP address; or
[0022] The acquisition module is further used to acquire the connection status information between the static IP address and the gateway address of the first routing device when the first routing device fails to detect the target server;
[0023] The sending module is further configured to, when the connection status information indicates that the connection is successful, the first routing device sends a first broadcast packet to at least one second routing device in the home network;
[0024] The determination module is used to determine that the first routing device is the main routing device when the first routing device has not received the first response message for a first preset number of times in a row, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
[0025] In a possible implementation, the determination module is further configured to determine that the first routing device is the main routing device when the connection status information indicates connection failure for a second preset number of consecutive times.
[0026] In a possible implementation, the target server includes a Dynamic Host Configuration Protocol DHCP server; the apparatus further includes: a receiving module, configured to receive a second broadcast packet sent by at least one second routing device in the home network after determining that the first routing device is the main routing device, when at least one second routing device in the home network detects the DHCP server;
[0027] The sending module is also used to send a second response message to at least one second routing device in the home network, where the second response message is a message that the first routing device responds to according to the second broadcast packet, so that at least one second routing device in the home network can determine that at least one second routing device in the home network is a sub-routing device according to the second response message.
[0028] In a third aspect, an embodiment of the present application provides a device for determining a home networking routing device, the device comprising: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for determining a home networking routing device in the first aspect or any possible implementation method of the first aspect.
[0029] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the method for determining a home networking routing device in the first aspect or any possible implementation of the first aspect.
[0030] The method, apparatus and equipment of the distributed routing device of the embodiment of the present application, the first routing device monitors the network communication interface, the network communication interface is connected to the target server, when the first routing device detects the target server, obtains the Internet Protocol IP address assigned by the upper device, according to the IP address, the first routing device sends a first broadcast packet to at least one second routing device in the home network, or, when the first routing device does not detect the target server, obtains the connection status information of the static IP address and the gateway address of the first routing device, when the connection status information is a successful connection, the first routing device sends a first broadcast packet to at least one routing device in the home network, when the first routing device does not receive the first response message for a first preset number of times in a row, it determines that the first routing device is the main routing device, the first response message is a message that at least one routing device in the home network responds to the first broadcast packet, and can autonomously switch the main routing device and the sub-routing device, thereby ensuring the uniqueness of the main routing device in the home network, simplifying the determination process of the main routing device and the sub-routing device, and improving the user experience of the wireless network. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 It is a flowchart of a method for determining a home networking routing device provided by an embodiment of the present application;
[0033] Figure 2 It is a flowchart of another method for determining a home networking routing device provided by an embodiment of the present application;
[0034] Figure 3 It is a structural diagram of a device for determining a home networking routing device provided in an embodiment of the present application;
[0035] Figure 4 It is a structural diagram of a home networking routing device determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0037] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0038] In order to solve the problems of the prior art, the embodiments of the present application provide a method, apparatus and device for determining a home networking routing device.
[0039] In an embodiment of the present application, after being started, the distributed routing device in the home network starts to monitor the network communication interface. When the routing device detects that there is a network connection, the routing device starts the intranet detection process and continues to send broadcast packets to other routing devices in the home network except the routing device. When the routing device sends a first preset number of times continuously and still does not receive a reply message from other routing devices, the routing device is determined to be the main routing device. When the routing device sends a reply message from a certain routing device within the first preset number of times continuously, the routing device is determined to be a sub-routing device. By starting the intranet detection process to determine whether a main routing device already exists in the home network, the uniqueness of the main routing device in the home network is ensured, the determination process of the main routing device and the sub-routing device is simplified, and the user experience of the wireless network is improved.
[0040] The following first introduces the method for determining the home networking routing device provided in the embodiment of the present application.
[0041] Figure 1 FIG. 1 is a flow chart of a method for determining a home networking routing device provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps:
[0042] S110, the first routing device monitors the network communication interface, and the network communication interface is connected to the target server.
[0043] The first routing device is any routing device in a home network, and the network communication interface includes: Gigabit Ethernet interface (GE), Reduced Gigabit Media Independent Interface (RGMII), Programmable Logic Controller (PLC) interface, Wi-Fi interface and other hardware interfaces.
[0044] After the first routing device is started, it starts to monitor the network communication interface, and the network communication interface is connected to the target server. The first routing device can detect whether it is connected to the external network by monitoring the network communication interface.
[0045] S120, when the first routing device detects the target server, it obtains the Internet Protocol IP address assigned by the upper-level device.
[0046] The target server includes a Dynamic Host Configuration Protocol (DHCP) server and an Ethernet-based Point to Point Protocol (PPPoE) server. When the first routing device detects the target server, it indicates that the first routing device is connected to the external network.
[0047] Since DHCP does not require authentication, when the first routing device detects the DHCP server, the first routing device will automatically obtain the IP address assigned by the upper-level device.
[0048] Since PPPoE requires authentication, when the first routing device detects the PPPoE server, after completing the configuration of the account password, it obtains the IP address assigned by the upper-level device.
[0049] S130: According to the IP address, the first routing device sends a first broadcast packet to at least one second routing device in the home network.
[0050] The second routing device is another routing device in the home network except the first routing device.
[0051] Based on the obtained IP address, the intranet detection process is started, and the first routing device sends a first broadcast packet to at least one second routing device to detect whether a main routing device already exists in the home network.
[0052] S140: When the first routing device fails to detect the target server, obtain connection status information between the static IP address and the gateway address of the first routing device.
[0053] If the first routing device monitors neither the DHCP server nor the PPPoE server, then obtain the connection status information of the static IP address and the gateway address of the first routing device, and determine whether the first routing device is connected to the external network based on the connection status information.
[0054] S150: When the connection status information indicates that the connection is successful, the first routing device sends a first broadcast packet to at least one second routing device in the home network.
[0055] When the connection status information is not successfully connected, it means that the first routing device has been connected to the external network. At this time, the intranet detection process is started, and the first routing device sends a first broadcast packet to at least one second routing device to detect whether a main routing device already exists in the home network.
[0056] S160, when the first routing device does not receive the first response message for a first preset number of times in a row, it is determined that the first routing device is a main routing device, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
[0057] The first routing device sends a first broadcast packet to at least one second routing device in the home network. If there is already a main routing device in the home network, the main routing device will reply to the first routing device according to the received first broadcast packet, and the first routing device will receive a first response message, and determine that the first routing device is the main routing device; if there is no routing device in the home network connected to the external network, the first routing device will not receive the first response message, and determine that the first routing device is a sub-routing device. The judgment mechanism switches the roles of the main routing device and the sub-routing device autonomously by detecting whether the first routing device receives the first response message.
[0058] In order to ensure the accuracy of the above judgment mechanism, when the first routing device fails to receive the first response message for a first preset number of times in a row, the first routing device is determined to be the main routing device to ensure that the second routing device in the home network has enough time to respond. The first preset number of times can be set according to actual needs and is not limited here.
[0059] If the first routing device accesses the external network through the DHCP server, when it is determined that the first routing device is the main routing device, the first routing device is made to work in the DHCP mode.
[0060] If the first routing device accesses the external network through the PPPoE server, when it is determined that the first routing device is the main routing device, the first routing device is made to work in the PPPoE mode.
[0061] If the first routing device accesses the external network through a static IP address, when the first routing device is determined to be the main routing device, the first routing device is made to work in a static IP mode.
[0062] In an embodiment of the present application, the target server is monitored by the first routing device, or the connection status information between the static IP address and the gateway address of the first routing device is obtained to determine whether the first routing device is connected to the external network. When the first routing device is connected to the external network, the intranet detection process is started, and a broadcast packet is sent to at least one second routing device in the home network to determine whether a main routing device already exists in the home network. When the first routing device does not receive the first response message for the first preset number of times, the first routing device is determined to be the main routing device, which ensures the uniqueness of the main routing device in the home network, simplifies the determination process of the main routing device and the sub-routing device, and improves the user experience of the wireless network.
[0063] In some embodiments, when the connection status information indicates connection failure for a second preset number of consecutive times, the first routing device is determined to be the main routing device.
[0064] When the connection status information is a connection failure for the second preset number of times in a row, that is, when the connection status information of the static IP address and the gateway address of the first routing device is a connection failure for the second preset number of times in a row, it indicates that the first routing device is not connected to the external network. However, after the first routing device is powered on and started, it will be connected to the internal network, and the first routing device will be determined as the main routing device, and the other routing devices in the home network will be determined as sub-routing devices to realize networking within the local area network. In abnormal situations such as the routing device in the home network not being connected to the external network or being connected to multiple external networks, this self-organizing form ensures the uniqueness of the main routing device in the home network and ensures the normal use of the intranet.
[0065] In some embodiments, after determining that the first routing device is the main routing device, when at least one second routing device in the home network detects a DHCP server, it receives a second broadcast packet sent by the at least one second routing device in the home network, and sends a second reply message to the at least one second routing device in the home network, where the second reply message is a message that the first routing device responds to according to the second broadcast packet, so that the at least one second routing device in the home network determines that the at least one second routing device in the home network is a sub-routing device according to the second reply message.
[0066] After the first routing device is determined to be the main routing role, the DHCP server will be turned on. When a new distributed routing device is started, that is, when at least one second routing device in the home network is started, the network communication interface will be monitored. When the DHCP service is detected, the intranet detection process is started, and a second broadcast packet is sent to other routing devices in the home network except the second routing device to detect whether there is a main routing in the home network. After the main routing device receives the second broadcast packet, it generates a second response message according to the second broadcast packet, and sends a second response message to the second routing device to reply to the second routing device. The second routing device receives the second response message, indicating that the main routing device already exists in the home network at this time, and determines the second routing device as a sub-routing device, and sets it to work in bridging mode. The main routing device allocates an IP address to the sub-routing device, and synchronizes the configuration information to the sub-routing device, which effectively avoids the appearance of multiple main routing devices in the home network, ensures the communication quality of the wireless network, and improves the user experience of the wireless network.
[0067] In some embodiments, the configuration information of the main routing device is detected periodically, and when it is detected that the configuration information is updated, the updated configuration information is synchronized to the sub-routing device.
[0068] After determining the main router and the sub-router, the main router and the sub-router establish communication through network cables, Wi-Fi mesh networks, or G.hn international standard mesh networks. The main router will periodically check whether its configuration information has been updated. The configuration information includes account information, passwords, and other information that needs to be configured when connecting to the network. It will also synchronize all configuration information to the sub-router to keep the configuration of the main router and the sub-router consistent. If there is some configuration information that needs to be synchronized immediately, it will be synchronized to the sub-router through a process immediately after the main router is set and saved.
[0069] In some embodiments, when at least two first routing devices detect the target server, or when at least two first routing devices do not detect the target server and the connection status information between the static IP addresses and the gateway addresses of at least two first routing devices is a successful connection, the first routing device that sends the first broadcast packet to other first routing devices and at least one second routing device in the home network for a first preset number of times in a row is determined to be the main routing device.
[0070] When at least two first routing devices detect the target server, or when at least two first routing devices do not detect the target server, and the connection status information between the static IP addresses and the gateway addresses of at least two first routing devices is successfully connected, it indicates that multiple distributed first routing devices are connected to the external network at this time, and multiple first routing devices simultaneously send broadcast packets to other first routing devices and at least one second routing device in the home network except the first routing device. The first routing device that sends broadcast packets for the first preset number of times in a row is determined to be the main routing device, and the remaining routing devices are automatically determined to be sub-routing devices, which can avoid the situation where multiple main routing devices cause network abnormalities.
[0071] In some embodiments, Figure 2 As shown, a method for determining a home networking routing device may include the following steps:
[0072] S210, starting a routing device in the home network.
[0073] S220: The first routing device monitors the network communication interface.
[0074] S230, determining whether the first routing device monitors the target server. If the first routing device monitors the target server, executing step S240; if the first routing device does not monitor the target server, executing step S280.
[0075] S240: The first routing device sends a first broadcast packet to at least one second routing device in the home network.
[0076] S250, determining whether the first routing device receives the first response message for the first preset time in succession; if the first routing device receives the first response message for the first preset time in succession, or the first routing device only needs to receive the first response message, executing step S260; if the first routing device does not receive the first response message for the first preset time in succession, executing step S2100.
[0077] S260: Determine that the first routing device is a sub-routing device.
[0078] S270, start the sub-routing device process communication, and receive the configuration information synchronized by the main routing device.
[0079] S280: Obtain connection status information between the static IP address and the gateway address of the first routing device.
[0080] S290, determining whether the connection status information obtained for a second preset number of consecutive times is a connection failure, if so, executing step S2100; if not, executing step S220.
[0081] S2100: Determine that a first routing device is a master routing device.
[0082] S2110, the main routing device starts process communication, turns on the DHCP server, and synchronizes configuration information to the sub-routing device.
[0083] Figure 3 Schematic diagram of a device structure provided in an embodiment of the present application. Figure 3 As shown, the home networking routing device determination apparatus 300 may include a detection module 310 , an acquisition module 320 , a sending module 330 and a determination module 340 .
[0084] A monitoring module 310, configured for the first routing device to monitor a network communication interface, the network communication interface being connected to a target server;
[0085] The acquisition module 320 is used to acquire the Internet Protocol IP address assigned by the upper-level device when the first routing device detects the target server;
[0086] The sending module 330 is configured to send a first broadcast packet from the first routing device to at least one second routing device in the home network according to the IP address; or
[0087] The acquisition module 320 is further used to acquire the connection status information between the static IP address and the gateway address of the first routing device when the first routing device fails to detect the target server;
[0088] The sending module 330 is further configured to, when the connection status information indicates that the connection is successful, send a first broadcast packet by the first routing device to at least one second routing device in the home network;
[0089] The determination module 340 is used to determine that the first routing device is the main routing device when the first routing device has not received the first response message for a first preset number of times in a row, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
[0090] In the embodiment of the present application, the main routing device and the sub-routing device can be switched autonomously, which ensures the uniqueness of the main routing device in the home network, simplifies the process of determining the main routing device and the sub-routing device, and improves the user experience of the wireless network.
[0091] In some embodiments, the determination module 340 is further configured to determine that the first routing device is the main routing device when the connection status information indicates connection failure for a second preset number of consecutive times.
[0092] In some embodiments, the target server includes a Dynamic Host Configuration Protocol DHCP server; the apparatus further includes: a receiving module 350, configured to receive a second broadcast packet sent by at least one second routing device in the home network after determining that the first routing device is the main routing device, when at least one second routing device in the home network detects the DHCP server;
[0093] The sending module 330 is also used to send a second response message to at least one second routing device in the home network, where the second response message is a message that the first routing device responds to according to the second broadcast packet, so that at least one second routing device in the home network can determine that at least one second routing device in the home network is a sub-routing device according to the second response message.
[0094] In some embodiments, the apparatus further includes a detection module 360 for periodically detecting configuration information of the main routing device;
[0095] The synchronization module 370 is used to synchronize the updated configuration information to the sub-routing device when it is detected that the configuration information is updated.
[0096] In some embodiments, the determination module 340 is also used to determine that the first routing device that sends broadcast packets to other first routing devices and at least one second routing device in the home network for a first preset number of consecutive times is the main routing device when at least two first routing devices detect the target server, or when at least two first routing devices do not detect the target server and the connection status information between the static IP addresses and the gateway addresses of at least two first routing devices is that the connection is successful.
[0097] Figure 3 Each module in the device shown has the function of realizing Figure 1 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0098] Figure 4 A schematic diagram of the hardware structure of a home networking routing device determination device provided in an embodiment of the present application is shown.
[0099] The home networking routing device determination device may include a processor 401 and a memory 402 storing computer program instructions.
[0100] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0101] The memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 402 may include a removable or non-removable (or fixed) medium, or the memory 402 is a non-volatile solid-state memory. The memory 402 may be inside or outside the integrated gateway disaster recovery device.
[0102] In one example, the memory 402 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory 402 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present application.
[0103] The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement Figure 1 Steps S110 to S160 in the embodiment shown in the figure are performed, and Figure 1 The corresponding technical effects achieved by executing the steps of the example shown are not repeated here for the sake of brevity.
[0104] In one example, the home networking routing device determination device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0105] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0106] Bus 410 includes hardware, software or both, and couples the components of the home networking routing device to each other. For example, but not limitation, the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), Hyper Transport (HT) interconnection, Industry Standard Architecture (ISA) bus, InfiniBand interconnection, Low Pin Count (LPC) bus, Memory bus, Micro Channel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0107] The home networking routing device determination device can execute the method for determining the home networking routing device in the embodiment of the present application based on the routing device in the home networking and the broadcast packet sent by the routing device, thereby realizing the combination of Figure 1 A method for determining a home networking routing device is described.
[0108] In addition, in combination with the method for determining the home networking routing device in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the methods for determining the home networking routing device in the above embodiment is implemented.
[0109] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0110] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0111] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0112] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0113] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for determining a home networking routing device, characterized in that: include: The first routing device monitors a network communication interface, wherein the network communication interface is connected to a target server; When the first routing device detects the target server, it obtains the Internet Protocol IP address assigned by the upper-level device; According to the IP address, the first routing device sends a first broadcast packet to at least one second routing device in the home network; or, When the first routing device fails to detect the target server, obtaining connection status information between the static IP address and the gateway address of the first routing device; When the connection status information indicates that the connection is successful, the first routing device sends a first broadcast packet to at least one second routing device in the home network; When the first routing device does not receive a first response message for a first preset number of times, the first routing device is determined to be a main routing device, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
2. The method according to claim 1, characterized in that When the connection status information indicates connection failure for a second preset number of consecutive times, the first routing device is determined to be a main routing device.
3. The method according to claim 1 or 2, characterized in that: The target server includes a Dynamic Host Configuration Protocol DHCP server; after determining that the first routing device is a main routing device, when at least one second routing device in the home network detects the DHCP server, receiving a second broadcast packet sent by at least one second routing device in the home network; A second response message is sent to at least one second routing device in the home network, where the second response message is a message that the first routing device responds to according to the second broadcast packet, so that at least one second routing device in the home network determines that at least one second routing device in the home network is a sub-routing device according to the second response message.
4. The method according to claim 3, characterized in that Regularly detect the configuration information of the main routing device; When it is detected that the configuration information is updated, the updated configuration information is synchronized to the sub-routing device.
5. The method according to claim 1, characterized in that The method further comprises: When at least two of the first routing devices detect the target server, or when at least two of the first routing devices do not detect the target server and the connection status information between the static IP addresses and the gateway addresses of at least two of the first routing devices is that the connection is successful, the first routing device that sends broadcast packets to other first routing devices and at least one of the second routing devices in the home network for a first preset number of times in a row is determined to be the main routing device.
6. A device for determining a home networking routing device, characterized in that: The device comprises: A monitoring module, used for the first routing device to monitor a network communication interface, wherein the network communication interface is connected to a target server; An acquisition module, used for acquiring an Internet Protocol IP address assigned by an upper-level device when the first routing device detects a target server; a sending module, configured to send, by the first routing device, a first broadcast packet to at least one second routing device in the home network according to the IP address; or The acquisition module is further configured to acquire connection status information between the static IP address and the gateway address of the first routing device when the first routing device fails to detect the target server; The sending module is further configured to, when the connection status information indicates that the connection is successful, cause the first routing device to send a first broadcast packet to at least one second routing device in the home network; The determination module is used to determine that the first routing device is a main routing device when the first routing device has not received a first response message for a first preset number of times in a row, and the first response message is a message that at least one routing device in the home network responds to according to the first broadcast packet.
7. The device according to claim 6, characterized in that The determining module is further configured to determine that the first routing device is a main routing device when the connection status information indicates connection failure for a second preset number of consecutive times.
8. The device according to claim 6 or 7, characterized in that The target server includes a Dynamic Host Configuration Protocol DHCP server; the device further includes: a receiving module, which is used to receive a second broadcast packet sent by at least one second routing device in the home network after determining that the first routing device is a main routing device when at least one second routing device in the home network detects the DHCP server; The sending module is also used to send a second response message to at least one second routing device in the home network, where the second response message is a message that the first routing device responds to according to the second broadcast packet, so that the at least one second routing device in the home network determines that the at least one second routing device in the home network is a sub-routing device according to the second response message.
9. A home networking routing device determination device, characterized in that: The home networking routing device determination device comprises: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for determining the home networking routing device as described in any one of claims 1-5.
10. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the method for determining a home networking routing device as described in any one of claims 1-5 is implemented.
