Disclosure of Invention
The application provides a method and a device for equipment network distribution, which are used for improving network distribution efficiency and success rate.
In a first aspect, the present application provides a device network allocation method, where the method is applied to a first electronic device, and the method includes:
Sending a network detection frame to a routing device, wherein the network detection frame comprises a target service set identifier SSID, and the target SSID comprises an identifier of the first electronic device;
The method comprises the steps of receiving a detection response from the routing equipment, wherein the detection response is sent after the routing equipment establishes a virtual access point by taking the target SSID as the SSID of the virtual access point and taking a first password as a connection password of the virtual access point;
establishing a first communication connection with the routing device by using the SSID of the virtual access point and the first password;
receiving, over the first communication connection, connection parameters of an actual access point of the routing device from the routing device;
And establishing a second communication connection with the routing equipment by using the connection parameters of the actual access point.
Optionally, before the first communication connection is established with the routing device using the SSID of the virtual access point and the first password, the method further includes:
and obtaining the first password according to the identification of the first electronic equipment.
Optionally, after the establishing a first communication connection with the routing device and before receiving, through the first communication connection, a connection parameter of an actual access point of the routing device from the routing device, the method further comprises:
And sending a device verification request to a cloud platform through the first communication connection, so that the cloud platform performs validity verification on the first electronic device according to the identifier of the first electronic device included in the device verification request, and when the validity verification passes, sends a first instruction to the routing device, wherein the first instruction is used for indicating the routing device to send the connection parameters of the actual access point to the first electronic device.
Optionally, before the sending the network probe frame to the routing device, the method further includes:
and generating the target SSID according to a preset SSID naming rule and the identification of the first electronic equipment.
In a second aspect, the present application provides a device network allocation method, where the method is applied to a routing device, and the method includes:
Receiving a network detection frame from first electronic equipment, wherein the network detection frame comprises a target service set identifier SSID, and the target SSID comprises an identifier of the first electronic equipment;
Obtaining a first password according to the identification of the first electronic equipment;
taking the target SSID as the SSID of a virtual access point, taking the first password as the connection password of the virtual access point, and establishing the virtual access point;
transmitting a probe response including the SSID of the virtual access point to the first electronic device, so that the first electronic device uses the SSID of the virtual access point, and the first password to establish a first communication connection with the routing device;
and sending the connection parameters of the actual access point of the routing equipment to the first electronic equipment through the first communication connection, so that the first electronic equipment establishes second communication connection with the routing equipment by using the connection parameters of the actual access point.
Optionally, the obtaining the first password according to the identifier of the first electronic device includes:
The identification of the first electronic equipment is sent to a cloud platform, so that the cloud platform obtains the first password according to the identification of the first electronic equipment and sends the first password to the routing equipment;
and receiving the first password sent by the cloud platform.
Optionally, before the first password is obtained according to the identification of the first electronic device, the method further includes:
judging whether the target SSID accords with a preset SSID naming rule;
and if the target SSID accords with a preset SSID naming rule, obtaining a first password according to the identification of the first electronic equipment.
Optionally, before the sending, by the first communication connection, the connection parameter of the actual access point of the routing device to the first electronic device, the method further includes:
The method comprises the steps of receiving a first instruction from a cloud platform, wherein the first instruction is used for indicating the routing equipment to send the connection parameters of the actual access point to the first electronic equipment, and the first instruction is sent after the validity of the cloud platform to the first electronic equipment is checked.
Optionally, after the sending, to the first electronic device, the connection parameters of the actual access point of the routing device, the method further includes:
and deleting the virtual access point.
In a third aspect, the present application provides a device network allocation method, where the method is applied to a user terminal, and the method includes:
Responding to the operation of adding new equipment triggered by a user, and sending an equipment network allocation instruction to the cloud platform, wherein the equipment network allocation instruction comprises a user identifier;
Displaying first prompt information from the cloud platform, wherein the first prompt information comprises a service set identifier SSID of an actual access point of a routing device and an identifier of a first electronic device, and the first prompt information is used for prompting the user to confirm whether to carry out network distribution on the first electronic device through the routing device;
responding to the start of network distribution operation of the first electronic equipment triggered by a user, sending an instruction for network distribution of the first electronic equipment to the cloud platform so that the cloud platform sends a first instruction to the routing equipment, wherein the first instruction is used for indicating the routing equipment to send the connection parameters of the actual access point to the first electronic equipment so that the first electronic equipment can be connected with the routing equipment by using the connection parameters of the actual access point.
In a fourth aspect, the present application provides a device network allocation apparatus, where the apparatus is applied to a first electronic device, and the apparatus includes:
The sending module is used for sending a network detection frame to the routing equipment, wherein the network detection frame comprises a target service set identifier SSID, and the target SSID comprises an identifier of the first electronic equipment;
The routing device comprises a first receiving module, a first detecting module and a second receiving module, wherein the first receiving module is used for receiving a detection response from the routing device, the detection response is generated after the routing device takes the target SSID as a service set identification SSID of a virtual access point and takes a first password as a connection password of the virtual access point to establish the virtual access point, and the first password is obtained by the routing device according to the identification of the first electronic device;
a first processing module, configured to establish a first communication connection with the routing device using an SSID of the virtual access point and the first password;
A second receiving module, configured to receive, through the first communication connection, a connection parameter of an actual access point of the routing device from the routing device;
And the second processing module is used for establishing second communication connection with the routing equipment by using the connection parameters of the actual access point.
In a fifth aspect, the present application provides a device network allocation apparatus, where the apparatus is applied to a routing device, the apparatus includes:
The receiving module is used for receiving a network detection frame from the first electronic equipment, wherein the network detection frame comprises a target service set identifier SSID, and the target SSID comprises an identifier of the first electronic equipment;
The processing module is used for obtaining a first password according to the identification of the first electronic equipment, taking the target SSID as a service set identification SSID of a virtual access point, taking the first password as a connection password of the virtual access point, and establishing the virtual access point;
The routing device comprises a first electronic device, a second electronic device, a sending module and a second communication module, wherein the first electronic device is used for sending a detection response comprising the SSID of the virtual access point to the first electronic device so that the first electronic device can use the SSID of the virtual access point, the first password can establish first communication connection with the routing device, and the connection parameters of the actual access point of the routing device are sent to the first electronic device through the first communication connection so that the first electronic device can establish second communication connection with the routing device by using the connection parameters of the actual access point.
In a sixth aspect, the present application provides an apparatus for a device network, where the apparatus is applied to a user terminal, and the apparatus includes:
The cloud platform comprises a first sending module, a cloud platform and a second sending module, wherein the first sending module is used for responding to the operation of adding new equipment triggered by a user and sending an equipment network allocation instruction to the cloud platform;
and the receiving module is used for receiving the first prompt information from the cloud platform. The first prompt message comprises a service set identifier SSID of an actual access point of the routing equipment and an identifier of the first electronic equipment, wherein the first prompt message is used for prompting the user to confirm whether the first electronic equipment is configured with a network through the routing equipment, the SSID of the actual access point of the routing equipment and the identifier of the first electronic equipment are determined by the cloud platform according to the user identifier.
And the display module is used for displaying the first prompt information.
The first sending module is used for responding to the start of network allocation operation of the first electronic equipment triggered by a user, sending an instruction for network allocation of the first electronic equipment to the cloud platform so that the cloud platform sends a first instruction to the routing equipment, and the first instruction is used for instructing the routing equipment to send the connection parameters of the actual access point to the first electronic equipment so that the first electronic equipment can be connected with the routing equipment by using the connection parameters of the actual access point.
In a seventh aspect, the application provides an electronic device comprising a processor, a memory, and a transmitter and a receiver, wherein the processor is in communication connection with the memory;
the transmitter and the receiver are both coupled to the processor, and the processor controls the transmitting action of the transmitter;
The memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any one of the first, second and third aspects.
In a fifth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to any of the first, second and third aspects when executed by a processor.
In a sixth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first, second and third aspects.
According to the equipment network distribution method and device, the first electronic equipment to be network distributed sends the network detection frame to the routing equipment, so that the routing equipment can acquire the first password based on the identification of the first electronic equipment included in the network detection frame. The routing device may then use the first password as a connection password for the virtual access point and the target SSID as an SSID for the virtual access point. By the method, the first password required by the routing equipment for establishing the virtual access point is acquired by the routing equipment according to the identification of the first electronic equipment. Compared with the prior art that the fixed password is configured in the routing equipment, the method and the device improve the security of the password for establishing the virtual access point. By the method, the virtual access point can be built after the network detection frame of the first electronic device is received, waste of network resources is avoided, and power consumption of the routing device is reduced. After the first communication connection is established between the first electronic device and the virtual access point of the routing device, connection parameters for connection with the actual access point of the routing device can be obtained through the first communication connection, so that the second communication connection is established with the routing device, and further the network distribution of the first electronic device is realized. By the method, in the network distribution process of the first electronic equipment, the network distribution process is not required to be operated by a user, and the network distribution efficiency and success rate are improved.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, it should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
Along with the development of the internet of things technology, the application of internet of things equipment in daily life of people is increasing. Generally, internet of things equipment needs to be configured and connected to the internet so as to facilitate equipment management and flexible use.
The internet of things device may be any electronic device capable of being configured to access the internet. The application scenario of the internet of things device may be, for example, a full-house intelligent digital control application scenario such as Smart Home (Smart Home), intelligent Home device ecology, intelligent Home (INTELLIGENCE HOUSE) ecology, and the like. Optionally, the internet of things device may not be limited to a PC, a mobile phone, a tablet PC, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent stove, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent floor sweeping robot, an intelligent window cleaning robot, an intelligent floor mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock and the like.
Taking intelligent home appliances as an example, at present, the existing network distribution modes mainly include the following modes:
1. And the user performs network distribution on the intelligent household appliances to be network-distributed through the mobile phone. For example, first, a user needs to turn on a bluetooth function of a mobile phone and turn on a mobile phone Application (App) corresponding to a brand of an intelligent home device to be connected to the network. Then, the mobile phone can find the intelligent household electrical appliance to be distributed with the network through Bluetooth, and prompts a user to operate and add new equipment through the App. Then, the mobile phone can complete the distribution network information issuing by sending the service set identifier (SERVICE SET IDENTIFIER, SSID) and the password of the router to the intelligent household electrical appliance to be distributed, so that the intelligent household electrical appliance to be distributed can be connected to the router by using the SSID and the password.
2. When the bluetooth function of the mobile phone cannot be used, the user also needs to open the App and click on the operation of adding a new device. Then, the mobile phone can prompt the user to switch the WiFi connection of the mobile phone to a temporary WiFi hot spot SSID which is started by the intelligent household electrical appliance to be connected with the network through the App. After the mobile phone is connected with the intelligent household appliance to be distributed, the user is prompted to select the SSID of the home master WiFi hot spot and input a corresponding password, and then the mobile phone can send the SSID and the password of the WiFi hot spot to the intelligent household appliance to be distributed through the APP, so that distribution network information is issued. Finally, the user needs to operate the mobile phone again to switch back to the home WiFi hotspot originally used.
3. When the intelligent household electrical appliance to be distributed with the network is electrified for the first time, the hidden hot spot of a fixed SSID is automatically connected. The hidden hot spot of the fixed SSID can be a hot spot which is opened in a hidden manner after the router of the same manufacturer is electrified and is identical to the intelligent home appliance to be distributed with the network. After the intelligent household electrical appliance to be distributed is connected with the hidden hot spot, the router can send the SSID and the password of the main WiFi hot spot to the intelligent household electrical appliance to be distributed through the connecting channel, and the distribution of the equipment distribution information is completed.
However, the above modes 1 and 2 both rely on complicated and cumbersome procedures of the user operating on the mobile phone to implement the network configuration of the device. For users who are not familiar with the distribution network flow, the distribution network efficiency and success rate are low.
In the above manner 3, all the intelligent home appliances need to be built-in to write a fixed hidden hot-spot SSID for detection. The router also needs to configure a fixed hot spot SSID and keep the detection and connection for receiving the smart home devices open in a hidden manner. However, a fixed SSID is generally less secure and may be subject to hacking or malicious connection attacks. In addition, the router always opens the hidden hot spot, so that the intelligent household appliances to be distributed can be connected with the distribution network. However, most of the time no device uses this hidden hotspot, resulting in router power consumption and waste of network resources.
In view of the above problems of the existing network distribution method, the present application provides a device network distribution method that has low user dependence and does not require a routing device to configure a fixed hidden hotspot SSID. By reducing the dependence of the equipment network distribution process on user operation, the network distribution efficiency and success rate are improved. By not configuring fixed hidden hot spots on the routing equipment, the security of the routing equipment is improved, and network resources and power consumption of the routing equipment are saved.
The technical scheme of the present application will be described in detail with reference to specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Exemplary, fig. 1 is a schematic diagram of an application scenario of a device network allocation method provided by the present application. As shown in fig. 1, the first electronic device is the device to be configured with the network. It should be understood that fig. 1 is merely an exemplary illustration of an application scenario of a device networking method using a first electronic device as an example of an intelligent washing machine. Optionally, the first electronic device may be any of the foregoing devices of the internet of things, which is not limited by the present application.
The first electronic device may access the internet through the routing device. The routing device may be any device such as a router that can access the first electronic device to the internet.
Fig. 2a is a schematic flow chart of a method for configuring a network by using a device according to the present application. As shown in fig. 2a, the method comprises the steps of:
s101, the first electronic device sends a network detection frame to the routing device.
The network probe frame may include a target SSID, among other things. The target SSID may include an identification of the first electronic device. The target SSID may be, for example, a combination result of the identification of the first electronic device and other characters. For example, the SSID of the virtual access point may be < DeviceID > _ hrwifi. The DeviceID is the identification of the first electronic device, and "_ hrwifi" are all other characters except the identification of the first electronic device. Or in some embodiments, the target SSID may also be an identification of the first electronic device.
The network probe frame may be used to probe a routing device capable of a communication connection with the first electronic device. If the first electronic device receives the probe response from the routing device after sending out the network probe frame, the routing device can establish communication connection with the first electronic device. If the first electronic device does not receive the probe response from any routing device after sending out the network probe frame, it is indicated that no routing device can establish a communication connection with the first electronic device.
The identification of the first electronic device may for example be a unique code (Identity document, ID) of the first electronic device. Optionally, the network probe frame further includes other content, which is not limited by the present application, for example, any existing network probe frame may be referred to.
Optionally, the first electronic device may send the network probe frame to the routing device through the WIFI communication module, for example. It should be understood that the present application is not limited to the timing of the first electronic device sending the network probe frame to the routing device. For example, the first electronic device may send a network probe frame to the routing device upon initial configuration of networking. Or the first electronic device may also send a network probe frame to the routing device after restoring the factory settings (i.e., resetting).
Accordingly, the routing device may receive a network probe frame from the first electronic device.
S102, the routing equipment obtains a first password according to the identification of the first electronic equipment.
Optionally, the routing device may store a mapping relationship between the identifier of the electronic device and the password in advance, for example. In this implementation manner, the routing device may obtain the first password according to the identifier of the first electronic device and the mapping relationship between the identifier of the electronic device and the password.
Or the mapping relation between the identification of the electronic device and the password can be stored in the cloud platform. In this implementation manner, after the routing device further obtains the identifier of the first electronic device, the identifier of the first electronic device is sent to the cloud platform. Then, the cloud platform may obtain a first password according to the identifier of the first electronic device and the mapping relationship between the identifier of the electronic device and the password, and send the first password to the routing device.
S103, the routing equipment takes the target SSID as the SSID of a virtual Access Point (AP), takes the first password as the connection password of the virtual Access Point and establishes the virtual Access Point.
The virtual access point may be, for example, a hidden virtual access point.
Optionally, the specific implementation manner of establishing the virtual access point by the routing device through the target SSID and the first password may refer to any existing method for constructing the virtual access point, which is not described herein.
S104, the routing equipment sends a detection response comprising the SSID of the virtual access point to the first electronic equipment.
The probe response may be used to indicate that the routing device is capable of establishing a communication connection with the first electronic device. Optionally, the present application is not limited to the above-mentioned probe response including other content, and may refer to any existing probe response, for example.
Accordingly, the first electronic device may receive the probe response from the routing device.
S105, the first electronic device establishes a first communication connection with the routing device by using the SSID of the virtual access point and the first password.
Optionally, the first password may be obtained by the first electronic device according to an identifier of the first electronic device. For example, the first electronic device and the router (or cloud platform) may have the same password generation algorithm deployed therein. In this implementation, the first electronic device inputs the identifier of the first electronic device to the password generation algorithm, and the router also inputs the identifier of the first electronic device to the same password generation algorithm, so the same output can be obtained as the first password. Or the first electronic device and the router can be deployed with the same mapping relation between the identifier of the electronic device and the password, so that the first electronic device and the router can obtain the same first password through the identifier of the first electronic device and the mapping relation between the identifier of the electronic device and the password.
Or as a possible implementation, the first password may be further included in the probe response, for example. That is, the first electronic device may obtain the first password from, for example, a probe response sent by the routing device.
Optionally, the first electronic device uses the SSID of the virtual access point and the first password to establish the first communication connection with the routing device, for example, any existing method for connecting the electronic device to the routing device may be referred to, which is not described herein.
S106, the routing equipment sends the connection parameters of the actual access point of the routing equipment to the first electronic equipment through the first communication connection.
The connection parameters of the actual access point may include, for example, an actual SSID (which may also be referred to as a primary SSID or a real SSID) and a connection password of the routing device.
Accordingly, the first electronic device may receive "connection parameters of the actual access point of the routing device" from the routing device over the first communication connection.
And S107, the first electronic equipment establishes a second communication connection with the routing equipment by using the connection parameters of the actual access point.
The second communication connection is established for the first electronic device using connection parameters of an actual access point of the routing device. Therefore, when the second communication connection is established, the first electronic device can access the Internet through the routing device, so that the distribution network of the first electronic device is realized.
In this embodiment, the first electronic device to be configured with the network sends the network probe frame to the routing device, so that the routing device may obtain the first password based on the identifier of the first electronic device included in the network probe frame. The routing device may then use the first password as a connection password for the virtual access point and the target SSID as an SSID for the virtual access point. By the method, the first password required by the routing equipment for establishing the virtual access point is acquired by the routing equipment according to the identification of the first electronic equipment. Compared with the prior art that the fixed password is configured in the routing equipment, the method and the device improve the security of the password for establishing the virtual access point. By the method, the virtual access point can be built after the network detection frame of the first electronic device is received, waste of network resources is avoided, and power consumption of the routing device is reduced. After the first communication connection is established between the first electronic device and the virtual access point of the routing device, connection parameters for connection with the actual access point of the routing device can be obtained through the first communication connection, so that the second communication connection is established with the routing device, and further the network distribution of the first electronic device is realized. By the method, in the network distribution process of the first electronic equipment, the network distribution process is not required to be operated by a user, and the network distribution efficiency and success rate are improved.
How the first electronic device obtains the first password is described in detail below:
As a possible implementation manner, the first electronic device may obtain the first password according to the identifier of the first electronic device before the first communication connection is established with the routing device by using the SSID of the virtual access point and the first password.
Taking the mapping relation between the identifier of the first electronic device and the password stored in the first electronic device as an example, the first electronic device may obtain the first password according to the identifier of the first electronic device and the mapping relation between the identifier of the electronic device and the password. For example, the mapping relationship between the identifier and the password of the electronic device may be as shown in table 1 below:
TABLE 1
| Identification of electronic devices |
Password code |
| Sign 1 |
Cipher 1 |
| Sign 2 |
Password 2 |
| Sign 3 |
Cipher 3 |
Assuming that the identifier of the first electronic device is identifier 1, the first electronic device may determine that the first password is password 1 according to the mapping relationship shown in table 1.
Taking the example that a password generation algorithm is preset in the first electronic device, the first electronic device may input the identifier of the first electronic device to the password generation algorithm to obtain a first password. The password generation algorithm may be any existing password generation algorithm, which is not limited in the present application.
In this embodiment, the first electronic device obtains the first password according to the identifier of the first electronic device, so that the first password is prevented from being transmitted to the first electronic device through the network, and the security of the first password is further improved.
As a further possible implementation, the first password may also be, for example, pre-stored in the first electronic device. That is, the first electronic device may acquire the first password from the data stored in itself. In this implementation, the first password may be pre-stored for the user in the first electronic device. Or the first electronic device can also input the identification of the first electronic device into a password generation algorithm in advance, obtain the first password and store the first password.
As a further possible implementation, the first password may be further included in the probe response sent by the routing device to the first electronic device, for example. In this implementation, the first electronic device may obtain the first password from the probe response.
The following details how the routing device obtains the first password according to the identifier of the first electronic device:
As a possible implementation manner, the routing device may obtain the first password from the cloud platform according to the identifier of the first electronic device. Optionally, the routing device may send the identification of the first electronic device to the cloud platform. Accordingly, the cloud platform may receive the identification of the first electronic device sent by the routing device.
Then, the cloud platform may obtain the first password according to the identifier of the first electronic device.
Optionally, the specific implementation manner of acquiring the first password by the cloud platform according to the identifier of the first electronic device may refer to, for example, the specific implementation manner of "the first electronic device acquires the first password according to the identifier of the first electronic device" described in any of the foregoing embodiments, which is not described herein. Optionally, the specific implementation manner of the cloud platform for acquiring the first password according to the identifier of the first electronic device may be the same as the specific implementation manner of the cloud platform for acquiring the first password according to the identifier of the first electronic device, so as to ensure that the first password acquired by the cloud platform is the same as the first password acquired by the first electronic device, and further ensure that the first electronic device can establish the first communication connection with the virtual access point of the routing device by using the first password.
In some embodiments, the cloud platform may obtain the first password directly according to the identifier of the first electronic device after obtaining the identifier of the first electronic device.
Or in some embodiments, after obtaining the identifier of the first electronic device, the cloud platform may further verify whether the first electronic device is a device in the blacklist according to the identifier of the first electronic device, and when determining that the first electronic device is not a device in the blacklist, obtain the first password according to the identifier of the first electronic device. If the first electronic device is determined to be a device in the blacklist, optionally, the cloud platform may not obtain the first password, and feedback a prompt message for indicating that the first electronic device is a device in the blacklist to the routing device.
After acquiring the first password, the cloud platform may send the first password to the routing device. Correspondingly, the routing device can receive the first password sent by the cloud platform, so that the first password is obtained according to the identification of the first electronic device.
In this embodiment, the routing device obtains the first password according to the identifier of the first electronic device through the cloud platform, so that the calculation amount of the routing device is reduced, and therefore, the requirement on the calculation capability of the routing device is reduced.
As a possible implementation manner, before sending the network probe frame to the routing device, the first electronic device may further generate the target SSID according to a preset SSID naming rule and the identifier of the first electronic device.
Optionally, the preset SSID naming rule may be stored in the first electronic device in advance for the user, for example.
The preset SSID naming rule may be < DeviceID > _ hrwifi, for example. Wherein the DeviceID represents an identification of the first electronic device. < DeviceID > _ hrwifi can be the target SSID.
Optionally, before the routing device obtains the first password according to the identifier of the first electronic device, the routing device may further determine whether the target SSID meets a preset SSID naming rule. If the target SSID accords with the preset SSID naming rule, the routing equipment can be connected with the first electronic equipment, and the first electronic equipment is provided with a network. Thus, the routing device may perform deriving the first password from the identification of the first electronic device.
Still taking the preset SSID naming rule < DeviceID > _ hrwifi as an example, the routing device may determine that the target SSID meets the preset SSID naming rule, for example, when the target SSID meets the format of < DeviceID > _ hrwifi.
If the routing device determines that the target SSID does not conform to the preset SSID naming rule, it is indicated that the first electronic device may not belong to the same manufacturer as the routing device, or a network detection frame sent by the first electronic device may not be safe. Thus, the routing device may, for example, discard the network probe frame and not feedback the probe response of the network probe frame.
In this embodiment, when it is determined that the target SSID meets a preset SSID naming rule, a first password is obtained according to an identifier of the first electronic device. By the method, the safety of the network detection frame sent by the first electronic equipment is checked, and the safety of the network distribution of the first electronic equipment is further improved.
The following describes in detail the timing of the routing device sending the connection parameters of the actual access point to the first electronic device:
as a possible implementation manner, the routing device may send the connection parameters of the actual access point to the first electronic device directly through the first communication connection after establishing the first communication connection with the first electronic device.
As another possible implementation manner, before the routing device sends the connection parameters of the actual access point to the first electronic device, the validity of the first electronic device may be checked by the cloud platform, so as to further improve the security of the network distribution process.
In this implementation, the first electronic device may, for example, send a device verification request to the cloud platform over the first communication connection after establishing the first communication connection with the routing device and before receiving the connection parameters of the actual access point of the routing device from the routing device over the first communication connection. The device verification request may include an identification of the first electronic device.
Accordingly, the cloud platform may receive the device verification request. Then, the cloud platform can perform validity check on the first electronic device according to the identifier of the first electronic device included in the device check request.
For example, the cloud platform may store in advance the identities of all electronic devices produced by a manufacturer. If the cloud platform searches the identifiers of the first electronic equipment in the identifiers of all the electronic equipment, and the first electronic equipment is the equipment produced by the manufacturer, the cloud platform can determine that the validity verification of the first electronic equipment passes. If the cloud platform does not find the identifier of the first electronic device in the identifiers of all the electronic devices, which means that the first electronic device is not a device produced by the manufacturer, the cloud platform can determine that the validity check of the first electronic device is not passed.
Or the cloud platform may also have a blacklisted device identification list stored in advance, for example. If the cloud platform searches the identifier of the first electronic device in the blacklist of device identifiers, which indicates that the first electronic device is a device for prohibiting network allocation, the cloud platform can determine that the validity check of the first electronic device is not passed. If the cloud platform does not find the identifier of the first electronic device in the blacklist device identifier list, which indicates that the first electronic device is a device capable of performing network configuration, the cloud platform can determine that the validity check of the first electronic device passes.
If the validity check of the cloud platform on the first electronic device passes, the cloud platform may send a first instruction for indicating that the routing device sends the connection parameter of the actual access point to the first electronic device to the routing device. Accordingly, the routing device may receive the first instruction from the cloud platform. The routing device, after receiving the first instruction, may send connection parameters of the actual access point to the first electronic device.
If the validity of the first electronic device by the cloud platform is not checked, for example, the cloud platform may send a second instruction to the routing device, where the second instruction is used to instruct the routing device not to send the connection parameter of the actual access point to the first electronic device. If the routing device receives the second instruction, for example, the routing device may not send the connection parameter of the actual access point to the first electronic device, so as to avoid connection between the first electronic device and the actual access point of the routing device, thereby improving security of the routing device. In this implementation, further, the routing device may also delete the previously established virtual access point, for example.
In some embodiments, the routing device may further determine, after the virtual access point is established, whether the first instruction sent by the cloud platform is received within a preset duration. If the routing device receives the first instruction sent by the cloud platform within the preset duration, an operation of sending the connection parameters of the actual access point to the first electronic device can be executed. If the routing device does not receive the first instruction sent by the cloud platform within the preset time, the virtual access point can be deleted. By the method, the route equipment is prevented from opening the virtual access point for a long time, the safety of the route equipment is improved, and network resources and power consumption of the route equipment are saved.
Taking the passing of the validity check of the first electronic device by the cloud platform as an example, the following describes in detail the time when the cloud platform sends the first instruction to the routing device:
optionally, the cloud platform may directly send the first instruction to the routing device after passing the validity check on the first electronic device.
Or the cloud platform can also determine whether to send the first instruction to the routing device according to whether to receive the instruction for network configuration of the first electronic device sent by the user terminal after the validity check of the first electronic device is passed.
For example, the user terminal may send a device configuration command to the cloud platform in response to a user-triggered operation of adding a new device. The device network allocation instruction may include a user identifier. The identity of the user may be, for example, a unique identity such as a user name of the user. The user terminal may be, for example, a mobile phone, a tablet computer, or the like.
Taking the user terminal as a mobile phone or a tablet computer as an example, fig. 2b is an interface schematic diagram of the user terminal provided by the present application. As shown in fig. 2b, the APP of the manufacturer to which the first electronic device belongs may be installed in the user terminal. The user can trigger the operation of opening the APP, click on the control of 'adding new equipment' in the APP interface, and trigger the operation of adding new equipment.
It should be understood that the present application is not limited to a communication manner between the user terminal and the cloud platform. The user terminal may, for example, communicate with the cloud platform via the routing device. Or the user terminal can also communicate with the cloud platform through a mobile communication mode such as a fifth generation mobile communication technology (5th Generation Mobile Communication Technology,5G).
Correspondingly, the cloud platform can receive the equipment network allocation instruction sent by the user terminal.
Then, the cloud platform may determine, according to the user identifier and the mapping relationship between the user identifier, the SSID of the actual access point of the routing device, and the identifier of the first electronic device, the SSID of the actual access point of the routing device and the identifier of the first electronic device.
The mapping relationship between the user identifier and the SSID of the actual access point of the routing device may be stored in the cloud platform in advance. The mapping relationship between the SSID of the actual access point of the routing device and the identifier of the first electronic device may be stored by the cloud platform after the validity check of the first electronic device passes. That is, the cloud platform may store the mapping relationship between the SSID of the actual access point of the routing device and the identifier of the first electronic device after the validity check of the first electronic device passes. The mapping relation among the user identifier, the SSID of the actual access point of the routing equipment and the identifier of the first electronic equipment can be determined through the mapping relation among the user identifier, the SSID of the actual access point of the routing equipment and the identifier of the first electronic equipment.
The identifier of the routing device may be, for example, carried in a device verification request when the first electronic device sends the device verification request to the cloud platform through the first communication connection.
Then, the cloud platform may send the first prompt information to the user terminal. The first prompt message may include an SSID of an actual access point of the routing device and an identifier of the first electronic device. The first prompt message may be used to prompt a user to confirm whether to perform network configuration on the first electronic device through the routing device.
Correspondingly, the user terminal can receive the first prompt information.
The user terminal may then display the first prompt. Still taking fig. 2b as an example, as shown in fig. 2b, the user terminal may display the SSID of the actual access point of the routing device included in the first hint information, and an identification of the first electronic device.
And then, the user terminal can respond to the operation of starting the network distribution of the first electronic equipment triggered by the user and send an instruction of network distribution of the first electronic equipment to the cloud platform. Still taking fig. 2b as an example, as shown in fig. 2b, the user may trigger starting the operation of network configuration on the first electronic device, for example, by clicking the control "yes".
In some embodiments, if the user triggers an operation of not performing network allocation on the first electronic device through the user terminal (for example, the user clicks a "no" control shown in fig. 2 b), optionally, the user terminal may send, for example, an instruction to instruct not to perform network allocation on the first electronic device to the cloud platform, so that the cloud platform may send, to the routing device, an instruction to not perform network allocation on the first electronic device. Further, the routing device may delete the virtual access point, for example.
After receiving the instruction for configuring the network for the first electronic device, the cloud platform may send the first instruction for instructing the routing device to send the connection parameter of the actual access point to the first electronic device to the routing device.
In this embodiment, after receiving an instruction for adding a network device to be configured, which is triggered by a user through a user terminal, the cloud platform may send a first instruction to the routing device. By the method, the cloud platform can send the first instruction to the routing equipment according to the instruction of the user, so that the routing equipment sends the connection parameters of the actual access point to the first electronic equipment after obtaining the instruction of the user, and further the network distribution of the first electronic equipment is realized after the user instructs the network distribution equipment to be distributed. By the method, the requirement of a user on the network distribution of the first electronic equipment is met, the user experience is improved, and network resources are saved.
Further, as a possible implementation manner, the routing device may further delete the virtual access point after sending the connection parameters of the actual access point of the routing device to the first electronic device. By the method, the route equipment is prevented from continuing to open the virtual access point, the network resource consumption and the power consumption of the route equipment are reduced, and the security of the route equipment is improved. The routing device may, for example, implement deleting the virtual access point by deleting configuration information used to create the virtual access point.
Taking the application scenario shown in fig. 1 as an example, assume that a routing device is a router, the first electronic device is an intelligent home appliance, the user terminal is a mobile phone, and fig. 3 to fig. 6 are schematic flow diagrams of another device network allocation method provided by the present application.
First, fig. 3 is a schematic flow chart of a method for establishing a first communication connection between an intelligent home appliance and a router according to the present application. As shown in fig. 3, the method may include the steps of:
1. The user operates the router to start. The internet connection of the router can also be configured through a network configuration device such as a light cat.
2. And starting the intelligent household appliance after the user operates the intelligent household appliance to reset.
3. The smart home device reads its own DeviceID (i.e., the identity of the smart home device).
4. And the intelligent household electrical appliance sends an 802.11Probe Req (a WIFI network detection frame in a WIFI communication protocol) according to a preset SSID naming rule.
The SSID naming rule may be, for example, < DeviceID > _ hrwifi.
5. The router receives the WIFI network probe frame sent by the smart home device, and determines whether the target SSID meets a preset SSID naming rule (e.g., detects whether the target SSID includes a DeviceID and a fixed string_ hrwifi).
6. If the preset SSID naming rule is met, the router sends the device identification of the intelligent household appliance to the cloud platform so as to acquire the first password from the cloud platform.
7. And the cloud platform acquires the first password according to the identification of the intelligent household appliance and returns the first password to the router.
8. The router dynamically creates a virtual AP hotspot (i.e., the aforementioned virtual access point) using the target SSID and the first password.
9. The router sends a probe response to the smart home device that includes the SSID of the virtual access point.
10. The intelligent household appliance uses the SSID of the virtual access point and the first password to send a request for connecting the virtual access point.
11. The router checks the SSID and the first password in the connection request sent by the intelligent household appliance, and if the SSID and the first password are matched with the configuration stored by the router, the first communication connection is established.
12. The router may also send a connection reply to the intelligent home device.
Fig. 4 is a schematic flow chart of a method for verifying validity of an intelligent home appliance according to the present application. As shown in fig. 4, the method may include the steps of:
13. The intelligent home device sends a device verification request to the router.
14. The router sends a device verification request to the cloud platform.
15. If the validity check of the intelligent home appliance by the cloud platform fails, the intelligent home appliance is not supported to perform the fast connection mode network allocation through the router, the cloud platform can execute step 16 to control the router to destroy the created virtual access point, and the router can recover the memory occupied by the virtual access point.
16. And the cloud platform sends a verification failure response to the router.
17. If the cloud platform verifies that the intelligent household electrical appliance is legal and successful, the relevant information of the intelligent household electrical appliance is recorded.
The related information may include, for example, an identifier of the intelligent home device, an SSID of a virtual access point, a status of the intelligent home device being in a distribution network, user information bound by the router, and the like.
18. And the cloud platform sends a verification success response to the router.
Fig. 5 is a flowchart of a method for sending a first instruction to a router according to the present application. As shown in fig. 5, the method may include the steps of:
19. the user operates the APP installed in the mobile phone and clicks the "Add New Intelligent household appliance" control.
20. And the mobile phone sends an instruction for adding the new equipment to the cloud platform.
21. And the cloud platform retrieves the intelligent household appliances to be distributed according to the router information and the associated user information.
22. The cloud platform pushes prompt information for finding out the new intelligent household electrical appliance to the mobile phone.
The prompt message may carry the SSID of the router primary WiFi (i.e., the actual access point) hotspot, and is used to prompt the user for confirmation.
23. The user clicks a control confirming the addition of the new smart home device.
24. The mobile phone display is used for prompting a user whether to connect the intelligent household appliance with the main WIFI hot spot SSID.
25. After the user selects 'start connection', the mobile phone sends an instruction of the equipment to be distributed to the cloud platform.
26. The cloud platform sends a first instruction to the router, wherein the first instruction is used for indicating the routing equipment to send the connection parameters of the actual access point to the intelligent household appliance.
Fig. 6 is a flow chart of a method for connecting with an actual access point of a router according to the present application. As shown in fig. 6, the method may include the steps of:
27. the router sends the connection parameters of the actual access point of the routing device to the intelligent home device.
28. The intelligent home appliance sends a receiving response to the routing device.
29. The intelligent home device disconnects the first communication connection.
30. The router sends a disconnection response to the intelligent home device.
31. The router destroys the hidden virtual AP temporarily created and recovers the memory space.
32. The intelligent home device sends a primary WiFi hotspot of the 802.11Probe Req Probe router.
33. The router again sends encrypted information (i.e., in response to the primary WiFi hotspot detection) to the smart home device including the SSID and password of the primary WiFi.
34. The intelligent household appliance is connected with the main WiFi hot spot of the router.
35. The router sends a connection response to the intelligent home device.
36. The router sends the prompt message of the intelligent household electrical appliance on line to the cloud platform.
37. And the cloud platform sends an online response to the router.
In this embodiment, the intelligent home device connects to the hidden virtual WiFi hotspot AP of the router, so that the first communication connection may obtain the SSID and the password of the actual access point pushed by the router for device configuration. By the method, the rapid network distribution of the intelligent household electrical appliance is realized, when the intelligent household electrical appliance supporting the rapid connection function and the router cooperate, the network distribution process is simpler, more convenient and easier to use, the process of requiring a user to operate a mobile phone to start Bluetooth or manually select WiFi hot spots and input passwords is avoided, and the network distribution efficiency and success rate are improved.
In addition, by the method, a fixed hot point AP does not need to be built in the router, and the network distribution is performed through the dynamically created virtual AP. The virtual AP can be destroyed after the equipment completes the distribution network or the distribution network is overtime, the memory is recovered, the security of the distribution network is improved, and the network resources and the power consumption of the router are saved.
Further, because the existing hot-spot SSID is fixedly written in all types of devices and routers of the manufacturer, no ID of the intelligent home appliance is transmitted in the connection process, when the device is erroneously connected to a router supporting the function of other manufacturers and the device is bound to an account of the other manufacturers, the data cannot be tracked, the problem cannot be repaired for the user, and the user experience is poor. According to the network distribution method provided by the application, the intelligent household electrical appliance is connected with the cloud platform through the hidden virtual AP of the router, and the cloud platform can verify and record the related information of the intelligent household electrical appliance, so that the data of the intelligent household electrical appliance can be used for tracking, the user problem can be solved conveniently, and the user experience is improved.
Fig. 7 is a schematic structural diagram of a device network distribution apparatus according to the present application. The apparatus 40 is applied to a first electronic device. As shown in fig. 7, the apparatus 40 includes a transmitting module 41, a first receiving module 42, a first processing module 43, a second receiving module 44, and a second processing module 45. Wherein, the
A sending module 41, configured to send a network probe frame to the routing device. The network detection frame comprises a target service set identifier SSID, wherein the target SSID comprises an identifier of the first electronic equipment.
A first receiving module 42 is configured to receive a probe response from the routing device. The detection response is sent after the routing equipment establishes the virtual access point by taking the target SSID as a service set identification SSID of the virtual access point and taking a first password as a connection password of the virtual access point, wherein the first password is obtained by the routing equipment according to the identification of the first electronic equipment, and the detection response comprises the SSID of the virtual access point.
A first processing module 43, configured to establish a first communication connection with the routing device using an SSID of the virtual access point and the first password.
A second receiving module 44, configured to receive, via the first communication connection, a connection parameter of an actual access point of the routing device from the routing device.
A second processing module 45, configured to establish a second communication connection with the routing device using the connection parameters of the actual access point.
Optionally, the first processing module 43 is further configured to obtain the first password according to the identifier of the first electronic device before the first communication connection is established with the routing device using the SSID of the virtual access point and the first password.
Optionally, the sending module 41 is further configured to send, after the first communication connection is established with the routing device and before the connection parameter of the actual access point of the routing device is received through the first communication connection, a device verification request to a cloud platform through the first communication connection, so that the cloud platform performs validity verification on the first electronic device according to an identifier of the first electronic device included in the device verification request, and sends, when the validity verification passes, a first instruction to the routing device, where the first instruction is used to instruct the routing device to send, to the first electronic device, the connection parameter of the actual access point.
Optionally, the first processing module 43 is further configured to generate, before the sending of the network probe frame to the routing device, the target SSID according to a preset SSID naming rule and an identifier of the first electronic device.
The device network allocation apparatus 40 provided by the present application is configured to execute the device network allocation method embodiment executed by the first electronic device, and its implementation principle and technical effects are similar, and will not be described again.
Fig. 8 is a schematic structural diagram of another network distribution device for equipment according to the present application. The apparatus 50 is applied to a routing device. As shown in fig. 8, the apparatus 50 includes a receiving module 51, a processing module 52, and a transmitting module 53. Wherein, the
The receiving module 51 is configured to receive a network probe frame from a first electronic device. The network detection frame comprises a target service set identifier SSID, wherein the target SSID comprises an identifier of the first electronic equipment.
And the processing module 52 is configured to obtain a first password according to the identifier of the first electronic device, use the target SSID as a service set identifier SSID of a virtual access point, and use the first password as a connection password of the virtual access point to establish the virtual access point.
And a sending module 53, configured to send a probe response including an SSID of the virtual access point, so that the first electronic device uses the SSID of the virtual access point, and the first password to establish a first communication connection with the routing device, and send, through the first communication connection, a connection parameter of an actual access point of the routing device to the first electronic device, so that the first electronic device uses the connection parameter of the actual access point to establish a second communication connection with the routing device.
Optionally, the processing module 52 is specifically configured to determine whether the format of the network probe frame conforms to a preset format. Optionally, the sending module 53 is specifically configured to send the identifier of the first electronic device to a cloud platform when the format of the network probe frame conforms to the preset format, so that the cloud platform obtains the first password according to the identifier of the first electronic device and sends the first password to the routing device, and optionally, the receiving module 51 is further configured to receive the first password sent by the cloud platform.
Optionally, the receiving module 51 is further configured to receive a first instruction from a cloud platform before the connection parameter of the actual access point of the routing device is sent to the first electronic device through the first communication connection. The first instruction is used for indicating the routing equipment to send the connection parameters of the actual access point to the first electronic equipment, and the first instruction is sent after the validity check of the cloud platform on the first electronic equipment is passed.
Optionally, the processing module 52 is further configured to delete the virtual access point after the sending of the connection parameters of the actual access point of the routing device to the first electronic device.
The device network allocation apparatus 50 provided by the present application is configured to execute the device network allocation method embodiment executed by the routing device, and its implementation principle and technical effects are similar, and will not be described again.
Fig. 9 is a schematic structural diagram of another network distribution device of the present application. The apparatus 60 is applied to a user terminal. As shown in fig. 9, the apparatus 60 includes a first transmitting module 61, a receiving module 62, a display module 63, and a second transmitting module 64. Wherein, the
The first sending module 61 is used for responding to the operation of adding new equipment triggered by a user and sending an equipment network allocation instruction to the cloud platform, wherein the equipment network allocation instruction comprises a user identifier;
And the receiving module 62 is configured to receive the first prompt information from the cloud platform. The first prompt message comprises a service set identifier SSID of an actual access point of the routing equipment and an identifier of the first electronic equipment, wherein the first prompt message is used for prompting the user to confirm whether the first electronic equipment is configured with a network through the routing equipment, the SSID of the actual access point of the routing equipment and the identifier of the first electronic equipment are determined by the cloud platform according to the user identifier.
The display module 63 is configured to display the first prompt message.
The second sending module 64 is configured to send, to the cloud platform, an instruction to perform network configuration on the first electronic device in response to a start of network configuration operation triggered by a user, so that the cloud platform sends a first instruction to the routing device, where the first instruction is configured to instruct the routing device to send, to the first electronic device, a connection parameter of the actual access point, so that the first electronic device connects with the routing device using the connection parameter of the actual access point.
The device network allocation apparatus 60 provided by the present application is configured to execute the device network allocation method embodiment executed by the user terminal, and its implementation principle and technical effects are similar, and will not be described again.
Fig. 10 is a schematic structural diagram of an electronic device according to the present application. Alternatively, the electronic device may be the aforementioned first electronic device, routing device or user terminal. As shown in fig. 10, the electronic device 700 may include at least one processor 701 and memory 702, a receiver 705, and a transmitter 704.
Wherein, the
Both the receiver 705 and the transmitter 704 are coupled to the processor 701. The processor 701 controls the reception operation of the receiver 705, and the processor 701 controls the transmission operation of the transmitter 704.
A memory 702 for storing programs. In particular, the program may include program code including computer-operating instructions.
The memory 702 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 701 is configured to execute computer-executable instructions stored in the memory 702 to implement the device networking method described in the foregoing method embodiment. The processor 701 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Optionally, the electronic device 700 may also include a communication interface 703. In a specific implementation, if the communication interface 703, the memory 702, and the processor 701 are implemented independently, the communication interface 703, the memory 702, and the processor 701 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 703, the memory 702, and the processor 701 are implemented on a single chip, the communication interface 703, the memory 702, and the processor 701 may complete communication through internal interfaces.
The application also provides a computer readable storage medium, which may include a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, and in particular, the computer readable storage medium stores program instructions, where the program instructions are used in the method in the foregoing embodiments.
The present application also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instructions from the readable storage medium, and execution of the execution instructions by the at least one processor causes the electronic device to implement the device networking method provided by the various embodiments described above.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.