CN105427577A - Infrared data processing method, processing device and decoding method - Google Patents

Infrared data processing method, processing device and decoding method Download PDF

Info

Publication number
CN105427577A
CN105427577A CN201510821068.0A CN201510821068A CN105427577A CN 105427577 A CN105427577 A CN 105427577A CN 201510821068 A CN201510821068 A CN 201510821068A CN 105427577 A CN105427577 A CN 105427577A
Authority
CN
China
Prior art keywords
data
character
coded
value
pulse width
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.)
Granted
Application number
CN201510821068.0A
Other languages
Chinese (zh)
Other versions
CN105427577B (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.)
Hisense Visual Technology Co Ltd
Original Assignee
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics Co Ltd
Priority to CN201510821068.0A priority Critical patent/CN105427577B/en
Publication of CN105427577A publication Critical patent/CN105427577A/en
Application granted granted Critical
Publication of CN105427577B publication Critical patent/CN105427577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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)
  • Optical Communication System (AREA)

Abstract

The invention provides an infrared data processing method, a processing device and a decoding method to solve the problems that in the prior art, the data quantity of infrared data coded with pulse is large, and large storage space needs to be occupied. The processing method includes the steps that infrared signals are received, the pulse width value of a first data waveform in data waveforms of the infrared signals is obtained and serves as a first classification data value and is assigned to a first coded character, and the first coded character is stored in character coded data; pulse width values of other data waveforms in the infrared signals are sequentially obtained, whether the absolute value of the difference between the current pulse width value and the (p-1)th classification data value and the absolute values of the differences between the current pulse width value and previous classification data values are within a preset threshold range or not is judged, if yes, the coded character assigned by the corresponding classification data value replaces the current pulse width value and is stored, and if not, it is determined that the current pulse width value is the pth classification data value, and the pth coded character replaces the current pulse width value and is stored in the character coded data.

Description

