A kind of quick distribution method and system of smart machine
Technical field
The present invention relates to router field more particularly to a kind of quick distribution method and system of smart machine
Background technique
Continuous with smart home is popularized, and the concept that household electric appliances are developed so far smart home is being swept across rapidly entirely
Industry, and Intelligent hardware product all relies on network service now, equipment distribution also just becomes Intelligent hardware core the most
One of function.
Similar product mainly has with net mode including 4 classes at present: 1, user manipulates client (such as mobile phone), makes client
With Intelligent hardware bluetooth connection, and further pass through client guide Intelligent hardware distribution;2, user manipulates client, makes client
End connects the WiFi signal of upper Intelligent hardware broadcast, and further guides Intelligent hardware distribution by client;3, user manipulates
Client, while Intelligent hardware being made to issue the sound wave of specific frequency, client is connect after receiving with smart machine, and is further led to
Cross client guidance Intelligent hardware distribution;4, client and Intelligent hardware are not directly connected, and client need to connect special routing
Device, and the Intelligent hardware distribution near the guidance of order router.These methods usually require the behaviour dependent on user customer
Control at least needs 4 nodes, i.e. client, radio reception device (such as router), Intelligent hardware ontology and cloud during distribution
Server is held, they need frequently interaction each other and could complete Intelligent hardware distribution after confirming, and any one mistake
The problem of journey, is likely to lead to equipment networking failure.And due to the diversity of different platform client (the not mobile phone of homologous ray,
PC etc.), distribution compatibility issue is also infinitely amplified.
Such as the patent of Publication No. CN108012305A discloses a kind of smart machine and sets with network method, system and intelligence
Standby, the above method includes: that smart machine is based on establishing the first signal path between OOB distribution mechanism and mobile terminal, receives institute
State the Connecting quantity for the destination router that mobile terminal is sent by first signal path;Wherein, the destination router
Connecting quantity include: destination router mark and/or connection password;It is connected according to the Connecting quantity of the destination router
The destination router establishes second signal channel with the destination router, completes distribution.Smart machine provided by the invention
The transmission of the Connecting quantity of destination router is completed based on OOB mechanism with network method, it is not only very convenient, efficient, it can also be promoted
Safety and reliability of the Connecting quantity of destination router in transmission process.But the invention needs to rely on mobile terminal
Distribution could be completed, needs that Intelligent hardware distribution could be completed after frequently interaction and confirmation, it is not convenient enough, and be easy to produce simultaneous
Capacitive problem.
Summary of the invention
The purpose of the present invention is in view of the drawbacks of the prior art, providing a kind of quick distribution method and system of smart machine,
The distribution to smart machine can be completed by router, it is easy to operate, rapid and safer with network process.
In order to achieve the goal above, the invention adopts the following technical scheme:
A kind of method of the quick distribution of smart machine is applied to router, comprising steps of
It is matched with the smart machine in preset range and receives the networking request sent from the smart machine;
It obtains the facility information of the smart machine and judges whether the facility information meets preset rules, if so,
Wifi password is sent to the smart machine, the smart machine connects the router by the wifi password;
The facility information is sent to server and sends bind request to the server.
Preferably, it further comprises the steps of:
Obtain the public key information carried in the networking request;
Encryption is carried out to wifi password according to the public key information and is sent to the encrypted wifi password described
Smart machine, the smart machine connect the router after the wifi password is decrypted.
Preferably, it further comprises the steps of:
Judge whether to establish connection with the smart machine within a preset time;
If establishing connection with the smart machine in preset time, and server successfully binds the smart machine, then closes
The pairing between the smart machine is closed, otherwise, the facility information of the smart machine is removed and closing is set with the intelligence
Pairing between standby.
Preferably, it further comprises the steps of:
Judge that the other smart machines whether received in addition to the smart machine during the smart machine distribution are sent out
The networking request sent, if so, the networking request of refusal other smart machines.
Preferably, pairing button is configured on the smart machine and the router, is opened by clicking the pairing button
Open the pairing mode of the smart machine and the router.
Correspondingly, also providing a kind of system of quick distribution of smart machine, comprising:
Receiving module is matched, for being matched and being received from the smart machine with the smart machine in preset range
The networking of transmission is requested;
Link block is obtained, for obtaining the facility information of the smart machine and judging whether the facility information meets
Preset rules, if so, sending wifi password to the smart machine, the smart machine connects institute by the wifi password
State router;
Binding module is sent, is asked for the facility information to be sent to server and send binding to the server
It asks.
Preferably, further includes:
Public key module is obtained, for obtaining the public key information carried in the networking request;
Encrypt sending module, for according to the public key information to wifi password carry out encryption and will be described encrypted
Wifi password is sent to the smart machine, and the smart machine connects the routing after the wifi password is decrypted
Device.
Preferably, further includes:
Judge link block, establishes connection with the smart machine within a preset time for judging whether;
Closedown module is bound, establishes connection with the smart machine for working as in preset time, and server is successfully bound
Otherwise the smart machine, the then pairing closed between the smart machine remove the facility information of the smart machine simultaneously
Close the pairing between the smart machine.
Preferably, further includes:
Judgement refusal module, for judging whether receive in addition to the smart machine during the smart machine distribution
The networking request that sends of other smart machines, if so, the networking request of refusal other smart machines.
Preferably, pairing button is configured on the smart machine and the router, is opened by clicking the pairing button
Open the pairing mode of the smart machine and the router.
Compared with prior art, the present invention obtains the equipment letter of smart machine by router and smart machine pairing
Breath, and to server transmission bind request to server, the bridge joint person connected as smart machine with server using router,
Frequently interaction is carried out without intelligent terminal, is confirmed, the more quick with network process of smart machine, safety are made.
Detailed description of the invention
Fig. 1 is a kind of method flow diagram for the quick distribution of smart machine that embodiment one provides;
Fig. 2 is a kind of system construction drawing for the quick distribution of smart machine that embodiment one provides;
Fig. 3 is a kind of method flow diagram for the quick distribution of smart machine that embodiment two provides;
Fig. 4 is a kind of system construction drawing for the quick distribution of smart machine that embodiment two provides
Specific embodiment
Following is a specific embodiment of the present invention in conjunction with the accompanying drawings, technical scheme of the present invention will be further described,
However, the present invention is not limited to these examples.
Embodiment one
Present embodiment discloses a kind of methods of the quick distribution of smart machine, are applied to router, as shown in Figure 1, including
Step:
S11, it is matched and is received with the smart machine in preset range and asked from the networking that the smart machine is sent
It asks;
S12, the facility information for obtaining the smart machine simultaneously judge whether the facility information meets preset rules, if
It is then to send wifi password to the smart machine, the smart machine connects the router by the wifi password;
S13, the facility information is sent to server and sends bind request to the server.
Continuous with smart home is popularized, and the concept that household electric appliances are developed so far smart home is being swept across rapidly entirely
Industry, and Intelligent hardware product all relies on network service now, equipment distribution also just becomes Intelligent hardware core the most
One of function.Current usually requires after intelligent terminal carries out frequent operation interaction and confirm to Intelligent hardware just with net mode
Intelligent hardware distribution can be completed, and the problem of any one process, is likely to lead to equipment networking failure, and different flat
The diversity (the not mobile phone of homologous ray, PC etc.) of the intelligent terminal of platform, distribution compatibility issue is also infinitely amplified.
A kind of smart machine provided in this embodiment quickly match network method do not need by intelligent terminal to hardware device into
Row operation, it is only necessary to which smart machine and router are matched, verified and then carry out binding with server and distribution can be completed, and are grasped
Work is easy, quick, and can guarantee the safety with network process.
It is in pre-determined distance after the completion of the power-up initializing of step S11 smart machine with router, wherein the pre-determined distance
For the distance that connects of smart machine and router, smart machine and router complete pairing and issue to router to network first
Request, it is preferred that configure pairing button on the smart machine and the router, open institute by clicking the pairing button
State the pairing mode of smart machine and the router.A kind of preferred embodiment of the present embodiment, smart machine and router are completed
The functional characteristic difference that smart machine can be had more after pairing carries out corresponding pairing prompt, for example, intelligent sound box and router
Voice prompting is issued after completing pairing, intelligent refrigerator and router carry out light prompt etc. after successfully matching.
Step S12 router and smart machine obtain the facility information of the equipment and judge the facility information after successfully matching
Whether preset rules are met, wherein the preset rules can be router before being matched with the smart machine
The facility information and user account information for storing smart machine are believed by the equipment for comparing the received facility information and storage
Whether breath unanimously judges whether the smart machine meets networking condition, if meeting networking condition, sends wifi password to the intelligence
Can equipment, smart machine receives the wifi that router is connected after wifi password.Preferably, it further comprises the steps of:
Obtain the public key information carried in the networking request;
Encryption is carried out to wifi password according to the public key information and is sent to the encrypted wifi password described
Smart machine, the smart machine connect the router after the wifi password is decrypted.
In order to reinforce the networking security of smart machine and router, key is generated after smart machine and router pairing
Right, including public key and private key, the present embodiment carries public key when sending networking request by smart machine, and it is close that router obtains this
Public key in key carries out encrypting and transmitting to smart machine, after smart machine receives encrypted wifi password to wifi password
The wifi of upper router is connected after being decrypted using the private key of key pair.
The facility information for the smart machine that step S13 router will acquire is sent to server and sends to server and binds
Request, the legitimacy of server authentication facility information simultaneously record information, and when detecting that smart machine is online by smart machine
It is bound with user account, so far intelligence energy equipment completes distribution, and router removes the intelligence after smart machine completes distribution
The facility information of equipment caches to carry out the distribution of other smart machines.
By router and smart machine pairing to obtain the facility information of smart machine, and sends and bind to server
This process router of server is requested as the bridge joint person of smart machine and server, make smart machine matches network process more
Accelerate speed, safety.
Preferably, it further comprises the steps of:
Judge that the other smart machines whether received in addition to the smart machine during the smart machine distribution are sent out
The networking request sent, if so, the networking request of refusal other smart machines.
Intelligent hardware and router only support one equipment of one-to-one addition every time, ask when router is connected to first distribution
Other pairing requests are not reprocessed after asking, the pairing that equipment receives first carrying WiFi password does not reprocess other after replying
Pairing replys and stops requesting password.
Correspondingly, the present embodiment also provides a kind of system of quick distribution of smart machine, as shown in Figure 2, comprising:
Receiving module 11 is matched, is set for being matched and being received with the smart machine in preset range from the intelligence
The networking request that preparation is sent;
Link block 12 is obtained, for obtaining the facility information of the smart machine and judging whether the facility information accords with
Preset rules are closed, if so, sending wifi password to the smart machine, the smart machine is connected by the wifi password
The router;
Binding module 13 is sent, is asked for the facility information to be sent to server and send binding to the server
It asks.
Preferably, further includes:
Public key module is obtained, for obtaining the public key information carried in the networking request;
Encrypt sending module, for according to the public key information to wifi password carry out encryption and will be described encrypted
Wifi password is sent to the smart machine, and the smart machine connects the routing after the wifi password is decrypted
Device.
Preferably, further includes:
Judgement refusal module, for judging whether receive in addition to the smart machine during the smart machine distribution
The networking request that sends of other smart machines, if so, the networking request of refusal other smart machines.
Preferably, pairing button is configured on the smart machine and the router, is opened by clicking the pairing button
Open the pairing mode of the smart machine and the router.
The present embodiment obtains the facility information of smart machine by router and smart machine pairing, and to server
Bind request is sent to server, the bridge joint person connected as smart machine with server using router is not necessarily to intelligent terminal
It carries out frequently interaction, confirm, make the more quick with network process of smart machine, safety.
Embodiment two
The present embodiment provides a kind of methods of the quick distribution of smart machine, what is different from the first embodiment is that further including step
S23, step S24 and step S25 solve smart machine because faults itself or other reasons cannot by the limitation of setting Connection Time
The case where distribution influences other Intelligent hardware distributions is completed, as shown in figure 3, comprising steps of
S21, it is matched and is received with the smart machine in preset range and asked from the networking that the smart machine is sent
It asks;
S22, the facility information for obtaining the smart machine simultaneously judge whether the facility information meets preset rules, if
It is then to send wifi password to the smart machine, if so, sending wifi password to the smart machine;
S23, judge whether to establish connection with the smart machine within a preset time;
If establishing connection with the smart machine in S24, preset time, and server successfully binds the smart machine,
The pairing between the smart machine is then closed, otherwise, the facility information of the smart machine is removed and closes and the intelligence
Pairing between energy equipment.
This implementation preset time is set as 60s, and Intelligent hardware opens pairing, pairing mode 60s is maintained, if within this period
Connection router is completed then to be automatically closed;If at the end 60s, time-out is closed since all kinds of exceptions fail to complete connection;Pairing is complete
Journey can actively close pairing mode by clicking pairing key;It routes end and opens pairing, maintain pairing mode 60s, herein
The connection with equipment is completed in period, and then starts to bind.It is automatic if confirming apparatus bound success within this period to close
Close pairing;If failing to establish connection with equipment, do not enter the binding stage, removes facility information at the end 60s, close pairing;If
Connection is established with equipment, but fails to complete apparatus bound due to various reasons, router removes facility information at the end 60s, and
Close pairing;Pairing whole process can actively close pairing mode by click keys.
Preferably, it further comprises the steps of:
Obtain the public key information carried in the networking request;
Encryption is carried out to wifi password according to the public key information and is sent to the encrypted wifi password described
Smart machine, the smart machine connect the router after the wifi password is decrypted.
Preferably, it further comprises the steps of:
Judge that the other smart machines whether received in addition to the smart machine during the smart machine distribution are sent out
The networking request sent, if so, the networking request of refusal other smart machines.
Preferably, pairing button is configured on the smart machine and the router, is opened by clicking the pairing button
Open the pairing mode of the smart machine and the router.
Correspondingly, the present embodiment also provides a kind of system of quick distribution of smart machine, from embodiment unlike, this
Embodiment further includes judging link block 23, binds closedown module 24, as shown in Figure 4, comprising:
Receiving module 21 is matched, is set for being matched and being received with the smart machine in preset range from the intelligence
The networking request that preparation is sent;
Link block 22 is obtained, for obtaining the facility information of the smart machine and judging whether the facility information accords with
Preset rules are closed, if so, sending wifi password to the smart machine, the smart machine is connected by the wifi password
The router;
Judge link block 23, establishes connection with the smart machine within a preset time for judging whether;
Closedown module 24 is bound, establishes connection with the smart machine for working as in preset time, and server is successfully tied up
Otherwise the fixed smart machine, the then pairing closed between the smart machine remove the facility information of the smart machine
And close the pairing between the smart machine
Preferably, further includes:
Public key module is obtained, for obtaining the public key information carried in the networking request;
Encrypt sending module, for according to the public key information to wifi password carry out encryption and will be described encrypted
Wifi password is sent to the smart machine, and the smart machine connects the routing after the wifi password is decrypted
Device.
Preferably, further includes:
Judgement refusal module, for judging whether receive in addition to the smart machine during the smart machine distribution
The networking request that sends of other smart machines, if so, the networking request of refusal other smart machines.
Preferably, pairing button is configured on the smart machine and the router, is opened by clicking the pairing button
Open the pairing mode of the smart machine and the router.
The present embodiment solves smart machine because faults itself or other reasons cannot be completed by the limitation of setting Connection Time
Distribution influences the case where other Intelligent hardware distributions, can effectively improve the distribution efficiency of Intelligent hardware.
Specific embodiment described herein is only an example for the spirit of the invention.The neck of technology belonging to the present invention
The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method
In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.