CN105070035B - The real-time compression method and device of infrared remote control code stream - Google Patents

The real-time compression method and device of infrared remote control code stream Download PDF

Info

Publication number
CN105070035B
CN105070035B CN201510527087.2A CN201510527087A CN105070035B CN 105070035 B CN105070035 B CN 105070035B CN 201510527087 A CN201510527087 A CN 201510527087A CN 105070035 B CN105070035 B CN 105070035B
Authority
CN
China
Prior art keywords
comparative sample
pulse
sample
code
remote control
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.)
Active
Application number
CN201510527087.2A
Other languages
Chinese (zh)
Other versions
CN105070035A (en
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.)
WUXI CHIPOWN MICROELECTRONICS CO Ltd
Original Assignee
WUXI CHIPOWN MICROELECTRONICS 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 WUXI CHIPOWN MICROELECTRONICS CO Ltd filed Critical WUXI CHIPOWN MICROELECTRONICS CO Ltd
Priority to CN201510527087.2A priority Critical patent/CN105070035B/en
Publication of CN105070035A publication Critical patent/CN105070035A/en
Application granted granted Critical
Publication of CN105070035B publication Critical patent/CN105070035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of real-time compression method and device of infrared remote control code stream.The compression method includes:Receive infrared remote control code stream, the infrared remote control code stream has continuous multiple yards of pulses, the code pulse includes at least two kinds of different types, each code pulse includes high level and low level, wherein high level is the carrier pulse of preset frequency, and the high level lasting time of different types of code pulse is different with the low level duration;Obtain successively and record each yard of pulse of the infrared remote control code stream, wherein each code pulse recorded includes its high level lasting time and low duration;Each code pulse of record match with one group of comparative sample including the first comparative sample and the second comparative sample and stores sample set to obtain sample index sequence, the index sum of each group comparative sample and code pulse, wherein using record recently two different code pulses as the first comparative sample and the second comparative sample.The space of RAM is so greatly saved.

Description

