Method and device for accessing the network of target device, electronic device and smart home system
By acquiring and refreshing network information to adjust the network connection of smart devices, the complex problem of smart devices' access process is solved, and the convenience of access and the improvement of user experience is achieved.
Patent Information
- Application Number
- CN202210808418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-07-08
AI Technical Summary
Smart devices operate complexly during the process of accessing the network, which affects the user experience. How to improve the convenience of accessing the network is an urgent problem.
By obtaining and refreshing network information, control the target device to select the target network, and adjust the network connection based on the refreshed information, reduce frequent switching of WiFi hotspots and simplify the network access process.
It has achieved simplification and convenience of the smart device network access process, reducing the complexity of user operations and waiting time, and improving the user experience.
Smart Images

Figure CN115243339B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for accessing a target device to a network, and a smart home system. Background Art
[0002] With the development of Internet of Things technology, more and more smart devices have begun to integrate network functions, such as TVs, refrigerators, air conditioners, etc. By integrating network functions, these devices have become more intelligent, greatly enriching people's daily life experience. However, when smart devices access the network based on the integrated network functions, the operation process is relatively complicated, which affects the user experience. Therefore, how to improve the convenience of smart devices accessing the network is an urgent problem to be solved. Summary of the invention
[0003] Based on this, it is necessary to provide a target device access method, device, electronic device and smart home system that can improve the convenience of smart device access to the network in response to the above technical problems.
[0004] In order to achieve the above technical objectives, the embodiments of this specification provide the following technical solutions:
[0005] In a first aspect, the present application provides a method for a target device to access a network, comprising:
[0006] In response to a network access operation for a target device, acquiring network information scanned by the target device, and controlling the target device to select a target network based on the network information;
[0007] Refreshed network information obtained by rescanning the target device after the last scan is acquired, and the target device is controlled to adjust the target network based on the refreshed network information.
[0008] In a second aspect, the present application provides a method for a target device to access a network, including:
[0009] In response to a network access operation sent by a terminal, network information within a target range is sent to the terminal to select a target network determined by the terminal according to the network information;
[0010] After the last scan, the network information within the target range is scanned again to obtain and save the updated network information, so as to adjust the target network based on the updated network information.
[0011] In a third aspect, the present application provides a network access device for a target device, including:
[0012] A control module, configured to, in response to a network access operation for a target device, obtain network information scanned by the target device, and control the target device to select a target network based on the network information;
[0013] The adjustment module is used to obtain the refreshed network information obtained by the target device after the last scan, and control the target device to adjust the target network based on the refreshed network information.
[0014] Optionally, in the network access device of the target device described above, the adjustment module includes:
[0015] The selection unit is configured to control the target device to select the re-determined target network in response to an operation of re-selecting the target network in the refreshed network information.
[0016] Optionally, in the network access device of the target device described above, the control module includes:
[0017] an acquiring unit, configured to acquire network access information of the target network in response to a selection operation on the target network in the network information;
[0018] The first control unit is used to control the target device to select the target network according to the network access information of the target network.
[0019] Optionally, in the network access device of the target device described above, the target network includes multiple channels;
[0020] The adjustment module comprises:
[0021] A first determining unit, configured to determine interference levels of the plurality of channels based on the updated network information;
[0022] A second determining unit, configured to determine, according to the interference levels of the plurality of channels, a target channel whose interference level satisfies a preset condition;
[0023] A second control unit is used to control the target device to access the target channel of the target network.
[0024] Optionally, in the network access device of the target device described above, when the first determination unit determines the interference degree of the plurality of channels based on the refreshed network information, it is specifically used to:
[0025] Based on the refreshed network information, determining the occurrence frequency of each of the channels in the target network;
[0026] The interference degree of the multiple channels is determined according to the occurrence frequency of the multiple channels and / or the position influence corresponding to each channel.
[0027] Optionally, in the network access device of the target device described above, when the first determination unit determines the interference degree of the multiple channels according to the occurrence frequency of the multiple channels and / or the position influence corresponding to each of the channels, it is specifically used to:
[0028] Determining the frequency of occurrence weights corresponding to the plurality of channels according to the frequency of occurrence of the plurality of channels; and / or determining the channel position weight corresponding to each channel according to the position influence corresponding to each channel;
[0029] Based on the occurrence frequency weights and / or the channel position weights, interference levels of the plurality of channels are determined.
[0030] Optionally, in the network access device of the target device described above, when the first determination unit determines the occurrence frequency weights corresponding to the plurality of channels according to the occurrence frequencies of the plurality of channels, it is specifically used to:
[0031] Determining the occurrence frequency weights corresponding to the plurality of channels according to the negative correlation between the occurrence frequency weights and the occurrence frequencies of the plurality of channels;
[0032] The channels of the target network include independent channels and non-independent channels; when the first determination unit determines the channel position weight corresponding to each of the channels according to the position influence corresponding to each of the channels, it is specifically used to:
[0033] The channel position weight of the non-independent channel is determined according to the position influence between the non-independent channel and the adjacent independent channel; the channel position weight of the non-independent channel is negatively correlated with the position influence of the non-independent channel; the channel position weight of the independent channel is greater than the channel position weight of the non-independent channel.
[0034] In a fourth aspect, the present application provides a network access device for a target device, including:
[0035] a sending module, configured to send network information within a target range to the terminal in response to a network access operation sent by the terminal, so as to select a target network determined by the terminal according to the network information;
[0036] The second adjustment module is used to scan the network information within the target range again after the last scan, obtain the updated network information and save it, so as to adjust the target network based on the updated network information.
[0037] In a fifth aspect, the present application provides a smart home system, including: smart devices and terminals; wherein:
[0038] The terminal is used to, in response to a network access operation for a target device, obtain network information scanned by the target device, and control the target device to select a target network based on the network information; obtain refreshed network information obtained by re-scanning the target device after the last scan, and control the target device to adjust the target network based on the refreshed network information;
[0039] The smart device is used to send network information within a target range to the terminal in response to a network access operation sent by the terminal, so as to select a target network determined by the terminal based on the network information; scan the network information within the target range again after the last scan, obtain the refreshed network information and save it, so as to adjust the target network based on the refreshed network information.
[0040] In a sixth aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the methods described above when executing the computer program.
[0041] In a seventh aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0042] In an eighth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above method.
[0043] The embodiments of this specification provide a method, device, electronic device and smart home system for network access of a target device, wherein, through the network access method of the target device, a terminal can obtain network information from the target device according to the network access operation for the target device, so as to control the target device to select a target network according to the network information, and the terminal can also control the target device to adjust the target network through the obtained refreshed network information, so that in the process of configuring the target device to access the network, the information of the surrounding routers can be obtained without frequently switching the connected WiFi hotspot, and the steps are simple and the operation is convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 An application environment diagram of a method for network access of a target device in an embodiment;
[0045] Figure 2 is a hardware structure block diagram of a gateway in one embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of a method for a target device to access a network in one embodiment;
[0047] Figure 4 A schematic diagram of displaying network information in one embodiment;
[0048] Figure 5 A schematic diagram of a flow chart of a step of determining a target channel in an embodiment;
[0049] Figure 6 A schematic flow chart of a step of determining the interference degree of a channel in one embodiment;
[0050] Figure 7 is a signaling flow chart of a method for network access of a target device in one embodiment;
[0051] Figure 8 is a structural block diagram of a network access device of a target device in an embodiment;
[0052] Fig. 9 FIG. 1 is a schematic diagram of the structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] Exemplary Implementation Environment
[0055] Please refer to Figure 1 , Figure 1 Schematic diagram of an implementation environment that may be involved in the present invention. The implementation environment is an Internet of Things platform, which includes a terminal 100, a gateway 200, a smart device 300 deployed in the gateway 200, a cloud server 400 and a router 500.
[0056] The terminal 100 may be any device with communication and storage functions, such as a desktop computer, a laptop computer, a tablet computer, a smart phone, or other intelligent communication device capable of network connection, which is not limited here.
[0057] The smart device 300 can be a smart lamp, a smart printer, a smart fax machine, a smart camera, a smart air conditioner, a smart TV, a smart refrigerator, or a human body sensor, a door and window sensor, a temperature and humidity sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a wireless switch, a wireless wall switch, a magic cube controller, a curtain motor, and other devices equipped with a communication module (such as a ZIGBFE module, a WIFI module, a Bluetooth communication module, etc.).
[0058] A network connection is established between the terminal 100 and the gateway 200. In one embodiment, the network connection is established between the terminal 100 and the gateway 200 via 2G / 3G / 4G / 5G, Wi-Fi, etc. The terminal 100 interacts with the gateway 200 through the network connection, so that the user can control the smart device 300 connected to the gateway 200 to perform corresponding actions with the help of the terminal 100.
[0059] Optionally, a client capable of managing smart devices is installed in the terminal 100 , and the client may be an application client (such as a mobile phone APP), or a web client or a small program, etc., which is not limited here.
[0060] The smart device 300 communicates with the gateway 200 through its own configured communication module, and is then controlled by the cloud server 400. In one embodiment, the smart device 300 accesses the gateway 200 through a local area network, and is thus deployed in the gateway 200. The process of the smart device 300 accessing the gateway 200 through a local area network includes that the gateway 200 first establishes a local area network, and the smart device 300 connects to the gateway 200 to access the local area network established by the gateway 200. The local area network includes: ZigBee or Bluetooth. Accordingly, the smart device 300 has a built-in communication module (such as a ZIGBEE module, a Wi-Fi module, a Bluetooth communication module, etc.) to have the function of realizing communication with the gateway 200 and the terminal.
[0061] The gateway 200 and the terminal 100 can both be connected to the router 500 and access the network through the router 500. The router 500 can access the server 500 through a wired or wireless communication connection. For example, the gateway 200 and the terminal 100 can store the acquired information in the cloud server 400. Optionally, the terminal 100 can also establish a network connection with the cloud server 400 through 2G / 3G / 4G / 5G, Wi-Fi, etc., so as to obtain data sent by the cloud server 400.
[0062] Alternatively, if Figure 1As shown, the terminal 100, the router 500 and the gateway 200 are in the same local area network, and the path established in the local area network can be called a local area network path. When the terminal 100, the router 500 and the gateway 200 are in the same local area network, the terminal 100 can interact with the gateway 200 and the smart device 300 connected to the gateway 200 through the local area network path. When the terminal 100 is not in the same local area network as the gateway 200 and the smart device 300, it can also interact through a wide area network path. The wide area network path refers to the path formed by the terminal connecting to the cloud server 400 through a mobile network such as 2G / 3G / 4G / 5G, and the smart device 300 connecting to the cloud server 400 through the gateway 200 and the router 500.
[0063] Figure 2 is a hardware structure block diagram of a gateway according to an exemplary embodiment. This gateway is suitable for Figure 1 The implementation environment shown.
[0064] It should be noted that the gateway is only an example adapted to the present invention and cannot be considered to provide any limitation on the scope of use of the present invention. The gateway cannot be interpreted as requiring dependence on or having Figure 2 One or more components of the exemplary gateway 200 shown in FIG.
[0065] The hardware structure of the gateway 200 may vary greatly due to different configurations or performances, such as Figure 2 As shown, the gateway 200 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .
[0066] The power supply 210 is used to provide working voltage for each hardware device on the gateway 200 .
[0067] The interface 230 includes at least one wired or wireless network interface 231 , at least one serial-to-parallel conversion interface 233 , at least one input-output interface 235 , and at least one USB interface 237 , etc., for communicating with external devices.
[0068] The memory 250 is a carrier for storing resources, which can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 251, an application 253 or data 255, etc. The storage method can be temporary storage or permanent storage. Among them, the operating system 251 is used to manage and control the hardware devices and application 253 on the gateway 200 to enable the central processor 270 to calculate and process the massive data 255. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, FreeRTOS, etc. The application 253 is a computer program that completes at least one specific task based on the operating system 251, which can include at least one module ( Figure 2 (not shown in the figure), each module may respectively include a series of computer-readable instructions for the gateway 200. The data 255 may be photos, pictures, etc. stored in a disk.
[0069] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via a bus for computing and processing the mass data 255 in the memory 250 .
[0070] As described in detail above, the gateway 200 applicable to the present invention will complete the device linkage control method by having the central processor 270 read a series of computer-readable instructions stored in the memory 250 .
[0071] In addition, the present invention can also be implemented through hardware circuits or hardware circuits combined with software instructions. Therefore, the implementation of the present invention is not limited to any specific hardware circuits, software, or a combination of the two.
[0072] Exemplary Methods
[0073] An exemplary embodiment of the present specification provides a method for a target device to access a network, and the method is described by taking a terminal in an exemplary embodiment environment as an example. Figure 3 , the network access method of the target device may include the following steps:
[0074] S301: In response to a network access operation for a target device, obtain network information scanned by the target device, and control the target device to select a target network based on the network information.
[0075] The target device refers to a smart device that has a network access requirement, and specifically can be a smart device that has a network access requirement in the exemplary embodiment environment. For example, the target device can be a smart TV, smart air conditioner, or smart refrigerator that has a network access requirement in the exemplary embodiment environment. The network access operation of the target device refers to an operation used to control the network access of the target device, and specifically can be an operation for the network access of the target device issued by the user through the terminal. For example, the user can determine the target device that needs to access the network through the terminal, and perform a selection operation on the target device from the terminal. In another embodiment, the user can also trigger a specified operation on the target device to initiate the network access operation. For example, the user can trigger operations such as specified options and specified buttons on the target device to trigger the target device to enter the wireless access mode, so as to send a signal to the nearby terminal that the target device is to access the network. After receiving the signal, the terminal responds to the network access operation of the target device to further process the network access of the target device.
[0076] Specifically in this embodiment, the target device can send an identification signal, which generally carries the identity information of the target device. After the terminal obtains the identification signal sent by the target device, it can parse the identity information of the target device and output it, so that the user can perform a selection operation on the target device from the terminal based on the identity information output by the terminal.
[0077] It should be noted that in the current network environment, there may be other smart devices that also have the function of sending identification signals to the outside, and the terminal may obtain the identity information of multiple devices. Therefore, the user needs to determine the identity information corresponding to the target device from the identity information of multiple devices and perform the selection operation for the target device from the terminal.
[0078] Among them, the time node when the target device sends the identification signal outward includes the node corresponding to when the start signal is powered on or the node corresponding to when the signal sending instruction is obtained. Exemplarily, if the time node when the target device sends the identification signal outward is the node corresponding to when the start signal is powered on, then when the target device detects that the start signal is powered on, the identification signal can be sent outward; if the time node when the target device sends the identification signal outward is the node corresponding to when the signal sending instruction is obtained, then when the target device detects that the start signal is powered on, the identification signal is not sent outward, but when the signal sending instruction is obtained, the identification signal is sent outward.
[0079] Identity information refers to information that can confirm the identity of the target device, so that the user can determine the identity information corresponding to the target device from all the identity information output by the terminal, and then perform a selection operation for the target device from the terminal. Exemplarily, the name of the identification signal can be set as the identity information of the target device, so that the terminal can quickly parse the identity information from the identification signal and output it. Moreover, the specific content of the identity information is not limited in the embodiments of the present application, and it can be the product name of the target device, the model specification of the target device, or a specific string of characters, etc., as long as the user can determine the corresponding target device through the identity information.
[0080] The identification signal sent outward by the target device is a signal that can be obtained and identified by the terminal. For example, if the target device can enter the Wireless Access Point (AP) mode, the AP hotspot signal sent by the target device in AP mode can be used as an identification signal. On the premise that the terminal is configured with a Wi-Fi module, the terminal can obtain the above-mentioned AP hotspot signal by searching for wireless networks; for another example, if the target device has a Bluetooth module, the Bluetooth function corresponding to the Bluetooth module can be activated, and the Bluetooth signal can be used as an identification signal. On the premise that the terminal is also configured with a Bluetooth module, the terminal can obtain the above-mentioned Bluetooth signal by searching for Bluetooth signals. For example, the terminal of this embodiment can be equipped with a Bluetooth module and a Wi-Fi module at the same time.
[0081] Furthermore, the user determines the identity information corresponding to the target device from the identity information of multiple devices, and after performing a selection operation for the target device on the terminal, the terminal establishes a connection with the target device. Based on the connection relationship between the terminal and the target device, the terminal can obtain the network information scanned by the target device.
[0082] Exemplarily, if both the terminal and the target device are equipped with Wi-Fi modules, the terminal obtains the AP hotspot signal sent outward by the target device by searching for the wireless network, and establishes an AP hotspot connection with the target device. Based on the AP hotspot connection between the terminal and the target device, the terminal can obtain the network information scanned by the target device; if both the terminal and the target device are equipped with Bluetooth modules, the terminal obtains the Bluetooth signal sent outward by the target device by searching for the Bluetooth signal, and establishes a Bluetooth connection with the target device. Based on the Bluetooth connection between the terminal and the target device, the terminal can obtain the network information scanned by the target device.
[0083] The network information refers to the information of the surrounding network devices obtained by the target device through scanning, including the network names, encryption methods and channels corresponding to different network devices. Generally, the target device can enter the AP mode after startup, scan the surrounding network devices, and obtain the information of the surrounding network devices. Exemplarily, the network device can include a router, and correspondingly, the network name corresponding to the network device is the router name, the encryption method corresponding to the network device is the encryption method of the router, and the channel corresponding to the network device is the multiple channels currently used by the router.
[0084] In one embodiment of the present application, after acquiring the network information, the terminal outputs the network information so that the user can determine the target network based on the output network information, and then control the target device to select the above target network.
[0085] When outputting the above network information, the form of outputting the network information is not limited in this embodiment. For example, the network information can be output in the form of a list, in the form of thumbnails, or in the form of voice. In addition, the content of the output network information can only include the network name, so that the user can select the target network corresponding to the target network device from the network information, and the encryption method, channel, etc. corresponding to the network device can be selected or not output according to the actual situation, which is not limited in this embodiment.
[0086] When terminals equipped with different operating systems output network information, in this embodiment, the control terminal outputs the same content in the network information in the same form, for example, both output the network name and signal strength in the form of a list. Figure 4 As shown. This reduces the display differences of terminals with different operating systems and improves the user experience. Moreover, in this embodiment, the network information that the terminal can obtain is the information of the surrounding network devices that the target device can scan, so that the user can select the target network from it, avoiding the situation where the terminal can only scan the currently connected network and the user needs to manually switch the target network.
[0087] It should be noted that Figure 4 The network name and signal strength shown in the figure are only used as examples to illustrate the output form of network information and do not have any limiting effect on the present application.
[0088] S302: Obtain refreshed network information obtained by the target device after a previous scan, and control the target device to adjust the target network based on the refreshed network information.
[0089] Each time the target device sends network information to the terminal, it will scan the surrounding network devices again, update the network information and store the updated network information. For example, the network information can be stored in a flash memory. In this embodiment, since the network information is pre-scanned and refreshed, when the terminal needs to re-acquire the network information from the target network, the target device can quickly respond and feedback the refreshed network information, reducing the user's waiting time.
[0090] The target device may scan the surrounding network devices at a frequency after sending the network information to the terminal each time, or scan the surrounding network devices at a preset time interval after sending the network information to the terminal. The time interval may be set by a person skilled in the art according to actual conditions, and is not limited in this embodiment.
[0091] When devices with different operating systems perform network scanning, the user's waiting time is different. In this embodiment, since the terminal does not perform network scanning, but obtains network information pre-scanned by the target device, the difference in waiting time of terminals with different operating systems is reduced, and the user experience is improved.
[0092] After the terminal obtains the network information and outputs the network information, due to unstable network signals or the target device scanning the surrounding network devices and obtaining the above network information, the target device corresponding to the target network is not powered on, etc., the output network information may not contain the target network that the user needs to connect to. In this case, the terminal needs to obtain the network information from the target device again, and the control terminal obtains the network information from the target device again and outputs it, so that the user can select the target network based on the output network information. The network information that the terminal obtains again from the target device is pre-scanned by the target device.
[0093] Exemplarily, a refresh button may be displayed on the display screen of the terminal. If the output network information does not include the target network that the user needs to connect to, the user triggers the refresh button on the display screen of the terminal to control the terminal to re-acquire the pre-scanned and refreshed network information from the target device and output it, so that the user can select the target network based on the output network information. If the network information acquired by the terminal still does not include the target network that the user needs to connect to, the user may trigger the refresh button on the display screen of the terminal to control the terminal to re-acquire the pre-scanned and refreshed network information from the target device and output it, until the output network information includes the target network that the user needs to connect to, or the user stops the network access operation.
[0094] Furthermore, after the target device is controlled to select a target network based on the network information, if the target network selected by the target device needs to be adjusted, such as replacing another network as the target network or determining the connection channel of the target network, etc., the refreshed network information obtained by the target device after the last scan can be obtained from the target device, so as to adjust the target network of the target device based on the refreshed network information.
[0095] Exemplarily, a refresh button can be displayed on the display screen of the terminal. If another network needs to be changed as the target network, the user triggers the refresh button on the display screen of the terminal to control the terminal to re-acquire network information from the target device and output it, so that the user can change other networks as the target network.
[0096] If the connection channel of the target network needs to be determined, the user does not need to manually refresh, and the terminal can automatically obtain network information from the target device, and determine the channel with less interference in the target network as the connection channel of the target network based on the refreshed network information, so that the target device can access the connection channel. Alternatively, if the connection channel of the target network needs to be determined, the terminal can automatically obtain and display the scanned and refreshed network information from the target device, so that the user can manually select the connection channel in the target network based on the scanned and refreshed network information.
[0097] In the network access method for the target device of the present embodiment, the terminal can obtain network information from the target device according to the network access operation for the target device, so as to control the target device to select the target network according to the network information. Moreover, the terminal can also control the target device to adjust the target network through the obtained refreshed network information, so that in the process of configuring the target device to access the network, there is no need to frequently switch the connected WiFi hotspot to obtain the information of the surrounding routers. The steps are simple and the operation is convenient.
[0098] In an exemplary embodiment of the present specification, the steps of the above embodiment control the target device to adjust the target network based on the refreshed network information, specifically including the following steps:
[0099] In response to an operation of reselecting a target network in the refreshed network information, the target device is controlled to select the re-determined target network.
[0100] As described in the above embodiments, each time the target device sends network information to the terminal, it will scan the surrounding network devices again, update the network information, and store the updated network information. In this embodiment, if it is necessary to change another network as the target network, the user can perform a refresh network operation. In response to the refresh network operation, the terminal obtains the refreshed network information obtained by the target device after the last scan from the target device, and outputs the refreshed network information, so that the user can perform an operation to reselect the target network from the refreshed network information, reselect the target network from the refreshed network information, and control the target device to select the currently re-determined target network.
[0101] Exemplarily, a refresh button may be displayed on the display screen of the terminal, and the user may execute a network refresh operation by triggering the refresh button on the display screen of the terminal. In response to the network refresh operation, the terminal reacquires network information from the target device and outputs it, so as to reselect the target network from the refreshed network information and control the target device to select the currently re-determined target network.
[0102] In the embodiments of the present application, the target network to which the target device is connected can be replaced based on actual needs, thereby improving the flexibility of the target device accessing the network.
[0103] In an exemplary embodiment of the present specification, the steps of the above embodiment control the target device to select the target network based on the network information, specifically including the following steps:
[0104] In response to a selection operation for a target network in the network information, network access information of the target network is acquired; and according to the network access information of the target network, a target device is controlled to select the target network.
[0105] Network access information refers to the information necessary to connect to the target network, mainly including the connection password of the target network and other information.
[0106] In an embodiment of the present application, according to the selection operation of the target network in the network list, the network access information of the target network is obtained. Wherein, obtaining the network access information of the target network includes obtaining the network access information input by the user. Exemplarily, the target network is generally provided with a connection password. In the process of the user selecting the target network from the network information, the user needs to input the corresponding connection password based on the terminal, so that the terminal sends the selection information of the target network and the connection password of the target network to the target device, and controls the target device to select the above-mentioned target network.
[0107] The user inputs the corresponding connection password based on the terminal, including the user inputting the corresponding connection password through a touch screen on the terminal, or inputting the corresponding connection password in the form of voice, which is not limited in this embodiment.
[0108] After the target device obtains the network access information of the target network, it can select the target network and establish a connection based on the network access information.
[0109] In this embodiment, when controlling the target device to access the target network, the user only needs to input the network access information of the target network, which is simple and easy to operate.
[0110] In an exemplary embodiment of the present specification, Figure 5 As shown, the target network of the above embodiment includes multiple channels, and the steps of the above embodiment control the target device to adjust the target network based on the refreshed network information, specifically including the following steps:
[0111] S501: Determine interference levels of multiple channels based on updated network information.
[0112] In an embodiment of the present application, controlling the target device to adjust the target network includes controlling the target device to access a channel in the target network that meets the requirements. Specifically, the target device in the above embodiment selects the target network, which means that the target device establishes a preliminary connection with the target network, and the target network includes multiple channels. In an embodiment of the present application, it is necessary to further determine a channel in the target network that meets the requirements so that the target device can access a channel in the target network that meets the requirements.
[0113] A channel that meets the requirements refers to a channel with less interference and that meets the connection requirements.
[0114] The target network may correspond to multiple channels. In order to determine the target channel that meets the requirements, the interference levels of multiple channels of the target network are determined in the embodiments of the present application. Exemplarily, each channel of the target network can be set as a potential target channel, the interference level of each channel is determined, and the channels that meet the requirements are selected from the potential target channels. In another exemplary embodiment, if some channels of the target network cannot be used to connect to the target device, for example, some channels in the target network are too interfered to be suitable as target channels, or some channels are occupied by fixed devices, etc., then these channels cannot be set as potential target networks, and the remaining channels can be set as potential target networks, the interference level of each channel in the remaining channels is determined, and the channels that meet the requirements are selected from the potential target channels.
[0115] Factors that affect the degree of channel interference include:
[0116] One is the interference of the channel itself. If the frequency of a channel appears more frequently, it means that the channel is used more frequently and the number of signals transmitted in the channel is large. When the signal is transmitted in the channel, the interference will be relatively serious; on the contrary, if the frequency of a channel appears less frequently, it means that the channel is used less frequently and the number of signals transmitted in the channel is small. When the signal is transmitted in the channel, the interference will be relatively less.
[0117] The second is interference between channels. Based on the frequency bands in which each channel in the network works, the channels can be divided into independent channels and non-independent channels. Among them, independent channels have the least interference; among non-independent channels, the closer the channel is to the independent channel, the more serious the interference it will receive.
[0118] The multiple channels of the target network may be considered based on the interference of the channels themselves to determine the interference degree of the multiple channels; the multiple channels of the target network may be considered based on the interference between the channels to determine the interference degree of the multiple channels; the multiple channels of the target network may also be considered based on the interference of the channels themselves and based on the interference between the channels to determine the interference degree of the multiple channels, which is not limited in this embodiment.
[0119] S502: Determine, according to the interference levels of the multiple channels, a target channel whose interference level meets a preset condition.
[0120] The target channel whose interference degree meets the preset conditions refers to a channel with a lower interference degree among multiple channels. Specifically, the interference degrees of multiple channels in the target network can be determined based on the above steps, and then a channel whose interference degree meets the preset conditions is selected as the target channel, for example, a channel with the lowest interference degree is selected as the target channel.
[0121] Exemplarily, multiple channels of the target network may be considered based on the interference of the channels themselves, the interference levels of the multiple channels may be determined, and then the channel with the lowest interference level may be selected as the target channel; multiple channels of the target network may be considered based on the interference between the channels, the interference levels of the multiple channels may be determined, and then the channel with the lowest interference level may be selected as the target channel; multiple channels of the target network may also be considered based on the interference of the channels themselves and the interference between the channels, the interference levels of the multiple channels may be determined, and then the channel with the lowest interference level may be selected as the target channel, and this is not limited in this embodiment.
[0122] S503: Control the target device to access the target channel of the target network.
[0123] After determining the target channel, the terminal may send selection information of the target channel to the target device to control the target device to connect to the target channel of the target network.
[0124] In this embodiment, a channel whose interference level meets preset requirements in the target network is selected as the target channel to control the access of the target device, which can improve the network stability of the target device and further improve the data transmission stability of the target device.
[0125] In an exemplary embodiment of the present specification, the steps of the above embodiment are based on the updated network information to determine the interference degree of multiple channels, specifically including the following steps:
[0126] Based on the refreshed network information, the occurrence frequency of each channel in the target network is determined; according to the occurrence frequency of multiple channels and / or the position influence corresponding to each channel, the interference degree of multiple channels is determined.
[0127] The frequency of occurrence of a channel refers to the frequency of occurrence of a channel used by the target network in the updated network information. The frequency of occurrence of a channel in the target network or the frequency of occurrence of a channel in the target network may be used as the frequency of occurrence of a channel, which is not limited in this embodiment.
[0128] For example, Figure 4 In the illustrated embodiment, if the network named "2022-5G" uses channels including channel 1 and channel 6; the network named "Bright House Networks" uses channels including channel 1 and channel 6; the network named "123456" uses channels including channel 1; the network named "BHN_Office" uses channels including channel 6; the network named "1508" uses channels including channel 1 and channel 6; the network named "MY-WIFI" uses channels including channel 11; the network named "1509" uses channels including channel 1 and channel 6; the network named "1507" uses channels including channel 1 and channel 6; the network named "Out of Service" uses channels including channel 1 and channel 11, the target network is the network named "Out of Service", and the number of occurrences of the channel in the target network is used as the frequency of occurrence of the channel in the target network, then it can be determined:
[0129] The occurrence frequency of channel 1 in the target network is 7, and the occurrence frequency of channel 11 in the target network is 2. Under the premise of only considering the interference caused by the occurrence frequency of the channel, the interference degree of channel 1 is greater than the interference degree of channel 11.
[0130] The position influence of a channel refers to the degree of influence of the channel's position on the channel interference. Independent channels have the least interference and the smallest position influence; while in non-independent channels, the closer the channel is to the independent channel, the greater the position influence and the more serious the interference.
[0131] Exemplarily, channels 1, 6, and 11 in the Wi-Fi signal are three independent channels that do not interfere with each other and have the smallest location impact; channels 2, 5, 7, 10, and 12 adjacent to the independent channels have relatively serious interference and the largest location impact; and other channels, including channels 3, 4, 8, 9, 13, and 14, are far away from the independent channels, have relatively little interference, and have a moderate location impact.
[0132] Based on this, the present application determines the interference degree of multiple channels from the frequency of occurrence of the channels and / or the position influence corresponding to each channel. The more the frequency of occurrence of the channels and the closer the non-independent channels are to the independent channels, the higher the interference degree of the channels; the less the frequency of occurrence of the channels and the farther the non-independent channels are from the independent channels or the channels are independent channels, the lower the interference degree of the channels.
[0133] Exemplarily, the interference degree of the channel can be determined based on the frequency of occurrence of the channel alone, or based on the position influence degree corresponding to each channel alone, or based on both the frequency of occurrence of the channel and the position influence degree corresponding to each channel, which is not limited in this embodiment. In order to more accurately determine the interference degree of each channel, as a preferred embodiment, the interference degree of the channel is determined based on both the frequency of occurrence of the channel and the position influence degree corresponding to each channel.
[0134] In an embodiment of the present application, the interference degree of the channel can be determined based on the frequency of occurrence of the channel and / or the position influence corresponding to each channel, and then the channel with less interference can be determined, thereby improving the network stability of the target device and thus improving the stability of data transmission of the target device.
[0135] In an exemplary embodiment of the present specification, Figure 6 As shown, the target network of the above embodiment includes multiple channels, and the steps of the above embodiment control the target device to adjust the target network based on the refreshed network information, specifically including the following steps:
[0136] S601. Determine occurrence frequency weights corresponding to multiple channels according to occurrence frequencies of multiple channels; and / or determine channel position weights corresponding to each channel according to position influence corresponding to each channel.
[0137] In the embodiments of the present application, the interference degree of multiple channels may be determined according to the occurrence frequency of the channels and / or the position influence corresponding to the channels.
[0138] Exemplarily, the frequency of occurrence weights corresponding to multiple channels can be determined based on the frequency of occurrence of multiple channels. The frequency of occurrence of a channel and the frequency of occurrence weight corresponding to the channel can be a positive correlation, that is, the more frequent the occurrence of a channel, the greater the frequency of occurrence weight corresponding to the channel is set; the frequency of occurrence of a channel and the frequency of occurrence weight corresponding to the channel can also be a negative correlation, that is, the less frequent the occurrence of a channel, the smaller the frequency of occurrence weight corresponding to the channel is set, and this embodiment does not limit this.
[0139] As another example, the corresponding channel position weight can be determined based on the position influence of the channel. The position influence of the channel and the channel position weight corresponding to the channel can be a positive correlation, that is, the greater the set position influence, the greater the channel position weight corresponding to the channel; the position influence of the channel and the channel position weight corresponding to the channel can also be a negative correlation, that is, the smaller the set position influence, the smaller the channel position weight corresponding to the channel, which is not limited in this embodiment.
[0140] It should be noted that the purpose of this embodiment is to determine channels with low frequency of occurrence and low position influence. Therefore, when determining the degree of interference of the channel based on the frequency of occurrence of the channel and the position influence corresponding to the channel, if the frequency of occurrence of the channel and the frequency of occurrence weight corresponding to the channel are set to be positively correlated, then the position influence of the channel and the channel position weight corresponding to the channel should be set to be positively correlated. If the frequency of occurrence of the channel and the frequency of occurrence weight corresponding to the channel are negatively correlated, then the position influence of the channel and the channel position weight corresponding to the channel should be set to be negatively correlated.
[0141] S602: Determine interference levels of multiple channels based on occurrence frequency weights and / or channel position weights.
[0142] Exemplarily, the interference degree of multiple channels can be determined based only on the occurrence frequency weight. If the occurrence frequency of a channel is set to be positively correlated with the occurrence frequency weight corresponding to the channel, the higher the occurrence frequency weight of the channel, the higher the interference degree of the channel; if the occurrence frequency of a channel is set to be negatively correlated with the occurrence frequency weight corresponding to the channel, the higher the occurrence frequency weight of the channel, the lower the interference degree of the channel.
[0143] In another exemplary embodiment, the interference degree of multiple channels can be determined based only on the channel position weight. If the position influence of the channel is set and the channel position weight corresponding to the channel is positively correlated, the higher the channel position weight of the multiple channels, the higher the interference degree of the channel; if the position influence of the channel is set and the channel position weight corresponding to the channel is negatively correlated, the higher the multiple channel position weights, the lower the interference degree of the channel.
[0144] In another exemplary embodiment, the interference degree of multiple channels can be determined based on the channel occurrence frequency weight and the channel position weight. The purpose of this embodiment is to determine channels with low frequency of occurrence and low position influence. Based on this, this embodiment can calculate the product of the occurrence frequency weight and the channel position weight as the interference degree of the channel.
[0145] If the occurrence frequency of a channel is set to be positively correlated with the occurrence frequency weight corresponding to the channel, and the position influence of the channel is also positively correlated with the channel position weight corresponding to the channel, the greater the value of the product of the occurrence frequency weight and the channel position weight, the higher the interference degree of the channel. In this case, the channel corresponding to the minimum value of the product can be selected as the target channel. If the occurrence frequency of a channel is set to be negatively correlated with the occurrence frequency weight corresponding to the channel, and the position influence of the channel is also negatively correlated with the channel position weight corresponding to the channel, the smaller the value of the product of the occurrence frequency weight and the channel position weight, the higher the interference degree of the channel. In this case, the channel corresponding to the maximum value of the product can be selected as the target channel.
[0146] In addition, in addition to calculating the product of the occurrence frequency weight and the channel position weight as the interference degree of the channel, the sum of the occurrence frequency weight and the channel position weight can be calculated as the interference degree of the channel, and the target channel can be selected from the target network based on the occurrence frequency weight and the channel position weight. Furthermore, according to the actual network environment, the influence of the channel occurrence frequency weight and the channel position weight on the channel interference degree can be determined to set a higher weight for the one with a high interference degree of the channel, and then the weighted sum or weighted product of the occurrence frequency weight and the channel position weight is calculated as the interference degree of the channel, and the target channel can be selected from the target network based on the weighted sum or weighted product of the occurrence frequency weight and the channel position weight.
[0147] In the embodiments of the present application, based on the channel occurrence frequency weight and / or the channel position weight, a channel with less interference can be determined to improve the network stability of the target device.
[0148] In an exemplary embodiment of the present specification, the steps of the above embodiment determine the occurrence frequency weights corresponding to the multiple channels according to the occurrence frequencies of the multiple channels, specifically including the following steps:
[0149] According to the negative correlation between the appearance frequency weights of the multiple channels and the appearance frequencies, the appearance frequency weights corresponding to the multiple channels are determined.
[0150] Specifically, the occurrence frequency weights corresponding to the multiple channels can be determined based on the occurrence frequencies of the multiple channels, and the occurrence frequency of the channel and the occurrence frequency weight corresponding to the channel can be set to be in a negative correlation, that is, the less the occurrence frequency of the channel, the greater the occurrence frequency weight corresponding to the channel. If the channel interference degree of the multiple channels is determined only according to the occurrence frequency weights corresponding to the multiple channels, then the less the occurrence frequency of the channel, the greater the occurrence frequency weight corresponding to the channel, and the smaller the corresponding channel interference degree.
[0151] Furthermore, the channels of the target network include independent channels and non-independent channels; the steps of the above embodiment determine the channel position weight corresponding to each channel according to the position influence corresponding to each channel, including:
[0152] The channel position weight of the non-independent channel is determined according to the position influence between the non-independent channel and the adjacent independent channel; the channel position weight of the non-independent channel is negatively correlated with the position influence of the non-independent channel; the channel position weight of the independent channel is greater than the channel position weight of the non-independent channel.
[0153] Specifically, in this embodiment, the channel position weight of the non-independent channel is negatively correlated with the position influence of the non-independent channel, that is, the closer the position of the non-independent channel is to the independent channel, the greater the position influence, and the smaller the channel position weight, while the position influence of the independent channel is the smallest. According to the above negative correlation, the channel position weight of the independent channel interferes with the channel position weight of the non-independent channel. If the channel interference degree of multiple channels is determined only according to the channel position weights corresponding to the multiple channels, then the greater the channel position weight, the smaller the corresponding channel interference degree.
[0154] If the interference degree of multiple channels is determined based on the occurrence frequency weight and the channel position weight, the product of the occurrence frequency weight and the channel position weight can be calculated as the interference degree of the channel. The smaller the value of the product of the occurrence frequency weight and the channel position weight is, the higher the interference degree of the channel is. In this case, the channel corresponding to the maximum value of the product can be selected as the target channel.
[0155] Exemplarily, channel position weights may be assigned to channels in the following manner:
[0156] Channel 1, channel 6, and channel 11 are three independent channels that do not interfere with each other, and the channel position weight is set to 0.9; the non-independent channels adjacent to the independent channels have relatively serious interference, channel 2, channel 5, channel 7, channel 10, and channel 12, and the channel position weight is set to 0.5; for the other channels, channel 3, channel 4, channel 8, channel 9, channel 13, and channel 14, the weight is set to 0.6.
[0157] Channels can be assigned frequency weights as follows:
[0158] If the channel occurrence frequency is 1, the occurrence frequency weight is set to 0.9; if the channel occurrence frequency is 2, the occurrence frequency weight is set to 0.8; if the channel occurrence frequency is 3, the occurrence frequency weight is set to 0.7; if the channel occurrence frequency is 4, the occurrence frequency weight is set to 0.6; if the channel occurrence frequency is 5, the occurrence frequency weight is set to 0.5; if the channel occurrence frequency is 6, the occurrence frequency weight is set to 0.4; if the channel occurrence frequency is 7, the occurrence frequency weight is set to 0.3; if the channel occurrence frequency is 8, the occurrence frequency weight is set to 0.2; if the channel occurrence frequency is 9, the occurrence frequency weight is set to 0.1.
[0159] If the current network information contains channel 1, channel 3, channel 6, channel 7, channel 8, channel 10 and channel 11, if the occurrence frequency of channel 1 is 9, the occurrence frequency of channel 3 is 7, the occurrence frequency of channel 6 is 6, the occurrence frequency of channel 7 is 7, the occurrence frequency of channel 8 is 8, the occurrence frequency of channel 10 is 1 and the occurrence frequency of channel 11 is 5, the interference degree of each channel existing in the current network information as a channel is shown in Table 1.
[0160] Table 1
[0161] Channel Channel Weight Number of channel occurrences Frequency Weight Interference level 1 0.9 9 0.1 0.9*0.1=0.09 3 0.6 7 0.3 0.6*0.3=0.18 6 0.9 6 0.4 0.9*0.4=0.36 7 0.5 7 0.3 0.5*0.3=0.15 8 0.6 8 0.2 0.6*0.2=0.12 10 0.5 1 0.9 0.5*0.9=0.45 11 0.9 5 0.5 0.9*0.5=0.45
[0162] As shown in Table 1, the interference degree of channel 8 is the smallest, and channel 8 can be selected as the target channel to control the target device to access channel 8 in the target network.
[0163] In an embodiment of the present application, based on the channel occurrence frequency weight and / or the channel position weight, a channel with less interference can be determined, thereby improving the network stability of the target device and achieving stability in data transmission.
[0164] Accordingly, the embodiment of this specification also provides a method for a target device to access the network, which is described by taking the method applied to a smart device in an exemplary implementation environment as an example. The method includes:
[0165] In response to the network access operation sent by the terminal, network information within the target range is sent to the terminal to select a target network determined by the terminal according to the network information;
[0166] After the last scan, the network information within the target range is scanned again to obtain and save the updated network information, so as to adjust the target network based on the updated network information.
[0167] For the specific limitations of this method, please refer to the limitations of the control method for the target device above, which will not be repeated here.
[0168] The present application also provides an application scenario, which applies the above-mentioned target device access method. Figure 7 The application process of the target device's network access method in this application scenario is as follows:
[0169] After the target device is powered on, it sends out an identification signal, wherein the identification signal includes an AP hotspot signal and / or a Bluetooth signal, and searches for nearby network information in AP mode. Figure 7 In the embodiment shown, the target device is powered on to turn on the AP mode, sends an AP hotspot signal as an identification signal, and searches for nearby network information in the AP mode. The network information includes information such as the network name, the encryption method of the network, and the channel of the network, and the network information is stored in the flash memory.
[0170] When the user uses the terminal to assist the target device in connecting to the target network, the control terminal scans the AP hotspot signal. The user performs the network access operation for the target device based on the terminal. The terminal responds to the network access operation for the target device and obtains the network information scanned by the target device, so that the user can select the target network based on the network information output by the target device and input the network access information corresponding to the target network. The terminal sends the target network and the network access information of the target network to the target device so that the target device selects the target network.
[0171] Each time the target device sends network information to the terminal, it will scan the surrounding network devices again according to the preset scanning frequency, update the network information, and store the updated network information. The preset scanning frequency includes scanning the surrounding network devices only once after sending the network information to the terminal, or scanning the surrounding network devices according to the preset time interval after sending the network information to the terminal. The time interval can be set by technicians in this field according to actual conditions, and this embodiment does not limit it. Figure 7 In the illustrated embodiment, after the network information is sent to the terminal, the surrounding network devices are scanned only once, the network information is updated, and the updated network information is stored.
[0172] In this embodiment, after the terminal sends the target network and the network access information of the target network to the target device, it obtains the updated network information of the target device and controls the target device to adjust the target network based on the updated network information.
[0173] Among them, based on the refreshed network information, the target device is controlled to adjust the target network, including selecting a channel with a low interference level as the target channel, and controlling the target device to connect to the target channel. Specifically, a channel with a low interference level refers to a channel that appears less frequently and has less interference between channels. In this embodiment, the occurrence frequency weights corresponding to multiple channels are determined according to the negative correlation between the channel occurrence frequency weight and the occurrence frequency; the channel position weight of the non-independent channel is determined according to the negative correlation between the position influence between the non-independent channel and the adjacent independent channel. The product of the above-mentioned occurrence frequency weight and the channel position weight is calculated, and the channel corresponding to the maximum value of the product is determined as the target channel.
[0174] Controlling the target device to adjust the target network based on the refreshed network information also includes changing the target network. Specifically, after the terminal sends the target network and the network access information of the target network to the target device, if the target network needs to be changed, the refreshed network information of the target device can be obtained, and a new network can be selected as the target network, and the target device can be controlled to select the target network. Therefore, in the process of configuring the target device to access the network, the information of the surrounding routers can be obtained without frequently switching the connected WiFi hotspot. The steps are simple and the operation is convenient, which greatly improves the efficiency of the device accessing the network.
[0175] It should be understood that although Figure 3 , Figure 5 and Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3 , Figure 5 and Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0176] Exemplary Devices
[0177] The embodiment of this specification also provides a network access device for a target device, such as Figure 8 As shown, including:
[0178] A control module, configured to obtain network information scanned by the target device in response to a network access operation for the target device, and control the target device to select a target network based on the network information;
[0179] The adjustment module is used to obtain the refreshed network information obtained by the target device after the last scan, and control the target device to adjust the target network based on the refreshed network information.
[0180] Optionally, the adjustment module in the above embodiment includes:
[0181] The selection unit is configured to control the target device to select the re-determined target network in response to an operation of re-selecting the target network in the refreshed network information.
[0182] Optionally, the control module of the above embodiment includes:
[0183] An acquisition unit, configured to acquire network access information of a target network in response to a selection operation on the target network in the network information;
[0184] The first control unit is used to control the target device to select the target network according to the network access information of the target network.
[0185] Optionally, the target network of the above embodiment includes multiple channels;
[0186] The adjustment module of the above embodiment further includes:
[0187] A first determining unit, configured to determine interference levels of multiple channels based on the updated network information;
[0188] A second determining unit, configured to determine, according to the interference levels of the multiple channels, a target channel whose interference level meets a preset condition;
[0189] The second control unit is used to control the target device to access the target channel of the target network.
[0190] Optionally, in the above network access device of the target device, when the first determination unit determines the interference degree of the multiple channels based on the refreshed network information, it is specifically used to:
[0191] Based on the refreshed network information, determine the occurrence frequency of each channel in the target network;
[0192] The interference degree of the multiple channels is determined according to the occurrence frequency of the multiple channels and / or the position influence corresponding to each channel.
[0193] Optionally, in the above network access device of the target device, when the first determination unit determines the interference degree of the multiple channels according to the occurrence frequency of the multiple channels and / or the position influence degree corresponding to each channel, it is specifically used to:
[0194] Determining the occurrence frequency weights corresponding to the multiple channels according to the occurrence frequencies of the multiple channels; and / or determining the channel position weight corresponding to each channel according to the position influence corresponding to each channel;
[0195] The interference levels of the multiple channels are determined based on the occurrence frequency weights and / or the channel position weights.
[0196] Optionally, in the above network access device of the target device, when the first determination unit determines the appearance frequency weights corresponding to the multiple channels according to the appearance frequencies of the multiple channels, it is specifically used to:
[0197] Determine the occurrence frequency weights corresponding to the multiple channels according to the negative correlation between the occurrence frequency weights of the multiple channels and the occurrence frequencies;
[0198] Optionally, the channel of the target network in the above embodiment includes an independent channel and a non-independent channel;
[0199] When the first determining unit determines the channel position weight corresponding to each channel according to the position influence corresponding to each channel, it is specifically used to:
[0200] The channel position weight of the non-independent channel is determined according to the position influence between the non-independent channel and the adjacent independent channel; the channel position weight of the non-independent channel is negatively correlated with the position influence of the non-independent channel; the channel position weight of the independent channel is greater than the channel position weight of the non-independent channel.
[0201] For the specific definition of the network access device of the target device, please refer to the definition of the network access method of the target device above, which will not be repeated here. Each module in the network access device of the above target device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0202] The embodiment of this specification also provides a network access device for a target device, including:
[0203] A sending module, configured to send network information within a target range to the terminal in response to a network access operation sent by the terminal, so as to select a target network determined by the terminal according to the network information;
[0204] The second adjustment module is used to scan the network information within the target range again after the last scan, obtain the updated network information and save it, so as to adjust the target network based on the updated network information.
[0205] For the specific definition of the network access device of the target device, please refer to the definition of the network access method of the target device above, which will not be repeated here. Each module in the network access device of the above target device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0206] Exemplary Systems
[0207] The embodiment of this specification also provides a smart home system, including: smart devices and terminals; wherein,
[0208] The terminal is used to obtain network information scanned by the target device in response to the network access operation for the target device, and control the target device to select the target network based on the network information; obtain the refreshed network information scanned by the target device after the last scan, and control the target device to adjust the target network based on the refreshed network information;
[0209] An intelligent device is used to respond to a network access operation sent by a terminal, send network information within a target range to the terminal, and select a target network determined by the terminal based on the network information; scan the network information within the target range again after the last scan, obtain the refreshed network information and save it, and adjust the target network based on the refreshed network information.
[0210] Exemplary Electronic Devices
[0211] In one embodiment, an electronic device is provided. The electronic device may be a gateway or a cloud server, and its internal structure diagram may be as follows: Fig. 9 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data such as positioning algorithms or navigation algorithms. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a positioning method is implemented.
[0212] Those skilled in the art will understand that Fig. 9The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0213] In one embodiment, an electronic device is provided. The electronic device may be a gateway or a cloud server, and includes a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, each step of the target device network access method shown in each embodiment of the above exemplary method section is implemented.
[0214] Exemplary computer program products and computer-readable storage media
[0215] In one embodiment, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the network access method of the target device in the above-mentioned method embodiments.
[0216] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the device or as a separate software package.
[0217] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, each step of the target device network access method shown in each embodiment of the above exemplary method part is implemented.
[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0219] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0220] The above-mentioned embodiments only express several implementation methods of this specification, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of this specification, which all belong to the protection scope of this specification. Therefore, the protection scope of the patent of this specification shall be based on the attached claims.
Claims
1. A method for a target device to access the network. It is characterized in that include: In response to a network access operation for a target device, acquiring network information scanned by the target device, and controlling the target device to select a target network based on the network information, so as to connect the target device to the target network; Acquire the refreshed network information obtained by automatically scanning again according to the scanning frequency after the target device sent the network information to the terminal last time, and control the target device to automatically adjust the target network based on the refreshed network information; the scanning frequency includes: automatically scanning the surrounding network devices once, or automatically scanning the surrounding network devices according to a preset time interval; the target network includes multiple channels; Wherein, controlling the target device to automatically adjust the target network based on the refreshed network information includes: Based on the updated network information, determine the interference degree of the plurality of channels; according to the interference degree of the plurality of channels, determine the target channel whose interference degree meets the preset conditions; control the target device to automatically access the target channel of the target network; the interference degree of the channel is determined based on the occurrence frequency of the channel and / or the position influence degree corresponding to the channel; The occurrence frequency of the channel is determined based on the number of occurrences or the frequency of occurrence of the channel; and the position influence corresponding to the channel is determined based on whether the channel is an independent channel and the distance between the channel and the independent channel.
2. The method according to claim 1, It is characterized in that The controlling the target device to automatically adjust the target network based on the refreshed network information includes: In response to an operation of reselecting a target network in the refreshed network information, the target device is controlled to select a re-determined target network.
3. The method according to claim 1, It is characterized in that The controlling the target device to select a target network based on the network information includes: In response to a selection operation on a target network in the network information, acquiring network access information of the target network; According to the network access information of the target network, the target device is controlled to select the target network.
4. The method according to claim 1, It is characterized in that The determining, based on the updated network information, interference levels of the plurality of channels comprises: Based on the refreshed network information, determining the occurrence frequency of each of the channels in the target network; The interference degree of the multiple channels is determined according to the occurrence frequency of the multiple channels and / or the position influence corresponding to each channel.
5. The method according to claim 4, It is characterized in that Determining the interference degree of the plurality of channels according to the occurrence frequencies of the plurality of channels and / or the position influence corresponding to each of the channels includes: Determining the frequency of occurrence weights corresponding to the plurality of channels according to the frequency of occurrence of the plurality of channels; and / or determining the channel position weight corresponding to each channel according to the position influence corresponding to each channel; Based on the occurrence frequency weights and / or the channel position weights, interference levels of the plurality of channels are determined.
6. The method according to claim 5, It is characterized in that The determining, according to the occurrence frequencies of the multiple channels, the occurrence frequency weights corresponding to the multiple channels comprises: Determining the occurrence frequency weights corresponding to the plurality of channels according to the negative correlation between the occurrence frequency weights and the occurrence frequencies of the plurality of channels; The channels of the target network include independent channels and non-independent channels; and determining the channel position weight corresponding to each channel according to the position influence corresponding to each channel includes: The channel position weight of the non-independent channel is determined according to the position influence between the non-independent channel and the adjacent independent channel; the channel position weight of the non-independent channel is negatively correlated with the position influence of the non-independent channel; the channel position weight of the independent channel is greater than the channel position weight of the non-independent channel.
7. A method for a target device to access a network. It is characterized in that include: In response to the network access operation sent by the terminal, network information within the target range is sent to the terminal to select a target network determined by the terminal according to the network information, and connect the target device to the target network; After the network information was sent to the terminal last time, the network information within the target range is automatically scanned again according to the scanning frequency, and the refreshed network information is obtained and saved, so as to automatically adjust the target network based on the refreshed network information; the scanning frequency includes: automatically scanning the surrounding network devices once, or automatically scanning the surrounding network devices according to a preset time interval; the target network includes multiple channels; The automatically adjusting the target network based on the refreshed network information includes: Determining interference levels of the plurality of channels based on the updated network information; Determining, according to the interference levels of the plurality of channels, a target channel whose interference level meets a preset condition; Controlling the target device to access a target channel of the target network; the interference degree of the channel is determined based on the frequency of occurrence of the channel and / or the influence of a position corresponding to the channel; The frequency of occurrence of the channel is determined based on the number of occurrences or the frequency of occurrence of the channel; the position influence corresponding to the channel is determined based on whether the channel is an independent channel and the distance between the channel and the independent channel.
8. A network access device for a target device, It is characterized in that include: an acquisition module, configured to, in response to a network access operation for a target device, acquire network information scanned by the target device, and control the target device to select a target network based on the network information, so as to connect the target device to the target network; A first adjustment module is used to obtain the refreshed network information obtained by automatically scanning again according to the scanning frequency after the target device sent the network information to the terminal last time, and control the target device to automatically adjust the target network based on the refreshed network information; the scanning frequency includes: automatically scanning the surrounding network devices once, or automatically scanning the surrounding network devices according to a preset time interval; the target network includes multiple channels; The first adjustment module controls the target device to automatically adjust the target network based on the refreshed network information, specifically for: Determining interference levels of the plurality of channels based on the updated network information; Determining, according to the interference levels of the plurality of channels, a target channel whose interference level meets a preset condition; Controlling the target device to access a target channel of the target network; the interference degree of the channel is determined based on the frequency of occurrence of the channel and / or the influence of a position corresponding to the channel; The frequency of occurrence of the channel is determined based on the number of occurrences or the frequency of occurrence of the channel; the position influence corresponding to the channel is determined based on whether the channel is an independent channel and the distance between the channel and the independent channel.
9. A network access device for a target device, It is characterized in that include: a sending module, configured to send network information within a target range to the terminal in response to a network access operation sent by the terminal, so as to select a target network determined by the terminal according to the network information, and connect the target device to the target network; A second adjustment module is used to automatically scan the network information within the target range again according to the scanning frequency after the network information was sent to the terminal last time, obtain the updated network information and save it, so as to automatically adjust the target network based on the updated network information; the scanning frequency includes: automatically scanning the surrounding network devices once, or automatically scanning the surrounding network devices according to a preset time interval; the target network includes multiple channels; The automatically adjusting the target network based on the refreshed network information includes: Determining interference levels of the plurality of channels based on the updated network information; Determining, according to the interference levels of the plurality of channels, a target channel whose interference level meets a preset condition; Controlling the target device to access a target channel of the target network; the interference degree of the channel is determined based on the frequency of occurrence of the channel and / or the influence of a position corresponding to the channel; The frequency of occurrence of the channel is determined based on the number of occurrences or the frequency of occurrence of the channel; the position influence corresponding to the channel is determined based on whether the channel is an independent channel and the distance between the channel and the independent channel.
10. A smart home system, It is characterized in that include: Smart devices and terminals; among them, The terminal is used to, in response to a network access operation for a target device, obtain network information scanned by the target device, and control the target device to select a target network based on the network information to connect the target device to the target network; obtain refreshed network information automatically scanned again according to a scanning frequency after the target device sent network information to the terminal last time, and control the target device to automatically adjust the target network based on the refreshed network information; The smart device is used to send network information within a target range to the terminal in response to a network access operation sent by the terminal, so as to select a target network determined by the terminal according to the network information, and connect the target device to the target network; automatically scan the network information within the target range again according to the scanning frequency after the network information was sent to the terminal last time, obtain the refreshed network information and save it, so as to automatically adjust the target network based on the refreshed network information; the scanning frequency includes: automatically scanning the surrounding network devices once, or automatically scanning the surrounding network devices according to a preset time interval; Wherein, the target network includes multiple channels; The terminal adjusting the target network based on the refreshed network information is specifically used for: Determining interference levels of the plurality of channels based on the updated network information; Determining, according to the interference levels of the plurality of channels, a target channel whose interference level meets a preset condition; Controlling the target device to access a target channel of the target network; the interference degree of the channel is determined based on the frequency of occurrence of the channel and / or the influence of a position corresponding to the channel; The frequency of occurrence of the channel is determined based on the number of occurrences or the frequency of occurrence of the channel; the position influence corresponding to the channel is determined based on whether the channel is an independent channel and the distance between the channel and the independent channel.
11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
