Network connection method and apparatus, electronic device, and readable storage medium
Through the selection of scanning and mutual assistance equipment in the Internet equipment in IoT devices, using the WiFi mutual assistance capabilities of home appliances to solve the problem of failure to connect to the Internet of Things equipment in a weak network environment, and improve the user experience.
Patent Information
- Application Number
- PCT/CN2024/070166
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-24
- Filing Date
- 2024-01-02
- Publication Date
- 2025-01-30
AI Technical Summary
When the Internet of Things devices are far away from the router, the signal is weak and they cannot connect to the network stably, resulting in high connection failure rate and high device churn rate.
By scanning the surrounding network equipment, it is determined whether the Internet of Things equipment is located in the weak network environment. If so, the mutual assistance equipment is selected for connection, and the WiFi mutual assistance capabilities of home appliances are used to realize the network connection of IoT devices.
Effectively solved the problem of high connection rates in the connection of IoT devices in a weak network environment, improved the user experience, and reduced the equipment loss rate.
Smart Images

Figure CN2024070166_30012025_PF_FP_ABST
Abstract
Description
Network connection method and device, electronic device and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 24, 2023, with application number "202310912046.X" and application name "Network connection method and device, electronic device and readable storage medium", the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of Internet of Things technology, and in particular to a network connection method and device, an electronic device, and a readable storage medium. Background Art
[0003] During the network configuration or networking stage, when the IoT device is far away from the router, the network signal is weak and the IoT device cannot connect to the network through the router.
[0004] If an IoT device that is normally connected to the network changes its location and becomes farther away from the router, the router signal will become weaker, causing the IoT device to go offline.
[0005] Summary of the Invention
[0006] This application aims to solve at least one of the technical problems existing in the prior art or related art.
[0007] In view of this, an embodiment of the first aspect of the present application provides a network connection method for an Internet of Things device.
[0008] An embodiment of the second aspect of the present application provides a network connection device for an Internet of Things device.
[0009] A third aspect of the present application is to provide an electronic device.
[0010] A fourth aspect of the present application is to provide a readable storage medium.
[0011] In a first aspect, an embodiment of the present application provides a network connection method for an IoT device, comprising: an IoT device that needs to be connected to the network scans surrounding network devices, wherein the network devices include routing devices and connected home appliances. A response from the network device is received. Based on the response, it is determined whether the IoT device that needs to be connected to the network is located in a weak network environment. In the case where the IoT device that needs to be connected to the network is located in a weak network environment, a mutual aid device is selected from the connected devices. The IoT device that needs to be connected to the network connects to the network through the mutual aid device, so that the IoT device is connected to the target server.
[0012] In the second aspect, an embodiment of the present application provides a network connection device for an Internet of Things device, comprising a scanning module, a receiving module, a judgment module, a selection module and a connection module. The scanning module is used for an Internet of Things device that needs to be connected to the network to scan surrounding network devices, wherein the network devices include routing devices and home appliances that are already connected to the network. The receiving module is used to receive a response from the network device. The judgment module is used to determine, based on the response, whether the Internet of Things device that needs to be connected to the network is located in a weak network environment. The selection module is used to select a mutual aid device from the connected devices when the Internet of Things device that needs to be connected to the network is located in a weak network environment. The connection module is used for an Internet of Things device that needs to be connected to the network to connect to the network through a mutual aid device, so that the Internet of Things device is connected to the target server.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the network connection method of the Internet of Things device of the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the network connection method of the Internet of Things device as in the first aspect are implemented.
[0015] In this application, based on the Wi-Fi mutual assistance capabilities of home appliances, when an IoT device is at the edge of a router's weak signal coverage, the configured IoT device can access the Internet through the connected home appliance and connect to the target server. This can solve the problem of high connection failure rate and device loss rate due to the distance between IoT devices and routers and weak signal in the user's weak network environment, effectively improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] FIG1 shows a schematic diagram of a flow chart of a method for connecting an IoT device to a network according to an embodiment of the present application;
[0017] FIG2 shows a second flow chart of a method for connecting an IoT device to a network according to an embodiment of the present application;
[0018] FIG3 shows a third flow chart of a network connection method for an IoT device according to an embodiment of the present application;
[0019] FIG4 shows a fourth flow chart of a method for connecting an IoT device to a network according to an embodiment of the present application;
[0020] FIG5 shows a fifth flow chart of a network connection method for an IoT device according to an embodiment of the present application;
[0021] FIG6 shows a sixth flow chart of a network connection method for an IoT device according to an embodiment of the present application;
[0022] FIG7 shows a seventh flow chart of a method for connecting an IoT device to a network according to an embodiment of the present application;
[0023] FIG8 shows a structural block diagram of a network connection device for an Internet of Things device provided in an embodiment of the present application;
[0024] FIG9 shows a structural block diagram of an electronic device provided in an embodiment of the present application;
[0025] FIG10 shows a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application;
[0026] FIG11 is a schematic diagram showing the distance between a router and smart home appliances according to an embodiment of the present application;
[0027] FIG12 shows a schematic diagram of a network topology according to an embodiment of the present application;
[0028] FIG13 shows a WiFi mutual assistance connection routing topology diagram of an embodiment of the present application.
[0029] The corresponding relationship between the reference numerals and component names in FIG8 to FIG13 is as follows:
[0030] 100: Network connection device for IoT devices; 110: Scanning module; 120: Receiving module; 130: Judgment module; 140: Selection module; 150: Connection module; 200: Third router; 202: First smart home appliance; 204: Second smart home appliance; 206: Third smart home appliance; 210: Cloud service; 212: First router; 214: Second router; 216: First IoT device; 218: First mutual aid device; 220: Second IoT device; 222: Second mutual aid device; 224: Third mutual aid device; 226: Fourth smart home appliance Home appliances; 1000: Electronic device; 1002: Processor; 1004: Memory; 1100: Electronic device; 1101: Radio frequency unit; 1102: Network module; 1103: Audio output unit; 1104: Input unit; 11041: Graphics processor; 11042: Microphone; 1105: Sensor; 1106: Display unit; 11061: Display panel; 1107: User input unit; 11071: Touch panel; 11072: Other input devices; 1108: Interface unit; 1109: Memory; 1110: Processor. DETAILED DESCRIPTION
[0031] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0032] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0033] The network connection method and device, electronic device, and readable storage medium provided in the embodiments of the present application are described in detail below with reference to Figures 1 to 13 through specific embodiments and their application scenarios.
[0034] The present application provides a network connection method for an IoT device. FIG1 shows a flow chart of a network connection method for an IoT device provided in an embodiment of the present application. As shown in FIG1 , the network connection method for an IoT device includes:
[0035] In step S102, the IoT device that needs to establish a network connection scans surrounding network devices.
[0036] Among them, network devices include routing devices and networked home appliances.
[0037] Step S104: Receive a response from the network device.
[0038] Step S106: Based on the response, determine whether the IoT device that needs to be connected to the network is located in a weak network environment.
[0039] Step S108: When the IoT device that needs to be connected to the network is located in a weak network environment, a mutual assistance device is selected from the connected devices.
[0040] In step S110 , the IoT device that needs to be connected to the network connects to the network through the mutual assistance device, so that the IoT device is connected to the target server.
[0041] It is understandable that during the network configuration or networking stage, when the IoT device is far away from the router, the network signal is weak and the IoT device cannot connect to the network through the router, resulting in the loss of the IoT device's networking properties.
[0042] If an IoT device that is normally connected to the network changes its location and becomes far away from the router, the signal with the router will become weaker after the device moves, causing the IoT device to go offline and the user to be unable to remotely control the IoT device.
[0043] To sum up, IoT devices cannot stably connect to the network due to their distance from the router, resulting in a poor product experience, reduced user experience, prone to complaints, and affecting brand effect.
[0044] IoT devices can be devices such as smart appliances. As shown in Figure 11, the third router 200 is connected to the first smart appliance 202 with a router signal of -40dBm. The third router 200 is connected to the second smart appliance 204 with a router signal of -50dBm. The third router 200 is connected to the third smart appliance 206 with a router signal less than -65dBm. The third smart appliance 206 is the farthest from the third router 206. The farther the distance, the weaker the signal. The success rate of the third smart appliance 206 connecting to the third router 200 is low. Generally, when the router signal is less than -65dBm at the location of the third smart appliance 206, it cannot be stably connected, making network configuration difficult. In summary, weak signals lead to high device connection failure rates and high device loss rates.
[0045] Optionally, when an IoT device needs to establish a network connection, it first scans its surroundings according to normal procedures, identifying nearby network devices that can connect to the network. These network devices can be routers or other connected home appliances. Upon receiving the request, the network device will respond. Upon receiving the response, the IoT device terminal to be connected to the network determines whether the IoT device requiring a network connection is located in a weak network environment. If so, it selects the optimal connection among the connected home appliances that meets mutual support requirements and establishes a private connection for the home appliances.
[0046] In some embodiments of the present application, based on the Wi-Fi mutual assistance capabilities of home appliances, when an IoT device is at the edge of a router's weak signal coverage, the configured IoT device can access the internet through an already connected home appliance and connect to the target server. This can solve the problem of high connection failure rates and device churn caused by the distance between IoT devices and routers, resulting in weak signals, and effectively improve the user experience.
[0047] In some embodiments of the present application, the network connection method of the Internet of Things device further includes:
[0048] When the IoT device that needs to be connected to the network is not located in a weak network environment, a routing device is selected from the connected devices, and the IoT device that needs to be connected to the network is connected to the network through the routing device, so that the IoT device is connected to the target server.
[0049] Optionally, after receiving the response, the IoT device terminal to be connected to the network determines whether the IoT device to be connected to the network is located in a weak network environment. If not, the IoT device connects to the routing device. Specifically, the IoT device and the routing device can be connected using AP (Access Point) mode and STA (Station) mode, with the IoT device connecting to the target server through the routing device.
[0050] In some embodiments of the present application, FIG2 shows a second flow chart of a network connection method for an IoT device provided in an embodiment of the present application. As shown in FIG2 , the network connection method for an IoT device further includes:
[0051] Step S202: Obtain the signal strength between the IoT device that needs to be connected to the network and the routing device.
[0052] Step S204: When the signal is less than the first value, it is determined that the IoT device is located in a weak network environment.
[0053] Optionally, when an IoT device needs to establish a network connection, it first scans its surroundings according to the normal process, sends a request to the network device, obtains a response from the routing device, and then obtains the signal value between the IoT device and the routing device. If the signal value is less than a first value, the IoT device is in a weak network environment. For example, the first value can be -50dBm to -70dBm, or -55dBm to -60dBm.
[0054] It is understandable that IoT devices are located in a weak network environment, which means that the distance between IoT devices and routing devices is far, the signal is weak, the connection failure rate is high, and the device loss rate is high.
[0055] In some embodiments of the present application, FIG3 shows a third flow chart of a network connection method for IoT devices provided in an embodiment of the present application. As shown in FIG3 , selecting a mutual aid device from the networked devices includes:
[0056] Step S302: obtaining the signal strength between the IoT device that needs to be connected to the network and the home appliance that is already connected to the network.
[0057] Step S304: obtaining the network information to which the connected home appliance is currently connected.
[0058] Step S306: Obtain the load of the home appliance connected to the network.
[0059] Step S308: Obtain the network level of the connected home appliance.
[0060] In step S310 , a mutual assistance device is selected from the connected home appliances based on the signal strength, network information, load, and network level.
[0061] Optionally, when selecting a mutual assistance device from the networked devices, the access determination rules include:
[0062] (1) Check whether the signal strength is suitable for connection.
[0063] (2) Confirm whether the network to which the device is connected is the target network to which the device is currently connected.
[0064] (3) Confirm whether the load of the networked equipment meets the requirements.
[0065] (4) Whether the network level of the networked devices or mutual assistance devices meets the requirements.
[0066] Access judgment rules include, but are not limited to, the above points. A network optimization algorithm is used to screen out mutually-aiding devices that meet the requirements for connection and mutual assistance. Each of the above points is considered a factor. In the above embodiment, the importance of each factor can be set in the network optimization algorithm, and mutually-aiding devices are screened based on the importance of each factor. In some embodiments of the present application, a four-point access judgment rule is provided for selecting mutually-aiding devices. Based on the access judgment rule, networked devices are screened according to the actual situation to obtain mutually-aiding devices that meet the requirements.
[0067] In some embodiments of the present application, FIG4 shows a fourth flow chart of a network connection method for an IoT device provided in an embodiment of the present application. As shown in FIG4 , an IoT device that needs to be connected to the network connects to the network through a mutual assistance device, including:
[0068] Step S402: Control the IoT device to negotiate a key with the mutual assistance device to obtain a key.
[0069] In step S404, the IoT device establishes a network connection with the mutual assistance device based on the key.
[0070] In some embodiments of the present application, key negotiation is required between the IoT device and the mutual aid device to obtain a key. During data transmission between the IoT and the mutual aid device, the key can ensure the security of data transmission.
[0071] In some embodiments of the present application, the Internet of Things device and the mutual assistance device establish a network connection, including:
[0072] IoT devices and mutual assistance devices use AP mode and STA mode for standard connection. Among them, the mutual assistance device is a pseudo AP that allows IoT devices to access.
[0073] In some embodiments of the present application, the network connection between the IoT device and the mutual assistance device can adopt standard connection modes of AP mode and STA mode. That is, the mutual assistance device implements a pseudo AP to allow the IoT device to access. Using this mode between the IoT device and the mutual assistance device can effectively ensure the stability of the network connection between the two devices.
[0074] In some embodiments of the present application, FIG5 shows a fifth flow chart of a network connection method for an IoT device provided in an embodiment of the present application. As shown in FIG5 , the IoT device and the mutual assistance device establish a network connection, including:
[0075] In step S502, the IoT device and the mutual assistance device perform MAC address association, so that the mutual assistance device forwards MAC layer data to the IoT device.
[0076] Step S504: Apply for an IP address for the IoT device.
[0077] Optionally, the IoT device and the mutual aid device may also be associated with a private MAC address (Media Access Control Address), and a logical mapping is generated between the IoT device and the mutual aid device, so that the IoT device and the mutual aid device can generate point-to-point MAC data transmission and reception, and the mutual aid device performs MAC layer data forwarding for the IoT device.
[0078] Optionally, after the MAC address association between the IoT device and the mutual aid device is completed, it is necessary to apply for an IP address (Internet Protocol Address) of the IoT device so that the IoT device can achieve network connection.
[0079] In some embodiments of the present application, FIG6 shows a sixth flow chart of a network connection method for an IoT device provided in an embodiment of the present application. As shown in FIG6 , applying for an IP address of an IoT device includes:
[0080] Step S602: Acquire the root node of the mutual assistance device.
[0081] Step S604: The sub-devices of the root node are connected using the MAC layer 4 address mode to implement MAC data forwarding.
[0082] Step S606: Apply for an IP address for the IoT device through the root node.
[0083] Alternatively, the root node of the mutual aid device is found, and sub-devices beyond the root node are connected using MAC layer 4 address mode to achieve MAC data forwarding. The root node then acts as a proxy for the router to apply for an IP address. This completes the network connection of IoT devices.
[0084] In some embodiments of the present application, 3 addresses and 4 addresses are the basic communication methods of the WiFi MAC protocol. 3 addresses are standard normal communication, and 4 addresses are used for forwarding at the MAC layer. 4 addresses include RA, TA, DA, and SA, and 3 addresses include SA, DA, and TA. Among them, RA represents the receiver or remote address (Receiver Address or Remote Address), TA represents the transmitter address (Transmitter Address), DA represents the destination address (Destination or Target Address), and SA represents the source address (Source Address). In some embodiments of the present application, Figure 7 shows a flow chart of the seventh method for connecting an IoT device to a network provided by an embodiment of the present application. As shown in Figure 7, applying for the IP address of an IoT device includes:
[0085] Step S702: Obtain the root node of the mutual assistance device.
[0086] In step S704, the root node applies for an IP address based on the data private protocol of the MAC layer using a data private protocol, and transparently transmits application data layer by layer using the MAC address.
[0087] Optionally, a user-defined private protocol may be used to implement a data private protocol based on the MAC layer for IP application, and transparently transmit application data layer by layer using MAC.
[0088] Optionally, when using a private protocol to discover and connect relationships, the sub-device uses MAC layer 4-address communication, the root node and AP router use a standard mode, the root node has both 4-address and 3-address sending and receiving modes, and forwarding is done through the root node agent.
[0089] Optionally, after device discovery is completed, the routing relationship of the MAC layer is established step by step, and the MAC routing relationship is synchronized to all connected devices.
[0090] Optionally, after the root node applies for an IP address, there is a MAC relationship routing table between devices, which can realize data forwarding at the IP layer.
[0091] In some embodiments of the present application, the network connection method of the Internet of Things device further includes:
[0092] The IoT devices and mutual assistance devices use a MAC layer private protocol and a heartbeat method to maintain the connection relationship.
[0093] Optionally, in device connection management, the mutual assistance connection between devices needs to maintain the connection relationship by applying heartbeats. Heartbeat maintenance can be achieved through the MAC layer private protocol, that is, any data refresh received from the connected device within the specified time is considered a heartbeat. If there is no data refresh, a packet of empty data MAC packet needs to be sent to maintain the connection.
[0094] In some embodiments of the present application, a heartbeat method is used to maintain the connection relationship. When problems occur in the connection, they can be discovered in time, thereby maintaining the stability of the network connection.
[0095] In some embodiments of the present application, the network connection method of the Internet of Things device further includes:
[0096] When the child device of the root node is disconnected, the MAC routing table and router information are updated to all connected devices, and the disconnected devices are reconnected.
[0097] Optionally, when a child device of the root node is disconnected, the device MAC routing table and router information need to be updated to all connected devices. The disconnected device needs to restart the connection process and achieve a reliable connection.
[0098] Optionally, restarting the connection means that the IoT device rescans surrounding network devices to connect to the network.
[0099] In some embodiments of the present application, the network connection method of the Internet of Things device further includes:
[0100] When the IoT device is disconnected from the intermediate node of the root node, it notifies the management node to disconnect and re-initiate a connection request.
[0101] Optionally, when the intermediate node is disconnected, it is necessary to notify the managed node to disconnect the connection relationship and re-initiate a connection request.
[0102] Optionally, re-initiating a connection request means that the IoT device re-scans surrounding network devices to establish a network connection.
[0103] The network connection method for an IoT device provided in the embodiments of the present application can be executed by a network connection device for the IoT device. In the embodiments of the present application, the network connection device for the IoT device is used as an example to illustrate the network connection method for the IoT device provided in the embodiments of the present application.
[0104] An embodiment of the present application provides a network connection device for an Internet of Things device. FIG8 shows a structural block diagram of the network connection device for an Internet of Things device provided by an embodiment of the present application. As shown in FIG8 , the network connection device 100 for an Internet of Things device includes: a scanning module 110, a receiving module 120, a judging module 130, a selecting module 140, and a connecting module 150. The scanning module 110 is used for an Internet of Things device that needs to be connected to the network to scan surrounding network devices, wherein the network devices include routing devices and home appliances that are already connected to the network. The receiving module 120 is used to receive responses from network devices. The judging module 130 is used to determine whether the Internet of Things device that needs to be connected to the network is located in a weak network environment based on the responses. The selecting module 140 is used to select a mutual aid device from the connected devices when the Internet of Things device that needs to be connected to the network is located in a weak network environment. The connecting module 150 is used for an Internet of Things device that needs to be connected to the network to connect to the network through a mutual aid device, so that the Internet of Things device is connected to the target server.
[0105] In some embodiments of the present application, based on the Wi-Fi mutual assistance capabilities of home appliances, when an IoT device is at the edge of a router's weak signal coverage, the configured IoT device can access the internet through an already connected home appliance and connect to the target server. This can solve the problem of high connection failure rates and device churn caused by the distance between IoT devices and routers, resulting in weak signals, and effectively improve the user experience.
[0106] The network connection device 100 for an IoT device provided in an embodiment of the present application can implement each process of the above-mentioned network connection method embodiment for an IoT device and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0107] The network connection device of the Internet of Things device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0108] The network connection device of the IoT device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0109] The network connection device for the Internet of Things device provided in the embodiment of the present application can implement each process implemented in the above method embodiment. To avoid repetition, it will not be described here.
[0110] Optionally, as shown in Figure 9, an embodiment of the present application further provides an electronic device 1000, which includes a processor 1002 and a memory 1004. The memory 1004 stores a program or instruction that can be run on the processor 1002. When the program or instruction is executed by the processor 1002, the various steps of the above-mentioned network connection method embodiment of the Internet of Things device are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0111] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0112] FIG10 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0113] The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109 and a processor 1110.
[0114] Those skilled in the art will appreciate that the electronic device 1100 may further include a power source (such as a battery) to power various components. The power source may be logically connected to the processor 1110 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG10 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.
[0115] The processor 1110 is configured to enable an IoT device that needs to be connected to the network to scan surrounding network devices, where the network devices include routing devices and connected home appliances.
[0116] Processor 1110 is configured to receive a response from the network device.
[0117] The processor 1110 is configured to determine, based on the response, whether the IoT device requiring network connection is located in a weak network environment.
[0118] The processor 1110 is configured to select a mutual assistance device from among the connected devices when the IoT device that needs to be connected to the network is located in a weak network environment.
[0119] The processor 1110 is configured to connect an IoT device that needs to be connected to a network to the network through a mutual assistance device, so that the IoT device is connected to a target server.
[0120] The processor 1110 provided in the embodiment of the present application can implement each process of the above-mentioned network connection method embodiment of the Internet of Things device and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0121] It should be understood that in an embodiment of the present application, the input unit 1104 may include a graphics processing unit (GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0122] The memory 1109 can be used to store software programs and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1109 may include a volatile memory or a non-volatile memory, or the memory 1109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0123] Processor 1110 may include one or more processing units. Optionally, processor 1110 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1110.
[0124] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned network connection method embodiment of the Internet of Things device is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0125] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0126] An embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned network connection method embodiment of the Internet of Things device, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0127] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0128] An embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-mentioned network connection method embodiment of the Internet of Things device, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0129] In an embodiment of the present application, a network connection method for IoT devices is provided. The topology diagram is shown in FIG12 . A cloud service 210 (i.e., a target server) is provided. A first router 212 and a second router 214 are connected to the cloud service 210. Several household appliances form a mesh (Mesh in Chinese means "net." The original meaning of Mesh networking is a wireless mesh network with multi-hop interconnection and mesh topology characteristics). A first IoT device 216 performs a scan (SCAN) to connect to a first mutual aid device 218. The first mutual aid device 218 is connected to the first router 212. A second IoT device 220 is connected to a second mutual aid device 222. The second mutual aid device 222 is connected to a third mutual aid device 224. The third mutual aid device 224 is connected to the second router 214. The third mutual aid device 224 is the root node.
[0130] Network connection involves the following steps:
[0131] (1) For devices that need to connect to a router (i.e. IoT devices that need to connect to the Internet), first scan the surrounding network devices that can be connected (including routing devices and connected home appliances) according to the normal process.
[0132] (2) All target routers and home appliances that meet the mutual connection requirements will respond to the request.
[0133] (3) After receiving the response, the IoT device terminal to be connected to the network determines who to connect to according to the established rules (if it is a weak network environment, it will establish a mutual connection with the home appliance; if it is not a weak network environment, it will connect to the router). If it is a router, it will use a standard AP and STA connection. If the home appliance meets the mutual assistance and is the optimal connection, it will use the home appliance mutual assistance private connection.
[0134] (4) Private mutual connection, access judgment rules:
[0135] 1) Check whether the signal strength is suitable for connection.
[0136] 2) Confirm whether the network to which the connected device is connected is the target network for the current device.
[0137] 3) Confirm whether the load connected to the networked devices meets the requirements.
[0138] 4) Whether the network level of the networked devices or mutual assistance devices meets the requirements.
[0139] A comprehensive judgment including but not limited to the above conditions is made to screen out target devices that meet the requirements of connection and mutual assistance.
[0140] (5) The mutual aid device and the target device (i.e., the IoT device that needs to be connected to the Internet) negotiate a key to determine the WiFi encryption key for subsequent connection transmission.
[0141] (6) The connection between the target device and the mutual assistance device can be a standard connection in AP mode and STA mode, that is, the mutual assistance device implements a pseudo AP and allows the target device to access.
[0142] (7) The target device and the mutual aid device can also use a private MAC association relationship to generate a logical mapping, so that the target device and the mutual aid device can generate point-to-point MAC data transmission and reception. The mutual aid device performs MAC layer data forwarding to the target device.
[0143] (8) Sub-devices other than the root node are connected in MAC layer 4 address mode and implement MAC data forwarding, and the root node acts as the proxy for the router's IP application; or a custom private protocol can be used to implement a data private protocol based on the MAC layer to apply for IP, and transparently transmit application data layer by layer using MAC.
[0144] (9) When discovering and connecting to a private protocol, the sub-device previously communicated using the MAC4 address. The root node and AP router used the standard mode, and the root node had both 4-address and 3-address sending and receiving modes. The root node then forwarded the message.
[0145] (10) After device discovery is completed, the MAC layer routing relationship is established step by step, and the MAC routing relationship is synchronized to all connected devices.
[0146] (11) After applying for an IP address, there is a MAC relationship routing table between devices, which can realize data forwarding at the IP layer.
[0147] (12) Device connection management. The mutual connection between devices needs to be maintained by applying heartbeats. Heartbeat maintenance can be achieved through the MAC layer private protocol. If data refresh received from the connected device within the specified time is considered a heartbeat, if there is no data refresh, a packet of empty data MAC packet needs to be sent to maintain the connection.
[0148] (13) When a sub-device is disconnected, the device MAC routing table and router information need to be updated to all connected devices. The disconnected device needs to restart the connection process and achieve a reliable connection. Then, start again from step (1).
[0149] (14) If the intermediate node loses connection, it should notify the managed node to disconnect and restart the connection request. Then it should start again from step (1).
[0150] Some embodiments of the present application can solve the problem of unsuccessful device connection and high failure rate in user environments with weak network conditions.
[0151] FIG13 shows a WiFi mutual assistance routing topology diagram. A third router 200 is connected to the first smart appliance 202 with a -40dBm signal. A third router 200 is connected to the second smart appliance 204 with a -50dBm signal. A third router 200 is connected to the third smart appliance 206 with a signal less than -60dBm. Third smart appliance 206 is located in a weak network environment. Using the network connection method for IoT devices provided in some embodiments of the present application, second smart appliance 204 is selected as the mutual assistance device. Third smart appliance 206, with a weak signal, can connect to the internet through second smart appliance 204. Second smart appliance 204 can be a refrigerator, and third smart appliance 206 can be a washing machine. Fourth smart appliance 226 is also located in a weak network environment. Using the network connection method for IoT devices provided in some embodiments of the present application, first smart appliance 202 is selected as the mutual assistance device. Fourth smart appliance 226, with a weak signal, can connect to the internet through first smart appliance 202. Third router 200 has routing compatibility. Among them, the fourth smart appliance 226 can be a washing machine.
[0152] The methods may be implemented in a variety of different ways depending on the specific features and / or example applications. For example, the methods may be implemented through a combination of hardware, firmware, and / or software. For example, in a hardware implementation, the processor may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, electronic devices, other device units for performing the above functions, and / or combinations thereof.
[0153] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: a portable computer floppy disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory card, a floppy disk, an encoding mechanical device (such as a punched card or a groove with a raised structure on which instructions are recorded), and any suitable combination of the foregoing. As used herein, a computer-readable storage medium should not be understood as a transmission signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium, or electrical signals transmitted through wires.
[0154] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0155] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0156] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A network connection method for an Internet of Things device, wherein: include: The IoT device that needs to be connected to the network scans the surrounding network devices, wherein the network devices include routing devices and home appliances that have been connected to the network; receiving a response from the network device; Based on the response, determining whether the IoT device that needs to be connected to the network is located in a weak network environment; When the IoT device that needs to be connected to the network is located in the weak network environment, selecting a mutual assistance device from the connected devices; The IoT device that needs to be connected to the network connects to the network through the mutual assistance device so that the IoT device is connected to the target server.
2. The network connection method of the Internet of Things device according to claim 1, wherein: Also includes: When the IoT device that needs to be connected to the network is not located in the weak network environment, a routing device is selected from the networking devices, and the IoT device that needs to be connected to the network connects to the network through the routing device, so that the IoT device is connected to the target server.
3. The network connection method for an Internet of Things device according to claim 1 or 2, wherein: Also includes: Obtaining the signal strength between the IoT device that needs to be connected to the network and the routing device; When the signal is less than the first value, it is determined that the Internet of Things device is located in the weak network environment.
4. The network connection method for an IoT device according to any one of claims 1 to 3, wherein: The selecting a mutual assistance device from the networked devices comprises: Obtaining the signal strength between the IoT device that needs to be connected to the network and the home appliance that has been connected to the network; Obtaining information about the network to which the networked home appliance is currently connected; Obtaining the load of the household electrical appliance connected to the network; Obtaining the network level of the home appliance connected to the network; The mutual assistance device is selected from the networked home appliances based on the signal size, the network information, the load and the network level.
5. The network connection method for an IoT device according to any one of claims 1 to 4, wherein: The IoT device that needs to be connected to the network connects to the network through the mutual assistance device, including: Control the IoT device to negotiate a key with the mutual assistance device to obtain a key; Based on the key, the IoT device establishes a network connection with the mutual assistance device.
6. The network connection method of the Internet of Things device according to claim 5, wherein: The Internet of Things device is connected to the mutual assistance device through a network, including: The IoT device and the mutual assistance device are connected in a standard manner using AP mode and STA mode, wherein the mutual assistance device is a pseudo AP that allows the IoT device to access.
7. The network connection method of the Internet of Things device according to claim 5, wherein: The Internet of Things device is connected to the mutual assistance device through a network, including: The IoT device is associated with the mutual assistance device by MAC address, so that the mutual assistance device forwards MAC layer data to the IoT device; Apply for the IP address of the IoT device.
8. The network connection method of the Internet of Things device according to claim 7, wherein: The application for the IP address of the IoT device includes: Obtaining the root node of the mutual aid device; The sub-devices of the root node are connected using the MAC layer 4 address mode to implement MAC data forwarding; Apply for the IP address of the IoT device through the root node.
9. The network connection method of the Internet of Things device according to claim 7, wherein: The application for the IP address of the IoT device includes: Obtaining the root node of the mutual aid device; Using the data privacy protocol, the root node applies for an IP address based on the data privacy protocol of the MAC layer, and transparently transmits application data layer by layer using the MAC address.
10. The network connection method for an Internet of Things device according to any one of claims 7 to 9, wherein: Also includes: The Internet of Things device and the mutual assistance device use a MAC layer private protocol and a heartbeat method to maintain the connection relationship.
11. The network connection method for an Internet of Things device according to any one of claims 7 to 10, wherein: Also includes: When the child device of the root node is disconnected, the MAC routing table and router information are updated to all connected devices, and the disconnected devices are reconnected.
12. The network connection method for an Internet of Things device according to any one of claims 7 to 11, wherein: Also includes: When the IoT device is disconnected from the intermediate node of the root node, the management node is notified to disconnect and a connection request is re-initiated.
13. A network connection device for an Internet of Things device, wherein: include: A scanning module is used for an IoT device that needs to be connected to the network to scan surrounding network devices, wherein the network devices include routing devices and home appliances that have been connected to the network; A receiving module, used for receiving a response from the network device; A judgment module, used to judge whether the IoT device that needs to be connected to the network is located in a weak network environment based on the response; A selection module, configured to select a mutual assistance device from the networked devices when the IoT device that needs to be connected to the network is located in the weak network environment; The connection module is used for the Internet of Things device that needs to be connected to the network to connect to the network through the mutual assistance device, so that the Internet of Things device is connected to the target server.
14. An electronic device, wherein: include: A memory on which programs or instructions are stored; A processor, configured to implement the steps of the network connection method for an Internet of Things device as described in any one of claims 1 to 12 when executing the program or instruction.
15. A readable storage medium having a program or instruction stored thereon, wherein: When the program or instruction is executed by the processor, the steps of the network connection method of the Internet of Things device as described in any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the steps of the network connection method for an Internet of Things device according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Network connection method and device, electronic equipment and readable storage medium
CN116709575A
Relay capable wireless apparatuses
CN105745990A
Network data transmission method, device and system
CN108601057A
Access method, device and system and readable storage medium
CN114938507A
Method for allocating resources in wireless LAN system and wireless LAN system
US20170257872A1