CN110930684A - Infrared control method and system supporting multiple coding formats - Google Patents

Infrared control method and system supporting multiple coding formats Download PDF

Info

Publication number
CN110930684A
CN110930684A CN201911257702.7A CN201911257702A CN110930684A CN 110930684 A CN110930684 A CN 110930684A CN 201911257702 A CN201911257702 A CN 201911257702A CN 110930684 A CN110930684 A CN 110930684A
Authority
CN
China
Prior art keywords
infrared
time data
time
control
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911257702.7A
Other languages
Chinese (zh)
Inventor
孟石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN201911257702.7A priority Critical patent/CN110930684A/en
Publication of CN110930684A publication Critical patent/CN110930684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application discloses an infrared control method and system supporting multiple coding formats, wherein the method comprises the following steps: acquiring infrared on-off time data sent by infrared remote control equipment; storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data; and sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled. Compared with the prior art, the infrared control method provided by the application does not adopt an NEC or RC series coding format, and all infrared data are based on the time codes of the on-off time of the infrared signals: a group of even-numbered arrays, the value with the odd-numbered array serial number represents the time of the infrared lamp, the value with the even-numbered array serial number represents the time of the infrared lamp, the time code is used as the infrared data storage format, and the encoding and decoding functions are not required to be realized.

Description

