Disclosure of Invention
In view of the above technical problems, the present invention aims to provide a method, a system, an electronic device and a medium for WiFi network configuration of an intelligent device, which solve the problem that when the existing network configuration operation flow faces many different kinds of target intelligent devices and the different target intelligent devices adopt different network configuration modes, a user needs to perform more switching operations.
The invention adopts the following technical scheme:
a WiFi network distribution method of intelligent equipment is applied to a client and comprises the following steps:
Sending a query request for acquiring intelligent equipment product information to a cloud; the equipment product information at least comprises names of all intelligent equipment and identifier information of all intelligent equipment;
If intelligent equipment product information returned by the cloud is received, a first input instruction is obtained, and target intelligent equipment and identifier information of the target intelligent equipment are determined in the intelligent equipment product information according to the first input instruction;
acquiring a second input instruction, and determining an identifier and password information of a target router according to the second input instruction;
Searching the target intelligent equipment by sending UDP broadcast packets, monitoring Bluetooth broadcast and searching an identifier of the target intelligent equipment;
When searching a target intelligent device, sending distribution network information to the target intelligent device so that the target intelligent device establishes connection with the target router according to the distribution network information; the distribution network information includes an identifier and password information for logging in the target router.
Optionally, the sending the network allocation information to the target intelligent device includes:
When the network distribution mode of the target intelligent equipment is network distribution through a wireless connection point, acquiring the wireless connection point of the target intelligent equipment, acquiring a third input instruction, establishing connection between the client and the wireless connection point of the target intelligent equipment according to the third input instruction, and sending network distribution information to the target intelligent equipment.
Optionally, the sending the network allocation information to the target intelligent device includes:
When a UDP broadcast packet is sent, sending distribution network information to the target intelligent equipment; the UDP broadcast packet contains distribution network information, so that when the distribution network mode of the target intelligent device is intelligent distribution network, the target intelligent device obtains a data frame according to the UDP broadcast packet, and analyzes the data frame to obtain an identifier and password information for logging in the target router.
Optionally, the sending the network allocation information to the target intelligent device includes:
When the Bluetooth broadcast is monitored, bluetooth connection is established with the target intelligent equipment, and the network distribution information is sent to the target intelligent equipment through a Bluetooth transmission mode, so that the target intelligent equipment acquires the network distribution information through the Bluetooth transmission mode when the network distribution mode of the target intelligent equipment is Bluetooth auxiliary network distribution.
Optionally, the method further comprises the following steps:
binding: acquiring equipment verification information, wherein the equipment verification information comprises one or more of a product model, a product key, a product function and protocol token information of target intelligent equipment; after the target intelligent device is connected with the cloud end through the target router, a binding request is sent to the cloud end, so that the cloud end binds the target intelligent device with the client end according to the binding request, and the binding request contains the device verification information.
Optionally, the acquiring the device verification information includes:
When the network distribution mode of the target intelligent equipment is Bluetooth auxiliary network distribution, receiving Bluetooth broadcast information sent by the target intelligent equipment, wherein the Bluetooth broadcast information comprises equipment verification information; and analyzing the Bluetooth broadcast information to obtain equipment verification information.
Optionally, the acquiring the device verification information includes:
When the network distribution mode of the target intelligent equipment is intelligent network distribution, receiving wireless broadcast information sent by the target intelligent equipment, wherein the wireless broadcast information comprises equipment verification information; and analyzing the wireless broadcast information to obtain the equipment verification information.
A smart device WiFi distribution system, comprising: the system comprises a client, a target intelligent device, a cloud end and a target router; the target router is connected with the cloud; the target intelligent equipment is provided with a WiFi signal receiving and transmitting unit;
The client is used for sending a query request for acquiring the product information of the intelligent equipment to the cloud; if intelligent equipment product information returned by the cloud is received, a first input instruction is obtained, and target intelligent equipment and identifier information of the target intelligent equipment are determined in the intelligent equipment product information according to the first input instruction; acquiring a second input instruction, and determining an identifier and password information of a target router according to the first input instruction; transmitting distribution network information to the target intelligent equipment so that the target intelligent equipment establishes connection with the target router according to the distribution network information and establishes connection with a cloud through the target router; the distribution network information comprises an identifier and password information for logging in the target router;
the target intelligent device is used for receiving the distribution network information sent by the client, establishing connection with the target router according to the distribution network information, and establishing connection with the cloud through the target router.
An electronic device, comprising: the system comprises at least one processor and a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the smart device WiFi networking method.
A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the smart device WiFi network deployment method.
Compared with the prior art, the invention has the beneficial effects that:
According to the invention, the target intelligent equipment is automatically searched through the client, and when the target intelligent equipment is searched, the distribution network information is sent to the target intelligent equipment, no matter what distribution network mode the target intelligent equipment adopts for distribution network, the distribution network of the intelligent equipment can be realized without switching the distribution network mode on the client or the intelligent equipment aiming at the distribution network mode of the target intelligent equipment; because switching operation is not required for different distribution network technologies, steps of user operation are reduced, the distribution network interaction process of the intelligent equipment is optimized, and the experience of a user is improved.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and detailed description, wherein, on the premise of no conflict, the following embodiments or technical features can be arbitrarily combined to form new embodiments:
Embodiment one:
referring to fig. 1-7, fig. 1 illustrates a WiFi network configuration method for an intelligent device according to the present invention, including:
step S1, sending a query request for acquiring intelligent equipment product information to a cloud end 1;
Specifically, the query request is used for acquiring information of the product of the intelligent device that can be supported by the cloud 1, for example, information of the product class of the supported target intelligent device 3, the product identifier of the target intelligent device 3, and the like.
Step S2, if intelligent equipment product information returned by the cloud 1 is received, a first input instruction is obtained, and identifier information of the target intelligent equipment 3 and the target intelligent equipment 3 is determined in the intelligent equipment product information according to the first input instruction;
In the specific embodiment of the invention, a first input instruction is input by a user at a client, and the target intelligent equipment 3 of the network distribution required by the user is determined according to the first input instruction.
Step S3, acquiring a second input instruction, and determining the identifier and the password information of the target router 2 according to the second input instruction;
The identifier english SSID is an abbreviation of SERVICE SET IDENTIFIER. The SSID technology can divide a local area network into a plurality of sub-networks requiring different identity verification, each sub-network needs independent identity verification, and only users passing the identity verification can enter the corresponding sub-network to prevent unauthorized users from entering the local network. By the identifier information of the target router 2, the target router 2 can be searched for and a wireless connection point connected to the target router 2.
In the specific embodiment of the invention, a second input instruction is input into the client by a user, and the identifier and the password information of the target router 2 are determined according to the second input instruction; specifically, SSID information and password information of the target router 2 may be input.
Step S4, searching the target intelligent equipment 3 by sending UDP broadcast packets, monitoring Bluetooth broadcast information and searching identifier information of the target intelligent equipment 3, and sending distribution network information to the target intelligent equipment 3 when the target intelligent equipment 3 is searched, so that the target intelligent equipment 3 establishes connection with the target router 2 according to the distribution network information; the distribution network information includes an identifier and password information for logging in the target router 2.
In the specific embodiment of the invention, the client 4 searches the target intelligent device 3 by sending a UDP broadcast packet, monitoring Bluetooth broadcast information and searching identifier information of the target intelligent device 3, so that no matter what network distribution mode the target intelligent device 3 is, the target intelligent device 3 can be searched correspondingly, after the intelligent device is found, a user is prompted to select the target intelligent device 3 to carry out network distribution in the same mode, and interaction steps of intelligent device network distribution are unified and simplified.
In the implementation process, the target intelligent device 3 is automatically searched through the client, no matter what network distribution mode is adopted by the target intelligent device 3 to carry out network distribution, the network distribution mode of the intelligent device can be realized without switching the network distribution modes on the client or the intelligent device aiming at different network distribution modes of the target intelligent device 3. Because switching operation is not required for different distribution network technologies, steps of user operation are reduced, the distribution network interaction process of the intelligent equipment is optimized, and the experience of a user is improved.
In the embodiment of the present invention, in step S4, the sending the network allocation information to the target intelligent device 3 includes:
When the network distribution mode of the target intelligent device 3 is that the network is distributed through a wireless connection point (the wireless connection point distribution network is also called as an AP distribution network), the wireless connection point of the target intelligent device 3 is obtained, a third input instruction is obtained, and the client 4 establishes connection with the wireless connection point of the target intelligent device 3 according to the third input instruction and sends network distribution information to the target intelligent device 3.
In the implementation process, only the first instruction and the second instruction (except for the third instruction when the network distribution mode of the target intelligent device 3 is the network distribution through the wireless connection point) are required to be input by the user, so that the steps of user operation are reduced, and the experience of the user is improved.
In this step, when the network configuration mode of the target intelligent device 3 is network configuration through the wireless connection point, the user is required to input a third instruction through the client, where the third instruction is used for the user to select to establish connection with the wireless connection point of the target intelligent device 3, and after establishing connection with the wireless connection point of the target intelligent device 3, network configuration information is sent to the target intelligent device 3.
In the embodiment of the present invention, in step S4, the sending the network allocation information to the target intelligent device 3 specifically further includes:
When a UDP broadcast packet is sent, sending distribution network information to the target intelligent equipment 3; the UDP broadcast packet includes distribution network information, so that when the distribution network mode of the target intelligent device 3 is an intelligent distribution network (the intelligent distribution network is also called Smart Config distribution network), the target intelligent device 3 obtains a data frame according to the UDP broadcast packet, and parses the data frame to obtain an identifier and password information for logging in the target router 2.
When the Bluetooth broadcast is monitored, bluetooth connection is established with the target intelligent device 3, and the network distribution information is sent to the target intelligent device 3 through a Bluetooth transmission mode, so that the target intelligent device 3 obtains the network distribution information through the Bluetooth transmission mode when the network distribution mode of the target intelligent device 3 is Bluetooth auxiliary network distribution.
As a further embodiment of the present invention, the method of the present invention may further comprise the steps of:
Binding: acquiring equipment verification information, wherein the equipment verification information comprises the product model, the product key, the product function and the protocol token information of the target intelligent equipment 3; after the target intelligent device 3 establishes connection with the cloud 1 through the target router 2, a binding request is sent to the cloud 1, wherein the binding request contains the device verification information; so that the cloud end binds the target intelligent device 3 with the client 4 according to the binding request;
and receiving notification information returned by the cloud end that the binding is successful.
In the implementation process, the client 4 searches the target intelligent device 3 by sending a UDP broadcast packet, monitoring bluetooth broadcast information and searching identifier information of the target intelligent device 3, and prompts a user to select the target intelligent device 3 to perform network allocation and binding after finding the intelligent device, so that interaction steps of intelligent device network allocation are unified and simplified.
Specifically, the obtaining the device verification information includes:
When the network distribution mode of the target intelligent device 3 is Bluetooth auxiliary network distribution, receiving Bluetooth broadcast information sent by the target intelligent device 3, wherein the Bluetooth broadcast information comprises device verification information; and analyzing the Bluetooth broadcast information to obtain equipment verification information.
When the network distribution mode of the target intelligent equipment 3 is intelligent network distribution, receiving wireless broadcast information sent by the target intelligent equipment 3, wherein the wireless broadcast information comprises equipment verification information; and analyzing the wireless broadcast information to obtain the equipment verification information.
When the network configuration mode of the target intelligent device 3 is a wireless connection point network configuration, the binding step includes: the client 4 establishes connection with the wireless connection point of the target intelligent device 3; after the connection between the client 4 and the wireless connection point is established, protocol token information is acquired, and the protocol token information is sent to the target intelligent device 3, so that the target intelligent device 3 forms binding with the user terminal according to the protocol token information after being connected to the cloud 1.
As a further embodiment, the method for WiFi network configuration of an intelligent device of the present invention is applied to a target intelligent device 3, and includes the following steps:
Step S11, receiving distribution network information sent by a client 4, establishing connection with the target router 2 according to the distribution network information, and establishing connection with the cloud 1 through the target router 2; the distribution network information includes an identifier and password information for logging in the target router 2.
Embodiment two:
Referring to fig. 2, the WiFi network system of the present invention includes: the client 4, the target intelligent device 3, the cloud 1 and the target router 2; the target router 2 is connected with the cloud 1; and the target intelligent equipment 3 is provided with a WiFi signal receiving and transmitting unit.
It should be noted that, when the network configuration mode of the target intelligent device 3 is a bluetooth auxiliary network configuration, a bluetooth connection unit is disposed on the target intelligent device 3.
The client 4 is configured to send a query request for acquiring product information of the intelligent device to the cloud 1; if intelligent equipment product information returned by the cloud 1 is received, a first input instruction is obtained, and identifier information of the target intelligent equipment 3 and the target intelligent equipment 3 is determined in the intelligent equipment product information according to the first input instruction; acquiring a second input instruction, and determining the identifier and the password information of the target router 2 according to the first input instruction; sending distribution network information to the target intelligent equipment 3 so that the target intelligent equipment 3 establishes connection with the target router 2 according to the distribution network information and establishes connection with the cloud 1 through the target router 2; the distribution network information comprises an identifier and password information for logging in the target router 2;
The target intelligent device 3 is configured to receive the distribution network information sent by the client 4, establish connection with the target router 2 according to the distribution network information, and establish connection with the cloud 1 through the target router 2.
As a specific example, a specific application of the system of the application is as follows: in the following description of the present application, the client 4 on which the APP of the intelligent device is installed is simply referred to as APP terminal.
1. As shown in fig. 3, when the network configuration mode of the target intelligent device 3 is a bluetooth auxiliary network configuration;
1) The target intelligent device 3 starts Bluetooth broadcasting, the broadcasting content is device verification information, and the device verification information comprises selectable product models, product keys, product supporting functions and the like;
2) The APP end inquires the currently supported product class and SSID list from the cloud end 1 and stores the product class and SSID list;
3) The APP end prompts a user to input SSID and password information of the target router 2;
4) The APP end sends a WiFi UDP broadcast packet, wherein the broadcast packet contains information such as encrypted SSID information and password of a target router 2; meanwhile, searching the designated SSID information according to the SSID list obtained by the query of the cloud 1; monitoring Bluetooth broadcasting at the same time;
5) The APP end receives Bluetooth broadcast information of the target intelligent device 3, analyzes device verification information in the broadcast packet, inquires the device verification information from the cloud end 1, and returns a verification result which can comprise product types, product supporting functions and the like;
6) The APP end establishes Bluetooth connection with the target intelligent device 3, and sends distribution network information to the target intelligent device 3, wherein the distribution network information can comprise SSID, password, token information and the like of the target router 2;
It should be noted that Token information is a string of characters generated by the server, which is used as a Token for the client 4 to request, when the server logs in for the first time, the server generates a Token and returns the Token to the client 4, and then the client 4 only needs to request data with the Token before, and does not need to carry the user name and the password again.
7) The target intelligent device 3 uses SSID information and a password of the target router 2 to carry out network allocation and is connected with the target router 2;
8) The target intelligent device 3 is connected with the cloud 1, and user binding operation is carried out by using information such as token;
9) Cloud 1 issues a notification of successful binding of the device to the APP end.
2. As shown in fig. 4, when the network configuration mode of the target intelligent device 3 is Smart Config network configuration;
1) The target intelligent device 3 starts to monitor the WiFi UDP broadcast packet;
It should be noted that the number of the substrates,
2) The APP end inquires the currently supported product class and SSID list from the cloud end 1 and stores the product class and SSID list;
3) The APP end prompts a user to input the SSID and the password of the target route;
4) The APP end sends a WiFi UDP broadcast packet which contains information such as an encrypted target route SSID and a password; meanwhile, searching a designated SSID according to the SSID list obtained by the query of the cloud 1; monitoring Bluetooth broadcasting at the same time;
5) The target intelligent device 3 captures an effective data frame from the WiFi UDP broadcast packet, analyzes the SSID and the password of the target route, and uses the SSID and the password to connect the target router 2; the target intelligent device 3 is connected to the cloud 1;
6) The target intelligent device 3 broadcasts device verification information through WiFi, wherein the device verification information can be selected from product models, product keys, product supporting functions, token and the like;
7) The APP end receives the WiFi broadcast packet of the target intelligent equipment 3, analyzes the equipment verification information in the data packet, and sends a binding request to the cloud end 1 by using the verification information;
8) The cloud end 1 sends a notification of successful device binding to the APP end and the target intelligent device 3.
3. As shown in fig. 5, when the network allocation mode of the target intelligent device 3 is an AP network allocation;
1) The target intelligent device 3 starts to monitor the WiFi UDP broadcast packet;
2) The APP end inquires the currently supported product class and SSID list from the cloud end 1 and stores the product class and SSID list;
3) The APP end prompts a user to input the SSID and the password of the target route;
4) The APP end sends a WiFi UDP broadcast packet which contains information such as an encrypted target route SSID and a password; meanwhile, searching a designated SSID according to the SSID list obtained by the query of the cloud 1; monitoring Bluetooth broadcasting at the same time;
5) The target intelligent device 3 fails to capture a valid data frame from the WiFi UDP broadcast packet or fails to allocate the network, and exceeds retry times/network allocation timeout; the target intelligent device 3 automatically switches to an AP distribution network mode;
6) The APP end searches the SSID of the SSID list obtained by inquiry, and prompts the user to connect the AP to which the SSID belongs;
7) After the APP end is connected with the AP of the target intelligent device 3, sending network allocation information to the target intelligent device 3, wherein the network allocation information can comprise SSID, password, token and the like of a target route;
8) The target intelligent device 3 is connected with the target router 2 according to the distribution network information;
9) The target intelligent device 3 is connected to the cloud 1 and completes device binding;
10 Cloud 1 issues a notification of successful binding of the device to the APP end.
In another embodiment of the present invention, the present invention provides a complete interaction process of a WiFi distribution network and binding of an intelligent device, where the distribution network system includes a client 4, a target intelligent device 3, a cloud 1, and a target router 2, and an APP (abbreviated as APP end) of the intelligent device is installed on the client 4. The interaction process of each module is shown in fig. 6, and the interaction process includes:
step S100, entering a network distribution flow;
step 200, prompting a user to fill in SSID information and a password of the target router 2 through an APP end;
step 300, the APP end starts to automatically search for the target intelligent device 3;
step 400, the APP end discovers the target intelligent device 3;
step S500, selecting target intelligent equipment 3 needing network allocation and binding through a client;
Step 600, when the target intelligent device 3 is in an AP distribution network mode, the APP end is connected to a designated AP, namely the target intelligent device 3;
step S700, equipment distribution network and binding;
and S800, ending.
Embodiment III:
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where an electronic device 100 for implementing a WiFi network configuration method for an intelligent device according to an embodiment of the present application may be described by using the schematic structural diagram shown in fig. 7.
As shown in fig. 7, an electronic device 100 includes one or more processors 102, one or more memory devices 104, interconnected by a bus system and/or other forms of connection mechanisms (not shown). It should be noted that the components and structures of the electronic device 100 shown in fig. 7 are exemplary only and not limiting, and that the electronic device may have some of the components shown in fig. 7 or may have other components and structures not shown in fig. 7, as desired.
The processor 102 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
The storage 104 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 102 to perform functions in the embodiments of the present application described below (as implemented by the processor) and/or other desired functions. Various applications and various data, such as various data used and/or generated by the applications, may also be stored in the computer readable storage medium.
The present invention also provides a computer storage medium having a computer program stored thereon, in which the method of the present invention can be stored if implemented in the form of software functional units and sold or used as a stand-alone product. Based on this understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer storage media may be suitably augmented or reduced according to the requirements of jurisdictions in which such computer storage media do not include electrical carrier signals and telecommunications signals, such as in certain jurisdictions, according to jurisdictions and patent practices.
It will be apparent to those skilled in the art from this disclosure that various other changes and modifications can be made which are within the scope of the invention as defined in the appended claims.