The real-time compression method and device of infrared remote control code stream
【Technical field】
The present invention relates to telecontrol code stream process field, more particularly to a kind of real-time compression method of infrared remote control code stream And device.
【Background technology】
At present, the Learning Scheme for the IR remote controller on the smart machine of in the market, which mostly uses, has large capacity The MCU (micro- central processing unit) of RAM (random access memory) carries out data buffer storage, and then the data sending of caching is given again Smart machine, so as to complete the learning process of whole infrared signal.And the MCU of the RAM of built-in large capacity certainly will be improved entirely The cost of scheme.
Fig. 1 is the waveform of the complete infrared remote control code stream of a frame, it includes the code pulse of multiple types, such as TA, TB, TC, TD, each code pulse include high level and low level, the high level lasting time of different types of code pulse and low Level duration is different, and the high level lasting time of the code pulse of same type is identical with low duration, and high level Then be made of the carrier pulse of several fixed frequencies, using the carrier pulse of fixed frequency come substitute high level be in order to The transmitting power consumption of whole MCU is reduced, and fixed carrier frequency pulse is free of in low level.Whole code stream waveform shown in Fig. 1 is By TA, TB, TC, these yard of pulse composition of TD.In other frame infrared remote control code streams, it may also include these yard of pulse Various combination, other kinds of code pulse can also be included.It is of the prior art to have defined all kinds of code pulses, it is various Code pulse combined can form a frame infrared remote control code stream.
Realize the real-time storage of a frame infrared remote control code stream, most straightforward approach is exactly to be carried out directly using big RAM Caching.In one example, for the infrared remote control code stream formed by 500 code pulses (such as TA and TB), according to each code Pulse takes 4 bytes and calculates, and high level lasting time takes 2 bytes, and low duration takes 2 bytes, right Show real-time storage in fact, it is necessary to which the ram cell of 2000byte, such storage mode can cause the huge RAM wastings of resources.
Therefore, expect to propose a kind of real-time compression method and device of improved infrared remote control code stream, it can be as far as possible Saving RAM resources.
【The content of the invention】
It is an object of the present invention to providing a kind of real-time compression method and device of infrared remote control code stream, it can be right Telecontrol code stream carries out Real Time Compression, so as to save RAM resources.
To solve the above-mentioned problems, according to an aspect of the present invention, the present invention provides a kind of reality of infrared remote control code stream When compression method, it includes:Infrared remote control code stream is received, the infrared remote control code stream has continuous multiple yards of pulses, described Code pulse includes at least two kinds of different types, and each code pulse includes high level and low level, and wherein high level is preset frequency Carrier pulse, the high level lasting time of different types of code pulse and low level duration be different;Obtain successively simultaneously Each yard of pulse of the infrared remote control code stream is recorded, wherein each code pulse recorded includes its high level lasting time and low Level duration;By each code pulse of record and one group of comparative sample for including the first comparative sample and the second comparative sample Matching is to obtain sample index sequence, the index sum of each group comparative sample and code pulse storage sample set, wherein will be nearest Two different code pulses of record are respectively as the first comparative sample and the second comparative sample.
According to another aspect of the present invention, the present invention provides a kind of Real Time Compression device of infrared remote control code stream, it is wrapped Include:Receiving unit, for receiving infrared remote control code stream, the infrared remote control code stream has continuous multiple yards of pulses, the code Pulse includes at least two kinds of different types, and each code pulse includes high level and low level, and wherein high level is preset frequency Carrier pulse, the high level lasting time of different types of code pulse are different with the low level duration;Acquiring unit, is used for Obtain successively and record each yard of pulse of the infrared remote control code stream, wherein each code pulse recorded is held including its high level Continuous time and low duration;Coding unit, by each code pulse of record with comparing including the first comparative sample and second Deposited compared with one group of comparative sample matching of sample with obtaining sample index sequence, the index sum of each group comparative sample and code pulse Sample set is stored up, wherein using record recently two different code pulses as the first comparative sample and the second comparative sample.
Compared with prior art, a kind of Real Time Compression side of simple, easy infrared remote control code stream is provided in the present invention Case, it can carry out Real Time Compression to telecontrol code stream, so as to save RAM resources.
【Brief description of the drawings】
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill of field, without having to pay creative labor, it can also be obtained according to these attached drawings other Attached drawing.Wherein:
Fig. 1 shows the waveform of the complete infrared remote control code stream of a frame;
Fig. 2 shows the example of the Real Time Compression scheme of the infrared remote control code stream in the present invention;
Fig. 3 shows the flow signal of the real-time compression method of the infrared remote control code stream in the present invention in one embodiment Figure;With
Fig. 4 shows the structural representation of the Real Time Compression device of the infrared remote control code stream in the present invention in one embodiment Figure.
【Embodiment】
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, it is below in conjunction with the accompanying drawings and specific real Applying mode, the present invention is described in further detail.
" one embodiment " or " embodiment " referred to herein refers to may be included at least one implementation of the present invention A particular feature, structure, or characteristic." in one embodiment " that different places occur in the present specification not refers both to same A embodiment, nor the single or selective embodiment mutually exclusive with other embodiment.
Fig. 3 shows the flow of the real-time compression method 300 of the infrared remote control code stream in the present invention in one embodiment Schematic diagram.As shown in Figure 3, the real-time compression method 300 includes the following steps.
Step 310, infrared remote control code stream is received.
The infrared remote control code stream has continuous multiple yards of pulses, and the code pulse includes at least two different types, often A yard of pulse includes high level and low level, and wherein high level is the carrier pulse of preset frequency, different types of code pulse High level lasting time is different with the low level duration.The reference carrier wave of preset frequency can be 0~80KHz.One frame is red The maximum length of outer remote control code stream can reach more than 1s, and code pulse number is maximum up to 500.
(a) in Fig. 2 illustrates an example of the waveform of infrared remote control code stream, wherein its multiple yards of arteries and veins having Punching, these yard of pulse are divided into tetra- kinds of different types of TA, TB, TC and TD, the high level lasting time of code pulse TA and code pulse TB It is different with low duration, and the high level lasting time of two code pulse TB and low duration are identical 's.
These infrared remote control code streams are from another infrared remote control code stream transmitting equipment, such as the infrared remote control of television set Device, the IR remote controller of air-conditioning.
Step 320, obtain successively and record each yard of pulse of the infrared remote control code stream, wherein each code arteries and veins recorded Punching includes its high level lasting time and low duration.
In one embodiment, the preset frequency in the high level of first code pulse of the infrared remote control code stream is calculated Carrier pulse signal period value, record when former code pulse high level in carrier pulse number, the carrier pulse Number is using by as the high level lasting time for deserving former code pulse, number and carrier pulse that subsequently can be based on carrier pulse Signal period value calculate can calculate deserve former code pulse high level lasting time.Deserved using timer to calculate The low duration of former code pulse.This completes the record of a code pulse.Same method is repeated, can be obtained And record the high level lasting time and low duration of each yard of follow-up pulse.The high level of the code pulse continues Time and low duration represent that wherein N is for the integer more than or equal to 1, such as N by the binary sequence of N byte 2。
(b) in Fig. 2 illustrates the example of each yard of pulse of acquisition.Each code pulse includes two parts data, high Level duration data and low level sequential time data, the time range are tens microseconds to hundreds of milliseconds, for example TAH is The data of the high level lasting time of code pulse TA, TAL are the data of the low duration of code pulse TA, and TBH is code arteries and veins The data of the high level lasting time of TB are rushed, TBL is data of low duration of code pulse TB etc..It should be understood that It is that these yard of pulse be not buffered at the same time to get off, but is buffered what is got off by timesharing, that is, obtains TAH and TAL, afterwards It can start to be compressed TAH and TAL, rather than after all code pulses are cached, just proceed by follow-up Compression.In the present invention, the high level lasting time data of each code pulse take 2 bytes, low level sequential time data 2 bytes are taken, that is, recording each code pulse needs the data of 4 bytes.
Step 330, by each code pulse of record compared with one group including the first comparative sample and the second comparative sample Sample matches are to obtain sample index sequence, the index sum of each group comparative sample and code pulse storage sample set, wherein will The two different code pulses recorded recently are respectively as the first comparative sample and the second comparative sample.
In one embodiment, by record when former code pulse and first comparative sample in current group comparative sample and the Two comparative samples are matched.Specifically, by when the high level lasting time of former code pulse and low duration respectively with The high level lasting time and low duration of the first comparative sample and the second comparative sample in current group comparative sample It is compared, if when the high level lasting time of former code pulse is consistent with the high level lasting time of a comparative sample, and When the low duration of former code pulse and the low duration of the comparative sample are consistent, then it is assumed that when former code pulse with The comparative sample matches, otherwise, then it is assumed that when former code pulse and the comparative sample mismatch.
If when former code pulse is matched with the first comparative sample, the correspondence position in the sample index sequence is marked For the first value, if when former code pulse is matched with the second comparative sample, by the correspondence position mark in the sample index sequence Second value, while the index sum cumulative 1 that will currently organize comparative sample are denoted as, each code pulse is corresponded in sample index sequence One.
If when former code pulse and the second comparative sample and the first comparative sample all mismatch, storage is current to organize comparative sample The code pulse that the first comparative sample in this is stored as code pulse in sample set stores sample, will currently organize comparative sample In the second comparative sample be updated to the first comparative sample, the second comparative sample will be updated to when former code pulse, so as to be formed new One group of comparative sample, index sum is set for one group of new comparative sample, and index sum is arranged to initial value, by sample Correspondence position in this call number sequence is labeled as second value.
Specifically, the sample index sequence is binary sequence, each position correspondence in the binary sequence from The code pulse obtained in the infrared remote control code stream, the first value are 0, second value 1, or the first value is 1, and second value is 0;The initial value of the index sum of every group of comparative sample is 1, and the index sum of every group of comparative sample takes M byte, and wherein M is Integer more than or equal to 1, the high level lasting time and low duration of each comparative sample in every group of comparative sample Equally represented by the binary sequence of N byte, the height of each code pulse storage sample in the code pulse storage sample set Level duration and low duration are equally represented by the binary sequence of N byte.
It refer to (b), (c), (d), (e), (f) in Fig. 2 below, which show a compressed encoding example.
At the initial stage of acquisition code pulse, two comparative samples in first group of comparative sample are all sky.
First to first code pulse TA processing of the infrared remote control code stream of acquisition, due to being first yard of pulse, Directly as the first comparative sample in first group of comparative sample, and first code pulse TA and the first comparative sample Match somebody with somebody, therefore the correspondence position in its call number sequence is 0.Index sum under first group of comparative sample is arranged to initial value 1.
When handling second code pulse TB of the infrared remote control code stream of acquisition, this yard of pulse TB is compared with first group The first comparative sample in sample is different, and the second comparative sample is sky, therefore by this yard of pulse TB directly as the second comparative sample This, and second code pulse TB is matched with the second comparative sample, therefore the correspondence position in its call number sequence is 1.First group Index sum under comparative sample is updated to 2.
When the 3rd code pulse TB of the infrared remote control code stream to acquisition is handled, this yard of pulse TB is compared with second Sample matches, therefore the correspondence position in its call number sequence is 1.Index sum under first group of comparative sample is updated to 3.
When the 4th code pulse TC of the infrared remote control code stream to acquisition is handled, this yard of pulse TC and first group of ratio All mismatched compared with the first comparative sample in sample and the second comparative sample, therefore the first comparative sample in first group of comparative sample The code pulse that this TA storages are stored as code pulse in sample set stores sample, by the second ratio in first group of comparative sample It is the first comparative sample compared with Sample Refreshment, code pulse TC is updated to the second comparative sample, so that second group of comparative sample is formed, Index sum is set for second group of comparative sample, and index sum is arranged to 1, while by pair in sample index sequence Position is answered to be labeled as 1.
When the 5th code pulse TB of the infrared remote control code stream to acquisition is handled, this yard of pulse TB and second group of ratio Compared with the first comparative sample matching in sample, therefore the correspondence position in its call number sequence is 0, the rope under second group of comparative sample Draw sum and be updated to 2.
When the 6th code pulse TB of the infrared remote control code stream to acquisition is handled, this yard of pulse TB and second group of ratio Compared with the first comparative sample matching in sample, therefore the correspondence position in its call number sequence is 0, the rope under second group of comparative sample Draw sum and be updated to 3.
When the 7th code pulse TC of the infrared remote control code stream to acquisition is handled, this yard of pulse TC and second group of ratio Compared with the second comparative sample matching in sample, therefore the correspondence position in its call number sequence is 1, the rope under second group of comparative sample Draw sum and be updated to 4.
When the 8th code pulse TC of the infrared remote control code stream to acquisition is handled, this yard of pulse TC and second group of ratio Compared with the second comparative sample matching in sample, therefore the correspondence position in its call number sequence is 1, the rope under second group of comparative sample Draw sum and be updated to 5.
When the 9th code pulse TD of the infrared remote control code stream to acquisition is handled, this yard of pulse TD and second group of ratio All mismatched compared with the first comparative sample in sample and the second comparative sample, therefore the first comparative sample in second group of comparative sample The code pulse that this TB storages are stored as code pulse in sample set stores sample, by the second ratio in second group of comparative sample It is the first comparative sample compared with Sample Refreshment, code pulse TD is updated to the second comparative sample, so that the 3rd group of comparative sample is formed, Index sum is set for the 3rd group of comparative sample, and index sum is arranged to 1, while by pair in sample index sequence Position is answered to be labeled as 1.
Since follow-up infrared remote control code stream is over, by the first comparative sample in the 3rd group of comparative sample and Two code pulses that the storage of two comparative samples is stored as code pulse in sample set store sample.
So, it is only necessary to the code pulse buffer area of 4 bytes is opened up in RAM, opens up the sample rope of a small amount of several bytes Draw sequence buffer area, the index sum buffer area under each group comparative sample of several bytes, opens up the group comparative samples of 8 bytes Buffer area and the storage sample set buffer area of multiple bytes can realize the real-time storage of super large overlength code stream.
As can be seen that one sharing 9 code pulses in Fig. 2,9*4=36byte is taken, becomes 4 code arteries and veins after overcompression Punching storage sample (4*4=16byte), the number composition of every group of sample index number of 2byte sample index sequence and 3byte, 21byte altogether, it can be seen that reached compression effectiveness.Because similar sample is many in the infrared code stream of household electrical appliances, the pressure Compression algorithm can reach good compression effectiveness, and ensure that the compression algorithm can be real using the method for two comparative samples When be processed, that is, between next sample low period just complete above the comparison of three samples and realize compression storage, this Sample ensures that each code stream sample causes to lose all without because front compression algorithm is not completed.
In an example, the present invention opens the RAM memory blocks of 64byte for sample index sequence, that is, maximum 64*8=512 code impulse smaple can be indexed.The present invention is that the index sum under each group comparative sample opens 65byte Space, the index sum under every group of comparative sample take 1 byte, the index of so achievable 64 groups of comparative samples.The present invention In be space that every group of comparative sample opens 8byte, storing sample set for code pulse opens 256byte, can store 64 A code stream sample.By substantial amounts of experimental verification, can be completed using the RAM of 400byte in of the invention 500 infrared distant The real-time storage of control code stream pulse period, and the ram cell of 2000byte is needed in theory, compression ratio has reached 5:1, while this Invention also ensure that the real-time of the compression algorithm, and the processing time of whole compression algorithm is no more than 100us, less than existing market The infrared code stream low level time.
The real-time compression method of infrared remote control code stream in the present invention both can be applied to common infrared remote control code stream In receive process, smart machine can also be applied to in the learning process of infrared remote controller.At present, in order to enable intelligence is set Standby (such as smart mobile phone) can learn the various IR remote controllers of family, and substitute multiple IR remote controllers to control using it Various household electrical appliances.For this, it usually needs an infrared remote control component is set, which is connected with smart machine, should Infrared remote control component can directly receive infrared signal and send infrared signal.The real-time pressure of infrared remote control code stream in the present invention Contracting method can be applied in the infrared remote control component.
According to another aspect of the present invention, the invention also provides a kind of Real Time Compression device of infrared remote control code stream, It includes receiving unit 410, acquiring unit 420 and coding unit 430.
The receiving unit 410 is used to receive infrared remote control code stream, and the infrared remote control code stream has continuous multiple codes Pulse, the code pulse include at least two kinds of different types, and each code pulse includes high level and low level, and wherein high level is The carrier pulse of preset frequency, the high level lasting time of different types of code pulse are different with the low level duration.Institute Acquiring unit 420 is stated, for obtaining each yard of pulse of the infrared remote control code stream successively, records the infrared remote control code stream Each yard of pulse, wherein each code pulse recorded includes its high level lasting time and low duration.The volume Code unit 430 matches each code pulse of record with one group of comparative sample including the first comparative sample and the second comparative sample To obtain sample index sequence, the index sum of each group comparative sample and code pulse storage sample set, wherein will record recently Two different code pulses respectively as the first comparative sample and the second comparative sample.
In one embodiment, the coding unit 430 performs following operation:By record when former code pulse and current group The first comparative sample and the second comparative sample in comparative sample are matched, if when former code pulse and the first comparative sample Match somebody with somebody, then by the correspondence position in the sample index sequence labeled as the first value, if when former code pulse and the second comparative sample Matching, then be labeled as second value, while the index that will currently organize comparative sample by the correspondence position in the sample index sequence Sum cumulative 1, each code pulse corresponds to one in sample index sequence;If when former code pulse and the second comparative sample and First comparative sample all mismatches, then the first comparative sample in the current group comparative sample of storage stores sample set as code pulse In code pulse storage sample, the second comparative sample in current group comparative sample is updated to the first comparative sample, will When former code pulse is updated to the second comparative sample, so as to form one group of new comparative sample, set for one group of new comparative sample Index sum is put, and index sum is arranged to initial value, the correspondence position in sample index sequence is labeled as second value.
The sample index sequence is binary sequence, and each position correspondence in the binary sequence is from described infrared The code pulse obtained in remote control code stream, the first value are 0 or 1, and second value is 1 or 0;When the high level of the code pulse continues Between and low duration represent that wherein N is integer more than or equal to 1 by the binary sequence of N byte;Every group of comparative sample The initial value of this index sum is 1, and the index sum of every group of comparative sample takes M byte, and wherein M is more than or equal to 1 Integer, the high level lasting time and low duration of each comparative sample in every group of comparative sample are equally by N words The binary sequence of section represents that each code pulse in the code pulse storage sample set stores the high level lasting time of sample Equally represented with low duration by the binary sequence of N byte.
The coding unit is by record when former code pulse and the first comparative sample and second in current group comparative sample Comparative sample carries out matching and refers to:By when the high level lasting time of former code pulse and low duration respectively with current group The high level lasting time and low duration of the first comparative sample and the second comparative sample in comparative sample are compared Compared with, if when the high level lasting time of former code pulse is consistent with the high level lasting time of a comparative sample, and work as former code The low duration of pulse is consistent with the low duration of the comparative sample, then it is assumed that when former code pulse is compared with this Sample matches.
The each yard of pulse that the acquiring unit obtains the infrared remote control code stream successively includes:Calculate the infrared remote control The signal period value of the carrier pulse of preset frequency in the high level of first code pulse of code stream, records each code pulse The number of carrier pulse in high level, and to calculate this current for the number based on carrier pulse and the signal period value of carrier pulse The high level lasting time of code pulse, is calculated when the low duration of former code pulse using timer.
It is pointed out that any change that one skilled in the art does the embodiment of the present invention All without departing from the scope of claims of the present invention.Correspondingly, the scope of claim of the invention is also not merely limited to In previous embodiment.