A kind of disposal route of infrared data, treating apparatus and coding/decoding method
Technical field
The present invention relates to infrared data encoding and decoding technique field, particularly relate to a kind of disposal route of infrared data, treating apparatus and coding/decoding method.
Background technology
Existing infrared remote-controlled signal all have employed certain Signal coding mode, and difference is only the length of signal time and the difference of figure place.Conventional Signal coding mode has: pulse code, namely according to the mode of pulse width different coding, Sony CSONY) company adopts is exactly this coded system.Space coding, namely according to the mode that interpulse period, length difference was encoded, is also often called as REC-80 mode.Transform coding, namely according to pulse and interval time order the change mode of encoding, also referred to as RC-5 mode.
And in the above described manner to the mode that infrared data is encoded, all need the pulse width values recording each high level pulse and low level pulse in infrared signal, the pulse width values of such as high level pulse is 562 microseconds, low level pulse pulse width values is 1112 microseconds, can be designated as 562,1112 respectively according to the position occurred in infrared signal and order.Be exemplified below infrared data: 3611, 1793, 562, 1112, 562, 1112, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 563, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1113, 561, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 561, 3611, 1794, 562, 560, 562, 560, 562, 1109, 562, 560, 562, 560, 561, 559, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 53590, 3611, 3610, 563, 53800, wherein, first pulse width values 3611 is the pulse width values of high level pulse, and namely entirety is height ... just (refer to level) and arrange.Visible, above-mentioned coded system, data volume is large, needs to take larger storage space.
Summary of the invention
Embodiments provide a kind of disposal route of infrared data, treating apparatus and coding/decoding method, the problem large with the data volume solving the infrared data of pulse code in prior art, needs occupy larger storage space.
The object of the invention is to be achieved through the following technical solutions:
The embodiment of the present invention provides a kind of disposal route of infrared data, comprising:
Receive the infrared signal that infrared transmission arranges transmission, obtain the pulse width values of first data waveform in the data waveform of described infrared signal, described data waveform comprises high level pulse and low level pulse;
The described pulse width values got first time is as first grouped data value, and assignment gives first coded character, in character-coded data, preserve first described coded character;
Sequentially obtain the described pulse width values of the described data waveform in described infrared signal after first described data waveform, judge the current described pulse width values that gets respectively with the absolute value of the difference of grouped data value described in grouped data value described in p-1 and before each whether in predetermined threshold range, if so, be kept in described character-coded data after then substituting current described pulse width values with the described coded character of the described grouped data value institute assignment of the absolute value of difference in described predetermined threshold range; If not, then determine that current described pulse width values is p described grouped data value, be kept in described character-coded data after substituting current described pulse width values with p described coded character; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number.
Embodiment of the present invention beneficial effect is as follows: by classifying to the described pulse width values in described infrared signal, the described pulse width values of absolute value in described predetermined threshold range of difference is each other replaced with the described coded character that storage space is little, and with described coded character described infrared signal encoded and obtain taking the less described character-coded data of storage space, thus realize the object of saving storage space.
The embodiment of the present invention also provides a kind for the treatment of apparatus of infrared data, comprising:
Receiving element, arranges the infrared signal of transmission for receiving infrared transmission, obtain the pulse width values of first data waveform in the data waveform of described infrared signal, and described data waveform comprises high level pulse and low level pulse; And, for sequentially obtaining the described pulse width values of the described data waveform in described infrared signal after first described data waveform;
Taxon, for will first time the described pulse width values that gets as first grouped data value; And,
For judge the current described pulse width values that gets respectively with the absolute value of the difference of grouped data value described in grouped data value described in p-1 and before each whether in predetermined threshold range, if, then current described pulse width values is attributed to the described grouped data value of absolute value in described predetermined threshold range of difference, if not, then determine that current described pulse width values is p described grouped data value; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number;
Processing unit, for giving first coded character by described first grouped data value assignment, preserves first described coded character in character-coded data; And described taxon judge the current described pulse width values that gets respectively with grouped data value described in p-1 and before each described in the absolute value of difference of grouped data value in described predetermined threshold range time, be kept in described character-coded data after substituting current described pulse width values with the described coded character of the described grouped data value institute assignment of the absolute value of difference in described predetermined threshold range; And, described taxon judge the current described pulse width values that gets respectively with grouped data value described in p-1 and before each described in the absolute value of difference of grouped data value not in described predetermined threshold range time, be kept in described character-coded data after substituting current described pulse width values with p described coded character.
Embodiment of the present invention beneficial effect is as follows: the pulse width values being obtained high level pulse and low level pulse in described infrared signal by described receiving element, by described taxon, the described pulse width values in described infrared signal is classified, the described pulse width values of absolute value in described predetermined threshold range of difference is each other replaced with the described coded character that storage space is little, and with described coded character described infrared signal to be encoded by described processing unit and obtain taking the less described character-coded data of storage space, thus realize the object of saving storage space.
The embodiment of the present invention also provides a kind of coding/decoding method of infrared data, comprising:
Obtain the described coded character in described character-coded data successively;
Using described grouped data value corresponding to described coded character as described pulse width values, according to the arrangement position of described coded character in described character-coded data obtained, described pulse width values is converted to high level pulse or low level pulse exports.
Embodiment of the present invention beneficial effect is as follows: carry out reverse-engineering to described character-coded data, the described coded character got is replaced with the described pulse width values that described grouped data value characterizes, and using described pulse width values as output high level pulse or low level pulse, thus realize the decoding of described character-coded data.
Accompanying drawing explanation
The process flow diagram of the disposal route of a kind of infrared data that Fig. 1 provides for the embodiment of the present invention;
The process flow diagram of the disposal route of the another kind of infrared data that Fig. 2 provides for the embodiment of the present invention;
The structured flowchart of the treating apparatus of a kind of infrared data that Fig. 3 provides for the embodiment of the present invention;
The process flow diagram of the coding/decoding method of a kind of infrared data that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Be described in detail below in conjunction with the implementation procedure of Figure of description to the embodiment of the present invention.It should be noted that same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not being interpreted as limitation of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.
Embodiment one
See Fig. 1, the embodiment of the present invention provides a kind of disposal route of infrared data, comprising:
101, receive the infrared signal that infrared transmission arranges transmission, obtain the pulse width values of first data waveform in the data waveform of infrared signal, data waveform comprises high level pulse and low level pulse.
It should be noted that, this infrared signal can be by master remote controller or the Infrared Projector transmission connecting computing machine or single-chip microcomputer plate, does not repeat them here.According to thought of the present invention, the learning-oriented from telepilot of corresponding infrared launcher can be provided, receive the infrared signal that infrared launcher sends.
Such as, in prior art, infrared signal is encoded with Microsoft's longtime coded system, obtains following infrared coded data:
3611, 1793, 562, 1112, 562, 1112, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 563, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1113, 561, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 561, 3611, 1794, 562, 560, 562, 560, 562, 1109, 562, 560, 562, 560, 561, 559, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 53590, 3611, 3610, 563, 53800, the pulse width values of each group digitized representation high level pulse or low level pulse, each pulse width values needs 2-3 byte to store, it can thus be appreciated that this Microsoft longtime coded system carries out record to the numerical value of the pulse width values of high level pulse or low level pulse completely.Usual high level pulse and low level pulse alternately send, in the present embodiment, the pulse width values 3611 of first data waveform is high level, represents a level waveforms with each pulse width values, and whole level waveforms meets for height ... the just rule of (level).
According to the step 101 of the present embodiment, the pulse width values that can get first data waveform of Microsoft longtime coded system record described above by this infrared signal is 3611.
102, the pulse width values got first time is as first grouped data value, and assignment gives first coded character, in character-coded data, preserve first coded character.
Such as, first pulse width values 3611 step 101 obtained, as first grouped data value, makes it assignment to first coded character A, and is kept in character-coded data by this first coded character A.Certainly, coded character can be A, B, C, D, E etc., also can be H, I, J, K, L etc., or the letter of other English alphabet, arabic numeral or other Languages; Preferably, coded character is English alphabet; Do not repeat them here.
103, sequentially obtain the pulse width values of the data waveform in infrared signal after first data waveform, judge the current pulse length value that gets respectively with the absolute value of the difference of p-1 grouped data value and each grouped data value before whether in predetermined threshold range, namely judge the current described pulse width values that gets respectively with the absolute value of the difference of each grouped data value determined whether in predetermined threshold range.
If so, be kept in character-coded data after then substituting current pulse length value with the coded character of the grouped data value institute assignment of the absolute value of difference in predetermined threshold range; If not, then determine that current pulse length value is p grouped data value, be kept in character-coded data after substituting current pulse length value with p coded character; Namely determine that current pulse length value is new grouped data value, and be kept in character-coded data after substituting current pulse length value with new coded character; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number.
In the present embodiment, predetermined threshold can be the scope of a number percent of current pulse length value, also can be the scope of a numerical value.Generally for and improve compatibility, adopt the scope of number percent as predetermined threshold, such as, current pulse length value is 3611, and get its scope of 1% ~ 10% as the foundation determining predetermined threshold, then predetermined threshold is 3611*1% ~ 3611*10%.
According to step 103, can judge the pulse width values of the data waveform after the first data waveform, classify and substitute with corresponding character code.
Be still following data instance with the pulse width of infrared signal:
3611,1793,562,1112,562,1112,562,1112,562,562,562,562,562,562,562,1112,562,562,562,562,562,563,562,562,562,562,562,1112,562,562,562,562,562,562,562,1113,561,562,562,562,562,562,562,562,562,562,562,1112,562,561,3611,1794,562,560,562,560,562,1109,562,560,562,560,561,559,562,1109,562,560,562,1109,562,1109,562,1109,562,1109,562,560,562,1109,562,1109,562,1109,562,53590,3611,3610,563,53800。
According to suddenly above-mentioned, by the pulse width values 3611 of first data waveform with first character coding A, and the A that encoded by first character is kept in character-coded data.
Get the pulse width values 1793 of second data waveform, determine that the absolute value of the difference of pulse width values 1793 and pulse width values 3611 is not in predetermined threshold range (1793*1% ~ 1793*10%), then can determine that pulse width values 1793 is as second grouped data value, and assignment second character code B, second character code B is kept in character-coded data, so in follow-up judgement, pulse width values 1793 and pulse width values 1794 also will be kept in character-coded data with second character code B.
Same, the pulse width values of other follow-up data waveform also carries out process as above, and the multiple grouped data value determined is 3611,1793,562,1112,53800, and character code corresponding is respectively A, B, C, D, E, and the character-coded data finally obtained is as follows:
ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Obviously, the grouped data value determined by above-mentioned steps and pulse width values have corresponding relation as shown in table 1:
Table 1
According to the corresponding relation between above-mentioned grouped data value and each corresponding pulse width values, the relation between coded character (such as A, B, C, D, E) and pulse width values is as follows:
Such as coded character A respective pulses width value 3611,3610,3609; Coded character B correspondence 1793,1794; Coded character C respective pulses width value 562,561,559,563; Coded character D respective pulses width value 1112,1113,1109; Coded character E respective pulses width value 53800,53590.
Certainly, above corresponding relation is through that the judgement of predetermined threshold obtains, and for this reason, provides a kind of concrete algorithm to be described above-mentioned deterministic process:
1, determine that predetermined threshold is α, process data variable is β, same class grouped data value counts is γ 1, γ 2, γ 3, γ 4 (initial value is 1), what data waveform data were total is counted as ε.
The pulse width values of the data waveform 2, extracted first time to a, preserves coded character A as first grouped data value assignment in character-coded data.
3, continue to obtain follow-up data waveform, by the current pulse width values assignment of acquisition to β, as β ∈ [a* (1-α), a* (1+ α)], by (a+ β)/γ 1 assignment to a, γ 1 adds 1 simultaneously, until β does not belong to [a* (1-α), a* (1+ α)], now by β assignment to b, in character-coded data, preserve coded character B;
4, continue to obtain follow-up data waveform, by the current pulse width values assignment of acquisition to β, as β ∈ [b* (1-α), b* (1+ α)], by (b+ β)/γ 2 assignment to b, until β does not belong to [a* (1-α), a* (1+ α)] ∩ [b* (1-α), b* (1+ α)], now by β assignment to c, in character-coded data, preserve coded character C;
5, continue to obtain follow-up data waveform, by the current pulse width values assignment of acquisition to β, as β ∈ β ∈ [c* (1-α), c* (1+ α)], by (c+ β)/γ 3 assignment to c, until β does not belong to [a* (1-α), a* (1+ α)] ∩ [b* (1-α), b* (1+ α)] ∩ [c* (1-α), c* (1+ α)], now by β assignment to d, in character-coded data, preserve coded character D;
6, continue to obtain follow-up data waveform, by the current pulse width values assignment of acquisition to β, as β ∈ [d* (1-α), d* (1+ α)], by (d+ β)/γ 4 assignment to d, until β does not belong to [a* (1-α), a* (1+ α)] ∩ [b* (1-α), b* (1+ α)] ∩ [c* (1-α), c* (1+ α)] ∩ [d* (1-α), d* (1+ α)], now by β assignment to e, in character-coded data, preserve coded character D.
By above-mentioned algorithm, the pulse width values of the high level pulse in infrared signal and low level pulse can be realized to be encoded to character-coded data and to preserve, and this preservation can be to be stored in the internal memory of receiving device (such as infrared signal receiver or telepilot), in storer itself or external storer.
The infrared coded data preserved with pulse width values takies 204 bytes when storing, because in former infrared coded data, one group of numeral characterizing pulse width values needs to take at least two bytes, and a byte only used in coded character, therefore in the disposal route that the present embodiment provides, the character-coded data that recompile obtains only takies former infrared coded data about 50% of storage space, saves storage space.
Certainly, in order to the character-coded data of storage correctly can be resolved, also should preserve grouped data value, preferably, the content that character-coded data stores the data segment of data as infrared character code is stored, the content that each grouped data value stores the parsing section of data as infrared character code is stored; Wherein, each grouped data value resolve in section put in order consistent with the sequencing that each coded character first time in data segment is stored.
Such as, according to above-mentioned infrared coded data, recompile obtains character-coded data (ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCC CDCCCCCCCDCCCDCDCDCDCCCDCDCDCE, AACE), character-coded data is stored in by this data segment that infrared character code stores data, simultaneously by grouped data value (3611,1793,562,1112,53800) the parsing section that infrared character code stores data is stored in, as follows:
3611,1793,562,1112,5380,ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, grouped data value (3611, 1793, 562, 1112, 53800) distributing order is the sequence consensus obtained with different pulse width values first time, such as infrared coded data (3611, 1793, 562, 1112, 562, 1112, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 563, 562, 562, 562, 562, 562, 1112, 562, 562, 562, 562, 562, 562, 562, 1113, 561, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 1112, 562, 561, 3611, 1794, 562, 560, 562, 560, 562, 1109, 562, 560, 562, 560, 561, 559, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 1109, 562, 560, 562, 1109, 562, 1109, 562, 1109, 562, 53590, 3611, 3610, 563, 53800) in, the sequencing that each different pulse width values first time obtains is as follows: 3611, 1793, 562, 1112, 563, 1113, 561, 1794, 560, 559, 1109, 3590, 3610, 53590, 53800, and the sequencing that the first time of the pulse width values corresponding with grouped data value obtains is as follows: 3611, 1793, 562, 1112, 53800.Therefore, only from numerically understanding, namely the distributing order of grouped data value is the sequencing of the first time acquisition of the pulse width values being selected as those grouped data values.
Based on the needs of reality, the total duration value and the carrier value that increase infrared signal in data can also be stored at infrared character code, total duration value and the carrier value of this infrared signal certain need to obtain in a step 101 or determine, make corresponding counting add 1 when each coded character is saved one time, according to each coded character preservation number of times separately and the sum of products of each self-corresponding grouped data value, total duration value and carrier value are stored in the parsing section end that infrared character code stores data, such as infrared character code stores data and is:
3611,1793,562,1112,5380,118368,38,ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, 118368 is total duration value of infrared signal, and unit is consistent with pulse width values, usual microsecond, the carrier value of 38 infrared signals, and the unit of carrier value is generally KHz, certainly can specify separately.
Can also infrared character code store record in data comprise button title by strong data segment, such as infrared character code stores data and is:
power,3611,1793,562,1112,5380,118368,38,ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, " powe " is stored in the button title by strong data segment, and the button that can have according to telepilot sets, such as, represent volume adjusting, adjust the button of the function such as platform, picture control, do not repeat them here.
Can also store record in data at infrared character code and comprise the additional information data section of brand manufacturers and unit type, such as infrared character code stores data and is:
Hisense,LED55XT800UCD,power,3611,1793,562,1112,5380,118368,38,ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, the additional information data section shared by " Hisense " is for storing brand manufacturers, and the additional information data section shared by " LED55XT800UCD " is used for depositing unit type.
According to the infrared coded data of above-mentioned citing, comprise the data such as brand manufacturers, unit type, button title at record after, still only taking 67% of infrared coded data (204 bytes) according to infrared character code storage data (136 byte) that the present invention obtains when storing, reducing the storage space taken greatly.
Embodiment of the present invention beneficial effect is as follows: by classifying to the pulse width values in infrared signal, the pulse width values of absolute value in predetermined threshold range of difference is each other replaced with the coded character that storage space is little, and with coded character infrared signal encoded and obtain taking the less character-coded data of storage space, thus realize the object of saving storage space.
Implement two
See Fig. 2, based on same invention thought, the embodiment of the present invention provides the disposal route of another kind of infrared data, comprising:
201, receive the infrared signal that infrared transmission arranges transmission, obtain the pulse width values of first data waveform in the data waveform of infrared signal, data waveform comprises high level pulse and low level pulse.
202, the pulse width values got first time is as first grouped data value, and assignment gives first coded character, in character-coded data, preserve first coded character.
203, sequentially obtain the pulse width values of the data waveform in infrared signal after first data waveform, judge the current pulse length value that gets respectively with the absolute value of the difference of p-1 grouped data value and each grouped data value before whether in predetermined threshold range, if so, be kept in character-coded data after then substituting current pulse length value with the coded character of the grouped data value institute assignment of the absolute value of difference in predetermined threshold range; If not, then determine that current pulse length value is p grouped data value, be kept in character-coded data after substituting current pulse length value with p coded character; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number.
First three step is roughly the same with embodiment one, and difference is also to comprise:
204, higher for repetition rate in character-coded data two coded characters are defined as respectively digital " 0 " and numeral " 1 ", 8 often adjacent bit digital are that a digit groups replaces with sexadecimal number, and carry out recompile to character-coded data; Wherein, the coded character of the interlude of character-coded data less than 8 with " 0 " polishing, coded character the remaining unchanged less than 8 of character-coded data tail end.
Such as, data (Hisense is stored according to the infrared character code that enforcement one obtains, LED55XT800UCD, power, 3611, 1793, 562, 1112, 5380, 118368, 38, ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCC CDCCCCCCCDCCCDCDCDCDCCCDCDCDCE, AACE), can by coded character C high for repetition rate, D replaces with digital " 0 " and numeral " 1 " respectively, and by every 8 continuous print numeral composition hexadecimal data, not enough position is with digital " 0 " polishing, the coded character that the coded character E of the total duration of corresponding data waveform is adjacent remains unchanged, it is as follows that the infrared character code be optimized stores data:
Hisense,LED55XT800UCD,power,3611,1793,562,1112,53800,118368,38,AB,0x54,0x04,0x00,0x40,0x40,0x04,AB,0x04,0x04,0x55,0x15,CEAACE。
Be described as follows with one of them hexadecimal data, such as 0x54, replaces with digital " 0 " and numeral " 1 " and is expressed as 0x01010100, i.e. corresponding character code CDCDCDCC, other hexadecimal data has same corresponding relation, will not enumerate at this.
The infrared character code of above-mentioned optimization stores the storage space of 68 bytes that data only take, and can greatly save storage space.Certainly other modification can also be carried out, still in scope according to inventive concept.
Embodiment three
See Fig. 3, the embodiment of the present invention provides a kind for the treatment of apparatus of infrared data, comprising:
Receiving element 301, arranges the infrared signal of transmission for receiving infrared transmission, obtain the pulse width values of first data waveform in the data waveform of infrared signal, data waveform comprises high level pulse and low level pulse; And, for sequentially obtaining the pulse width values of the data waveform in infrared signal after first data waveform;
Taxon 302, for will first time the pulse width values that gets as first grouped data value; And,
For judge the current pulse length value that gets respectively with the absolute value of the difference of p-1 grouped data value and each grouped data value before whether in predetermined threshold range, if, then current pulse length value is attributed to the grouped data value of absolute value in predetermined threshold range of difference, if not, then determine that current pulse length value is p grouped data value; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number;
Processing unit 303, for giving first coded character by first grouped data value assignment, preserves first coded character in character-coded data; And taxon judge the current pulse length value that gets respectively with p-1 grouped data value and before the absolute value of difference of each grouped data value in predetermined threshold range time, be kept in character-coded data after substituting current pulse length value with the coded character of the grouped data value institute assignment of the absolute value of difference in predetermined threshold range; And, taxon judge the current pulse length value that gets respectively with p-1 grouped data value and before the absolute value of difference of each grouped data value not in predetermined threshold range time, be kept in character-coded data after substituting current pulse length value with p coded character.
Certainly, based on the consideration of different needs and more Optimized Coding Based, receiving element 301 and processing unit 303 can also have following function:
Processing unit 303, also for higher for repetition rate in character-coded data two coded characters being defined as respectively digital " 0 " and numeral " 1 ", 8 often adjacent bit digital are that a digit groups replaces with sexadecimal number, and carry out recompile to character-coded data; Wherein, the coded character of the interlude of character-coded data less than 8 with " 0 " polishing, coded character the remaining unchanged less than 8 of character-coded data tail end.
Processing unit 303, the content also for character-coded data is stored the data segment of data as infrared character code stores, and the content that each grouped data value stores the parsing section of data as infrared character code is stored; Wherein, each grouped data value resolve in section put in order consistent with the sequencing that each coded character first time in data segment is stored.
Receiving element 301, also for: make when each coded character is saved one time corresponding counting add 1, according to each coded character preservation number of times separately and the sum of products of each self-corresponding grouped data value, determine total duration value and the carrier value of infrared signal; Processing unit 303, also stores the parsing section end of data for total duration value and carrier value being stored in infrared character code.
Processing unit 303, also for store at infrared character code record in data comprise button title by strong data segment.
Processing unit 303, also comprises the additional information data section of brand manufacturers and unit type for storing record in data at infrared character code.
Embodiment of the present invention beneficial effect is as follows: the pulse width values being obtained high level pulse and low level pulse in infrared signal by receiving element, by taxon, the pulse width values in infrared signal is classified, the absolute value of the difference of replacing each other with the coded character that storage space is little is less than or equal to the pulse width values of predetermined threshold range, and with coded character infrared signal to be encoded by processing unit and obtain taking the less character-coded data of storage space, thus realize the object of saving storage space.
Embodiment four
See Fig. 4, the embodiment of the present invention also provides a kind of coding/decoding method of infrared data, comprising:
401, obtain the coded character in character-coded data successively.
Data are stored for the infrared character code obtained in embodiment one, usually first obtains infrared character code successively and store the grouped data value stored in data; After obtaining the coded character in character-coded data more successively, then according to put in order with sequencing that in data segment each coded character first time the be stored consistent corresponding relation of each grouped data value in parsing section, the grouped data value that coded character is corresponding is determined.
Infrared character code for the optimization obtained in embodiment one stores data, usually first obtains infrared character code successively and stores the grouped data value stored in data; Obtain the sexadecimal number of carrying out in the character-coded data of recompile with digital " 0 " and numeral " 1 " more successively, resolve sexadecimal number and according to resolve obtain each determine obtain coded character, then according to put in order with sequencing that in data segment each coded character first time the be stored consistent corresponding relation of each grouped data value in parsing section, the grouped data value that coded character is corresponding is determined.It should be noted that, the infrared character code of the optimization obtained in embodiment two stores data, owing to directly not preserving coded character or partly preserving coded character, therefore can preset the coded character that may use or preserve coded character, to call when resolving.
402, using grouped data value corresponding to coded character as pulse width values, according to the arrangement position of coded character in character-coded data obtained, pulse width values is converted to high level pulse or low level pulse exports.
Embodiment of the present invention beneficial effect is as follows: carry out reverse-engineering to character-coded data, the pulse width values characterized with grouped data value replaces the coded character got, and using pulse width values as output high level pulse or low level pulse, thus realize the decoding of character-coded data.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (17)