Infrared control method and system supporting multiple coding formats
Technical Field
The application relates to the field of infrared control, in particular to an infrared control method and system supporting multiple coding formats.
Background
When developing an infrared-based function, the existing embedded intelligent device needs to perform a data encoding, transmitting, decoding and receiving function based on an infrared encoding format. The mainstream encoding formats at present are manchester encoding such as RC series encoding, and inescapable NEC encoding necessary for time delay encoding. Meanwhile, according to different hardware platforms, hardware of GPIO or PWM may be used as a hardware channel for connecting an infrared transmitter/receiver and a CPU, and then coding and decoding of RC series codes and coding and decoding of NEC codes are realized on the two hardware channels, the hardware characteristics of the two hardware channels are different, the PWM is based on square waves, the GPIO is based on interruption, so that development cost is high when coding and decoding are realized, and interfaces of the two hardware on LINUX which are applied to the outside are completely different, so that cross-platform transplantation is difficult when the infrared function is applied and developed.
Disclosure of Invention
The main objective of the present application is to provide an infrared control method supporting multiple coding formats, including:
acquiring infrared on-off time data sent by infrared remote control equipment;
storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
and sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
Optionally, sending a control instruction corresponding to the execution action containing the infrared on-off time data to the device to be controlled:
when the control instruction has the infrared on-off time data corresponding to the control instruction, entering the next step;
when the control command does not have the infrared on-off time data corresponding to the control command, repeating all the steps to obtain the infrared on-off time data corresponding to the control command again.
Optionally, the infrared light on-off time data is a set of arrays including a plurality of digits, wherein at least some digits represent the infrared light on-off time, and at least some digits of the rest of digits represent the infrared light off-time.
Optionally, the number of the digit groups is even, wherein the digit with the odd number represents the on time of the infrared lamp, and the digit with the even number represents the off time of the infrared lamp.
Optionally, the control instruction is stored in the cloud server.
According to another aspect of the present application, there is also provided an infrared control system supporting multiple encoding formats, including:
the on-off time data acquisition module is used for acquiring infrared on-off time data sent by the infrared remote control equipment;
the storage module is used for storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
and the control instruction sending module is used for sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
The application also discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of being executed by the processor, wherein the processor realizes the method of any one of the above items when executing the computer program.
The application also discloses a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements the method of any of the above.
The present application also discloses a computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
Compared with the prior art, the method has the following advantages:
1. instead of using NEC or RC series encoding formats, all infrared data are based on the time code of the on-off time of the infrared signal: a group of even-numbered arrays, the value with the odd-numbered array serial number represents the time of the infrared lamp, the value with the even-numbered array serial number represents the time of the infrared lamp, the time code is used as the infrared data storage format, and the encoding and decoding functions are not required to be realized.
2. Providing a unified infrared functional interface, and uniformly adopting the time code based on the infrared signal on-off signal as a parameter: the device comprises an infrared signal sending interface, an infrared signal receiving interface and an infrared signal learning interface.
3. And the infrared time code is transmitted and received on the PWM and GPIO hardware by the internal implementation.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow diagram of an infrared control method supporting multiple encoding formats according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a computer device according to one embodiment of the present application; and
FIG. 3 is a schematic diagram of a computer-readable storage medium according to one embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to fig. 1, an embodiment of the present application provides an infrared control method supporting multiple encoding formats, including:
s2: acquiring infrared on-off time data sent by infrared remote control equipment;
s4: storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
s6: and sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
Take remote control of the remote control as an example. When in use, the remote control 1 sends a turn-off control command containing a control code to the television 1 via an infrared lamp. At this point, the television captures the signal simultaneously with the remote control device in the method. What the television captures is instead the control instructions itself. And the remote control device captures the turning on and off of the infrared lamp. Therefore, the remote control device records the on-off time of the infrared lamp, records the on-off time, records the closing action of the television, and simultaneously corresponds the on-off time and the closing action on the remote control device through hardware (for example, the key 1 corresponds to the remote controller 1 for closing the remote controller 1, and the key 2 corresponds to the remote controller 1 for increasing the volume of the remote controller 1 for remotely controlling the television 1). The on-off time of the infrared ray has a unique corresponding relation with the control instruction contained in the infrared ray. When the television 1 needs to be controlled to be turned off and the volume needs to be increased, only the key 1 and the key 2 need to be pressed. Similarly, when the television 2 is controlled by the remote control 2, the keys 3 and 4 on the remote control device are used to correspond. Therefore, one remote control device can be used, and when the specific coding modes of televisions with different coding and decoding types or other devices to be controlled do not need to be known, the remote control functions of all the devices to be controlled can be integrated in one remote control device only by the on-off time of the infrared lamp.
In an embodiment of the present application, a control instruction corresponding to the execution action including the infrared on-off time data is sent to the device to be controlled:
when the control instruction has the infrared on-off time data corresponding to the control instruction, entering the next step;
when the control command does not have the infrared on-off time data corresponding to the control command, repeating all the steps to obtain the infrared on-off time data corresponding to the control command again.
For example, when the user wants to control the volume of the television 3, the user presses a certain key (e.g., key 9) on the control device. At this time, the control device will search the stored database for the infrared on/off time data corresponding to the key 9 and the corresponding execution action. When the searched result is: when the infrared on-off time data corresponding to the key 9 and the corresponding execution action are to control the volume of the television 3, the control instruction is directly sent to the television 3. However, when the infrared on/off time data and the corresponding execution action corresponding to the key 9 do not control the volume of the tv 3 (there may be two cases, one is that the key 9 does not correspond to any infrared on/off time data and execution action, and the other is that the corresponding infrared on/off time data and execution action are for remote controlling another tv or another function of the same tv), the user repeats the first step of obtaining the corresponding infrared on/off time data and execution action using the remote controller 3 for controlling the tv 3 and recording the action in the key 9.
In an embodiment of the present application, the infrared light on/off time data is a set of arrays having a plurality of digits, wherein at least some digits represent the infrared light on time, and at least some digits of the remaining digits represent the infrared light off time. In this embodiment, the number of the array is even (but not limited thereto, and those skilled in the art can use any data combination method according to the actual situation), wherein the number with odd number represents the on time of the infrared lamp, and the number with even number represents the off time of the infrared lamp.
In an embodiment of the application, the control instruction is stored in a cloud server. The control equipment needs corresponding infrared on-off time data in the cloud server. Thus, it is not necessary for each individual control device to learn the infrared light-on/off time data of all the devices to be controlled. It is only necessary that the sum stored by the plurality of control devices can cover all the devices to be controlled.
According to another aspect of the present application, there is also provided an infrared control system supporting multiple encoding formats, including:
the on-off time data acquisition module is used for acquiring infrared on-off time data sent by the infrared remote control equipment;
the storage module is used for storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
and the control instruction sending module is used for sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
Compared with the prior art, the method has the following advantages:
1. instead of using NEC or RC series encoding formats, all infrared data are based on the time code of the on-off time of the infrared signal: a group of even-numbered arrays, the value with the odd-numbered array serial number represents the time of the infrared lamp, the value with the even-numbered array serial number represents the time of the infrared lamp, the time code is used as the infrared data storage format, and the encoding and decoding functions are not required to be realized.
2. Providing a unified infrared functional interface, and uniformly adopting the time code based on the infrared signal on-off signal as a parameter: the device comprises an infrared signal sending interface, an infrared signal receiving interface and an infrared signal learning interface.
3. And the infrared time code is transmitted and received on the PWM and GPIO hardware by the internal implementation.
Referring to fig. 2, the present application further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of the above methods when executing the computer program.
Referring to fig. 3, a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements any of the methods described above.
A computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. An infrared control method supporting multiple coding formats, comprising:
acquiring infrared on-off time data sent by infrared remote control equipment;
storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
and sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
2. The infrared control method supporting multiple coding formats according to claim 1, wherein a control command corresponding to the execution action containing the infrared on-off time data is sent to the device to be controlled:
when the control instruction has the infrared on-off time data corresponding to the control instruction, entering the next step;
when the control command does not have the infrared on-off time data corresponding to the control command, repeating all the steps to obtain the infrared on-off time data corresponding to the control command again.
3. The infrared control method supporting multiple encoding formats as claimed in claim 2, wherein the infrared on/off time data is a set of array comprising a plurality of digits, wherein at least some digits represent the infrared lamp on time, and at least some digits of the remaining digits represent the infrared lamp off time.
4. The infrared control method supporting multiple encoding formats as claimed in claim 3, wherein the number of the digits of the array is an even number, wherein the digits with odd numerical values represent the on-time of the infrared lamps, and the digits with even numerical values represent the off-time of the infrared lamps.
5. The infrared control method supporting multiple encoding formats according to claim 3, wherein the control instruction is stored in a cloud server.
6. An infrared control system supporting multiple encoding formats, comprising:
the on-off time data acquisition module is used for acquiring infrared on-off time data sent by the infrared remote control equipment;
the storage module is used for storing the infrared on-off time data and the execution action of the equipment to be controlled corresponding to the infrared on-off time data;
and the control instruction sending module is used for sending a control instruction corresponding to the execution action containing the infrared on-off time data to the equipment to be controlled.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of claims 1-5 when executing the computer program.
8. A computer-readable storage medium, a non-transitory readable storage medium, having stored therein a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1-5.
9. A computer program product comprising computer readable code that, when executed by a computer device, causes the computer device to perform the method of any of claims 1-5.
CN201911257702.7A 2019-12-10 2019-12-10 Infrared control method and system supporting multiple coding formats Pending CN110930684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911257702.7A CN110930684A (en) 2019-12-10 2019-12-10 Infrared control method and system supporting multiple coding formats

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911257702.7A CN110930684A (en) 2019-12-10 2019-12-10 Infrared control method and system supporting multiple coding formats