Claims (10)

1. a kind of real-time compression method of infrared remote control code stream, it is characterised in that it includes:
Infrared remote control code stream is received, the infrared remote control code stream has continuous multiple yards of pulses, and the code pulse includes at least Two kinds of different types, each code pulse include high level and low level, and wherein high level is the carrier pulse of preset frequency, different The high level lasting time of the code pulse of type is different with the low level duration;
Obtain successively and record each yard of pulse of the infrared remote control code stream, wherein each code pulse recorded includes its high electricity Flat duration and low duration;
By record when former code pulse with including the first comparative sample and second comparative sample currently organize comparative sample match with Sample index sequence, the index sum of each group comparative sample and code pulse storage sample set are obtained, wherein will record recently Two different code pulses are respectively as the first comparative sample and the second comparative sample.
2. the real-time compression method of infrared remote control code stream according to claim 1, it is characterised in that the working as record Former code pulse is matched to obtain sample index number with the current group comparative sample including the first comparative sample and the second comparative sample Sequence, the index sum of each group comparative sample and code pulse storage sample set include:
By record when former code pulse is matched with the first comparative sample in current group comparative sample and the second comparative sample;
If when former code pulse is matched with the first comparative sample, by the correspondence position in the sample index sequence labeled as the One value, if when former code pulse is matched with the second comparative sample, the correspondence position in the sample index sequence is labeled as Second value, while the index sum cumulative 1 that will currently organize comparative sample, each code pulse is corresponded in the sample index sequence One;
If when former code pulse and the second comparative sample and the first comparative sample all mismatch, storage is current to be organized in comparative sample The code pulse being stored as code pulse in sample set of the first comparative sample store sample, will be in current group comparative sample Second comparative sample is updated to the first comparative sample, the second comparative sample will be updated to when former code pulse, so as to form new one Group comparative sample, sets index sum for one group of new comparative sample and index sum is arranged to initial value, by the sample Correspondence position in this call number sequence is labeled as second value.
3. the real-time compression method of infrared remote control code stream according to claim 2, it is characterised in that the sample index number Sequence is binary sequence, the code that each correspondence in the binary sequence is obtained from the infrared remote control code stream Pulse, the first value are 0 or 1, and second value is 1 or 0;
The high level lasting time and low duration of the code pulse are by the binary sequence expression of N byte, wherein N For the integer more than or equal to 1;
The initial value of the index sum of every group of comparative sample is 1, and the index sum of every group of comparative sample takes M byte, wherein M For the integer more than or equal to 1;
The high level lasting time and low duration of each comparative sample in every group of comparative sample are equally by N byte Binary sequence represent, the high level lasting time of each code pulse storage sample in code pulse storage sample set and Low duration is equally represented by the binary sequence of N byte.
4. the real-time compression method of infrared remote control code stream according to claim 2, it is characterised in that the working as record Former code pulse carries out matching and refers to the first comparative sample in current group comparative sample and the second comparative sample:
By when the high level lasting time of former code pulse and low duration respectively with first in current group comparative sample The high level lasting time and low duration of comparative sample and the second comparative sample are compared, if working as former code pulse High level lasting time it is consistent with the high level lasting time of a comparative sample, and when former code pulse low level continue when Between it is consistent with the low duration of the comparative sample, then it is assumed that when former code pulse and the comparative sample match, otherwise, recognize Not matched that when former code pulse and the comparative sample.
5. the real-time compression method of infrared remote control code stream according to claim 1, it is characterised in that described to obtain institute successively Stating each yard of pulse of infrared remote control code stream includes:
Calculate the single week of the carrier pulse of the preset frequency in the high level of first code pulse of the infrared remote control code stream Time value, records the number of the carrier pulse in the high level of each code pulse, is calculated using timer when former code pulse Low duration.
6. a kind of Real Time Compression device of infrared remote control code stream, it is characterised in that it includes:
Receiving unit, for receiving infrared remote control code stream, the infrared remote control code stream has continuous multiple yards of pulses, the code Pulse includes at least two kinds of different types, and each code pulse includes high level and low level, and wherein high level is preset frequency Carrier pulse, the high level lasting time of different types of code pulse are different with the low level duration;
Acquiring unit, for obtaining and recording each yard of pulse of the infrared remote control code stream successively, wherein each code recorded Pulse includes its high level lasting time and low duration;
Coding unit, by record when former code pulse and the current group comparative sample for including the first comparative sample and the second comparative sample This matching is to obtain sample index sequence, the index sum of each group comparative sample and code pulse storage sample set, wherein will most The two different code pulses closely recorded are respectively as the first comparative sample and the second comparative sample.
7. the Real Time Compression device of infrared remote control code stream according to claim 6, it is characterised in that the coding unit is held The following operation of row:
The former code pulse of working as of record is matched with the first comparative sample in current group comparative sample and the second comparative sample,
If when former code pulse is matched with the first comparative sample, by the correspondence position in the sample index sequence labeled as the One value, if when former code pulse is matched with the second comparative sample, the correspondence position in the sample index sequence is labeled as Second value, while the index sum cumulative 1 that will currently organize comparative sample, each code pulse corresponds to one in sample index sequence Position;
If when former code pulse and the second comparative sample and the first comparative sample all mismatch, storage is current to be organized in comparative sample The code pulse being stored as code pulse in sample set of the first comparative sample store sample, will be in current group comparative sample Second comparative sample is updated to the first comparative sample, the second comparative sample will be updated to when former code pulse, so as to form new one Group comparative sample, sets index sum for one group of new comparative sample and index sum is arranged to initial value, by the sample Correspondence position in this call number sequence is labeled as second value.
8. the Real Time Compression device of infrared remote control code stream according to claim 7, it is characterised in that the sample index number Sequence is binary sequence, the code that each position correspondence in the binary sequence is obtained from the infrared remote control code stream Pulse, the first value are 0 or 1, and second value is 1 or 0;
The high level lasting time and low duration of the code pulse are by the binary sequence expression of N byte, wherein N For the integer more than or equal to 1;
The initial value of the index sum of every group of comparative sample is 1, and the index sum of every group of comparative sample takes M byte, wherein M For the integer more than or equal to 1,
The high level lasting time and low duration of each comparative sample in every group of comparative sample are equally by N byte Binary sequence represent, the high level lasting time of each code pulse storage sample in code pulse storage sample set and Low duration is equally represented by the binary sequence of N byte.
9. the Real Time Compression device of infrared remote control code stream according to claim 7, it is characterised in that
The coding unit is by record when former code pulse is compared with the first comparative sample and second in currently group comparative sample Sample carries out matching and refers to:
By when the high level lasting time of former code pulse and low duration respectively with first in current group comparative sample The high level lasting time and low duration of comparative sample and the second comparative sample are compared, if working as former code pulse High level lasting time it is consistent with the high level lasting time of a comparative sample, and when former code pulse low level continue when Between it is consistent with the low duration of the comparative sample, then it is assumed that when former code pulse and the comparative sample match.
10. the Real Time Compression device of infrared remote control code stream according to claim 6, it is characterised in that the acquiring unit Obtaining each yard of pulse of the infrared remote control code stream successively includes:
Calculate the single week of the carrier pulse of the preset frequency in the high level of first code pulse of the infrared remote control code stream Time value, records the number of the carrier pulse in the high level of each code pulse, is calculated using timer when former code pulse Low duration.
CN201510527087.2A 2015-08-25 2015-08-25 The real-time compression method and device of infrared remote control code stream Active CN105070035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510527087.2A CN105070035B (en) 2015-08-25 2015-08-25 The real-time compression method and device of infrared remote control code stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510527087.2A CN105070035B (en) 2015-08-25 2015-08-25 The real-time compression method and device of infrared remote control code stream

