Summary of the invention
The embodiment of the invention provides a kind of control method of smart machine, system and intelligent terminals, to set intelligently
The control command for being used to control smart machine under intelligent cloud agreement that intelligent terminal is sent is converted by unified realize except standby
Control command under the device protocol of the smart machine is sent to the intelligence by the control command under the device protocol of smart machine
Energy equipment controls the smart machine to realize, improves the update iteration speed of entire platform of internet of things, mitigates smart machine
Processing pressure, the production efficiency of smart machine is improved, so that intelligent terminal is more easily controlled various smart machines.
A kind of control method of smart machine provided in an embodiment of the present invention, comprising:
Receive the control command for being used to control smart machine under the intelligent cloud agreement that intelligent terminal is sent;
According to the control command under the control command and intelligent cloud agreement under the device protocol of the preset smart machine
Between corresponding relationship, the control command for being used to control smart machine under intelligent cloud agreement that the intelligent terminal is sent is turned
Change the control command under the device protocol of the smart machine into;
Control command under the device protocol of the smart machine is sent to the smart machine, is set for controlling the intelligence
It is standby.
In this way, unified realize will be used to control under intelligent cloud agreement that intelligent terminal is sent except the smart machine
The control command of smart machine processed is converted into the control command under the device protocol of smart machine, and the equipment of the smart machine is assisted
Control command under view is sent to the smart machine, controls the smart machine to realize, improves entire platform of internet of things
Update iteration speed, mitigate the processing pressure of smart machine, the device protocol of the smart machine without different vendor is mutually simultaneous
Hold, improve the production efficiency of smart machine, be conducive to the connected realization of object object, intelligent terminal is not needed to various smart machines
Device protocol is compatible with and is upgraded, so that intelligent terminal is more easily controlled various smart machines.
Preferably, the corresponding relationship is pre-set as follows:
Receive the control command under the device protocol of the smart machine;
Control command under the device protocol of the smart machine is converted into intermediate file;
The intermediate file is converted into the script of the control command for being used to control the smart machine under intelligent cloud agreement
Language file stores script language files and the institute of the control command for controlling the smart machine under the intelligent cloud agreement
State the corresponding relationship of the control command under the device protocol of smart machine.
Wherein, the control command under the device protocol of the smart machine is converted into intermediate file, then by intermediate file
It is converted into the script language files of the control command for controlling the smart machine under intelligent cloud agreement, this processing mode
Quickly and conveniently the control command under the device protocol of smart machine can be converted to and be used to control institute under intelligent cloud agreement
State the script language files of the control command of smart machine.
Preferably, according to the control under the control command and intelligent cloud agreement under the device protocol of the preset smart machine
Corresponding relationship between system order, by the control for being used to control smart machine under intelligent cloud agreement that the intelligent terminal is sent
Order the control command being converted under the device protocol of the smart machine, comprising:
Determine the script of the control command for controlling smart machine under the intelligent cloud agreement that the intelligent terminal is sent
Language file, according to the script language files of the control command under the intelligent cloud agreement for controlling the smart machine with
The corresponding relationship of control command under the device protocol of the smart machine determines the corresponding intelligence of the script language files
Control command under the device protocol of equipment.
Preferably, the control command under the device protocol of the smart machine is sent to the smart machine, comprising:
Control command under the device protocol of the smart machine is sent to the smart machine after encryption.
A kind of control method of smart machine provided in an embodiment of the present invention, the control method phase with the smart machine
It is corresponding, comprising:
Intelligent terminal generates the control command for being used to control smart machine under intelligent cloud agreement;
The intelligent terminal sends the control command.
In this way, intelligent terminal does not need to be compatible with the device protocol of various smart machines and upgraded, so that
Intelligent terminal is more easily controlled various smart machines.
A kind of control system of smart machine provided in an embodiment of the present invention, comprising:
Receiving unit, the control for being used to control smart machine under intelligent cloud agreement for receiving intelligent terminal transmission are ordered
It enables;
Conversion unit of protocol, for the control command and intelligent cloud under the device protocol according to the preset smart machine
The corresponding relationship between control command under agreement will be used to control intelligence under intelligent cloud agreement that the intelligent terminal is sent
The control command of equipment is converted into the control command under the device protocol of the smart machine;
Transmission unit is used for the control command under the device protocol of the smart machine to be sent to the smart machine
In the control smart machine.
By the system, unified realize will be used to control under intelligent cloud agreement that intelligent terminal is sent except the smart machine
The control command of smart machine processed is converted into the control command under the device protocol of smart machine, and the equipment of the smart machine is assisted
Control command under view is sent to the smart machine, controls the smart machine to realize, improves entire platform of internet of things
Update iteration speed, mitigate the processing pressure of smart machine, the device protocol of the smart machine without different vendor is mutually simultaneous
Hold, improve the production efficiency of smart machine, be conducive to the connected realization of object object, intelligent terminal is not needed to various smart machines
Device protocol is compatible with and is upgraded, so that intelligent terminal is more easily controlled various smart machines.
Preferably, the system further include:
Typing unit, for presetting the corresponding relationship in the following way:
Receive the control command under the device protocol of the smart machine;
Control command under the device protocol of the smart machine is converted into text among corresponding extensible markup language
Part;
The receiving unit is also used to: the intermediate file being converted into the intelligence that is used to control under intelligent cloud agreement and is set
The script language files of standby control command;
The transmission unit is also used to: storing the control command for being used to control the smart machine under the intelligent cloud agreement
Script language files and the smart machine device protocol under control command corresponding relationship.
Preferably, the conversion unit of protocol is specifically used for:
Determine the script of the control command for controlling smart machine under the intelligent cloud agreement that the intelligent terminal is sent
Language file, according to the script language files of the control command under the intelligent cloud agreement for controlling the smart machine with
The corresponding relationship of control command under the device protocol of the smart machine determines the corresponding intelligence of the script language files
Control command under the device protocol of equipment.
Preferably, the transmission unit is specifically used for: by the control command under the device protocol of the smart machine by adding
The smart machine is sent to after close.
A kind of intelligent terminal corresponding with the described system provided in an embodiment of the present invention, comprising:
Generation unit, for generating the control command for being used to control smart machine under intelligent cloud agreement;
Transmission unit, for sending the control command to the control system.
The intelligent terminal does not need to be compatible with the device protocol of various smart machines and upgraded, so that intelligent terminal is more
Easily controllable various smart machines.
Specific embodiment
Present inventor it has been investigated that: the speed of production of smart machine is compared with the speed of internet iteration, intelligence
The firmware update of energy equipment lags far behind the iteration of internet.It is realized so protocol analysis function is placed on smart machine end,
The update iteration of entire platform of internet of things will be substantially reduced, reduces the production efficiency of smart machine, hinder the hair of platform of internet of things
Open up speed.The embodiment of the invention provides a kind of control method of smart machine, system and intelligent terminals, in smart machine
Except unified realize the control command for being used to control smart machine under intelligent cloud agreement that intelligent terminal is sent is converted into intelligence
Control command under the device protocol of energy equipment, is sent to the intelligence for the control command under the device protocol of the smart machine
Equipment controls the smart machine to realize, improves the update iteration speed of entire platform of internet of things, mitigate smart machine
Processing pressure improves the production efficiency of smart machine, so that intelligent terminal is more easily controlled various smart machines.
Referring to Fig. 1, a kind of Internet of Things provided in an embodiment of the present invention includes:
At least one intelligent terminal 11: i.e. the terminal devices such as intelligent machine, such as iphone, android mobile phone, pad, including
App application, provides user's operation entrance.
Intelligent cloud service system 12: under the intelligent cloud agreement of the i.e. unified control command for realizing various device protocols and standard
Control command the service system mutually converted, can be and the system is constituted by a server, can also by more service
Device, which cooperates, constitutes the system.Specifically, intelligent cloud service system 12 may include access center and protocol analysis center, connect
Enter center and be mainly responsible for the protocol data for receiving smart machine and intelligent terminal, intelligent cloud agreement and intelligence are responsible in protocol analysis center
The identification of the device protocol of energy equipment turns with mutual.
At least one smart machine 13: the smart machine of manufacturer's production, such as: the equipment such as air-conditioning, refrigerator have access to object
It networks and can be carried out remote operation.
The control method of the smart machine of intelligent 12 side of cloud service system, referring to fig. 2, this method are introduced first below
Comprising steps of
The control command for being used to control smart machine under the intelligent cloud agreement that S101, reception intelligent terminal are sent;
Wherein, the intelligent cloud agreement, i.e., the standard agreement of intelligent cloud service system 12 and each 13 intercommunication of smart machine.
Intelligent cloud service system 12 is similar to a middle-agent, realizes the unified conversion function of agreement.
S102, according under the device protocol of the preset smart machine control command and intelligent cloud agreement under control
Corresponding relationship between order orders the control for being used to control smart machine under intelligent cloud agreement that the intelligent terminal is sent
Enable the control command being converted under the device protocol of the smart machine;
Wherein, the smart machine for being used to control itself manufacturer of the device protocol of smart machine, i.e. different vendor production
Agreement, intelligent cloud service system turn the control command for being used to control smart machine under intelligent cloud agreement that intelligent terminal is sent
It changes the control command under the device protocol of smart machine into, so as to be identified by smart machine, realizes control smart machine.
S103, the control command under the device protocol of the smart machine is sent to the smart machine, for controlling this
Smart machine.
After smart machine receives the control command under the device protocol of the smart machine, which is identified,
And it executes.
Preferably, the corresponding relationship is pre-set as follows:
Receive the control command under the device protocol of the smart machine;
Control command under the device protocol of the smart machine is converted into corresponding extensible markup language XML text
Part;Wherein, which is similar to an intermediate file, which can also be other shapes in addition to can be XML file
The file of formula.
The XML file is converted into the script language of the control command for being used to control the smart machine under intelligent cloud agreement
Say that file, the script language files for example can be lua script language files, naturally it is also possible to be other kinds of scripting language
File stores lua script language files and the institute of the control command for controlling the smart machine under the intelligent cloud agreement
State the corresponding relationship of the control command under the device protocol of smart machine.
Wherein, the control command under the device protocol of the smart machine is converted into XML file, then XML file is turned
Change the lua script language files of the control command for controlling the smart machine under intelligent cloud agreement, this processing side into
Control command under the device protocol of smart machine can be converted to quickly and conveniently and be used to control under intelligent cloud agreement by formula
The lua script language files of the control command of the smart machine.
Preferably, according to the control under the control command and intelligent cloud agreement under the device protocol of the preset smart machine
Corresponding relationship between system order, by the control for being used to control smart machine under intelligent cloud agreement that the intelligent terminal is sent
Order the control command being converted under the device protocol of the smart machine, comprising:
Determine the lua foot of the control command for controlling smart machine under the intelligent cloud agreement that the intelligent terminal is sent
This language file, according to the lua scripting language of the control command for controlling the smart machine under the intelligent cloud agreement
The corresponding relationship of control command under the device protocol of file and the smart machine determines that the lua script language files are corresponding
The smart machine device protocol under control command.
Preferably, the control command under the device protocol of the smart machine is sent to the smart machine, comprising:
Control command under the device protocol of the smart machine is sent to the smart machine after encryption.
For example, base64 (or other algorithms also can be used and encrypted) can be used to turning in intelligent cloud service system
Control command under the device protocol for the smart machine got in return is encrypted, and is sent to the smart machine, correspondingly, the intelligence
After energy equipment receives encrypted control command, it is decrypted using base64, obtains the control that the smart machine can identify
Order, and execute the control command.
To sum up, intelligent cloud service system can receive the control command under the device protocol of the smart machine of manufacturer, factory first
Before the publication of smart machine product, input system (can be a part in intelligent cloud service system) will can intelligently be set quotient first
Control command under standby device protocol translates into extensible markup language (ExtensibleMarkupLanguage, abbreviation
XML) file, by XML file storage into XML file server.
Protocol analysis center in intelligent cloud service system by XML file Content Transformation at script language code, such as can
To be that XML file is converted into lua script language files.The XML file is converted into intelligent cloud association by i.e. intelligent cloud service system
The lua script language files of the control command for controlling the smart machine under view, store the use under the intelligent cloud agreement
In the lua script language files of control command and the control under the device protocol of the smart machine that control the smart machine
The corresponding relationship of order is to lua file server.
After the publication of manufacturer's smart machine product, intelligent terminal will send and be used to control smart machine under intelligent cloud agreement
Control command.Access center is determined by lua file server to be used under the intelligent cloud agreement that the intelligent terminal is sent
The lua script language files of the control command of smart machine are controlled, protocol analysis center is according to the use under the intelligent cloud agreement
In the lua script language files of control command and the control under the device protocol of the smart machine that control the smart machine
The control command for being used to control smart machine under the intelligent cloud agreement of intelligent terminal transmission is converted by the corresponding relationship of order
Control command under the device protocol of smart machine, access center are sent to intelligence after encrypting by base64 to the control command
Equipment, smart machine can directly pass through control command operation smart machine after decrypting using base64.
Wherein, intelligent cloud agreement uses json format string, and intelligent cloud protocol contents use key, value form data
It is described.
Correspondingly, in intelligent terminal side, referring to Fig. 3, a kind of control method of smart machine provided in an embodiment of the present invention,
Comprising steps of
S201, intelligent terminal generate the control command for being used to control smart machine under intelligent cloud agreement;
S202, the intelligent terminal send the control command.
Specifically, intelligent terminal can generate the use under intelligent cloud agreement with intelligent cloud protocol code according to the pre-stored data
In the control command of control smart machine.
In addition, intelligent terminal can also use the prior art, the control life under the device protocol of smart machine is directly transmitted
It enables to intelligent cloud service system, intelligent cloud service system receives the control under the device protocol of the smart machine of intelligent terminal transmission
After system order, it is sent to corresponding smart machine after can directly being encrypted the control command, is not necessarily to protocol conversion.
The device structure provided in an embodiment of the present invention corresponded to the above method is described below.
Referring to fig. 4, the control system of a kind of smart machine provided in an embodiment of the present invention, comprising:
Receiving unit 41, the control for being used to control smart machine under intelligent cloud agreement for receiving intelligent terminal transmission
Order;
Conversion unit of protocol 42, for the control command and intelligence under the device protocol according to the preset smart machine
The corresponding relationship between control command under cloud agreement will be used to control intelligence under intelligent cloud agreement that the intelligent terminal is sent
The control command of energy equipment is converted into the control command under the device protocol of the smart machine;
Transmission unit 43, for the control command under the device protocol of the smart machine to be sent to the smart machine,
For controlling the smart machine.
The function of receiving unit 41 and transmission unit 43 can realize by same unit, such as by above-mentioned access center
It realizes, which can be an independent server.Conversion unit of protocol 42 can be in above-mentioned protocol analysis
The heart, which is also possible to an independent server, or can also be located at same server with access center.
Specifically, receiving unit 41 and transmission unit 43 can be realized by entity apparatus such as processors with transmission-receiving function.Similarly,
Conversion unit of protocol 42 can also be realized by entity apparatus such as processors.
Preferably, the system further include:
Typing unit, for presetting the corresponding relationship in the following way:
Receive the control command under the device protocol of the smart machine;
Control command under the device protocol of the smart machine is converted into corresponding extensible markup language XML text
Part;
The receiving unit is also used to: the XML file being converted into the intelligence that is used to control under intelligent cloud agreement and is set
The lua script language files of standby control command;
The transmission unit is also used to: storing the control command for being used to control the smart machine under the intelligent cloud agreement
Lua script language files and the smart machine device protocol under control command corresponding relationship.
Wherein, XML file can store on an XML file server;It is described for controlling under intelligent cloud agreement
The lua script language files of the control command of smart machine are corresponding with the control command under the device protocol of the smart machine
Relationship also can store on a lua script server.It is thus preferable to which the receiving unit is from XML file server
The control command for being used to control the smart machine for obtaining XML file, and the XML file being converted under intelligent cloud agreement
Lua script language files;The transmission unit is by the control command for being used to control the smart machine under the intelligent cloud agreement
Lua script language files and the smart machine device protocol under control command corresponding relationship storage to lua script
On server.
Typing unit is referred to as input system, can be an independent server, is also possible to and above-mentioned each list
Member is located at same server, is specifically not construed as limiting.
Preferably, the conversion unit of protocol is specifically used for:
Determine the lua foot of the control command for controlling smart machine under the intelligent cloud agreement that the intelligent terminal is sent
This language file, according to the lua scripting language of the control command for controlling the smart machine under the intelligent cloud agreement
The corresponding relationship of control command under the device protocol of file and the smart machine determines that the lua script language files are corresponding
The smart machine device protocol under control command.
Preferably, the transmission unit is specifically used for: by the control command under the device protocol of the smart machine by adding
The smart machine is sent to after close.So as to improve the safety of control command transmission.
Referring to Fig. 5, a kind of intelligent terminal corresponding with the described system provided in an embodiment of the present invention, comprising:
Generation unit 51, for generating the control command for being used to control smart machine under intelligent cloud agreement;
Transmission unit 52, for sending the control command to the control system.
Specifically, generation unit 51 can realize that transmission unit 52 can be transceiver by entity apparatus such as processors.
In conclusion the embodiment of the present invention uniformly realizes the intelligent cloud agreement for sending intelligent terminal except smart machine
Under the control command for controlling smart machine be converted into the control command under the device protocol of smart machine, which is set
Control command under standby device protocol is sent to the smart machine, controls the smart machine to realize, improves entire
The update iteration speed of platform of internet of things, mitigates the processing pressure of smart machine, the equipment of the smart machine without different vendor
Agreement is compatible, improves the production efficiency of smart machine, discharges the equipment productivity of manufacturer, is conducive to the connected reality of object object
Existing, the agreement that smart machine receives is provided by intelligent cloud service system, as long as meeting intelligence cloud service system offer
Unified agreement --- intelligent cloud agreement, any equipment and terminal can seamless access, be solved perfectly intelligent cloud agreement and
The compatibility of the device protocol of manufacturer turns with mutual.Intelligent terminal does not need to be compatible with the device protocol of various smart machines and risen
Grade, so that intelligent terminal is more easily controlled various smart machines.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.