Network access method, device, electronic device and computer readable storage medium
By monitoring the number of connection requests of ZigBEE devices, setting the busy status of the network access control device and passing it to the second network access device to reduce its network access speed, it solves the problem of low network configuration efficiency when devices under the ZigBEE protocol connect to the network at the same time, and achieves a more efficient implementation. Efficient network bandwidth utilization and network access process.
Patent Information
- Application Number
- CN202010910983.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-02
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-09-02
AI Technical Summary
Under the ZigBEE protocol, as the number of smart home devices increases, too much network bandwidth will be occupied when the devices are connected to the network at the same time. The coordinator caches too many device network access contexts, resulting in difficulty or inability to connect to the network, and low network configuration efficiency.
By obtaining the number of connection requests sent by the first network access device at the current moment, it is determined whether it is greater than a certain value. If it is greater, the working state of the network access control device is set to the busy state, and the busy state is sent to the second network access device to instruct it. Reduce network access speed.
Effectively control the network access speed, improve network configuration efficiency, reduce the ineffective occupation of network bandwidth by network access devices, and improve the efficiency of large-scale network deployment.
Smart Images

Figure CN114205838B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and more specifically, to a network access method, device, electronic device and computer-readable storage medium. Background Art
[0002] As a low-power, self-organizing wireless communication technology, ZigBEE adds network layer and application layer parts to the IEEE802.15.4 communication protocol, and standardizes the application layer, so that ZigBEE products produced by different manufacturers can be easily interconnected according to the standard. At present, the ZigBEE Alliance has more than 300 member companies, which jointly promote the development of ZigBEE wireless technology, making it a technology that is widely used in smart home, energy, business and industry. How to improve the efficiency of network configuration under the ZigBEE protocol is an urgent problem to be solved. Summary of the invention
[0003] In view of this, the present application proposes a network access method, device, electronic device and computer-readable storage medium to improve the above-mentioned defects.
[0004] In a first aspect, an embodiment of the present application provides a network access method, which is applied to a network access control device, and the method includes: obtaining the number of connection requests sent by a first network access device at a current moment;
[0005] Determine whether the number of connection requests is greater than a first value. If so, set the working state to a busy state, send the busy state to the second network access device, and instruct the second network access device to reduce the network access speed through the busy state.
[0006] In a second aspect, an embodiment of the present application provides a network access method, which is applied to a second network access device, and the method includes: receiving a busy status sent by a network access control device, and reducing a network access speed according to the busy status.
[0007] In a third aspect, an embodiment of the present application provides a network access device, the device comprising: an acquisition module, a judgment module, a setting module and a sending module. The acquisition module is used to acquire the number of connection requests sent by the first network access device at the current moment. The judgment module is used to determine whether the number of connection requests is greater than a first value. The setting module is used to set the working state to a busy state if it is greater than the first value. The sending module is used to send the busy state to the second network access device, and instruct the second network access device to reduce the network access speed through the busy state.
[0008] In a fourth aspect, an embodiment of the present invention provides a network access system, which includes: a network access control device and a second network access device; the network access control device is used to obtain the number of connection requests sent by the first network access device at a current moment, and determine whether the number of connection requests is greater than a first value. If it is greater than the first value, the network access control device sets its working state to a busy state, and sends the busy state to the second network access device; the second network access device is used to receive the busy state sent by the network access control device, and reduce the network access speed according to the busy state.
[0009] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; one or more applications; wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the network access method provided in any embodiment of the present application.
[0010] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the network access method provided by any embodiment of the present application.
[0011] Compared with the prior art, the embodiments of the present application propose a network access method, device, electronic device and computer-readable storage medium. The network access method is applied to a network access control device, by obtaining the number of connection requests sent by the first network access device at the current moment, and judging whether the number of connection requests is greater than a first value, when the number of connection requests is greater than the first value, the present application can set the working state of the network access control device to a busy state, and finally send the busy state to the second network access device, and instruct the second network access device to reduce its network access speed through the busy state. The present application effectively controls the network access speed of the second network access device by monitoring the number of connection requests sent by the first network access device, and can improve the network configuration efficiency to a certain extent.
[0012] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 A schematic diagram showing the structure of a network system proposed in this application is shown;
[0015] Figure 2 A flow chart of a network access method proposed in one embodiment of the present application is shown;
[0016] Figure 3 A schematic diagram of network access when the network access control device is a gateway in a network access method proposed in one embodiment of the present application is shown;
[0017] Figure 4 A schematic diagram of network access when the network access control device is a router in a network access method proposed in one embodiment of the present application is shown;
[0018] Figure 5 A flow chart of a network access method proposed in another embodiment of the present application is shown;
[0019] Figure 6 A flowchart showing other steps in a network access method proposed in another embodiment of the present application;
[0020] Figure 7 A flow chart of a network access method proposed in one embodiment of the present application is shown;
[0021] Figure 8 A structural block diagram of a network access device proposed in an embodiment of the present application is shown;
[0022] Fig. 9 Another structural block diagram of a network access device proposed in an embodiment of the present application is shown;
[0023] Fig.10 A structural block diagram of a network access device proposed in an embodiment of the present application is shown;
[0024] Fig.11 A structural block diagram of an electronic device for executing a network access method according to an embodiment of the present application is shown;
[0025] Fig.12 A storage unit proposed in an embodiment of the present application and used to store or carry program codes for implementing a network access method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0028] Smart home devices in the smart home system can be mainly divided into two categories: gateways and sub-devices. The gateways and sub-devices can be networked using wireless communication protocols such as ZIGBEE, Bluetooth, 2.4GHz, infrared, etc. In this embodiment, ZigBEE technology is used as an example for explanation. ZigBEE technology (ZigBEE Technology) is a short-range, low-power wireless communication technology, which is characterized by close distance, low complexity, self-organization, low power consumption, and low data rate. The gateway, as the core device for forming a ZigBEE network, is the basis of the ZigBEE network protocol. At present, the mainstream networking mode is centralized networking, and the sub-devices of ZigBEE form a ZigBEE network by connecting to the gateway. Device management, application settings, etc. are all achieved by sending information from the gateway to control the sub-devices. Since the ZigBEE network belongs to a local area network, in order to expand the application scenario, the gateway currently has an Internet access function.
[0029] Common smart home systems such as Figure 1 In the system 10 shown, the system 10 may include a terminal device 11, a server 12, a gateway 13, a network access device 14 and a router 15. The terminal device 11 may be any device with communication and storage functions, such as a smart phone, a PC (personal computer), a tablet computer, a laptop, a mobile Internet device (MID) or other intelligent communication devices with network connection functions. The server 12 may be a network access server, a database server, a cloud server, etc. Optionally, the gateway 13 may be built based on the ZigBEE protocol, and the gateway 13 may have an Internet access interface, such as wireless wired Ethernet, optical fiber, Wi-Fi, GSM or 3G / 4G / 5G, etc.; the gateway 13 may also have a local control network access interface, such as ZIGBEE, Bluetooth, 2.4GHz, infrared, etc., wherein the gateway 13 may also be called a coordinator. The network access device 14 may be a device that is subsequently connected to the gateway 13 through user operation, that is, the network access device 14 is mainly realized through the gateway 13, that is, the gateway 13 may be called a network access control device.
[0030] In this application, the network access device 14 may include two categories, namely, data collector and controlled device, and the data collector may include an image acquisition device, an audio acquisition device or other smart home devices. The image acquisition device may be an infrared camera, a color camera, etc.; the audio acquisition device may be a sound acquisition device or a recording device, etc.; other smart home devices may include an electric meter, a door magnetic sensor, a human body sensor, a door and window sensor, a temperature and humidity sensor, a light sensor, an infrared sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a smart socket, a wireless switch, a wireless wall sticker switch, a magic cube controller, a curtain motor, a multi-function gateway, an air conditioner companion, etc. The controlled device may be a smart home device, such as a TV, an air conditioner, a refrigerator, etc. In certain cases, other smart home devices may also be used as controlled devices, and what the network access device 14 specifically includes is not explicitly limited here.
[0031] Optionally, a client capable of managing smart home devices is installed in the terminal device 11 , and the client may be an application client (such as a mobile phone APP) or a web client, which is not limited here.
[0032] Optionally, one or more network access devices 14 can establish a network connection with the gateway 13 based on the ZigBEE protocol, thereby joining the ZigBEE network. The gateway 13 and the terminal device 11 can both be connected to the router 15 and access the Ethernet through the router 15. The router 15 accesses the server 12 through 2G / 3G / 4G / 5G, Wi-Fi, etc. For example, the gateway 13 and the terminal device 11 can store the acquired information in the server 12. Optionally, the terminal device 11 can also establish a network connection with the server 12 through 2G / 3G / 4G / 5G, Wi-Fi, etc., so as to obtain the data sent by the server 12.
[0033] With the diversification of application scenarios, there are more demands for the efficiency of device network building. When a single or several devices access the ZigBEE protocol at the same time, the standard access process can meet the access requirements. However, when a large number of ZigBEE devices access the network at the same time, the device's access-related data packets (such as scan requests / responses) will excessively occupy the network bandwidth, and the coordinator caches too many device access contexts, resulting in difficulty in device access or inability to connect to the network, which ultimately leads to inefficient network configuration when large-scale network deployment occurs.
[0034] In order to facilitate the detailed description of the present application, the system of the present application will be first introduced below with reference to the accompanying drawings.
[0035] In order to overcome the above defects, Figure 2, an embodiment of the present application provides a network access method, which is applied to a network access control device, and the method may include steps S110 to S140.
[0036] Step S110: Obtain the number of connection requests currently sent by the first network access device.
[0037] In the embodiment of the present application, the network access control device may be a gateway (coordinator) or a router, and the first network access device may be a device that has sent a connection request, which may be a smart home device or a terminal device, etc. As a method, the network access control device may receive connection requests sent by multiple first network access devices, and the embodiment of the present application may count the number of these connection requests and use the number of connection requests as the number of connection requests.
[0038] As another way, the number of connection requests sent at the current moment may be the number of connection requests sent by the network access control device at the current moment. For example, the current moment is 13:00 on August 1, 2020, and the network access control device receives 6 connection requests at the same time at this time point, and the number of connection requests at this time is 6. In addition, the number of connection requests sent at the current moment may also be the number of connection requests sent in the time period before the current moment. For example, the current moment is 13:00 on August 1, 2020, and the network access control device receives 10 connection requests within 5 minutes before 13:00. The number of connection requests at this time is the number of connection requests, and the number of connection requests at this time also includes the connection requests received at 13:00. In addition, the first network access device is in a waiting state after sending a connection request, that is, although the first network access device sends a connection request, it has not yet successfully accessed the network. It should be noted that in the embodiment of the present application, the current moment may also refer to a unit time, that is, the number of connection requests sent by the first network access device in a unit time is obtained.
[0039] Step S120: Determine whether the number of connection requests is greater than a first value.
[0040] In some implementations, after the network access control device obtains the number of connection requests currently sent by the first network access device, it can determine whether the number of connection requests is greater than a first value. If the number of connection requests currently sent by the first network access device is greater than the first value, the working state of the network access control device is controlled to be in a busy state, that is, the process proceeds to step S130. If the number of connection requests currently sent by the first network access device is less than the first value, the number of connection requests is re-acquired and it is determined whether it is greater than the first value, that is, the process proceeds to step S110.
[0041] In the embodiment of the present application, the first value can be preset according to an empirical value, or it can be dynamically set. Specifically, the present application can first obtain the current network status of the network access control device, and determine whether the network status of the network access control device at the current moment is the optimal status. If the network status of the network access control device at the current moment is the optimal status, the first value is set to the first preset threshold, and the first preset threshold corresponds to the optimal status. If the network status of the network access control device at the current moment is not the optimal status, it is determined whether the network status of the network access control device at the current moment is a good status. If the network status of the network access control device at the current moment is a good status, the first value is set to the second preset threshold, and the second preset threshold corresponds to the good status. If the network status of the network access control device at the current moment is not a good status, the first value is set to the third preset threshold. As a way, the first preset threshold is less than the second preset threshold, and the second preset threshold is less than the third preset threshold. By setting in this way, not only the network configuration efficiency can be improved, but also the network bandwidth can be fully utilized to avoid unnecessary waste of network resources.
[0042] Step S130: Set the working state to a busy state.
[0043] As a method, when the network access control device determines that the number of connection requests is greater than the first value, the present application can set the working state of the network access control device to a busy state, that is, switch the working state of the network access control device to a busy state. In the embodiment of the present application, the working state of the network access control device may include an idle state and a busy state, which is mainly used to characterize the working state of the network access control device at the current moment. When the working state of the network access control device is a busy state, it indicates that the network bandwidth of the network access control device is occupied more; when the working state of the network access control device is an idle state, it indicates that the network bandwidth of the network access control device is occupied less.
[0044] As another way, when it is determined that the number of connection requests is greater than the first value, the present application can first obtain the working state of the network access control device, and determine whether the working state of the network access control device is an idle state. If it is determined that the working state of the network access control device is an idle state, the present application can switch the working state of the network access control device from an idle state to a busy state. In addition, when it is determined that the number of connection requests is greater than the first value, and the working state of the network access control device is a busy state, the present application can keep the working state of the network access control device unchanged. It should be noted that the working state of the network access control device in the embodiment of the present application is only used as a reference for the second network access device. Controlling the working state of the network access control device to change is only a change in the working identifier, and the actual working condition of the network access control device does not change. In other words, whether the working state of the network access control device is switched from a busy state to an idle state, or the working state of the network access control device is switched from an idle state to a busy state, the working condition of the network access control device itself does not change. The main function of controlling the change of its working state is to send different prompt information to the second network access device, thereby controlling the access speed of the second device.
[0045] In an embodiment of the present application, the network access control device can determine the number of network access devices at the same time per unit time based on the number of connection requests sent by the network access devices received by itself. When the number of connection requests received by the network access control device per unit time is greater than a first value, the present application can set the working state of the network access control device to a busy state. Specifically, when the number of connection requests is greater than the first value, the network access control device can consider that there are many network access devices at present, and at this time it can modify the flag bit of the corresponding field in its own scan response. In an embodiment of the present application, the flag bit of the corresponding field in the network access control device scan response (Beacon) can be modified by modifying the flag bit of the Battery Life Extension field, that is, the working state of the control device is changed. In addition, the network access control device can also modify its working state by modifying the unused field in the Battery Life Extension data frame, and the unused field can be a protocol reserved field. At this time, the corresponding flag bit in the scan response frame sent by the network access control device can be a busy state.
[0046] As another way, when it is determined that the number of connection requests received by the network access control device per unit time is greater than the first value, the network access control device may also obtain the number of address information received per unit time, and determine whether the number of address information is greater than the address threshold, and if it is greater than the address threshold, modify the flag bit of the corresponding field in the network access control device scan response, that is, modify the working state of the network access control device to a busy state. The address information may be the address information of the network access device, that is, different network access devices may have different corresponding address information.
[0047] In other implementations, the network access control device may also simultaneously obtain the number of connection requests and the number of address information, and obtain the sum of these two numbers to obtain the target number. Then, it is determined whether the target number is greater than the number threshold. If the target number is greater than the number threshold, the flag bit of the corresponding field in the network access control device scan response is modified. If the target number is less than the number threshold, there is no need to change the flag bit of the corresponding field in the network access control device scan response. Obviously, the flag bit of the corresponding field in the network access control device scan response can be 1 or 0. When the flag bit is 1, it indicates that the network access control device is in a busy state, and when the flag bit is 0, it indicates that the network access control device is in a busy state.
[0048] Step S140: Send the busy status to the second network access device, and instruct the second network access device to reduce the network access speed through the busy status.
[0049] From the above introduction, it can be known that the network access control device can be a gateway (coordinator) or a router, and the first network access device and the second network access device can be collectively referred to as network access devices. The difference between the two is that the first network access device has successfully sent a scan request and a connection request to the network access control device, while the second network access device has only sent a scan request to the network access control device. In order to more clearly understand the process of network access of network access devices, this application provides Figure 3 and Figure 4 . Figure 3 This is an interactive diagram of a networked device joining the network through a gateway (coordinator), that is, Figure 3 The access control device in the network is the gateway. Figure 3It can be seen that when the network access control device is a gateway (coordinator), the network access device must first send a scan request to the gateway (coordinator) to obtain the network information that can be joined near the network access device. After receiving the scan request sent by the network access device, the gateway (coordinator) can obtain the network information that can be joined around the network access device, and send the obtained network information to the network access device in the form of a scan response. After receiving the scan response sent by the gateway (coordinator), the network access device can select an available network from the scan results and send a connection request to the gateway (coordinator), that is, the network access device can send a connection request to the gateway (coordinator) based on the available network it selected. After receiving the connection request sent by the network access device, the gateway (coordinator) can generate a network address and send the generated network address to the network access device in the form of a connection response. At the same time, when the gateway (coordinator) detects that a network-accessing device has joined the network, it will send its network key to the network-accessing device. After receiving the network key sent by the gateway (coordinator), the network-accessing device can encrypt its address information and broadcast the encrypted address information to the entire network, that is, send the address information of the network-accessing device to the gateway (coordinator), and the network access process of the network-accessing device is completed.
[0050] In other embodiments, Figure 4 This is an interactive diagram of a networked device joining the network through a router, that is, Figure 3 The access control device in the network is a router. Figure 3 It can be seen that when the network access control device is a router, the network access device needs to first send a scan request to the router to obtain the network information that can be joined near the network access device. After receiving the scan request sent by the network access device, the router can obtain the network information that can be joined around the network access device, and send the obtained network information to the network access device in the form of a scan response. After receiving the scan response sent by the router, the network access device can select an available network from the scan results and initiate a connection request to it, that is, the network access device can send a connection request to the router based on the available network it selected. After receiving the connection request sent by the network access device, the router can generate a network address and send the generated network address to the network access device in the form of a connection response. At the same time, when the router detects that a network access device has joined the network, it can send the information of the newly added network access device to the gateway (coordinator), and the gateway (coordinator) can encrypt the address information of the network access device, obtain the network key, and send the network key to the router. After the router obtains the network key sent by the gateway (coordinator), it can send it to the network-accessing device. After receiving the network key sent by the router, the network-accessing device can send the address information of the network-accessing device to the router, thus completing the network access process of the network-accessing device.
[0051] As a method, after setting the working state of the network access control device to a busy state, the present application can send the busy state to the second network access device, and the busy state indicates that the second network access device has a lower network access speed. It should be noted that in the embodiment of the present application, the busy state can be sent to the second network access device through a scan response, and the busy state can also be the flag bit information of the corresponding field of the network access control device.
[0052] As a specific example, when the first number of network-accessing devices are powered on for scanning, the second number of first network-accessing devices will be the first to send connection requests, and the remaining third number of network-accessing devices will be the second network-accessing devices. When the network-accessing control device receives the second number of connection requests within a unit time, it will modify the corresponding mark bit of its scan response, and inform the third number of second network-accessing devices in the subsequent scanning process, prompting the second network-accessing devices that the current network-accessing process is busy. For example, when 100 network-accessing devices are powered on for scanning, the first 10 first network-accessing devices will be the first to initiate connection requests, and the remaining 90 network-accessing devices will be the second network-accessing devices. When the gateway receives the connection request of the 10th first network-accessing device within a unit time, it will modify the corresponding mark bit of its scan response and inform the remaining 90 second network-accessing devices in the subsequent scanning process that the current network-accessing process is busy.
[0053] It should be noted that, in the embodiment of the present application, when the network access control device is a gateway, the first value can be set to a first threshold value, and when the network access control device is a router, the first value can be set to a second threshold value, wherein the first threshold value is greater than the second threshold value. The present application can divide network access devices into three types, the first type is a first network access device, which can also be referred to as a device that has started connection, and this type of network access device has sent a connection request but has not yet successfully accessed the network; the second type is a second network access device, which can also be referred to as a new device, and the second network access device is a device that has not yet sent a connection request, that is, the second network access device is a device that is still sending a scan request; the third type is a third network access device, and the third network access device is a device that has successfully accessed the network.
[0054] A network access method proposed in the present application is applied to a network access control device. The method obtains the number of connection requests sent by the first network access device at the current moment, and determines whether the number of connection requests is greater than a first value. When the number of connection requests is greater than the first value, the present application can set the working state of the network access control device to a busy state, and finally send the busy state to the second network access device, and instruct the second network access device to reduce its network access speed through the busy state. The present application effectively controls the network access speed of the second network access device by monitoring the number of connection requests sent by the first network access device, which can not only improve the network configuration efficiency to a certain extent, but also reduce the ineffective occupation of network bandwidth by the network access device.
[0055] See also Figure 5 Another embodiment of the present application proposes a network access method, from Figure 5 It can be seen that the method includes steps S210 to S260.
[0056] Step S210: Obtain the number of connection requests currently sent by the first network access device.
[0057] Step S220: Determine whether the number of connection requests is greater than a first value.
[0058] Step S230: Set the working state to a busy state.
[0059] Step S240: Send the busy status to the second network access device, and instruct the second network access device to reduce the network access speed through the busy status.
[0060] As a method, steps S210 to S240 have been described in detail in the above embodiment and will not be repeated here.
[0061] Step S250: Send a connection response and a network key to the first network access device.
[0062] In the embodiment of the present application, when the network access control device sends the busy status to the second network access device, the network access control device can send a connection response and a network key to the first network access device. After receiving the connection response and the network key sent by the network access control device, the first network access device can encrypt its address information and send it to the network access control device, and broadcast it to the entire network. At this time, the first network access device successfully accesses the network. In addition, when the first network access device sends the encrypted address information to the network access control device, the first network access device becomes the third network access device, that is, the identification of the first network access device is changed to the third network access device.
[0063] In some embodiments, when the network access control device obtains a connection request sent by the first network access device, it can also directly generate a network address based on the connection request, and send the network address and the network key generated by the network address to the first network access device through a connection response. After the first network access device receives the connection response and network key sent by the network access control device, it can encrypt its address information and send it to the entire network, thereby achieving successful network access.
[0064] Step S260: receiving network access success information sent by the first network access device.
[0065] In the embodiment of the present application, the network access control device may receive the success information sent by the first network access device, and when the network access control device receives the success information sent by the first network access device, the number of connection requests may be reduced by 1. In other words, when the network access control device receives the network access success information sent by multiple first network access control devices, it may count the number of successful network accesses for which the network access success information is received, and then subtract the number of successful network accesses to obtain the number of remaining connection requests.
[0066] As a method, the embodiment of the present application may also include: Figure 6 The steps shown, that is, the network access method may also include steps S270 to S300.
[0067] Step S270: Obtain the number of connection requests sent by the first network access device at the next moment.
[0068] From the above introduction, it can be known that after receiving the successful network access information, the network access control device can subtract the number of successful network access devices, and then use the number of connection requests at the current moment to subtract the number of successful network access devices to obtain the number of remaining connection requests. In other words, as long as the network access control device receives a successful network access information, the number of connection requests will be reduced by one, and the number of remaining connection requests will become less and less. Therefore, after receiving the successful network access information sent by the first network access device, the network access control device can obtain the number of connection requests sent by the first network access device at the next moment, and the number of connection requests sent by the first network access device at the next moment is the number of remaining connection requests. Obviously, the number of connection requests sent by the first network access device at the next moment is less than the number of connection requests sent by the first network access device at the current moment. When the network access control device obtains the number of connection requests sent by the first network access device at the next moment, it can determine whether the number of remaining connection requests is less than the second value, that is, enter step S280.
[0069] Step S280: Determine whether the number of connection requests sent by the first network access device at the next moment is less than the second value.
[0070] In an embodiment of the present application, after sending the busy status to the second network access device, the network access control device can detect the number of remaining connection requests in real time, that is, detect the number of connection requests sent by the first network access device at the next moment in real time. When it is determined that the number of remaining connection requests is less than the second value, the present application can switch the working state of the network access control device to the idle state. In a specific embodiment, when it is determined that the number of remaining connection requests is zero, the present application can switch the working state of the network access control device to the idle state, that is, enter step S290.
[0071] Step S290: Set the working state to the idle state.
[0072] As a method, when the number of connection requests sent by the first network access device at the next moment is less than the second value, the network access control device can set its working state to an idle state, that is, the network access control device can update the response field of its own scan response, indicating that the current joining device is relatively idle. The network access control device can notify the second network access device that it is currently in an idle state in the form of a scan response, and the scan response at this time can be called an idle state.
[0073] Step S300: Send the idle state to the second network access device, and instruct the second network access device to increase the network access speed through the idle state.
[0074] In the embodiment of the present application, when the network access control device determines that the number of remaining connection requests is less than the second value, it can set its working state to an idle state and send the idle state to the second network access device, and the idle state can be transmitted to the second network access device in the form of a scan response. At the same time, the network access control device can instruct the second network access device to increase the network access speed through the idle state.
[0075] A network access method proposed in the present application is applied to a network access control device. The method obtains the number of connection requests sent by the first network access device at the current moment, and determines whether the number of connection requests is greater than a first value. When the number of connection requests is greater than the first value, the present application can set the working state of the network access control device to a busy state, and finally send the busy state to the second network access device, and instruct the second network access device to reduce its network access speed through the busy state. The present application effectively controls the network access speed of the second network access device by monitoring the number of connection requests sent by the first network access device. In addition, when the number of remaining network access requests is less than the second value, the embodiment of the present application can switch the state of the network access control device to an idle state, which can not only make full use of the network bandwidth, but also improve the network configuration efficiency.
[0076] like Figure 7 , an embodiment of the present application provides a network access method, which is applied to a second network access device, and the method may include steps S310 to S320.
[0077] Step S310: receiving a busy status sent by a network access control device.
[0078] In the embodiment of the present application, the second network access device may be a network access device that has sent a response request but has not received a scan response, that is, the second network access device is a network access device that has not sent a connection request. When it receives a busy state sent by the network access control device, it can reduce the network access speed according to the busy state. In the embodiment of the present application, the busy state may be a scan response, and the scan response includes the working state of the network access control device, and the working state of the network access control device includes a busy state and an idle state. Obviously, after sending a scan request, the second network access device can detect in real time whether there is a scan response input. If it detects that there is a scan response input, it obtains the working state of the network access control device in the scan response, and determines whether the network access control device is in a busy state according to the working state. If it is determined that the network access control device is in a busy state, the second network access device can reduce the network access speed, that is, enter step S320.
[0079] Step S320: reducing the network access speed according to the busy state.
[0080] As a method, the second network access device can reduce the network access speed after receiving the busy status, that is, when the second network access device determines that the network access control device is in a busy state, it can slow down the network access speed. In some embodiments, when it is determined that the busy status sent by the network access control device is received, the second network access device can stop sending scan requests in a first time period, wherein the time starting point of the first time period is the moment when the busy status is received. For example, the second network access device receives the busy status sent by the network access control device at 13:00, at which time it can stop sending scan requests, and continue to send scan requests to the network access control device 10 seconds after stopping sending scan requests. The first time period can be set according to an empirical value, and can also be set according to the actual situation of the network access control device. The specific setting is not explicitly limited here, and can be selected according to the actual situation.
[0081] In other embodiments, when the second network access device receives the busy status sent by the network access control device, it can increase the interval time for sending the scan request. In a specific example, under normal circumstances, the second network access device sends a scan request to the network access control device once every first time period, and when the second network access device receives the busy status sent by the network access control device, it can increase the interval time for sending the scan request, that is, it can send a scan request to the network access control device once every second time period, and the second time period is greater than the first time period. For example, under normal circumstances, the second network access device sends a scan request to the network access control device once every 1 second, and when the second network access device receives the busy status sent by the network access control device, it can send a scan request to the network access control device once every 2 seconds.
[0082] A network access method proposed in the present application is applied to a second network access device, in which the second network access device can detect in real time whether a busy status sent by a network access control device is received, and if received, the second network access device can reduce its own network access speed according to the prompt information. The second network access device of the present application can reduce its network access speed when receiving a busy status, which can improve the network configuration efficiency to a certain extent.
[0083] See also Figure 8 , a network access device 400 proposed in an embodiment of the present application includes an acquisition module 410, a judgment module 420, a setting module 430 and a sending module 440.
[0084] The acquisition module 410 is used to acquire the number of connection requests sent by the first network access device at the current moment.
[0085] The determination module 420 is configured to determine whether the number of connection requests is greater than a first value.
[0086] The setting module 430 is configured to set the working state to a busy state if the value is greater than the first value.
[0087] The sending module 440 is used to send the busy status to the second network access device, and instruct the second network access device to reduce the network access speed through the busy status.
[0088] As a way, Fig. 9 The network access device 400 shown may further include a connection sending module 450 and an information receiving module 460 .
[0089] The connection sending module 450 is used to send a connection response and a network key to the first network access device.
[0090] The information receiving module 460 is used to receive the network access success information sent by the first network access device.
[0091] As a method, the network access device 400 can also be used to obtain the number of connection requests sent by the first network access device at the next moment, and determine whether the number of connection requests sent by the first network access device at the next moment is less than a second value, and the second value is less than the first value. If the number of connection requests sent by the first network access device at the next moment is less than the second value, the working state is set to an idle state, the idle state is sent to the second network access device, and the second network access device is instructed to increase the network access speed through the idle state.
[0092] Furthermore, in the embodiment of the present application, the network access control device may be a gateway or a router.
[0093] See also Fig.10, an embodiment of the present application proposes a network access device 500, which includes a receiving module 510 and a speed adjustment module 520.
[0094] The receiving module 510 is used to receive the busy status sent by the network access control device.
[0095] The speed adjustment module 520 is used to reduce the network access speed according to the busy state.
[0096] Furthermore, the speed adjustment module 520 is further configured to stop sending scanning requests within a first time period when it is determined that a busy status sent by the network access control device is received, and the time starting point of the first time period is the moment when the busy status is received.
[0097] Furthermore, the speed adjustment module 520 is also used to increase the interval time for sending the scan request.
[0098] The present application proposes a network access method, device and system. The method obtains the number of connection requests sent by the first network access device at the current moment and determines whether the number of connection requests is greater than a first value. When the number of connection requests is greater than the first value, the present application can set the working state of the network access control device to a busy state, and finally send the busy state to the second network access device, and instruct the second network access device to reduce its network access speed through the busy state. The present application effectively controls the network access speed of the second network access device by monitoring the number of connection requests sent by the first network access device, and can improve the network configuration efficiency to a certain extent.
[0099] An embodiment of the present invention provides a network access system, which may include a network access control device and a second network access device, wherein the network access control device is used to obtain the number of connection requests sent by the first network access device at the current moment, and determine whether the number of connection requests is greater than a first value, if it is greater than the first value, the network access control device sets its working state to a busy state, and sends the busy state to the second network access device. The second network access device is used to receive the busy state sent by the network access control device, and reduce the network access speed according to the busy state.
[0100] Fig.11 FIG. 1 is a hardware structure block diagram of an electronic device of a network access method provided by an embodiment of the present invention. Fig.11As shown, the electronic device 1100 may have relatively large differences due to different configurations or performances, and may include one or more processors (Processing Units, CPU) 1110 (the processor 1110 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (such as one or more mass storage devices) for storing application programs 1123 or data 1122. Among them, the memory 1130 and the storage medium 1120 can be short-term storage or persistent storage. The program stored in the storage medium 1120 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the processor 1110 can be configured to communicate with the storage medium 1120 and execute a series of instruction operations in the storage medium 1120 on the electronic device 1100. The electronic device 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1140, and / or one or more operating systems 1121, such as WindowsserverTM, MacOSXTM, UnixTM, LinuxTM, FrEEBSDTM, etc.
[0101] The input / output interface 1140 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the electronic device 1100. In one example, the input / output interface 1140 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1140 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0102] It can be understood by those skilled in the art that Fig.11 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.11 More or fewer components as shown, or with Fig.11 Different configurations are shown.
[0103] Please refer to Fig.12 , a storage unit for storing or carrying a program code for implementing a network access method according to an embodiment of the present application. The computer-readable storage medium 600 stores a program code, which can be called by a processor to execute the method described in the above method embodiment.
[0104] The computer readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 that performs any method step of the above method. These program codes can be read from or written to one or more computer program products. The program code 610 can be compressed, for example, in an appropriate form.
[0105] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0106] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0107] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0108] The above is only a preferred embodiment of the present application and does not constitute any form of limitation to the present application. Although the present application has been disclosed as a preferred embodiment as above, it is not intended to limit the present application. Any technician familiar with the profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of the technical solution of the present application.
Claims
1. A network access method, characterized in that: Applied to a network access control device, the method comprises: Obtain the number of connection requests sent by the first network access device at the current moment; Determine whether the number of connection requests is greater than a first value; wherein, if the network status of the network access control device at the current moment is the optimal status, the first value is set to a first preset threshold; if the network status of the network access control device at the current moment is a good status, the first value is set to a second preset threshold; if the network status of the network access control device at the current moment is not a good status and is not the optimal status, the first value is set to a third preset threshold; the first preset threshold is less than the second preset threshold, and the second preset threshold is less than the third preset threshold; If it is greater than the first value, the working state is set to busy state; The busy status is sent to each second network access device waiting for network access, and the busy status is used to instruct each second network access device to reduce the network access speed.
2. The method according to claim 1, characterized in that After sending the busy status to the second network access device and instructing the second network access device to reduce the network access speed through the busy status, the method includes: Sending a connection response and a network key to the first network access device; Receive network access success information sent by the first network access device.
3. The method according to claim 2, characterized in that After receiving the network access success information sent by the first network access device, the method further comprises: Obtaining the number of connection requests sent by the first network access device at the next moment, and determining whether the number of connection requests sent by the first network access device at the next moment is less than a second value, and the second value is less than the first value; If the number of connection requests sent by the first network access device at the next moment is less than the second value, setting the working state to an idle state; The idle state is sent to the second network access device, and the second network access device is instructed to increase the network access speed through the idle state.
4. The method according to any one of claims 1 to 3, characterized in that: The network access control device is a gateway or a router.
5. A network access method, characterized in that: Applied to a second network access device waiting for network access, the method comprises: Receive a busy status sent by a network access control device, wherein the busy status is determined based on whether the number of connection requests sent by the first network access device at the current moment is greater than a first value, wherein if the network status of the network access control device at the current moment is the optimal status, the first value is the first preset threshold; if the network status of the network access control device at the current moment is the good status, the first value is the second preset threshold; if the network status of the network access control device at the current moment is not the good status and is not the optimal status, the first value is the third preset threshold; the first preset threshold is less than the second preset threshold, and the second preset threshold is less than the third preset threshold; The network access speed is reduced according to the busy status.
6. The method according to claim 5, characterized in that The reducing the network access speed according to the busy state comprises: When it is determined that the busy status sent by the network access control device is received, the scanning request is stopped within a first time period, and the time starting point of the first time period is the moment when the busy status is received.
7. The method according to claim 5, characterized in that The reducing the network access speed according to the busy state comprises: Increase the time interval between scan requests.
8. A network access device, characterized in that: The device comprises: An acquisition module, used to acquire the number of connection requests sent by the first network access device at the current moment; A judgment module, used to judge whether the number of connection requests is greater than a first value; wherein, if the network status of the network access control device at the current moment is the optimal status, the first value is set to a first preset threshold; if the network status of the network access control device at the current moment is a good status, the first value is set to a second preset threshold; if the network status of the network access control device at the current moment is not a good status and is not the optimal status, the first value is set to a third preset threshold; the first preset threshold is less than the second preset threshold, and the second preset threshold is less than the third preset threshold; A setting module, configured to set the working state to a busy state if the value is greater than the first value; The sending module is used to send the busy status to each second network access device waiting for network access, and instruct each second network access device to reduce the network access speed through the busy status.
9. A network access system, characterized in that: The network access system includes a network access control device and a second network access device; The network access control device is used to obtain the number of connection requests sent by the first network access device at the current moment, and determine whether the number of connection requests is greater than a first value; wherein, if the network status of the network access control device at the current moment is the optimal status, the first value is set to the first preset threshold; if the network status of the network access control device at the current moment is the good status, the first value is set to the second preset threshold; if the network status of the network access control device at the current moment is not the good status and is not the optimal status, the first value is set to the third preset threshold; the first preset threshold is less than the second preset threshold, and the second preset threshold is less than the third preset threshold, if it is greater than the first value, the network access control device sets its working state to a busy state, and sends the busy state to each of the second network access devices waiting for network access; The second network access device is used to receive the busy status sent by the network access control device and reduce the network access speed according to the busy status.
10. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by the processor.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
