CN107331147A - A kind of efficient infrared coding-decoding method of intelligent home control system - Google Patents
A kind of efficient infrared coding-decoding method of intelligent home control system Download PDFInfo
- Publication number
- CN107331147A CN107331147A CN201710627799.0A CN201710627799A CN107331147A CN 107331147 A CN107331147 A CN 107331147A CN 201710627799 A CN201710627799 A CN 201710627799A CN 107331147 A CN107331147 A CN 107331147A
- Authority
- CN
- China
- Prior art keywords
- coding
- pulse
- precision
- compressed
- control system
- 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
Links
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C23/00—Non-electrical signal transmission systems, e.g. optical systems
- G08C23/04—Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B1/00—Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
- H04B1/66—Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission for reducing bandwidth of signals; for improving efficiency of transmission
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention belongs to smart home field, the efficient infrared coding-decoding method of more specifically to a kind of intelligent home control system.It includes following steps:S1:By pulse signal according to there is pulse-free signal cutting section, it will be defined as by pulse signal " 1 ", pulse-free signal is defined as " 0 ";S2:The duration of two kinds of pulse signal is arranged in order, i.e.,:Coding ordered series of numbers to be compressed;S3:The form of expression by coded number leu to be compressed according to precision and time value is compressed coding.The beneficial effects of the invention are as follows:By encoding and decoding technique of the present invention, technology versatility is improved, human cost input is reduced, improves economic benefit.
Description
Technical field
The invention belongs to smart home field, the efficient infrared volume of more specifically to a kind of intelligent home control system
Coding/decoding method.
Background technology
In smart home industry, many home appliances are controlled by IR remote controller, and these IR remote controllers
Infrared code storehouse is all solidificated in the storage medium of remote control by itself, when triggering some operation, will have been deposited out of storage medium
The code value of storage is sent out.
But the infrared code value of different IR remote controllers is all inconsistent, and becoming increasingly abundant and intelligently setting with household appliances
Standby development, it may be desired to which expected control could be realized using multiple remote controls, for example:In parlor, first may
Need to open TV by television set IR remote controller, magic box is then opened by intelligent magic box remote control, video is finally found
Source is not output on television set, also to carry out video source output switching by video matrix remote control.With smart home row
The development of industry, has engendered universal code storehouse, by selecting corresponding equipment, is controlled.But the main bottle of the technical scheme
Neck have it is following some:
1. it is that home appliance is constantly being produced, and universal code storehouse must be safeguarded immediately after, and universal code storehouse
Renewal, test and safeguard will bring very big cost.The household electrical appliance newly gone out might have a window phase and can not use
Universal code storehouse is controlled;
2. during Shi Jishiyong universal code storehouse, discovery is not omnipotent, may find that its corresponding uncontrollable correspondence of code value
Function because the infrared equipment in the whole world is too many, and standard differs, and each code value is carried out if desired and tests or verify cost
It is too high caused, so this is also the maximum obstruction of universal code storehouse popularization;
3. assume that universal code storehouse has obtained good maintenance, then inherently put into very big cost, and if it is desired to using
This yard of storehouse must need one expense of payment to be bought, but often in actual applications, simply use wherein very little one
The infrared code storehouse divided, but need to pay the expense in all yards of storehouses.
The problem of in order to solve above-mentioned, therefore a kind of new code encoding/decoding mode of urgent need, encoding and decoding technique of the prior art,
It is based primarily upon main following two standards and carries out encoding and decoding:
1.NEC Protocol PWM (pulse width modulation) standard,
2.Philips RC-5 Protocol PPM (pulse position modulation) standard.
As shown in Figure 1;
Prior art is all by logic code as code identification into 011101, but the technology has the following disadvantages:
1. first having to recognize different standards, and encoded, if that is, various criterion is not identified and can led to not
Distinguish;
2. if new standard comes out, encryption algorithm is updated again, it could be adapted to.So prior art is to standard
With dependence.
The content of the invention
The present invention asks to solve the cost expenses very big technology of the renewal in universal code storehouse and test maintaining in the prior art
Inscribe and provide a kind of efficient infrared coding-decoding method of high efficiency, low cost and the intelligent home control system without dependence.
In order to solve the above-mentioned technical problem, the technical scheme is that:A kind of intelligent home control system it is efficient red
Outer decoding method, includes following steps:
S1:There is pulse-free signal to cut some segmentations according to infrared code, there will be pulse signal to be defined as " 1 ", no pulse letter
Number it is defined as " 0 ";
S2:The duration for having pulse signal and pulse-free signal of each segmentation is arranged by the order of infrared code, i.e.,:
Coding ordered series of numbers to be compressed;
S3:Each segmentation in coding ordered series of numbers to be compressed is compressed volume according to the form of expression of precision and time value
Code.
By the way that the pulse signal of analog quantity is compressed according to the form of expression of precision and time value again, will originally with
The signal of analog quantity form storage is stored with the signal of digital quantity, while covert raising storage capacity, because using electric signal
Encoding and decoding technique, independent of encoding and decoding standard, true form reasonable compression is carried out using algorithm, and stored, entered when extracting
Row decoded back, and simultaneously non-usage logic encoding and decoding, thus without dependence, greatly reduce the input of cost.
Preferably, in step s3, each segmentation uses the binary system compressed encoding of N in coding ordered series of numbers to be compressed
Mode, and wherein represent precision, latter N-M expression time value with first M.
The form of expression arranged in pairs or groups by precision and time value, makes the duration of each segmentation pass through the letter of binary form
Showing just, and represent that scope also becomes very large.
Preferably, in step s3, calculating that the number L of range, the number L of range calculate that mode is as follows by precision:L
=2M。
I.e. when using the binary system compression coding mode of N, precision is determined according to precision error tolerance, by precision with
And time value extrapolates range.
Preferably, using the binary system compression coding mode of 12 in step S3, and precision wherein is represented with first 2,
The expression time value of 10 afterwards.
The principle said and fixed based on fault-tolerant percentage is put into embodiment, and time width is bigger, fault-tolerant numerical value
It is bigger;Precision are represented because of the binary system compression coding mode using 12, and using first 2, then the latter 10 expression time
Value,
And the precision error tolerance of infrared code is 0.02ms, is extrapolated according to the maximum of time value, then first paragraph
Range is then precision (0~20.46ms), the like, remaining three accurate values are positioned into 0.1ms, 0.5ms, 1ms respectively
When, you can meet the Breadth Maximum 650ms of infrared code signal, and its range be also respectively (20.46ms~102.3ms),
(102.3ms~511.5ms), (511.5ms~650ms).
Above-mentioned technical proposal is used, the invention has the advantages that:Independent of any standard, because based on electric signal
Encoding and decoding, thus future the technology need not be updated or be safeguarded, greatly reduce later stage cost input.And the present invention is used
The encoding and decoding technique of raw electrical signal, so independent of encoding and decoding standard, carrying out true form reasonable compression using algorithm, and deposited
Storage, decoded back is carried out when extracting, and simultaneously non-usage logic encoding and decoding, thus without dependence, greatly reduces cost
Input.
Brief description of the drawings
Fig. 1 is infrared code encoded segment schematic diagram of the prior art;
Fig. 2 is the infrared code encoded segment schematic diagram in the present invention.
Embodiment
The embodiment to the present invention is described further below in conjunction with the accompanying drawings.Herein it should be noted that for
The explanation of these embodiments is used to help understand the present invention, but does not constitute limitation of the invention.In addition, disclosed below
As long as each of the invention embodiment in involved technical characteristic do not constitute conflict each other and can just be mutually combined.
As shown in Figure 2, a kind of efficient infrared coding-decoding method of intelligent home control system, includes following steps:
S1:There is pulse-free signal to cut some segmentations according to infrared code, there will be pulse signal to be defined as " 1 ", no pulse letter
Number it is defined as " 0 ";
S2:The duration for having pulse signal and pulse-free signal of each segmentation is arranged by the order of infrared code, i.e.,:
Coding ordered series of numbers to be compressed;
S3:Each segmentation in coding ordered series of numbers to be compressed is compressed volume according to the form of expression of precision and time value
Code.
Each segmentation uses the binary system compression coding mode of N in coding ordered series of numbers to be compressed, and wherein with preceding M table
Show precision, latter N-M expression time value.
Calculate that the number L of range, the number L of range calculate that mode is as follows by precision:L=2M。
Using the binary system compression coding mode of 12, and wherein represent precision, the expression time of latter 10 with first 2
Value.
Width of the invention by calculating pulse signal and low level signal, is represented and is encoded with the time.For example:With
Exemplified by infrared code shown in Fig. 1, to explain technical scheme, 16 sections are divided the signal into, each section includes two information:
1. signal type:A. pulse (being defined as 1), b. low levels (being defined as 0);
2. signal duration:t.
Information in Fig. 2 expressed to (mode of form is expressed according to Fig. 2 encoded segments schematic diagram with the form of form
More for simplicity), as shown in the segment encoding table of table 1;
The segment encoding table of table 1
Analyzed by table 1, it is seen that, two rules:
1. the signal type of initial signal is started with impulse type;
2. signal type, which is impulse type, low level type, must be spaced appearance.
According to above rule, we are specific as shown in the segment encoding of table 2 optimization table again to code optimization;And be segmented and compile
Time value in code optimization table is arranged as coding ordered series of numbers to be compressed in order.
The segment encoding of table 2 optimizes table
By calculating to table 2 is actual, not high is required to the time precision of each fragment, and error tolerance is wide, for this
One characteristic, we further analyze, and draw:
1. and most long infrared code signal Breadth Maximum is no more than 650ms on the market for analysis;
2. the principle fixed based on fault-tolerant percentage, time width is bigger, fault-tolerant numerical value is bigger;
Therefore, using 12 coded systems, and as shown in the encoding precision compaction table of table 3:
The encoding precision of table 3 is compressed
That is, precision is represented with preceding 2 bits, 10 bits represent time value after;
Bit12, bit11 represent precision:
As bit12=0 and bit11=0, precision is 0.02ms (range 0ms~20.46ms);
As bit12=0 and bit11=1, precision is 0.1ms (range 20.46ms~102.3ms);
As bit12=1 and bit11=0, precision is 0.5ms (range 102.3ms~511.5ms);
As bit12=1 and bit11=1, precision is 1ms (range 511.5ms~650ms).
T1 i.e. in table 2 can represent that front two 11 represents that its precision is 1ms, rear ten with 110000001001
0000001001 represents 9ms.
Thus by above coding techniques, in precision error tolerance, compression ratio is improved to greatest extent;
And for decoding algorithm, it is reverse to calculate to the value of actual storage, you can to realize and decoded.
It is of the invention main with resolving the shortcomings of the prior art solutions, by controlling the infrared of home appliance needed for live typing
Yard, coding is compressed according to the infrared code value of physical device, when triggering correspondence control, decoding extraction, and transmission pair is carried out
Answer infrared code.
By the present invention in that with how much infrared codes, with regard to typing, extract and verify, thus high efficiency, low cost solve it is above-mentioned
The shortcoming of technical scheme.
According to above encryption algorithm, the data of table 2 can further be compressed, taking 4Byte by an original signal is
32Bit is compressed to 12Bit, and compression ratio is 2.67 times, and one infrared code takes 24Byte.The FLASH that general single-chip microcomputer is carried is
128KB, firmware occupancy 64KB, can accommodate 2730 by calculating single-chip microcomputer itself FLASH, be approximately equal under normal circumstances
The code storehouse of 27 TV remote controllers.
Based on smart home industry application background, the actual use of domestic consumer can not possibly more than 27 TV remote-controls
Device, can be to the further optimization of precision if there is specific demand.
Independent of any standard, because of the encoding and decoding based on electric signal, therefore future need not be updated or tie up to the technology
Shield, greatly reduces later stage cost input.And the present invention is using the encoding and decoding technique of raw electrical signal, so independent of encoding and decoding
Standard, carries out true form reasonable compression using algorithm, and is stored, and carries out decoded back when extracting, and simultaneously non-usage logic
Encoding and decoding, thus without dependence, greatly reduce the input of cost.
Thus by encoding and decoding technique of the present invention, improve technology versatility, reduce human cost input, improve through
Ji benefit.
Embodiments of the present invention are explained in detail above in association with accompanying drawing, but the invention is not restricted to described implementation
Mode.For a person skilled in the art, in the case where not departing from the principle of the invention and spirit, to these embodiments
A variety of change, modification, replacement and modification are carried out, are still fallen within protection scope of the present invention.
Claims (4)
1. a kind of efficient infrared coding-decoding method of intelligent home control system, it is characterized in that:Include following steps:
S1:There is pulse-free signal to cut some segmentations according to infrared code, there will be pulse signal to be defined as " 1 ", pulse-free signal is fixed
Justice is " 0 ";
S2:The duration for having pulse signal and pulse-free signal of each segmentation is arranged by the order of infrared code, i.e.,:Wait to press
Reduce the staff yardage row;
S3:Each segmentation in coding ordered series of numbers to be compressed is compressed coding according to the form of expression of precision and time value.
2. a kind of efficient infrared coding-decoding method of intelligent home control system according to claim 1, it is characterized in that:
In step S3, each segmentation uses the binary system compression coding mode of N in coding ordered series of numbers to be compressed, and wherein with first M
Represent precision, latter N-M expression time value.
3. a kind of efficient infrared coding-decoding method of intelligent home control system according to claim 2, it is characterized in that:
In step S3, calculate that the number L of range, the number L of range calculate that mode is as follows by precision:L=2M。
4. a kind of efficient infrared coding-decoding method of intelligent home control system according to Claims 2 or 3, its feature
It is:The binary system compression coding mode of 12 is used in step S3, and wherein represents precision with first 2, during the expression of latter 10
Between be worth.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710627799.0A CN107331147A (en) | 2017-07-28 | 2017-07-28 | A kind of efficient infrared coding-decoding method of intelligent home control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710627799.0A CN107331147A (en) | 2017-07-28 | 2017-07-28 | A kind of efficient infrared coding-decoding method of intelligent home control system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107331147A true CN107331147A (en) | 2017-11-07 |
Family
ID=60227884
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710627799.0A Pending CN107331147A (en) | 2017-07-28 | 2017-07-28 | A kind of efficient infrared coding-decoding method of intelligent home control system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107331147A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1993005580A1 (en) * | 1991-08-30 | 1993-03-18 | Thomson Consumer Electronics, S.A. | Method of compressing data code and apparatus for using the compressed data code |
CN1599258A (en) * | 2004-06-25 | 2005-03-23 | 浙江大学 | Coding mode suitable for different refrared control signal |
CN101789173A (en) * | 2010-03-12 | 2010-07-28 | 北京东方广视科技股份有限公司 | Method for learning waveform and device therefor |
CN102790621A (en) * | 2012-06-08 | 2012-11-21 | 深圳市创荣发电子有限公司 | Infrared data processing storage method and infrared remote-control unit |
CN104992553A (en) * | 2015-07-29 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Replication study method and system of infrared remote waveform of household appliances |
CN204965741U (en) * | 2015-07-30 | 2016-01-13 | 广州唯控电子科技有限公司 | Infrared remote control study data compression system |
CN105957332A (en) * | 2016-06-30 | 2016-09-21 | 北京海尔广科数字技术有限公司 | Method for learning and using infrared remote controller codes and learning type remote controller |
-
2017
- 2017-07-28 CN CN201710627799.0A patent/CN107331147A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1993005580A1 (en) * | 1991-08-30 | 1993-03-18 | Thomson Consumer Electronics, S.A. | Method of compressing data code and apparatus for using the compressed data code |
CN1599258A (en) * | 2004-06-25 | 2005-03-23 | 浙江大学 | Coding mode suitable for different refrared control signal |
CN101789173A (en) * | 2010-03-12 | 2010-07-28 | 北京东方广视科技股份有限公司 | Method for learning waveform and device therefor |
CN102790621A (en) * | 2012-06-08 | 2012-11-21 | 深圳市创荣发电子有限公司 | Infrared data processing storage method and infrared remote-control unit |
CN104992553A (en) * | 2015-07-29 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Replication study method and system of infrared remote waveform of household appliances |
CN204965741U (en) * | 2015-07-30 | 2016-01-13 | 广州唯控电子科技有限公司 | Infrared remote control study data compression system |
CN105957332A (en) * | 2016-06-30 | 2016-09-21 | 北京海尔广科数字技术有限公司 | Method for learning and using infrared remote controller codes and learning type remote controller |
Non-Patent Citations (1)
Title |
---|
王虹: "《通信系统原理》", 30 August 2014, 国防工业出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101908911B (en) | Intelligent home control system and method for networking by utilizing power line and remote controllers | |
CN105070035B (en) | The real-time compression method and device of infrared remote control code stream | |
CN105450299A (en) | Method, device and system for coding and decoding signal | |
CN116016606B (en) | Sewage treatment operation and maintenance data efficient management system based on intelligent cloud | |
CN105281777B (en) | A kind of compression method, system and the remote controler of remote controler learning data | |
CN103024499A (en) | Method and device for implementing smart television | |
CN107331147A (en) | A kind of efficient infrared coding-decoding method of intelligent home control system | |
CN101964046A (en) | Barcode scanning and identifying method | |
CN103731241B (en) | Encoding system and method for improving spectrum efficiency of communication system | |
CN102214360B (en) | Bitmap constructing method and device, intersection method and intersection device | |
CN105471511A (en) | Coding and decoding method for enhancing optical signal transmission reliability and device and system thereof | |
CN106485021A (en) | Mining high-voltage electric-network automatic short-circuit computational methods based on interconnection switch topology coding | |
CN103812556B (en) | Lighting parameter optimizing method for photon client | |
CN103793979A (en) | Method for upgrading photon receiving end | |
CN104240491A (en) | Method for digitizing infrared signal | |
CN103428502B (en) | Decoding method and decoding system | |
CN106094605A (en) | A kind of HART multichannel switching circuit and method | |
CN205902151U (en) | LED wireless receiving controller | |
CN109872522B (en) | Algorithm for decompressing infrared code based on sample index | |
CN104468968A (en) | Implementation method of telecontrol system based on Android mobile phone | |
CN103763838A (en) | Illumination control information sending method and device and illumination control system | |
CN102736551A (en) | Software problem solving method for ladder diagram codes of programmable logic controller (PLC) | |
CN106850785A (en) | A kind of physical message system data compression transmitting method of use sliding window caching | |
CN107393291A (en) | A kind of compression of red outer code data and decompression method | |
CN204695538U (en) | A kind of radio remote switch that freely matches |
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: 20171107 |