Publications (1)

Publication Number Publication Date
CN110930684A true CN110930684A (en) 2020-03-27

Family

ID=69859452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911257702.7A Pending CN110930684A (en) 2019-12-10 2019-12-10 Infrared control method and system supporting multiple coding formats

Country Status (1)

Country Link
CN (1) CN110930684A (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188457A (en) * 2007-09-21 2008-05-28 广州市聚晖电子科技有限公司 A learning and access method for infrared data based on communication devices
CN101483006A (en) * 2008-05-30 2009-07-15 南靖万利达科技有限公司 Method for forwarding remote control signal
CN201716854U (en) * 2010-07-19 2011-01-19 王志良 Learning transponder and remote controller and integrated control system provided with same
CN103345829A (en) * 2013-06-17 2013-10-09 深圳市九洲电器有限公司 Method and device for remote controller learning
CN103714690A (en) * 2013-12-23 2014-04-09 乐视致新电子科技(天津)有限公司 Method and device for resolving physical codes from remote control coded pulses
WO2015000399A1 (en) * 2013-07-02 2015-01-08 恬家(上海)信息科技有限公司 Learning method for infrared signal
CN105070035A (en) * 2015-08-25 2015-11-18 无锡力芯微电子股份有限公司 Real-time compression method and device for infrared remote control code stream
CN105702014A (en) * 2016-02-25 2016-06-22 无锡力芯微电子股份有限公司 Quick matching method for infrared remote control code library
CN105894792A (en) * 2014-12-02 2016-08-24 无锡比益特科技有限公司 Studying and encoding method for efficient infrared remote control
CN105915989A (en) * 2016-04-29 2016-08-31 镇江惠通电子有限公司 Infrared data transmission method and system, and remote control terminal
CN105957332A (en) * 2016-06-30 2016-09-21 北京海尔广科数字技术有限公司 Method for learning and using infrared remote controller codes and learning type remote controller
CN106297264A (en) * 2016-08-31 2017-01-04 杭州赫智电子科技有限公司 The coded method of the multiple ultra-red order of a kind of compatibility and system
CN106679107A (en) * 2017-01-10 2017-05-17 珠海格力电器股份有限公司 Air conditioner control method and device
CN107730868A (en) * 2017-09-11 2018-02-23 深圳市劳沃智能科技有限公司 The compression and storage method and device of infrared learning coded data
CN110211364A (en) * 2019-05-30 2019-09-06 深圳创维-Rgb电子有限公司 A kind of test macro, test method, electronic equipment and storage medium
CN110223499A (en) * 2019-06-18 2019-09-10 广州中安电工高新科技股份有限公司 A kind of infrared decoding method and device
CN110533898A (en) * 2019-09-06 2019-12-03 百度在线网络技术(北京)有限公司 Wireless control learning system, method, apparatus, equipment and the medium of controlled plant

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188457A (en) * 2007-09-21 2008-05-28 广州市聚晖电子科技有限公司 A learning and access method for infrared data based on communication devices
CN101483006A (en) * 2008-05-30 2009-07-15 南靖万利达科技有限公司 Method for forwarding remote control signal
CN201716854U (en) * 2010-07-19 2011-01-19 王志良 Learning transponder and remote controller and integrated control system provided with same
CN103345829A (en) * 2013-06-17 2013-10-09 深圳市九洲电器有限公司 Method and device for remote controller learning
WO2015000399A1 (en) * 2013-07-02 2015-01-08 恬家(上海)信息科技有限公司 Learning method for infrared signal
CN103714690A (en) * 2013-12-23 2014-04-09 乐视致新电子科技(天津)有限公司 Method and device for resolving physical codes from remote control coded pulses
CN105894792A (en) * 2014-12-02 2016-08-24 无锡比益特科技有限公司 Studying and encoding method for efficient infrared remote control
CN105070035A (en) * 2015-08-25 2015-11-18 无锡力芯微电子股份有限公司 Real-time compression method and device for infrared remote control code stream
CN105702014A (en) * 2016-02-25 2016-06-22 无锡力芯微电子股份有限公司 Quick matching method for infrared remote control code library
CN105915989A (en) * 2016-04-29 2016-08-31 镇江惠通电子有限公司 Infrared data transmission method and system, and remote control terminal
CN105957332A (en) * 2016-06-30 2016-09-21 北京海尔广科数字技术有限公司 Method for learning and using infrared remote controller codes and learning type remote controller
CN106297264A (en) * 2016-08-31 2017-01-04 杭州赫智电子科技有限公司 The coded method of the multiple ultra-red order of a kind of compatibility and system
CN106679107A (en) * 2017-01-10 2017-05-17 珠海格力电器股份有限公司 Air conditioner control method and device
CN107730868A (en) * 2017-09-11 2018-02-23 深圳市劳沃智能科技有限公司 The compression and storage method and device of infrared learning coded data
CN110211364A (en) * 2019-05-30 2019-09-06 深圳创维-Rgb电子有限公司 A kind of test macro, test method, electronic equipment and storage medium
CN110223499A (en) * 2019-06-18 2019-09-10 广州中安电工高新科技股份有限公司 A kind of infrared decoding method and device
CN110533898A (en) * 2019-09-06 2019-12-03 百度在线网络技术(北京)有限公司 Wireless control learning system, method, apparatus, equipment and the medium of controlled plant

Similar Documents

Publication Publication Date Title
US8232861B2 (en) Remote controller capable of selectively controlling a plurality of electric appliances, remote control system and method thereof
US7106209B2 (en) Programming a universal remote control
CN1313987C (en) Arrangement including remote control device and first electronic device
CN102495614A (en) Intelligent household control system
CN101394497B (en) Video device capable of downloading data and method of controlling the same
CN102737496A (en) Remote control system
RU2573762C1 (en) System of remote control and management of "intelligent house" electronic devices
CN103281558A (en) Testing method based on set top box and set top box testing system
CN102930710A (en) Method and device for realizing infrared remote control by mobile phone
CA2689500C (en) Systems and methods for activity-based control of consumer electronics
CN100389441C (en) Studying and up grading system and method for enhanced
CN105096581A (en) Infrared remote control code matching method, remote control equipment and main controlled equipment
CN101155278A (en) Electrical equipment with multi-remote controller control function and implementing method thereof
CN103177092A (en) Data updating method and system of knowledge base and knowledge base
CN102547457B (en) A kind of method for down loading of the remote-controller data based on Set Top Box
CN1185852A (en) Wireless and secure control of electrical equipment
CN110930684A (en) Infrared control method and system supporting multiple coding formats
CN104900045A (en) Signal transmission method, electronic devices and control system
CN103209250A (en) Universal remote control system
CN101277400A (en) Method for processing signal of remote controller, and method and remote controller for controlling apparatus
KR20170099573A (en) Smart label, apparatus and method for contorlling optical network using the same
EP3399511B1 (en) Smart infrared control device and smart infrared control system
CN103686263A (en) Method, equipment and system for data processing
WO2013005233A1 (en) Universal learning radio frequency and communication technology converter
CN101359424A (en) Generating method and system for remote control drive

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327