CN109714785B - Network access method, device, network equipment and storage medium - Google Patents

Network access method, device, network equipment and storage medium Download PDF

Info

Publication number
CN109714785B
CN109714785B CN201910142857.XA CN201910142857A CN109714785B CN 109714785 B CN109714785 B CN 109714785B CN 201910142857 A CN201910142857 A CN 201910142857A CN 109714785 B CN109714785 B CN 109714785B
Authority
CN
China
Prior art keywords
network
power
network access
network equipment
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910142857.XA
Other languages
Chinese (zh)
Other versions
CN109714785A (en
Inventor
张俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910142857.XA priority Critical patent/CN109714785B/en
Publication of CN109714785A publication Critical patent/CN109714785A/en
Application granted granted Critical
Publication of CN109714785B publication Critical patent/CN109714785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present application relates to the field of network communication technologies, and in particular, to a network access method, apparatus, network device, and storage medium, which are convenient for implementing network access of network devices in batches, and are time-saving and labor-saving. The network access method comprises the steps that after the network equipment is powered on, whether the power-off times of the network equipment in the latest preset time length reach the preset times or not is judged according to the recorded power-off times of the network equipment after the network equipment is powered on; and if the preset times are reached, starting the network access function of the network equipment.

Description

Network access method, device, network equipment and storage medium
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a network access method, an apparatus, a network device, and a storage medium.
Background
Along with the development of the internet of things technology, more and more intelligent devices are produced by the self, such as an intelligent air conditioner, an intelligent lamp, an intelligent refrigerator and the like. Currently, the networking of the smart devices is mainly performed by accessing a Wireless local area network based on a Wireless Fidelity (WiFi) protocol. For an intelligent device, an Access Point (AP) is often required to Access a wireless local area network.
The scheme for accessing the intelligent device to the network provided in the related technology mainly comprises the following steps: firstly, a key with a pairing function can be added to the AP, and when a user needs to access the intelligent device to the AP, the user needs to press the key to start a pairing mode of the AP, so that the intelligent device is accessed to the AP. Secondly, the intelligent equipment is accessed to the intelligent terminal by utilizing the code scanning function of the intelligent terminal (a mobile phone, a panel, a television box, a computer and the like). Specifically, the intelligent terminal is used for scanning the two-dimensional code on the intelligent device, obtaining a Media Access Control Address (MAC) carried in the two-dimensional code, and writing the MAC into a white list of the AP, so that once the AP monitors the intelligent device in the white list, the intelligent device can be allowed to Access the network.
However, in any of the above schemes for accessing the network, it is necessary to manually operate each of the smart devices and the APs, which is time-consuming and labor-consuming.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a network access method, an apparatus, a network device, and a storage medium, which can implement network access of network devices in batches, and save time and labor.
Mainly comprises the following aspects:
in a first aspect, a network access method is provided, where the method includes:
after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach the preset times or not according to the recorded power-off times of the network equipment after the network equipment is powered on;
and if the preset times are reached, starting the network access function of the network equipment.
In a second aspect, a network access apparatus is provided, the apparatus comprising:
the judging module is used for judging whether the power-off times of the network equipment in the latest preset time length reach the preset times or not according to the recorded power-off times of the network equipment after power-on after the network equipment is powered on;
and the access module is used for starting the network access function of the network equipment if the preset times are reached.
In a third aspect, a network device is provided, which includes a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the network device is running, the machine-readable instructions when executed by the processor performing the following processes:
after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach the preset times or not according to the recorded power-off times of the network equipment after the network equipment is powered on;
and if the preset times are reached, starting the network access function of the network equipment.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, performs the steps of the network access method according to the first aspect.
By adopting the scheme, after the network equipment is powered on, whether the power-off times of the network equipment within the recent preset time reach the preset times or not can be judged according to the recorded power-off times of the network equipment after the network equipment is powered on, and the network access function of the network equipment is started when the preset times are judged, namely, in the embodiment of the application, the network equipment can realize that the time node for starting the network access function is that the power-off times recorded by the network equipment reach the preset times, so that the network equipment conforming to the time node can be accessed into the same network, thereby facilitating the network access of the network equipment in batches, and saving time and labor.
In this embodiment, the network device may be an AP or an intelligent device. In specific application, the judgment of the frequency consistency can be carried out only on the AP, the judgment of the frequency consistency can be carried out only on the intelligent equipment, and the judgment of the frequency consistency can be carried out on both the AP and the intelligent equipment. When determining that the power-off times of the AP and the intelligent device meet the preset times (namely, the AP and the intelligent device execute the power-off operation and have synchronism), the network access functions of the AP and the intelligent device can be synchronously started, the intelligent device can be automatically accessed into the AP, the network access of batch network devices is facilitated, and time and labor are saved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a network access method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating another network access method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a network access device according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of a network device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In consideration of the fact that in the related art, no matter the scheme for realizing the network access based on the key mode or the scheme for realizing the network access based on the code scanning mode, each intelligent device needs to be manually operated, which wastes time and labor. Based on this, the embodiment of the application provides a network access method to realize the network access of intelligent devices in batches, and time and labor are saved.
Fig. 1 is a flowchart of a network access method according to an embodiment of the present application. The execution subject of the network Access method may be an Access Point (AP) or an intelligent device. The network access method is specifically realized by the following steps:
s101, after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach preset times according to the recorded power-off times of the network equipment after the network equipment is powered on.
Here, it is considered that, in the related art, regardless of whether the scheme for implementing the network access based on the key mode or the scheme for implementing the network access based on the code scanning mode, each network device (i.e., AP or smart device) needs to be manually operated, and the former needs to not only manually operate each network device, but also set a key or other modes (such as voice) to control the network device to trigger the network access. It can be seen that the above two related network access schemes are inconvenient for implementing network access of batch network devices. Just in order to solve the above problems, the network access method provided in the embodiment of the present application seeks a method for controlling, based on a short-time power-on manner, that all network devices currently meeting the power-off times can start a network access function, which is convenient for network access of network devices in batches, and further, all intelligent devices that execute power-off and meet the power-off times can access APs that execute power-off synchronously and meet the power-off times, that is, the batch intelligent devices are convenient to access the APs, which is time-saving and labor-saving, reduces the learning cost of users, and improves the use experience of users.
It should be noted that, in the embodiment of the present application, when the AP is used as an execution subject of the network access method, the network device may be the AP, and when the intelligent device is used as an execution subject of the network access method, the network device may be the intelligent device. In addition, the network access method provided by the embodiment of the application can be applied to various application scenes, so that different intelligent devices can be corresponding to different application scenes, for example, for an intelligent home, the intelligent devices can be an intelligent refrigerator, an intelligent television and the like.
In the embodiment of the present application, the power-off times may be recorded based on a nonvolatile storage medium, that is, when the network device is an AP, the power-off times of the AP may be recorded by the nonvolatile storage medium of the AP, and when the network device is an intelligent device, the power-off times of the intelligent device may be recorded by the nonvolatile storage medium of the intelligent device.
The non-volatile storage medium may be implemented using non-volatile storage technology that ensures that data is not lost when the computer is turned off, or when the computer is turned off suddenly or unexpectedly. The embodiment of the application just utilizes the characteristics of the nonvolatile storage medium to realize the recording of the power-off times.
The nonvolatile storage medium may be a flash memory (flash memory), a nonvolatile memory (NVDIMM), a memristor (RRAM), or other storage media with power-off self-protection. Considering that the flash not only has the performance of Electrically Erasable and Programmable (EEPROM), but also can quickly read data without losing data when power is off, in this embodiment of the present application, the flash can be used as a nonvolatile storage medium.
It should be noted that, in the embodiment of the present application, the number of times of power failure may be recorded based on a non-volatile storage medium, and may also be implemented based on other ways, which is not specifically limited herein.
In the embodiment of the application, before the network access function of the network device is started, whether the power-off frequency of the network device within the latest preset time reaches the preset frequency or not may be determined.
When the network device is an AP, in order to determine whether the power-off frequency of the AP reaches the preset frequency, the embodiment of the application may determine, according to a determination condition that the power-off frequency read from the nonvolatile storage medium fixed address of the AP reaches the preset frequency when the AP is powered off and powered on again.
Similarly, when the network device is an intelligent device, in order to determine whether the power-off frequency of the intelligent device reaches the preset frequency, the power-off frequency may be determined according to the specific implementation method for determining whether the power-off frequency of the AP reaches the preset frequency, and details are not described here.
It should be noted that the preset number may be one or multiple times, and relatively speaking, the larger the preset number is set, the lower the possibility of generating interconnection between two networks in a parallel architecture is, where the two networks may be any networks that are not expected to generate interconnection. For example, for a user a and a user B, the user a corresponds to one AP and three smart devices, and the user B corresponds to one AP and two smart devices, and in consideration of the radio penetration, it needs to be considered how to ensure that the three smart devices corresponding to the user a cannot be easily added to the AP of the user B. Based on the above discussion, the preset times in the embodiment of the present application may be multiple times, so as to meet the requirements of complex application scenarios.
And S102, if the preset times are reached, starting a network access function of the network equipment.
Here, the judgment of the consistency of the times may be performed only on the AP so as to perform the operation of turning on the AP access function when the consistency is determined, the judgment of the consistency of the times may be performed only on the smart device so as to perform the operation of turning on the network access function of the smart device when the consistency is determined, and the judgment of the consistency of the times may be performed on both the AP and the smart device so as to perform the operation of turning on the network access function of the AP and the smart device synchronously when the consistency is determined. Next, the above three cases will be described.
On the first hand, when the power-off times of the AP are determined to accord with the preset times, the network access function of the AP can be started, and at the moment, the intelligent devices set to be in the automatic networking mode can be added into the AP, so that the network access of batch intelligent devices is realized.
In the second aspect, when the power-off times of the intelligent equipment are determined to accord with the preset times, the network access function of the intelligent equipment can be started, and at the moment, the APs set to be in the automatic networking mode can be accessed by the intelligent equipment, so that the network access of the intelligent equipment in batches is realized.
In a third aspect, when determining that the power-off times of the AP and the smart device both meet the preset times (that is, the AP and the smart device perform power-off operations synchronously), that is, when determining that the power-off times of the AP within the latest preset time period reach the preset times, the network access function of the AP may be turned on, and at this time, for the smart device whose power-off times within the latest preset time period reach the preset times, the network access function of the smart device is turned on along with the turning on of the network access function of the AP. Therefore, for all intelligent devices meeting the condition that the power-off frequency within the latest preset duration reaches the preset frequency, a network access request can be sent to the synchronous AP, and the AP is accessed based on the Service Set Identifier (SSID) information returned by the AP and the corresponding password information. Therefore, in specific application, the AP and the smart device can synchronously execute the power-off operation according to the embodiment of the application.
The network access method provided by the embodiment of the present application may implement the judgment of the time consistency based on the comparison result between the power-off times stored in the volatile storage medium in the network device and the preset times, as shown in fig. 2, which is a flowchart of a judgment method provided by the embodiment of the present application.
When the network device is in a power-on state, executing S201, namely reading the power-off times stored in a nonvolatile storage medium of the network device;
s202, judging whether the read power-off times reach preset times or not;
if not, executing S203; and after the network device is powered off and powered on again, returning to the step S201; if yes, go to S204.
S203, after the read power-off times are added by 1, writing the processed power-off times into the nonvolatile storage medium;
s204, the network access function of the network equipment is started.
Here, when the network device is an AP, the power-off number stored in the nonvolatile storage medium of the AP may be read first, then it is determined whether the read power-off number reaches a preset number, and when it is determined that the read power-off number does not reach the preset number, the read power-off number is incremented by 1, and then the processed power-off number is written into the nonvolatile storage medium, and after the AP is powered off and powered on again, the power-off number currently stored in the nonvolatile storage medium of the AP is read, and it is determined whether the read power-off number reaches the preset number, and similarly, when it is determined that the read power-off number does not reach the preset number, the value is incremented by 1 until the network join function of the AP is started when the read power-off number reaches the preset number. The power-off times stored in the nonvolatile storage medium can be cleared once per preset time length so as to further ensure the synchronous operation of the AP and the intelligent device on the premise of ensuring the counting accuracy.
Similarly, when the network device is an intelligent device, the network access function of the network device can be started according to the method, which is not described herein again.
When concrete application, in order to facilitate control AP and smart machine to cut off the power supply and go up the electricity in step, can connect AP and smart machine on a plug wire row, like this, can go up the electricity and finally go up the automation networking that realizes intelligent machine in batches through control plug wire row many times short-term electricity, avoided relevant button networking mode and sweep the problem that the code networking mode brought wastes time and energy, made things convenient for user's use, the practicality is better.
In order to further understand the method for synchronously accessing the AP and the smart device to the network provided in the embodiments of the present application, a specific example is described below.
Taking the intelligent networking of the whole house of the hardbound property as an example, under the condition that the normal power-on of the AP and the intelligent device of the whole house is ensured, if the preset number of times is 2, the AP can execute the following operations during the specific application:
1. the 1 st time of starting the total switch of the whole house, that is, the AP is in the power-on state, at this time, the power-off times stored in the nonvolatile storage medium of the AP may be read, and it is assumed that the power-off times stored therein is 0 (may correspond to power-on initialization), so that it may be determined that the read power-off times do not reach 2. In this case, before the 1 st power-off of the AP, the read power-off count may be added by 1, and then the processed power-off count, that is, 1 may be written in the nonvolatile storage medium. Wherein, the 1 st power-off may be completed within a time period of t0 (e.g. 1 second).
2. And 2, starting the whole house master switch, namely, after the 1 st power-off and 2 nd power-on of the AP, reading the power-off times stored in the nonvolatile storage medium of the AP again, wherein the read power-off times is 1, and the value still does not reach 2. At this time, before the 2 nd power-off of the AP, the number of power-off times that can be read is added by 1, and then the processed number of power-off times, that is, 2 is written into the nonvolatile storage medium. The 2 nd power-off may be completed within a time period from t0 to t1 (e.g., 5 seconds at t 1).
3. And starting the whole house master switch for the 3 rd time, namely, after the AP is powered off for the 2 nd time and powered on for the 3 rd time, reading the power-off times stored in the nonvolatile storage medium of the AP again, wherein the read power-off times are 2, the value reaches 2, and at this time, the network access function of the AP can be started.
Considering that the relevant operation of the smart device before accessing the AP is synchronized with the AP, that is, the following operation may be performed on the smart device in a specific application:
1. the 1 st time of starting the total switch of the whole house, that is, the intelligent device is in a power-on state, at this time, the power-off times stored in the nonvolatile storage medium of the intelligent device may be read, and it is assumed that the power-off times stored here is 0 (may correspond to power-on initialization), so that it may be determined that the read power-off times do not reach 2. At this time, before the smart device powers off for the 1 st time, after the read power-off number is added by 1, the processed power-off number, that is, 1, may be written into the nonvolatile storage medium. Wherein, the 1 st power-off may be completed within a time period of t0 (e.g. 1 second).
2. And 2, starting the whole house master switch, namely, after the intelligent device is powered off for the 1 st time and powered on for the 2 nd time, reading the power-off times stored in the nonvolatile storage medium of the intelligent device again, wherein the read power-off times are 1, and the value still does not reach 2. At this time, before the 2 nd power-off of the smart device, after the readable power-off times are added by 1, the processed power-off times, that is, 2, are written into the nonvolatile storage medium. The 2 nd power-off may be completed within a time period from t0 to t1 (e.g., 5 seconds at t 1).
3. And (3) starting the whole house master switch, namely, after the intelligent device is powered off for the 2 nd time and powered on for the 3 rd time, reading the power-off times stored in the nonvolatile storage medium of the intelligent device again, wherein the read power-off times are 2, the value reaches 2, and at the moment, the network access function of the intelligent device can be started.
In this way, after the 3 rd master switch is turned on, the AP starts to enable the networking request after waiting for t2 (e.g., t2 ═ 2 minutes) for all the smart devices in the whole house to turn on the networking request, so that the smart devices in the whole house automatically join the AP network of the own house after a period of time.
It should be noted that the on operation and the off operation of the whole house main switch can be controlled by the plug wire row.
In the application, before the network access function of the network device is started, whether the AP serves as the network device or the intelligent device serves as the network device, the executed operations are all the judgment of the time consistency, that is, when the power-off times of the device are determined to reach the preset times, the network access function can be started. However, after the network access function of the network device is turned on, the subsequent operations of the intelligent device as a device to be networked are different considering that the AP is a networked device and the intelligent device is a device to be networked. Next, the AP as a network device and the smart device as a network device will be specifically described.
For the AP serving as the network device, in this embodiment of the present application, after the network access function of the AP is started, the AP may continuously detect the wireless air interface packet, and for all the wireless intelligent devices applying for networking that conform to the protocol, may immediately respond to the wireless networking request, and return SSID information and corresponding password information to the corresponding intelligent device, so that the intelligent device may establish network connection with the AP.
In a specific application, in order to further ensure that at least two networks under a parallel architecture are not interconnected, the network access method provided in the embodiment of the present application may start a timer of an AP, and close a network access function of the AP after a timing time of the started timer of the AP reaches a preset time threshold (e.g., 5 minutes), so as to deny access to the AP by other intelligent devices except the intelligent device that has accessed the AP.
Here, the network access method provided in the embodiment of the present application may perform multiple rounds, and when any round of the method is performed, if the timing time of the timer reaches the preset time threshold, the AP does not respond to the network access requests of other intelligent devices that are not accessed to the AP any more, so as to reduce response resources of the AP on the premise of ensuring that no interconnection is generated between networks.
For the case that the intelligent device serves as the network device, in the embodiment of the application, after the network access function of the intelligent device is started, the intelligent device may send a network access request to the AP, and may access the AP according to SSID information and corresponding password information when SSID information and corresponding password information returned by the AP in response to the network access request are received.
In a specific application, in order to further ensure that at least two networks under a parallel architecture are not interconnected, the network access method provided in the embodiment of the present application may start a timer of an intelligent device, and close a network access function of the intelligent device after a timing time of the started timer of the intelligent device reaches a preset time threshold, so as not to attempt to access an AP.
For the intelligent device, whether the network access function of the intelligent device is directly closed or not can be determined by judging whether the power-off times of the network device in the latest preset time reach the preset times plus 1 time, so that the network access of the batch intelligent device is conveniently realized, and the network exit of the batch intelligent device is also conveniently realized.
Taking the intelligent networking of the whole house of the hardbound property as an example for specific description, under the condition that it is ensured that both the AP and the intelligent device of the whole house can be normally powered on, assuming that the preset number of times is 2, the intelligent device may perform the network logout operation according to the steps:
1. the 1 st time of starting the total switch of the whole house, that is, the intelligent device is in a power-on state, at this time, the power-off times stored in the nonvolatile storage medium of the intelligent device may be read, and it is assumed that the power-off times stored here is 0 (may correspond to power-on initialization), so that it may be determined that the read power-off times do not reach 3. At this time, before the smart device powers off for the 1 st time, after the read power-off number is added by 1, the processed power-off number, that is, 1, may be written into the nonvolatile storage medium. Wherein, the 1 st power-off may be completed within a time period of t0 (e.g. 1 second).
2. And 2, starting the whole house master switch, namely, after the intelligent device is powered off for the 1 st time and powered on for the 2 nd time, reading the power-off times stored in the nonvolatile storage medium of the intelligent device again, wherein the read power-off times is 1, and the value still does not reach 3. At this time, before the 2 nd power-off of the smart device, after the readable power-off times are added by 1, the processed power-off times, that is, 2, are written into the nonvolatile storage medium. The 2 nd power-off may be completed within a time period from t0 to t1 (e.g., 5 seconds at t 1).
3. And starting the whole house main switch for the 3 rd time, namely, after the intelligent device is powered off for the 2 nd time and powered on for the 3 rd time, reading the power-off times stored in the nonvolatile storage medium of the intelligent device again, wherein the read power-off times are 2, and the value still does not reach 3. At this time, before the 3 rd power-off of the smart device, after the readable power-off times are added by 1, the processed power-off times, that is, 3, are written into the nonvolatile storage medium. The 3 rd power-off may be completed within a time period from t0 to t1 (e.g., 5 seconds at t 1).
4. And 4, starting the whole house main switch, namely, after the intelligent device is powered off for the 3 rd time and powered on for the 4 th time, reading the power-off times stored in the nonvolatile storage medium of the intelligent device again, wherein the read power-off times is 3, and the value reaches 3.
In this way, after the 4 th master switch is turned on, all the smart devices in the whole house can perform the network quitting operation within the time of waiting for t2 (for example, t2 is 2 minutes), and then the devices can be in a factory state. Therefore, the network returning method and the network returning device are convenient for realizing the network returning of the intelligent devices in batches, and are better in practicability.
Based on the same inventive concept, embodiments of the present application provide a network access apparatus corresponding to a network access method, and because the principle of the apparatus in the embodiments of the present application for solving the problem is similar to the network access method described above in the embodiments of the present application, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not described again.
As shown in fig. 3, a schematic structural diagram of a network access device according to an embodiment of the present application includes:
the judging module 301 is configured to, after a network device is powered on, judge whether the power-off frequency of the network device within a latest preset time period reaches a preset frequency according to the recorded power-off frequency of the network device after the network device is powered on;
an access module 302, configured to start a network access function of the network device if a preset number of times is reached.
In an embodiment, the determining module 301 is specifically configured to:
reading the power-off times stored in a nonvolatile storage medium of the network equipment, and judging whether the read power-off times reach preset times; clearing the power-off times stored in the nonvolatile storage medium once per preset time length;
if not, after adding 1 to the read power-off times, writing the processed power-off times into the nonvolatile storage medium, and returning to the step of reading the power-off times stored in the nonvolatile storage medium of the network equipment after the network equipment is powered off and powered on again;
the access module 302 is specifically configured to start the network access function of the network device if a preset number of times is reached.
In another embodiment, the network device is an access point, AP; the access module 302 is specifically configured to:
after the network access function of the network equipment is started, receiving a network access request sent by intelligent equipment;
and sending Service Set Identifier (SSID) information and corresponding password information to the intelligent equipment so as to establish network connection between the intelligent equipment and the AP.
In some embodiments, the access module 302 is specifically configured to:
starting a timer of the AP after starting a network access function of the network equipment;
and after the timing time of the started timer of the AP reaches a preset time threshold, closing the network access function of the AP.
In yet another embodiment, the network device is a smart device; the access module 302 is specifically configured to:
after the network access function of the network equipment is started, a network access request is sent to an AP;
and when SSID information and corresponding password information returned by the AP responding to the network access request are received, accessing the AP according to the SSID information and the corresponding password information.
In some embodiments, the access module 302 is specifically configured to:
after the network access function of the network equipment is started, starting a timer of the intelligent equipment;
and if the timing time of the timer reaches a preset time threshold before the AP is successfully accessed, closing the network access function of the intelligent equipment.
In another embodiment, the access module 302 is specifically configured to:
after the network access function of the network equipment is started, if the power-off frequency of the intelligent equipment in the latest preset time duration is determined to reach the preset frequency plus 1 time before the network access function of the network equipment is successfully accessed to the AP and the intelligent equipment is in a power-on state, the network access function of the intelligent equipment is closed.
As shown in fig. 4, a schematic structural diagram of a network device according to an embodiment of the present application is provided, where the network device includes: a processor 401, a memory 402 and a bus 403, the memory 402 storing machine-readable instructions executable by the processor 401, the processor 401 and the memory 402 communicating via the bus 403 when the AP is running, the machine-readable instructions when executed by the processor 401 performing the following:
after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach the preset times or not according to the recorded power-off times of the network equipment after the network equipment is powered on;
and if the preset times are reached, starting the network access function of the network equipment.
In an embodiment, in the processing executed by the processor 401, the determining whether the power-off frequency of the network device in the last preset time period reaches a preset frequency, and if the power-off frequency reaches the preset frequency, starting a network access function of the network device includes:
reading the power-off times stored in a nonvolatile storage medium of the network equipment, and judging whether the read power-off times reach preset times; clearing the power-off times stored in the nonvolatile storage medium once per preset time length;
if not, after adding 1 to the read power-off times, writing the processed power-off times into the nonvolatile storage medium, and returning to the step of reading the power-off times stored in the nonvolatile storage medium of the network equipment after the network equipment is powered off and powered on again;
and if so, starting the network access function of the network equipment.
In some embodiments, the network device is an access point, AP; after the network access function of the network device is started, the processing executed by the processor 401 further includes:
receiving a network access request sent by intelligent equipment;
and sending Service Set Identifier (SSID) information and corresponding password information to the intelligent equipment so as to establish network connection between the intelligent equipment and the AP.
In another embodiment, after the network access function of the network device is started, the processing executed by the processor 401 further includes:
starting a timer of the AP;
and after the timing time of the started timer of the AP reaches a preset time threshold, closing the network access function of the AP.
In some embodiments, the network device is a smart device; after the network access function of the network device is started, the processing executed by the processor 401 further includes:
sending a network access request to the AP;
and when SSID information and corresponding password information returned by the AP responding to the network access request are received, accessing the AP according to the SSID information and the corresponding password information.
In another embodiment, after the network access function of the network device is turned on, the processing executed by the processor 401 further includes:
starting a timer of the intelligent equipment;
and if the timing time of the timer reaches a preset time threshold before the AP is successfully accessed, closing the network access function of the intelligent equipment.
In another embodiment, after the network access function of the network device is started, the processing executed by the processor 401 further includes:
and if the power-off times of the intelligent equipment in the latest preset time length reach the preset times plus 1 time when the intelligent equipment is in the power-on state before the AP is successfully accessed, closing the network access function of the intelligent equipment.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the network access method.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is run, the network access method can be executed, so that the problem that time and labor are wasted because each device needs to be manually operated in the existing network access method is solved, and the effects of realizing network access of network devices in batches and saving time and labor are achieved.
The computer program product of the network access method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method for network access, the method comprising:
after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach the preset times or not according to the recorded power-off times of the network equipment after the network equipment is powered on;
if the preset times are reached, starting a network access function of the network equipment;
the judging whether the power-off times of the network equipment within the latest preset time reach the preset times or not, and if the power-off times reach the preset times, starting the network access function of the network equipment comprises the following steps:
reading the power-off times stored in a nonvolatile storage medium of the network equipment, and judging whether the read power-off times reach preset times; clearing the power-off times stored in the nonvolatile storage medium once per preset time length;
if not, after adding 1 to the read power-off times, writing the processed power-off times into the nonvolatile storage medium, and returning to the step of reading the power-off times stored in the nonvolatile storage medium of the network equipment after the network equipment is powered off and powered on again;
and if so, starting the network access function of the network equipment.
2. The method of claim 1, wherein the network device is an Access Point (AP); after the network access function of the network device is started, the method further includes:
receiving a network access request sent by intelligent equipment;
and sending Service Set Identifier (SSID) information and corresponding password information to the intelligent equipment so as to establish network connection between the intelligent equipment and the AP.
3. The method of claim 2, wherein after the starting of the network access function of the network device, further comprising:
starting a timer of the AP;
and after the timing time of the started timer of the AP reaches a preset time threshold, closing the network access function of the AP.
4. The method of claim 1, wherein the network device is a smart device; after the network access function of the network device is started, the method further includes:
sending a network access request to the AP;
and when SSID information and corresponding password information returned by the AP responding to the network access request are received, accessing the AP according to the SSID information and the corresponding password information.
5. The method of claim 4, wherein after the starting of the network access function of the network device, further comprising:
starting a timer of the intelligent equipment;
and if the timing time of the timer reaches a preset time threshold before the AP is successfully accessed, closing the network access function of the intelligent equipment.
6. The method of claim 4, wherein after the starting of the network access function of the network device, further comprising:
and if the power-off times of the intelligent equipment in the latest preset time length reach the preset times plus 1 time when the intelligent equipment is in the power-on state before the AP is successfully accessed, closing the network access function of the intelligent equipment.
7. A network access apparatus, the apparatus comprising:
the judging module is used for judging whether the power-off times of the network equipment in the latest preset time length reach the preset times or not according to the recorded power-off times of the network equipment after power-on after the network equipment is powered on;
the access module is used for starting the network access function of the network equipment if the preset times are reached;
the judgment module is specifically configured to:
reading the power-off times stored in a nonvolatile storage medium of the network equipment, and judging whether the read power-off times reach preset times; clearing the power-off times stored in the nonvolatile storage medium once per preset time length;
and if not, after adding 1 to the read power-off times, writing the processed power-off times into the nonvolatile storage medium, and returning to the step of reading the power-off times stored in the nonvolatile storage medium of the network equipment after the network equipment is powered off and powered on again.
8. A network device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the network device is operating, the machine-readable instructions when executed by the processor performing the following:
after the network equipment is powered on, judging whether the power-off times of the network equipment in the latest preset time reach the preset times or not according to the recorded power-off times of the network equipment after the network equipment is powered on;
if the preset times are reached, starting a network access function of the network equipment;
in the processing executed by the processor, the determining whether the power-off frequency of the network device within the latest preset time reaches a preset frequency, and if the power-off frequency reaches the preset frequency, starting a network access function of the network device includes:
reading the power-off times stored in a nonvolatile storage medium of the network equipment, and judging whether the read power-off times reach preset times; clearing the power-off times stored in the nonvolatile storage medium once per preset time length;
if not, after adding 1 to the read power-off times, writing the processed power-off times into the nonvolatile storage medium, and returning to the step of reading the power-off times stored in the nonvolatile storage medium of the network equipment after the network equipment is powered off and powered on again;
and if so, starting the network access function of the network equipment.
9. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the network access method according to any one of claims 1 to 6.
CN201910142857.XA 2019-02-26 2019-02-26 Network access method, device, network equipment and storage medium Active CN109714785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910142857.XA CN109714785B (en) 2019-02-26 2019-02-26 Network access method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910142857.XA CN109714785B (en) 2019-02-26 2019-02-26 Network access method, device, network equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109714785A CN109714785A (en) 2019-05-03
CN109714785B true CN109714785B (en) 2022-02-11

Family

ID=66265040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910142857.XA Active CN109714785B (en) 2019-02-26 2019-02-26 Network access method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109714785B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114466375B (en) * 2020-11-09 2024-01-19 深圳Tcl新技术有限公司 WiFi equipment network distribution method and system, wiFi equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007214703A (en) * 2006-02-07 2007-08-23 Ntt Docomo Inc Mobile station, radio access network apparatus, and resource request method
CN101321086A (en) * 2007-06-08 2008-12-10 华为技术有限公司 Connecting equipment management method and connecting equipment, management equipment and communication system
CN105338527A (en) * 2014-08-06 2016-02-17 深圳中电国际信息科技有限公司 Network access configuration method and system for Internet of Things module
CN106982449A (en) * 2017-03-06 2017-07-25 深圳市高斯贝尔家居智能电子有限公司 A kind of network collocating method of video camera
EP3373568A2 (en) * 2000-05-23 2018-09-12 IoT IP GmbH Programmable communicator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3373568A2 (en) * 2000-05-23 2018-09-12 IoT IP GmbH Programmable communicator
JP2007214703A (en) * 2006-02-07 2007-08-23 Ntt Docomo Inc Mobile station, radio access network apparatus, and resource request method
CN101321086A (en) * 2007-06-08 2008-12-10 华为技术有限公司 Connecting equipment management method and connecting equipment, management equipment and communication system
CN105338527A (en) * 2014-08-06 2016-02-17 深圳中电国际信息科技有限公司 Network access configuration method and system for Internet of Things module
CN106982449A (en) * 2017-03-06 2017-07-25 深圳市高斯贝尔家居智能电子有限公司 A kind of network collocating method of video camera

Also Published As

Publication number Publication date
CN109714785A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
US20220377047A1 (en) eSIM-BASED CARD POOL SYSTEM AND CONTROL METHOD THEREOF
CN107950041B (en) Profile switching method and terminal
CN104853373B (en) A kind of Working mode switching method and device of wireless module
WO2019057011A1 (en) Method for processing network slice template, and management device
CN110769033A (en) Intelligent networking method and system
US20190261270A1 (en) Method and device for reducing power consumption of terminal, and smart card
US20160308824A1 (en) Method for determining gre tunnel, gateway device, and access site
CN111163469A (en) Network distribution method of intelligent household appliance, wireless module and intelligent household appliance
CN105554758A (en) Uniform authentication system and method of multiple WiFi networks based on cloud platform
CN111093105A (en) Remote control method and device
CN109714785B (en) Network access method, device, network equipment and storage medium
CN113572669A (en) Scene processing method and device, intelligent gateway and processor
CN111988824A (en) Network switching method and device, electronic equipment and storage medium
CN112492618A (en) Network sharing method and device, electronic equipment and storage medium
CN103345828A (en) Method and system for controlling computer through intelligent terminal
US20150304978A1 (en) Automatic calibration of probe request received signal strength indication (rssi) threshold to control associations
US10432714B2 (en) Data processing method and system based on asymmetric P2P network
US20220322237A1 (en) Trigger discovery method, terminal device, and network device
CN107548019B (en) Method and device for processing network beacon in wireless sensor network
CN113766606B (en) Network distribution method, system, computer equipment and storage medium based on cellular communication
CN105323373A (en) Mobile terminal, and method and device for initializing subscriber identity module card of mobile terminal
CN111836339B (en) Network equipment
CN104837146B (en) Configuration parameter distribution method, receiving method and device
CN112235842A (en) Communication method and device of Internet of things equipment
CN108055254B (en) Method and device for non-perception authentication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230616

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.