1. a disposal route for infrared data, is characterized in that, comprising:
Receive the infrared signal that infrared transmission arranges transmission, obtain the pulse width values of first described data waveform in the data waveform of described infrared signal, described data waveform comprises high level pulse and low level pulse;
The described pulse width values got first time is as first grouped data value, and assignment gives first coded character, in character-coded data, preserve first described coded character;
Sequentially obtain the described pulse width values of the described data waveform in described infrared signal after first described data waveform, judge the current described pulse width values that gets respectively with the absolute value of the difference of grouped data value described in grouped data value described in p-1 and before each whether in predetermined threshold range, if so, be kept in described character-coded data after then substituting current described pulse width values with the described coded character of the described grouped data value institute assignment of the absolute value of difference in described predetermined threshold range; If not, then determine that current described pulse width values is p described grouped data value, be kept in described character-coded data after substituting current described pulse width values with p described coded character; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number.
2. disposal route as claimed in claim 1, is characterized in that, comprise further:
Higher for repetition rate in described character-coded data two described coded characters are defined as respectively digital " 0 " and numeral " 1 ", 8 often adjacent bit digital are that a digit groups replaces with sexadecimal number, and carry out recompile to described character-coded data; Wherein, the described coded character of the interlude of described character-coded data less than 8 with " 0 " polishing, described coded character the remaining unchanged less than 8 of described character-coded data tail end.
3. disposal route as claimed in claim 1 or 2, it is characterized in that, the content also comprised described character-coded data stores the data segment of data as infrared character code stores, and the content that grouped data value described in each stores the parsing section of data as described infrared character code is stored; Wherein, the putting in order in described parsing section of grouped data value described in each is consistent with the coded character sequencing that is stored of first time described in each in described data segment.
4. disposal route as claimed in claim 3, it is characterized in that, also comprise, corresponding counting is made to add 1 when coded character is saved one time described in each, according to the preservation number of times separately of coded character described in each and the sum of products of each self-corresponding described grouped data value, determine total duration value and the carrier value of described infrared signal, described total duration value and described carrier value are stored in the described parsing section end that described infrared character code stores data.
5. disposal route as claimed in claim 3, is characterized in that, be also included in described infrared character code store record in data comprise button title by strong data segment.
6. disposal route as claimed in claim 3, is characterized in that, is also included in described infrared character code and stores the additional information data section recording in data and comprise brand manufacturers and unit type.
7. disposal route as claimed in claim 1, it is characterized in that, described coded character is English alphabet or numeral.
8. a treating apparatus for infrared data, is characterized in that, comprising:
Receiving element, arranges the infrared signal of transmission for receiving infrared transmission, obtain the pulse width values of first described data waveform in the data waveform of described infrared signal, and described data waveform comprises high level pulse and low level pulse; And, for sequentially obtaining the described pulse width values of the described data waveform in described infrared signal after first described data waveform;
Taxon, for will first time the described pulse width values that gets as first grouped data value; And,
For judge the current described pulse width values that gets respectively with the absolute value of the difference of grouped data value described in grouped data value described in p-1 and before each whether in predetermined threshold range, if, then current described pulse width values is attributed to the described grouped data value of absolute value in described predetermined threshold range of difference, if not, then determine that current described pulse width values is p described grouped data value; Wherein, p=2,3,4 ... .N, N be more than or equal to 2 natural number;
Processing unit, for giving first coded character by described first grouped data value assignment, preserves first described coded character in character-coded data; And described taxon judge the current described pulse width values that gets respectively with grouped data value described in p-1 and before each described in the absolute value of difference of grouped data value in described predetermined threshold range time, be kept in described character-coded data after substituting current described pulse width values with the described coded character of the described grouped data value institute assignment of the absolute value of difference in described predetermined threshold range; And, described taxon judge the current described pulse width values that gets respectively with grouped data value described in p-1 and before each described in the absolute value of difference of grouped data value not in described predetermined threshold range time, be kept in described character-coded data after substituting current described pulse width values with p described coded character.
9. treating apparatus as claimed in claim 8, it is characterized in that, described processing unit, also for: higher for repetition rate in described character-coded data two described coded characters are defined as respectively digital " 0 " and numeral " 1 ", 8 often adjacent bit digital are that a digit groups replaces with sexadecimal number, and carry out recompile to described character-coded data; Wherein, the described coded character of the interlude of described character-coded data less than 8 with " 0 " polishing, described coded character the remaining unchanged less than 8 of described character-coded data tail end.
10. treating apparatus as claimed in claim 8 or 9, it is characterized in that, described processing unit, content also for described character-coded data is stored the data segment of data as infrared character code stores, and the content that grouped data value described in each stores the parsing section of data as described infrared character code is stored; Wherein, the putting in order in described parsing section of grouped data value described in each is consistent with the coded character sequencing that is stored of first time described in each in described data segment.
11. treating apparatus as claimed in claim 10, it is characterized in that, described receiving element, also for: make corresponding counting add 1 when coded character is saved one time described in each, according to the preservation number of times separately of coded character described in each and the sum of products of each self-corresponding described grouped data value, determine total duration value and the carrier value of described infrared signal;
Described processing unit, also stores the described parsing section end of data for described total duration value and described carrier value being stored in described infrared character code.
12. treating apparatus as claimed in claim 10, is characterized in that, described processing unit, also for store at described infrared character code record in data comprise button title by strong data segment.
13. treating apparatus as claimed in claim 10, is characterized in that, described processing unit, also comprise the additional information data section of brand manufacturers and unit type for storing record in data at described infrared character code.
14. treating apparatus as claimed in claim 8, it is characterized in that, described coded character is English alphabet or numeral.
The coding/decoding method of 15. 1 kinds of infrared datas, for resolve adopt disposal route as described in any one of claim 1-7 obtain as described in character-coded data, it is characterized in that, comprising:
Obtain the described coded character in described character-coded data successively;
Using described grouped data value corresponding to described coded character as described pulse width values, according to the arrangement position of described coded character in described character-coded data obtained, described pulse width values is converted to high level pulse or low level pulse exports.
16. coding/decoding methods as claimed in claim 15, is characterized in that, the described described coded character obtained successively in described character-coded data, also comprises:
Obtain the described sexadecimal number of carrying out in the described character-coded data of recompile with digital " 0 " and numeral " 1 ", resolve described sexadecimal number and according to the described coded character of resolving each that obtain and determining to obtain.
17. coding/decoding methods as described in claim 15 or 16, is characterized in that, before the described described coded character obtained successively in described character-coded data, obtain described infrared character code successively and store the described grouped data value stored in data;
After the described described coded character obtained successively in described character-coded data, according to put in order with sequencing that in described data segment each described in coded character first time the be stored consistent corresponding relation of grouped data value described in each in described parsing section, determine the described grouped data value that described coded character is corresponding.
CN201510821068.0A 2015-11-23 2015-11-23 A kind of processing method of infrared data, processing unit and coding/decoding method Active CN105427577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510821068.0A CN105427577B (en) 2015-11-23 2015-11-23 A kind of processing method of infrared data, processing unit and coding/decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510821068.0A CN105427577B (en) 2015-11-23 2015-11-23 A kind of processing method of infrared data, processing unit and coding/decoding method

