A kind of device identification method that control system is sprayed based on Internet of ThingsTechnical field
The present invention relates to a kind of device identification method that control system is sprayed based on Internet of Things, belong to Internet of Things wireless telecommunicationsTechnical field.
Background technology
Greenery patches, garden spray system is usually used in a courtyard, the plant spray irrigation of urban landscape, and the work of the system is formerReason is that system user is timed to spray control device beforehand through craft and spray operation is set or active, and sprays controllerObtain spray control instruction after, to be connected to spray controller on all the way or a few road outlet valves send switch order, drive outRelay in water valve, so as to realize automatically controlling for plant spray water valve.
Spray controller is the core apparatus of spray system, and the operation of whole system is mainly driven by spray controllerIt is dynamic.Traditional spray controller housing has a control panel, user by the button of panel to the date of controller, the time,Spray frequency, sprays way, sprays the details such as duration, and water size and is configured.There is one in spray controllerClock trigger, after detecting trigger condition and meeting, automatic driving water valve is operated by trigger.
Spray system based on Internet of Things is by spray controller, cloud server and client operation software composition.
In order to realize long-range wireless remote control of the mobile terminal to spray controller, client software needs to set like clockworkIt is standby to be bound with user account, so that the equipment that each user is controlled by client software is one's own spray controlDevice equipment processed.
Found through inspection, the A of Chinese invention patent application CN 102882676, disclose a kind of " internet of things equipment end safetyCut-in method and system ", it contrasts the authentication code stored in the authentication code and database in request data when equipment is accessed,Authenticate and successfully then set up proper communication.It is matched using fixed authentication code, can realize the association of equipment, but securityIt is relatively low, once authentication code is revealed, the improper startup and closing of internet of things equipment will be caused.Chinese invention patent CN103281199 A, then disclose a kind of " unified recognition methods of the sensing layer equipment based on ID in Internet ", it is in InternetIncrease equipment control layer between sensing layer, ID is mapped to equipment control layer by certain rule, forms M-ID by sensing layer equipment,Equipment identification is carried out using the M-ID.The program has higher security, but equipment investment is big, and can not be applied to handClient end AP P is held to be associated.
It can be seen that, the technical scheme of above-mentioned two documents can not be applied to the equipment identification of spray control system.
The content of the invention
The invention solves the problems that technical problem is:A kind of device identification method that control system is sprayed based on Internet of Things is provided,Equipment can be accurately identified, and it is safe, it is adaptable to and handheld client end is operated.
In order to solve the above-mentioned technical problem, technical scheme proposed by the present invention is:One kind is based on Internet of Things spray control systemThe device identification method of system, the Internet of Things spray control system includes:Spray controller, cloud server, client operationSoftware, wherein, spray controller is connected with sprinkling equipment, for being controlled to sprinkling equipment, and spray controller possesses uniquelyMainboard recognition sequence code, client operation software installation comprises the following steps in handheld device or computer, this recognition methods:
1st step, when spray controller associate with user account when, spray controller according to the cycle of setting generation oneRandom sequence code, mainboard recognition sequence code and random sequence code are shown on a display screen, and by mainboard recognition sequence code withRandom sequence code is together sent to cloud server, and the display screen is connected with spray controller, or can in LANReceive and show the display device of mainboard recognition sequence code and random sequence code that spray controller is sent;
2nd step, server are received after the mainboard recognition sequence code and random sequence code that spray controller sends, and are carried outStorage or/and renewal;
3rd step, by user's Account Logon client operation software, the mainboard shown on input spray controller screen is knownOther sequence code and random sequence code, client operation software is uploaded to cloud server;
Two sequence codes and two sequence codes of storage that 4th step, cloud server send client software are comparedCompared with if two sequence codes are completely the same, equipment is recognized successfully, and spray controller completes to associate with user account, the sprayController is controlled by the client operation software for being logged in the user account;If matching is unsuccessful, goes to the 1st step and wait nextSecondary association.
In order to solve the above-mentioned technical problem, invention also has following improvement:
1st, in the 1st step, spray controller produces the random sequence code described in one after starting every time.
2nd, in the 1st step, spray controller produces the random sequence code described in one, T span every time TFor 1m -12h.
3rd, in the 1st step, spray controller is by wireless communication module by mainboard recognition sequence code and random sequence codeIt is sent to cloud server.
4th, when spray controller is not associated with user account, spray controller is continuously by mainboard recognition sequence codeCloud server is sent with current random sequence code.
5th, in the case where spray controller completes to associate with user account, association status is locked, other users accountIt can not be associated with the spray controller.
6th, spray controller is completed after associating with user account, can be used the client operation for being logged in the user account softPart carries out both operation cancellation associations of breaking off relations.
7th, the spray controller is completed after associating with user account, can be grasped by being logged in the client of the user accountThe equipment state of the spray controller associated, parameter configuration, historical data information are checked as software.
8th, the cloud server records the product specification of spray controller, and input voltage, electric current is equipped with valve numberAmount, user can be inquired about and be changed operation by client software.
9th, spray controller is completed after associating with user account, and the client operation software for being logged in the user account is sentOperational order spray controller is sent to by LAN or cloud server.
Mainboard recognition sequence code and the random sequence code produced are sent to server by spray controller, and together in displayAfter screen display, User logs in client operation software, the two sequence codes are inputted, input sentenced by serverIt is disconnected;When this two groups of character strings that user inputs show that the content of screen display is completely the same with spray controller equiment, equipmentIt can be successfully associated with account by cloud server.After equipment is successfully associated with account, all controls that client software is sentSystem instruction can be sent to the spray controller specified exactly.By the inventive method, user can realize like clockworkAccount is associated with equipment(Binding), be not in the safety problem of faulty operation equipment.
The innovative point of the present invention is:Random sequence code participation equipment is increased newly to associate with account, and has been held by serverRow deterministic process, substantially increases the accuracy of association, eliminates the hidden danger caused by the code leakage of mainboard recognition sequence, pacifies operationFull property has obtained effective guarantee;Because two sequence codes are all shown on a display screen, therefore onsite user can be moreEfficiently it is associated operation, it is ensured that field operation is smoothed out;The present invention is to carry out user account with spray controllerAssociation, rather than associating between traditional equipment and equipment, as long as setting for client operation software can be installed by possessing oneIt is standby, it is seen then that the association and control in the inventive method are can be realized as using mobile phone, it is very convenient;Due to spray controlDevice can only be associated with a user account simultaneously, therefore avoid multi-user from operating the trouble brought simultaneously, and a user accountBut multiple spray controllers can be associated, facilitate operating personnel while being sprayed to larger greenery patches/garden, or multiple greenery patches/gardensDrench control.
Brief description of the drawings
The device identification method for spraying control system based on Internet of Things of the present invention is made furtherly below in conjunction with the accompanying drawingsIt is bright.
Fig. 1 is the spray control system schematic diagram based on Internet of Things.
Fig. 2 is the device identification method flow chart of the spray control system based on Internet of Things.
Embodiment
As shown in figure 1, the spray control system based on Internet of Things involved by the present embodiment method, composition includes:
Controller is sprayed, equipped with wireless communication module and LCD display.Internet is accessed by the wireless communication module;Wherein, wireless communication module can be the CC3000Wi-Fi home control network communication protocol chips of TIX, with spray controlThe main control chip signal connection of device, the Wi-Fi network that Wi-Fi home control network communication protocols chip is set up by wireless router accesses mutualCloud server in networking.User can be cut by switching push button between MANUAL CONTROL mode and wireless control modeChange;
Valve is sprayed, spray piping is arranged at and is controlled by spray controller;
Cloud server, records user account, sprays the product specification of controller, operational parameter control(Input voltage,Electric current), it is equipped with valve quantity, the information such as mainboard recognition sequence code, user can be inquired about and be changed by client softwareOperation.
Control terminal is sprayed, is provided with that client operation is soft, the mainboard recognition sequence code and random sequence of user can be receivedThe input of code, and associating for spray controller and user account is realized by internet or LAN;Equipment is associated to accountAfter work(, all control instructions of the soft transmission of client operation can be sent to the spray controller specified exactly.
The device identification method that control system is sprayed based on Internet of Things of the present embodiment, is comprised the following steps:
1st step, spray controller start, and access cloud server and check that hand is no in association status.
2nd step, when spray controller associate with user account, spray controller according to the cycle of setting generation one withMachine sequence code, mainboard recognition sequence yard and random sequence code are shown on a display screen, and by mainboard recognition sequence code with being somebody's turn to doRandom sequence code is together sent to cloud server, and the display screen is the display screen of spray controller.
In this step, spray controller produces the random sequence code described in one after starting every time, and spray controller leads toCross wireless communication module and mainboard recognition sequence code and random sequence code be sent to cloud server, when spray controller not withWhen user account is associated, mainboard recognition sequence code and current random sequence code are continuously sent high in the clouds by spray controllerServer.
In addition, the generation of random sequence number can also produce one every time T, T span is 1m -12h.Described display screen can also be located at the mainboard recognition sequence code that can receive and show that spray controller is sent in LANWith the display device of random sequence code.
3rd step, server are received after the mainboard recognition sequence code and random sequence code that spray controller sends, and are carried outStorage.
4th step, by user's Account Logon client operation software, the mainboard shown on input spray controller screen is knownOther sequence code and random sequence code, client operation software is uploaded to cloud server.
Two sequence codes and two sequence codes of storage that 5th step, cloud server send client software are comparedCompared with if two sequence codes are completely the same, equipment is recognized successfully, and spray controller completes to associate with user account, spray controlDevice is controlled by the client operation software for being logged in the user account, the situation for completing to associate in spray controller and user accountUnder, association status is locked, and other users account can not be associated with the spray controller;If matching is unsuccessful, the 1st step is gone toWait next secondary association.
6th step, when spray controller and user account is in association status, can be by being logged in the client of the user accountEnd operation software checks the equipment state of the spray controller associated, parameter configuration, historical data information;It is logged in the userThe operational order that the client operation software of account is sent is sent to spray controller by LAN or cloud server.
After spray controller is associated with user account, when user needs to cancel both associations, it can be used and be logged in the userThe client operation software of account carries out both operation cancellation associations of breaking off relations;When spray controller and user account complete to associate.
The device identification method for spraying control system based on Internet of Things of the present invention is not limited to described in above-described embodimentConcrete technical scheme, the technical scheme of all use equivalent substitution formation is the protection domain of application claims.