A kind of control method of infrared equipment
Technical field
The present invention relates to a kind of control method of equipment, more particularly to a kind of intelligent household electronic equipment carries out infrared code
The method of habit and infrared control.
Background technology
With the development of science and technology, increasing modern appliances equipment has come into the family of people, while with
Living standard more and more higher, people there has also been a higher understanding and requirement to life staying idle at home.Then it there has been intelligent family
The generation of equipment is occupied, and in these intelligent equipments, many equipment are required for being controlled by IR remote controller, so
Just there are two, three even more remote controls in the family, and excessive different being used in mixed way for remote control can give people
Life bring inconvenience.Therefore, the control of multiple home equipments how is carried out by a remote control, realization uses one
Individual all home equipments of remote control control, it has also become people in the urgent need to.
Also occur in that some single remotes are controlled the product of distinct device on present society, but these products are past
Either the infrared coding process of facility for study or had to toward needing to carry out typing every time by linking ability after internet
Carry out data transmission with it is synchronous, red outer code information can not realize real-time update, be unsatisfactory for people to intelligent residence equipment control
Requirement.
The content of the invention
It is an object of the invention to provide a kind of control method of infrared equipment, existed with solving home equipment in the prior art
Carry out during infrared control operational order study sequence of maneuvers it is cumbersome with data transfer with synchronized update in terms of ask
Topic, realizes the study control of intelligent residence infrared equipment, infrared code data message and upgrades in time, can also be realized without network
The unrestricted choice of long-range control, study and control.
To reach above-mentioned purpose, a kind of control method of infrared equipment of the invention, it is applied to the infrared system of smart home
In system, the system includes remote server, coding acquisition software, infrared coding collector, IR remote controller, local infrared data
Storehouse, client, intelligent domestic gateway, infrared control device, controlled plant, a kind of control method technical side of infrared equipment
Case is specifically included:The infrared code of control device learns, sets up infrared code storehouse, the download of infrared code and infrared control Four processes.
The infrared code study of control device refers to the infrared code by the intelligent domestic gateway by the infrared equipment
Information learning comprises the following steps to the process of the infrared control device:
a1)The client carries out identity validation by UDP modes and according to proprietary protocol and intelligent domestic gateway, described
Infrared control device forms communication link by RF communication registrations to intelligent domestic gateway;
a2)The client issue enters study order, and the intelligent domestic gateway, which is received, enters study shape after the order
State, while entering study order to infrared control device forwarding, the infrared control device receives the study order
Afterwards, open IR signal reception passage and enter learning state;
a3)The IR remote controller button is operated to carry out infrared signal transmitting, the infrared control device receives described red
External signal, is converted into infrared coding by the infrared signal and carries out self preservation, and learn to intelligent domestic gateway transmission
Acknowledgement command, the intelligent domestic gateway forwards the acknowledgement command to the client;
a4)The client is received after the acknowledgement command, be this time study infrared coding distribute infrared key assignments and by
The brand and model of equipment are controlled, and the distribution is handed down to the intelligent domestic gateway;
a5)The intelligent domestic gateway is received after the infrared key assignments of the distribution and the brand and model of controlled plant to institute
State client and send and receive response, and the brand and model of the infrared key assignments of the distribution and controlled plant be sent to described red
External control control equipment, the infrared control device obtains the infrared key assignments of the distribution and the brand and model of controlled plant, and protects
Deposit;
a6)Repeat step a3 described above)、a4)、a5), continue to learn other operation buttons of the IR remote controller,
Until all operation button study of the IR remote controller are finished;
a7)After all operation buttons study of the IR remote controller is finished, the client is to the smart home net
Close transmission and exit infrared learning order, the intelligent domestic gateway by being exited described in parsing after infrared learning order, immediately to
The infrared control device exits infrared learning order described in issuing;
a8)The infrared control device closes the IR signal reception passage, exits infrared learning state, and will hold
The result for exiting infrared learning order of having gone feeds back to the intelligent domestic gateway, and the intelligent domestic gateway is further anti-
Feed client.
It is described to set up infrared code storehouse and refer to the red outer code information of infrared equipment formation library file, and realize shared mistake
Journey, specifically includes following steps:
b1)The infrared coding collector connects PC computer USB connectors, and the coding acquisition software is started at PC ends;
The infrared control device is registered to the infrared coding collector, communication link is formed;
b2)The coding acquisition software issue study order notifies that the infrared coding collector opens infrared after receiving
Signal receiving channel;
b3)The IR remote controller button is operated to carry out infrared signal transmitting, the infrared coding collector receives described
Infrared signal, and the infrared signal is converted into infrared coding is transmitted to the coding acquisition software;
b4)The coding acquisition software generates infrared key assignments record, then repeat step b3 according to the infrared coding),
Continue the red outer code information of collection other buttons of IR remote controller, until the infrared code of all buttons of the IR remote controller is adopted
Collection is finished;
b5)After the completion of the infrared code collection of each button of IR remote controller, the coding acquisition software is according to described red
The infrared code library file of foreign key value record generation uploads to the remote server and is backed up and shared, while the library file is protected
Exist in the local infrared data storehouse.
Further, step b5)In also include when coding acquisition software and the remote server can not carry out net
When network is connected, the coding acquisition software exports the infrared code storehouse of all brand equipment from the local infrared data storehouse,
Realized with the coding acquisition software shared.
The infrared code, which is downloaded, to be referred to the infrared coding in the local infrared data storehouse passing through the smart home net
The process for downloading to the infrared control device is closed, following steps are specifically included:
c11)The client by UDP modes and carries out identity validation, institute according to proprietary protocol and intelligent domestic gateway
Infrared control device is stated by RF communication registrations to intelligent domestic gateway, communication link is formed;
c12)The client imports shared infrared code library file from the local infrared data storehouse;
c13)Model and brand of the client in infrared code storehouse, by infrared coding by connecting the intelligent family
Gateway downloads are occupied to the infrared control device;
c14)The infrared control device is received after infrared coding, and according to the model and brand of infrared coding, packet is protected
Deposit infrared coding information.
Correspondingly, the infrared code downloading process also includes another downloading infrared code by the coding acquisition software
Method, specifically includes following steps:
c21)The coding acquisition software logs in the remote server and downloads the infrared code storehouse of all brand equipment;
Do not connect under network condition, can also be imported infrared code storehouse by the local infrared data storehouse;
c22)The coding acquisition software connects the infrared coding collector, and the infrared control device is registered to
In the infrared coding collector, the connection with the infrared coding collector is realized;
c23)The coding acquisition software is according to infrared code storehouse information, in units of infrared coding brand and model, directly
Infrared coding is downloaded to the infrared control device;
c24)The infrared control device is received after infrared coding, according to the infrared coding brand and model, packet
Preserve infrared coding information.
The infrared control refers to that the client is carried out by the intelligent domestic gateway to the infrared control device
The process learnt in control, specifically includes following steps:
d1)The client sends equipment control command to the intelligent domestic gateway, and the intelligent domestic gateway is received
After timely respond to order and return to response;
d2)The equipment control command is handed down to the infrared control device by the intelligent domestic gateway;
d3)The infrared control device detected the equipment control command of reception, judge it is local in whether deposit
In the corresponding infrared coding of the equipment control command;
d4)Exist when the infrared control device detects the corresponding infrared coding of the control command, then directly sent out
Infrared signal is sent to be controlled the controlled plant;
d5)The controlled plant receives the infrared signal and timely responds to control, the infrared control device will it is described by
Control equipment state is uploaded to the intelligent domestic gateway, and the controlled device state is uploaded to described by the intelligent domestic gateway
Client;
Further when the controlled device state has mark with infrared code, the process terminates;Otherwise the visitor
Family termination is received after feedback information, downloads the corresponding infrared volume of the equipment control command from the local infrared data storehouse automatically
Code is simultaneously handed down to the intelligent domestic gateway, and the intelligent domestic gateway is by under the corresponding infrared coding of the equipment control command
The infrared control device is issued, the infrared control device stores the corresponding infrared coding of the equipment control command, then
Infrared signal is sent to be controlled controlled plant.
Further, the corresponding infrared coding of the automatic download equipment control command comprises the following steps:
The client assigns the infrared coding download command with infrared coding, the intelligence to the intelligent domestic gateway
Energy home gateway is transmitted into infrared code and downloads notice to the infrared control device immediately after receiving, the infrared control is set
It is standby to enter infrared coding download state, and feed back response to the intelligent domestic gateway;The intelligent domestic gateway receives described
Feed back after response, issue the request of the first frame data to the infrared control device immediately, the infrared control device obtains first
The red outer code data of frame, and returned data receives response to the intelligent domestic gateway, the intelligent domestic gateway repeats red
Outer coding request of data, until after the red outer code data request of progress nth frame is sent to the infrared control device, it is described infrared
Control device successfully obtains red outer code data, and feeds back to the intelligent domestic gateway, and the intelligent domestic gateway notifies institute
State infrared control device infrared coding and download and terminate.
The beneficial effects of the invention are as follows:A kind of control method of infrared equipment of the present invention is alternative there is provided 4
Infrared equipment control method process;For the infrared code of infrared equipment of different brands and model, as long as learning once and forming red
Outer code storehouse, can be achieved with the shared of multiple client.User need not the infrared code of facility for study one by one, as long as selecting on the client
The brand and model selected for infrared equipment just can realize that batch downloads infrared code to infrared control device.There is environment in network
Under, coding acquisition software can upgrade in time infrared code storehouse data, realize the real-time update in infrared code storehouse;Providing simultaneously need not
Also the possibility of the study and configuration of IR remote controller can be carried out under conditions of network;User need not participate in downloading process;Infrared code
Various kinds of equipment brand, the telecommand coding information of the product of model can be preserved in storehouse, intelligent home device is substantially increased
The efficiency of infrared remote control, facilitates user quickly to use.
Brief description of the drawings
Fig. 1 is a kind of system architecture diagram of the control method based on smart home infrared system of infrared equipment of the invention;
Fig. 2 is that a kind of workflow of the infrared code study of control method embodiment control device of infrared equipment of the invention is shown
It is intended to;
Fig. 3 is that a kind of control method embodiment of infrared equipment of the invention sets up the workflow schematic diagram in infrared code storehouse;
Fig. 4 is a kind of workflow schematic diagram of the infrared code download of control method embodiment of infrared equipment of the invention;
Fig. 5 is a kind of workflow signal of another infrared code download of control method embodiment of infrared equipment of the invention
Figure;
Fig. 6 is a kind of workflow schematic diagram of the control method embodiment infrared control of infrared equipment of the invention.
Embodiment
The understanding of those skilled in the art for convenience, makees further below in conjunction with accompanying drawing of the present invention to the present invention
It is bright, it is clear that described embodiment is only a part of example of the present invention, rather than whole embodiments, implementation of the invention
Example not limitation of the invention.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creativeness
The every other embodiment obtained under the premise of work, belongs to protection scope of the present invention.
Reference picture 1, the control method of infrared equipment of the present invention is based on smart home infrared system in the present embodiment
In, the system includes:Remote server, coding acquisition software, infrared coding collector, IR remote controller, local infrared data
Storehouse, client, intelligent domestic gateway, infrared control device, controlled plant, remote server are gathered by internet with coding
Software is connected, and the local infrared data storehouse is connected with coding acquisition software and client, and infrared control device is believed by RF radio frequencies
Number it is connected with controlled plant and intelligent domestic gateway, IR remote controller passes through RF radiofrequency signals and infrared control device and infrared volume
Code collector is connected, and infrared coding collector is connected by USB interface with coding acquisition software, and intelligent domestic gateway passes through UDP
Communications protocol is connected with client, coding acquisition software.
Fig. 2 is referred to, is a kind of infrared code study work of control device of the control method embodiment of infrared equipment of the invention
Make in schematic flow sheet, the present embodiment, the process comprises the following steps:
101st, the client by UDP modes and carries out identity validation, institute according to proprietary protocol and intelligent domestic gateway
Infrared control device is stated by RF communication registrations to intelligent domestic gateway, communication link is formed;
102nd, the client issue enters study order, and the intelligent domestic gateway, which is received, enters study shape after the order
State, while entering study order to infrared control device forwarding;The infrared control device receives the study order
Afterwards, open IR signal reception passage and enter learning state;
103rd, the IR remote controller button is operated to carry out infrared signal transmitting, the infrared control device receives described red
External signal, and the infrared signal is converted into infrared coding, and carry out self preservation;The infrared control device obtains described
After infrared coded data, study acknowledgement command is sent to the intelligent domestic gateway immediately, the intelligent domestic gateway is to described
Client forwards the acknowledgement command;
104th, the client is received after the result, is that the infrared coding of this time study distributes key value and controlled
Equipment brand and model, and the distribution is handed down to the intelligent domestic gateway;
105th, sent after the intelligent domestic gateway is received to the client and receive response, and by the key assignments of the distribution
The infrared control device is sent to controlled plant brand and model, the infrared control device obtains the key assignments of the distribution
With controlled plant brand and model, and preserve;
106th, step 103-105 described above are repeated, continue to learn other operation buttons of the IR remote controller, directly
Finished to all operation button study of the IR remote controller;
107th, after all operation buttons study of the IR remote controller is finished, the client is to the smart home net
Close transmission and exit infrared learning order, the intelligent domestic gateway by being exited described in parsing after infrared learning order, immediately to
The infrared control device exits infrared learning order described in issuing;
108th, the infrared control device closes the IR signal reception passage, exits infrared learning state, and will
Perform the result for exiting infrared learning order and feed back to the intelligent domestic gateway, the intelligent domestic gateway is further
Feed back to client.
Fig. 3 is referred to, is that a kind of control method embodiment of infrared equipment of the invention sets up infrared code storehouse workflow
Schematic diagram,
201st, the infrared coding collector connection PC computer USB connectors, the coding acquisition software is started in PC;Will
The infrared control device is registered to the infrared coding collector, forms communication link;
202nd, the coding acquisition software issue enters infrared remote control and learns to order, and order is transmitted by UDP communication modes
To the intelligent domestic gateway, the intelligent domestic gateway will be ordered by internal parsing, and order is passed through under RF radiofrequency signals
The infrared control device is issued, the infrared coding collector opens IR signal reception passage after receiving, into study shape
State;
203rd, the IR remote controller button is operated to carry out infrared signal transmitting, the infrared coding collector receives described
Infrared signal, by internal conversion agreement by the infrared signal of reception be converted into infrared coding 1 be transmitted to it is described coding adopt
Collect software;
204th, the infrared coding that the coding acquisition software is uploaded according to the infrared coding collector, generates infrared key assignments
Record and preserved;
Repeat step 203, the infrared coding collector continue to gather the corresponding IR remote controller of the controlled plant other
The red outer code information of button, until the infrared code collection of all buttons of the IR remote controller is finished;
205th, each button of the IR remote controller of this controlled plant infrared code collection after the completion of, coding acquisition software according to
The infrared code library file of the key assignments record generation uploads to remote server and backed up, while being stored in institute in the form of a file
State in local infrared data storehouse;
When the coding acquisition software can not carry out network connection with the remote server, the coding acquisition software
The infrared code storehouse of all brand equipment is exported from the local infrared data storehouse, realized altogether with the coding acquisition software
Enjoy.
Fig. 4 is referred to, is that a kind of infrared code download workflow of the control method embodiment of infrared equipment of the invention is shown
It is intended to, in the present embodiment, the process comprises the following steps:
301st, the client by UDP modes and carries out identity validation, institute according to proprietary protocol and intelligent domestic gateway
Infrared control device is stated by RF communication registrations to intelligent domestic gateway, communication link is formed.
302nd, the client imports shared infrared code library file from local infrared data storehouse;
303rd, the client connects the intelligent domestic gateway, and brand and model list in infrared code storehouse
Position, the infrared control device is downloaded to by infrared coding by connecting the intelligent domestic gateway;
304th, the infrared control device is received after infrared coding, and infrared coding letter is preserved according to brand and model packet
Breath.
Correspondingly, refer to Fig. 5, be a kind of infrared equipment of the invention another infrared code of control method embodiment under
Carry in workflow schematic diagram, the present embodiment, the process comprises the following steps:
311st, the coding acquisition software logs in the remote server and downloads the infrared code storehouse of all brand equipment;
Do not connect under network condition, can also be imported infrared code storehouse by local infrared data storehouse;
312nd, the coding acquisition software connects the infrared coding collector, and the infrared control device is registered to
In the infrared coding collector, the connection with infrared coding collector is realized;
313rd, it is described coding acquisition software according to infrared code storehouse information, in units of infrared code brand and model, directly under
Infrared coding is carried to the infrared control device;
314th, the infrared control device is received after infrared coding, and infrared coding letter is preserved according to brand and model packet
Breath.
Fig. 6 is referred to, is a kind of workflow signal of the control method embodiment infrared control of infrared equipment of the invention
In figure, the present embodiment, methods described includes:
401st, the client sends equipment control command to the intelligent domestic gateway, and the intelligent domestic gateway is received
After timely respond to order and return to response and the equipment control command is handed down to the infrared control device;
402nd, the infrared control device is detected the equipment control command of reception, judge in database whether
There is the corresponding infrared coding of the equipment control command;
403rd, existed when the infrared control device detects the corresponding infrared coding of the control command, then directly sent out
Send infrared signal to be controlled controlled plant, and the controlled device state is uploaded to the intelligent domestic gateway, it is described
The controlled device state is uploaded to the client by intelligent domestic gateway;
404th, when the client, which receives the controlled device state, there is mark with infrared code, the process terminates;
Otherwise the client downloads the corresponding infrared coding of the equipment control command and is handed down to the intelligent domestic gateway automatically,
The corresponding infrared coding of the equipment control command is handed down to the infrared control device by the intelligent domestic gateway, described red
External control control equipment stores the corresponding infrared coding of the equipment control command, then sends infrared signal and controlled plant is controlled
System.