Publications (2)

Publication Number Publication Date
CN105427577A true CN105427577A (en) 2016-03-23
CN105427577B CN105427577B (en) 2019-06-07

Family

ID=55505752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510821068.0A Active CN105427577B (en) 2015-11-23 2015-11-23 A kind of processing method of infrared data, processing unit and coding/decoding method

Country Status (1)

Country Link
CN (1) CN105427577B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530769A (en) * 2016-10-27 2017-03-22 晋城市通平交通科技有限公司 Solar road warning light and electric wave time synchronization signal decoding method
CN107945477A (en) * 2017-11-10 2018-04-20 深圳睿舍智能科技有限公司 The method and device that infrared or wireless remote control signals data are compressed
CN109523772A (en) * 2018-12-29 2019-03-26 东莞钜威动力技术有限公司 A kind of voltage data transmission method, device, terminal and storage medium
CN109637111A (en) * 2018-12-25 2019-04-16 歌尔科技有限公司 Infrared signal compression method, device, user equipment and storage medium
CN111260854A (en) * 2020-03-10 2020-06-09 深圳来电科技有限公司 Circuit and method for improving infrared identification sensitivity and mobile power supply leasing equipment
CN112071052A (en) * 2019-09-06 2020-12-11 超级智慧家(上海)物联网科技有限公司 Infrared repeater system, infrared repeater and data learning method thereof
CN113850988A (en) * 2020-12-24 2021-12-28 广东朝歌智慧互联科技有限公司 Key value correction method, device, equipment and computer readable medium
EP4024360A1 (en) * 2021-01-04 2022-07-06 Hangzhou Tuya Information Technology Co., Ltd. Infrared remote control code matching method and apparatus, computer device, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4809359A (en) * 1986-12-24 1989-02-28 Dockery Devan T System for extending the effective operational range of an infrared remote control system
CN2847409Y (en) * 2005-12-20 2006-12-13 海信集团有限公司 Infrared remote repeat circuit using radio transmission technology
CN101483006A (en) * 2008-05-30 2009-07-15 南靖万利达科技有限公司 Method for forwarding remote control signal
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method
CN104240491A (en) * 2014-09-24 2014-12-24 恬家(上海)信息科技有限公司 Method for digitizing infrared signal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4809359A (en) * 1986-12-24 1989-02-28 Dockery Devan T System for extending the effective operational range of an infrared remote control system
CN2847409Y (en) * 2005-12-20 2006-12-13 海信集团有限公司 Infrared remote repeat circuit using radio transmission technology
CN101483006A (en) * 2008-05-30 2009-07-15 南靖万利达科技有限公司 Method for forwarding remote control signal
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method
CN104240491A (en) * 2014-09-24 2014-12-24 恬家(上海)信息科技有限公司 Method for digitizing infrared signal

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530769A (en) * 2016-10-27 2017-03-22 晋城市通平交通科技有限公司 Solar road warning light and electric wave time synchronization signal decoding method
CN107945477A (en) * 2017-11-10 2018-04-20 深圳睿舍智能科技有限公司 The method and device that infrared or wireless remote control signals data are compressed
CN109637111A (en) * 2018-12-25 2019-04-16 歌尔科技有限公司 Infrared signal compression method, device, user equipment and storage medium
CN109523772A (en) * 2018-12-29 2019-03-26 东莞钜威动力技术有限公司 A kind of voltage data transmission method, device, terminal and storage medium
CN112071052A (en) * 2019-09-06 2020-12-11 超级智慧家(上海)物联网科技有限公司 Infrared repeater system, infrared repeater and data learning method thereof
CN111260854A (en) * 2020-03-10 2020-06-09 深圳来电科技有限公司 Circuit and method for improving infrared identification sensitivity and mobile power supply leasing equipment
CN113850988A (en) * 2020-12-24 2021-12-28 广东朝歌智慧互联科技有限公司 Key value correction method, device, equipment and computer readable medium
EP4024360A1 (en) * 2021-01-04 2022-07-06 Hangzhou Tuya Information Technology Co., Ltd. Infrared remote control code matching method and apparatus, computer device, and readable storage medium
US20220215746A1 (en) * 2021-01-04 2022-07-07 Hangzhou Tuya Information Technology Co., Ltd. Infrared Remote Control Code Matching Method and Apparatus, Computer Device, and Readable Storage Medium
US11984021B2 (en) * 2021-01-04 2024-05-14 Hangzhou Tuya Information Technology Co., Ltd. Infrared remote control code matching method and apparatus, computer device, and readable storage medium