Publications (2)

Publication Number Publication Date
CN105070035A CN105070035A (en) 2015-11-18
CN105070035B true CN105070035B (en) 2018-05-04

Family

ID=54499389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510527087.2A Active CN105070035B (en) 2015-08-25 2015-08-25 The real-time compression method and device of infrared remote control code stream

Country Status (1)

Country Link
CN (1) CN105070035B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330948A (en) * 2021-01-04 2021-02-05 杭州涂鸦信息技术有限公司 Infrared remote control code matching method and device, computer equipment and readable storage medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105702014A (en) * 2016-02-25 2016-06-22 无锡力芯微电子股份有限公司 Quick matching method for infrared remote control code library
CN105957332A (en) * 2016-06-30 2016-09-21 北京海尔广科数字技术有限公司 Method for learning and using infrared remote controller codes and learning type remote controller
CN106971528A (en) * 2017-03-31 2017-07-21 上海智觅智能科技有限公司 A kind of algorithm for compressing infrared Air Conditioner Remote code storehouse
CN107610445B (en) * 2017-10-12 2020-05-05 长沙蒲公英智能科技有限公司 Infrared self-learning data coding method and circuit thereof
CN108182795B (en) * 2018-01-11 2020-08-14 鹤壁天海电子信息系统有限公司 Infrared data learning method and device and electronic equipment
CN108694826B (en) * 2018-06-28 2020-06-05 浙江嘉科电子有限公司 Infrared encoding and decoding method
CN110930684A (en) * 2019-12-10 2020-03-27 杭州涂鸦信息技术有限公司 Infrared control method and system supporting multiple coding formats
CN111402570B (en) * 2020-02-11 2021-08-17 广州创知科技有限公司 Infrared remote control signal receiving method, receiving system, receiving device and storage medium
CN113284333A (en) * 2021-05-21 2021-08-20 北京昆羽科技有限公司 Learning method and device based on remote controller, remote controller and storage medium
CN113542225B (en) * 2021-06-17 2023-08-22 深圳市合广测控技术有限公司 Data compression method and device, terminal equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3305191B2 (en) * 1996-03-19 2002-07-22 富士通株式会社 Document management apparatus, data compression method, and data restoration method
CN100377247C (en) * 2003-10-31 2008-03-26 浙江中控技术股份有限公司 Real-time data on-line compression and decompression method
TW201042586A (en) * 2009-05-21 2010-12-01 Wistron Corp Remote control setting method and device for electronic device and remote control system
CN101989379B (en) * 2009-07-31 2012-03-07 宁波家天下智能系统有限公司 Learning method and transmitting method of infrared cod signal and remote controller
CN102129769B (en) * 2011-01-14 2012-11-07 利尔达科技有限公司 Universal remote control method
CN103795421B (en) * 2014-02-26 2017-05-24 活点信息技术有限公司 Method for data compression and decompression i

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330948A (en) * 2021-01-04 2021-02-05 杭州涂鸦信息技术有限公司 Infrared remote control code matching method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN105070035A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
CN105070035B (en) The real-time compression method and device of infrared remote control code stream
CN105957332A (en) Method for learning and using infrared remote controller codes and learning type remote controller
CN103795421A (en) Method for data compression and decompression i
CN201359768Y (en) Household learning remote-control device
CN105955748A (en) Return scene processing method and device of application program
CN104183105A (en) Mobile-terminal-based remote control method and device
CN104780391A (en) Video file format converting method and device
CN105702014A (en) Quick matching method for infrared remote control code library
CN105337850A (en) Internet of Things data processing method and internet of Things gateway
CN103226858B (en) The processing method and processing device of Bluetooth pairing information
CN104901706B (en) A kind of digitalized electric energy quality monitoring terminal detection means and its data transfer device
CN202339631U (en) Transmitting and learning control circuit of remote control, remote control and tablet computer
CN201307911Y (en) A multi-camera circuit and a mobile terminal
CN203242160U (en) Intelligent remote control terminal
CN103024499A (en) Method and device for implementing smart television
CN107945477A (en) The method and device that infrared or wireless remote control signals data are compressed
CN104240491B (en) The digitizing solution of infrared signal
CN104217576A (en) Decoding/coding method of infrared pulse signal
CN103686263B (en) A kind of data processing method, equipment and system
CN111968361B (en) Infrared repeated code learning method and infrared remote control system applied to Internet of things
CN109413492B (en) Audio data reverberation processing method and system in live broadcast process
CN105718850B (en) The pixel method of sampling and device applied to fingerprint sensor
CN104618715A (en) Method and device for obtaining minimal rate-distortion cost
CN103391570A (en) Network flow control method and controller, and mobile terminal
CN205356414U (en) Cross -platform pronunciation and subordinate answer process recording system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant