It is a kind of to allow facility registration to cloud with network method based on SmartConfig modeTechnical field
The present invention relates to network design field, more particularly to a kind of allow facility registration to cloud based on SmartConfig modeMatch network method in end.
Background technique
Smart home, household electrical appliances are generallyd use also in the stage of popularization due to popularizing for family's wifi network at present at this stageWifi and router are completed to connect, and carry out data interaction with mobile phone, cloud.Currently a popular wifi configuration mode generally have withLower 2 kinds: 1, Intelligent hardware is in ap mode, and mobile phone is used for station mode, forms local after the AP of mobile phone connection intelligent socketNet, mobile phone send need link road by SSID and password to intelligent socket, Intelligent hardware actively goes connection specified circuit by rear, completeAt connection;2, a key configures (SmartConfig) mode: Intelligent hardware is under promiscuous mode, monitors all reports in networkText, cell phone application into UDP message, send SSID and cipher coding, Intelligent hardware is received by broadcast packet or group castingIt is decoded after UDP message, obtains correct SSID and password, then actively connected the routing of specified SSID, complete connection.And it is above-mentionedTwo methods have the following problems: smart machine, smart phone and cloud distribution need interaction repeatedly, and process complexity causes to matchNet success rate is low, slow with net spee.
This method of the present invention allows facility registration, with network method, to allow to cloud based on a kind of based on SmartConfig modeMobile phone is only once interacted with smart machine, is reduced interaction flow and is realized cloud registration, simplifies and match network process, improve distributionSuccess rate and speed.
Summary of the invention
In view of the above drawbacks of the prior art, the technical problem to be solved by the present invention is to allow mobile phone and smart machine onlyIt is once interacted, reduces interaction flow and realize cloud registration, simplify and match network process, improve the success rate and speed of distribution.
To achieve the above object, a preferred embodiment of the invention is provided a kind of allowed based on SmartConfig mode and setIt is standby be registered to cloud with network method, comprising the following steps:
Step 1, mobile phone send the request of bound device;
Step 2 receives the short code key that server end is sent, and sends instruction packet;
Step 3, interval specified time send inquiry.
Further, step 1 is specifically, mobile phone is used to bind the request of the short code key of hardware to server end transmission.
Further, instruction packet includes WiFi title, password and short code key, and instruction coating is set as being sent to router,Instruction packet is transmitted to equipment by router, and locking mobile phone issues instruction packet after equipment receives instruction packet.
Further, instruction coating parsing, the data after instruction coating parsing are sent to cloud and initiate activation requestAnd distribution.
Further, the interval time of step 3 is arranged to 2 seconds, inquires specifically, constantly sending to cloud every 2 secondsEquipment whether the request of binding success, if distribution success, equipment show distribution success, otherwise continue send query facility whetherThe request of binding success.
Another preferred embodiment of the invention provides a kind of allows facility registration to arrive cloud based on SmartConfig modeNetwork distribution device characterized by comprising
Request module: it is requested for sending to obtain the request of short code key and initiate activation to cloud to server end;
Receiving module: for receiving short code key and cloud message;
Processing module: for handling instruction packet.
Further, comprising: processing module is specifically used for the information packages such as the short code key for receiving receiving module into fingerShow packet, and instruction packet is transmitted to router, equipment is forwarded to by router, locking mobile phone issues after equipment receives instruction packetInstruction packet.
Another embodiment of the invention provides a kind of computer equipment, including memory, processor and is stored inOn memory and the computer program that can run on a processor, which is characterized in that when processor executes program, realize the present inventionThe method of embodiment.
Another embodiment of the invention provides a kind of computer readable storage medium, is stored thereon with computer journeySequence, which is characterized in that the method for the embodiment of the present invention is realized when the program is executed by processor.
Technical effect
The present invention, which uses, is based on SmartConfig mode, in the way of short code key, mobile phone and smart machine is allowed only to carry out oneCloud registration is realized in secondary interaction, reduces interaction flow and distribution process, is improved and is matched net spee and success rate.
It is described further below with reference to technical effect of the attached drawing to design of the invention, specific structure and generation, withIt is fully understood from the purpose of the present invention, feature and effect.
Detailed description of the invention
Fig. 1 is that one kind of a preferred embodiment of the invention is based on SmartConfig mode and allows facility registration to cloudThe flow diagram with network method.
Fig. 2 is that one kind of a preferred embodiment of the invention is based on SmartConfig mode and allows facility registration to cloudThe flow diagram with network method.
Specific embodiment
The present invention is described further with reference to the accompanying drawings and detailed description.
As shown in Figure 1, allowing facility registration to the distribution side in cloud based on SmartConfig mode the present invention provides a kind ofMethod, comprising the following steps:
Step 101, mobile phone send the request of bound device;Specifically, mobile phone is used to bind hardware to server end transmissionShort code key request.
Step 102 receives the short code key that server end is sent, and sends instruction packet;Instruction packet include WiFi title, password andShort code key, instruction coating are set as being sent to router, and instruction packet is transmitted to equipment by router, after equipment receives instruction packetIt locks mobile phone and issues instruction packet.
Step 103, interval specified time send inquiry.
Another embodiment of the invention, instruction coating parsing, the data after instruction coating parsing are sent to cloudAnd initiate activation request and distribution.
Further, the interval time of step 3 is arranged to 2 seconds, inquires specifically, constantly sending to cloud every 2 secondsEquipment whether the request of binding success, if distribution success, equipment show distribution success, otherwise continue send query facility whetherThe request of binding success.
Illustrate the process with a simple example:
As shown in Fig. 2, shared mobile phone, four end of server-side, router and smart machine, user is sent with mobile phone to be needed to bindSmart machine short code key to server, after receiving short code key, instruction will be packaged into WiFi title, password and short code keyPacket is herein broadcast or multicast packets, is sent to router, is forwarded instruction packet in the sky by router, and smart machine is logicalIt crosses and monitors aerial broadcast or multicast packet to receive information, while connecting router, and information is returned into router.Mobile phone every 2Second to server ask whether with smart machine binding success, distribution is shown if binding success, if it fails, returnTo mobile phone, mobile phone continues to inquire to server message.At the same time, smart machine sends registration letter to server with instruction packetBreath, and after being registered in and succeeding in registration, server will send the successful message of distribution to mobile phone.
Another preferred embodiment of the invention provides a kind of allows facility registration to arrive cloud based on SmartConfig modeNetwork distribution device, comprising:
Request module: it is requested for sending to obtain the request of short code key and initiate activation to cloud to server end;
Receiving module: for receiving short code key and cloud message;
Processing module: for handling instruction packet.Processing module is specifically used for the letter such as short code key for receiving receiving moduleBreath is packaged into instruction packet, and instruction packet is transmitted to router, is forwarded to equipment by router, equipment is locked after receiving instruction packetDetermine mobile phone and issues instruction packet.
Device in the present embodiment can be used for executing described in any of the above-described embodiment based on SmartConfig modeAllow facility registration to cloud with network method, specific implementation principle may refer to any of the above-described embodiment, and details are not described herein again.
The present invention, which uses, is based on SmartConfig mode, in the way of short code key, mobile phone and smart machine is allowed only to carry out oneCloud registration is realized in secondary interaction, and whole process lasts about 15 seconds or so, reduces interaction flow and distribution process, is improved and is matched net speeAnd success rate.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that those skilled in the art withoutIt needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the artPersonnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's ideaTechnical solution, all should be within the scope of protection determined by the claims.