Also Published As

Publication number Publication date
CN105427577B (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN105427577A (en) Infrared data processing method, processing device and decoding method
CN105306062A (en) Encoding and storing method and device for infrared data, and decoding method
CN107256707B (en) Voice recognition method, system and terminal equipment
CN104301737B (en) The coding/decoding method of target image block and coding method and decoder and encoder
CN101951516B (en) Parallel encoding realization circuit and encoding method based on CABAC (Context-based Adaptive Binary Arithmetic Coding) in H.264/AVC (Advanced Video Coding)
CN108509652B (en) Data processing system and method
CN110515951A (en) A kind of BOM standardized method, system and electronic equipment and storage medium
CN104375952A (en) Method for reading data from ring buffer
CN108984499B (en) Report data processing method and device, electronic equipment and readable storage medium
EP0378762A2 (en) Graphics images data compression method
CN101052938B (en) Low latency data packet reception and processing
CN104333732A (en) Distributed video analysis method and system thereof
CN113542225B (en) Data compression method and device, terminal equipment and storage medium
CN105874774A (en) Count table maintenance apparatus for maintaining count table during processing of frame and related count table maintenance method
CN102289445A (en) Method and device for analyzing XML (Extensible Markup Language) file and terminal
CN106850559A (en) A kind of expansible procotol analysis system and method
CN102377894B (en) Method and device for revising imaging box chip
CN104360988A (en) Method and device for identifying coding mode of Chinese characters
CN106484702B (en) Target web page access volume display method and device
CN106897434A (en) A kind of data lead-in method, apparatus and system
CN107832623B (en) Method and system for encrypting and decrypting coordinate track
CN107329756A (en) Generation method, device, storage medium, processor and the terminal of program file
CN111143312A (en) Format analysis method, device, equipment and storage medium for power logs
CN103336761A (en) Interference filtration matching algorithm based on dynamic partitioning and semantic weighting
CN105117403A (en) Log data fragmentation and query method and apparatus

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
CP01 Change in the name or title of a patent holder

Address after: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Patentee after: Hisense Visual Technology Co., Ltd.

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Patentee before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

CP01 Change in the name or title of a patent holder