CN105427577B - A kind of processing method of infrared data, processing unit and coding/decoding method - Google Patents

A kind of processing method of infrared data, processing unit and coding/decoding method Download PDF

Info

Publication number
CN105427577B
CN105427577B CN201510821068.0A CN201510821068A CN105427577B CN 105427577 B CN105427577 B CN 105427577B CN 201510821068 A CN201510821068 A CN 201510821068A CN 105427577 B CN105427577 B CN 105427577B
Authority
CN
China
Prior art keywords
character
data
value
code
infrared
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
CN201510821068.0A
Other languages
Chinese (zh)
Other versions
CN105427577A (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)
  • Optical Communication System (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The present invention provides a kind of processing method of infrared data, processing unit and coding/decoding methods, and the data volume to solve the problems, such as the infrared data of pulse code in the prior art is big, needs to occupy biggish memory space.It the treating method comprises: receiving infrared signal, obtain the pulse width values of first data waveform in the data waveform of infrared signal as first classification data value, and be assigned to first code character, first code character is saved in character-coded data;The pulse width values of data waveform after sequentially obtaining in infrared signal, judge current pulse length value respectively with pth -1 and before the absolute value of the difference of each classification data value whether in predetermined threshold range, if so, being saved after substituting current pulse length value with the code character of corresponding classification data value institute assignment;If not, it is determined that current pulse length value is p-th of classification data value, is stored in character-coded data after substituting current pulse length value with p-th of code character.

Description

A kind of processing method of infrared data, processing unit and coding/decoding method
Technical field
The present invention relates to infrared data encoding and decoding technique field more particularly to a kind of processing methods of infrared data, processing Device and coding/decoding method.
Background technique
Existing infrared remote-controlled signal all uses certain Signal coding mode, difference be only signal time length and The difference of digit.Common Signal coding mode has: pulse code, i.e., according to the mode of pulse width different coding, Sony What CSONY) company used is exactly this coding mode.Space coding is encoded according to interpulse period length difference Mode, also commonly known as REC-80 mode.Transform coding, i.e., the side encoded according to pulse and the change of interval time sequence Formula, also referred to as RC-5 mode.
And the mode that infrared data is encoded in the above described manner, it is required to each high level in record infrared signal The pulse width values of pulse and low level pulse, such as the pulse width values of high level pulse are 562 microseconds, low level pulse arteries and veins Rushing width value is 1112 microseconds, can be denoted as 562,1112 respectively according to the position and sequence occurred in infrared signal.Citing Following 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, That is generally height ... height (referring to level) arrangement.As it can be seen that above-mentioned coding mode, data volume is big, needs to occupy biggish Memory space.
Summary of the invention
The embodiment of the invention provides a kind of processing method of infrared data, processing unit and coding/decoding methods, existing to solve Have that the data volume of the infrared data of pulse code in technology is big, needs the problem of occupying biggish memory space.
The purpose of the present invention is what is be achieved through the following technical solutions:
The embodiment of the present invention provides a kind of processing method of infrared data, comprising:
The infrared signal that infrared sending device is sent is received, first data in the data waveform of the infrared signal are obtained The pulse width values of waveform, the data waveform include high level pulse and low level pulse;
Using the pulse width values got for the first time as first classification data value, and it is assigned to first coding Character saves first code character in character-coded data;
Sequentially obtain the pulse of the data waveform in the infrared signal after first data waveform Width value judges each institute of the presently described pulse width values got respectively with the classification data value of pth -1 and before The absolute value of the difference of classification data value is stated whether in predetermined threshold range, if so, with the absolute value of difference described pre- It is saved after determining the presently described pulse width values of code character substitution of the classification data value institute assignment in threshold range In the character-coded data;If not, it is determined that presently described pulse width values are p-th of classification data value, with pth A code character is stored in the character-coded data after substituting presently described pulse width values;Wherein, p=2,3, 4 ... .N, N are the natural number more than or equal to 2.
The embodiment of the present invention has the beneficial effect that: by dividing the pulse width values in the infrared signal Class replaces institute of the absolute value in the predetermined threshold range of mutual difference with the small code character of memory space It states pulse width values, and with the code character is encoded to obtain that occupy memory space smaller described to the infrared signal Character-coded data, to realize the purpose for saving memory space.
The embodiment of the present invention also provides a kind of processing unit of infrared data, comprising:
Receiving unit, the infrared signal sent for receiving infrared sending device, obtains the data wave of the infrared signal The pulse width values of first data waveform in shape, the data waveform include high level pulse and low level pulse;And it uses In the pulse width values for sequentially obtaining the data waveform in the infrared signal after first data waveform;
Taxon, for using the pulse width values got for the first time as first classification data value;And
Presently described pulse width values for judging to get with the classification data value of pth -1 and before each respectively Whether the absolute value of the difference of a classification data value is in predetermined threshold range, if so, by presently described pulse width Value is attributed to the classification data value of the absolute value of difference in the predetermined threshold range, if not, it is determined that presently described Pulse width values are p-th of classification data value;Wherein, p=2,3,4 ... .N, N are the nature more than or equal to 2 Number;
Processing unit, for first classification data value to be assigned to first code character, in character code number According to first code character of middle preservation;And the presently described pulse width values point got in taxon judgement The absolute value of the difference of each classification data value not with the classification data value of pth -1 and before is in the predetermined threshold When in range, with the coded word of classification data value institute assignment of the absolute value of difference in the predetermined threshold range Symbol is stored in the character-coded data after substituting presently described pulse width values;And it is obtained in taxon judgement The each classification data value of the presently described pulse width values got respectively with the classification data value of pth -1 and before When the absolute value of difference is not in the predetermined threshold range, presently described pulse width is substituted with p-th of code character It is stored in after value in the character-coded data.
The embodiment of the present invention has the beneficial effect that: obtaining high level pulse in the infrared signal by the receiving unit With the pulse width values of low level pulse, the pulse width values in the infrared signal are carried out by the taxon Classification, replaces the absolute value of mutual difference in the predetermined threshold range with the small code character of memory space The pulse width values, and the infrared signal is encoded with the code character by the processing unit and is occupied The smaller character-coded data of memory space, to realize the purpose for saving memory space.
The embodiment of the present invention also provides a kind of coding/decoding method of infrared data, comprising:
Successively obtain the code character in the character-coded data;
Using the corresponding classification data value of the code character as the pulse width values, according to the volume of acquisition The pulse width values are converted to high level pulse or low level by arrangement position of the code character in the character-coded data Pulse output.
The embodiment of the present invention has the beneficial effect that: reverse-engineering is carried out to the character-coded data, with the classification number The pulse width values characterized according to value replace the code character got, and using the pulse width values as output High level pulse or low level pulse, to realize the decoding of the character-coded data.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the processing method of infrared data provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the processing method of another infrared data provided in an embodiment of the present invention;
Fig. 3 is a kind of structural block diagram of the processing unit of infrared data provided in an embodiment of the present invention;
Fig. 4 is a kind of flow chart of the coding/decoding method of infrared data provided in an embodiment of the present invention.
Specific embodiment
The realization process of the embodiment of the present invention is described in detail with reference to the accompanying drawings of the specification.It should be noted that Same or similar label indicates same or similar element or element with the same or similar functions from beginning to end.Lead to below It crosses the embodiment being described with reference to the drawings to be exemplary, for explaining only the invention, and be not considered as limiting the invention, Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.
Embodiment one
Referring to Fig. 1, the embodiment of the present invention provides a kind of processing method of infrared data, comprising:
101, the infrared signal that infrared sending device is sent is received, first data in the data waveform of infrared signal are obtained The pulse width values of waveform, data waveform include high level pulse and low level pulse.
It should be noted that the infrared signal can be the infrared letter by master remote controller or connection computer or single-chip microcontroller plate What number transmitter was sent, details are not described herein.Thought according to the present invention can provide the learning-oriented of corresponding infrared launcher From remote controler, the infrared signal that infrared launcher is sent is received.
Such as in the prior art, infrared signal is encoded with Microsoft's long time coding mode, is obtained 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;Every set of number represents the pulse width values of a high level pulse or low level pulse, each A pulse width values need 2-3 byte to be stored, it can thus be appreciated that Microsoft long time coding mode is completely to high electricity The numerical value of the pulse width values of flat pulse or low level pulse is recorded.Usual high level pulse and low level pulse are alternately sent out It send, in the present embodiment, the pulse width values 3611 of first data waveform are high level, represent one with each pulse width values A level waveforms, whole level waveforms meet for the rule of height ... height (level).
According to the step 101 of the present embodiment, can be got by the infrared signal such as above-mentioned Microsoft long time coding The pulse width values for first data waveform that mode records are 3611.
102, using the pulse width values got for the first time as first classification data value, and it is assigned to first coding Character saves first code character in character-coded data.
For example, first pulse width values 3611 that step 101 is obtained are used as first classification data value, it is allowed to assignment It is stored in character-coded data to first code character A, and by first code character A.Certainly, code character can be with It is A, B, C, D, E etc. are also possible to H, I, J, the word of K, L etc. or other English alphabets, Arabic numerals or other Languages It is female;Preferably, code character is English alphabet;Details are not described herein.
103, the pulse width values of the data waveform in infrared signal after first data waveform are sequentially obtained, judgement obtains The current pulse length value the got absolute value with -1 classification data value of pth and the difference of each classification data value before respectively Whether in predetermined threshold range, that is, judge the presently described pulse width values got respectively with have confirmed each point Whether the absolute value of the difference of class data value is in predetermined threshold range.
If so, the code character substitution of the classification data value institute assignment with the absolute value of difference in predetermined threshold range It is stored in character-coded data after current pulse length value;If not, it is determined that current pulse length value is p-th of classification data Value is stored in character-coded data after substituting current pulse length value with p-th of code character;Determine current pulse length Value is new classification data value, and is stored in character-coded data after substituting current pulse length value with new code character; Wherein, p=2,3,4 ... .N, N are the natural number more than or equal to 2.
In the present embodiment, predetermined threshold can be the range of a percentage of current pulse length value, be also possible to one The range of a numerical value.Generally for compatibility is improved, using the range of percentage as predetermined threshold, for example, current PRF is wide Angle value is 3611, take its 1%~10% range as determine predetermined threshold foundation, then predetermined threshold be 3611*1%~ 3611*10%.
According to step 103, the pulse width values of the data waveform after the first data waveform can be judged, be classified It is substituted with corresponding character code.
Still with the pulse width of infrared signal for following data instance:
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 above-mentioned rapid, the pulse width values 3611 of first data waveform are encoded into A with first character, and by first A character code A is stored in character-coded data.
The pulse width values 1793 for getting second data waveform, determine pulse width values 1793 and pulse width values The absolute value of 3611 difference in predetermined threshold range (1793*1%~1793*10%), then can not determine pulse width Value 1793 is used as second classification data value, and second character code B of assignment, and second character code B is stored in character In coded data, then in subsequent judgement, pulse width values 1793 and pulse width values 1794 simultaneously will be with second characters Coding B is stored in character-coded data.
Likewise, the pulse width values of subsequent other data waveforms also carry out treatment thereto, the multiple classification determined Data value is 3611,1793,562,1112,53800, and corresponding character code is A, B, C, D, E, finally obtained character Coded data is as follows:
ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCC CDCDCDCDCCCDCDCDCE,AACE。
Obviously, the classification data value and pulse width values determined by above-mentioned steps has corresponding relationship as shown in Table 1:
Table 1
According to the corresponding relationship between above-mentioned classification data value and corresponding each pulse width values, code character (example Such as A, B, C, D, E) and pulse width values between relationship it is as follows:
Such as code character A respective pulses width value 3611,3610,3609;Code character B corresponding 1793,1794;Coding Character C respective pulses width value 562,561,559,563;Code character D respective pulses width value 1112,1113,1109;Coding Character E respective pulses width value 53800,53590.
Certainly, above corresponding relationship is obtained by the judgement of predetermined threshold, for this purpose, providing a kind of specific algorithm Above-mentioned deterministic process is illustrated:
1, determine predetermined threshold be α, process data variable be β, same class classification data value counts be γ 1, γ 2, γ 3, γ 4 (initial value 1), data waveform data it is total be counted as ε.
2, it is assigned to a using the pulse width values of the data waveform extracted for the first time as first classification data value, Code character A is saved in character-coded data.
3, continue to obtain subsequent data waveform, the current pulse width values that will acquire are assigned to β, as β ∈ [a* (1- α), a* (1+ α)], (a+ β)/γ 1 is assigned to a, while γ 1 plus 1, until β is not belonging to [a* (1- α), a* (1+ α)], at this time will β is assigned to b, and code character B is saved in character-coded data;
4, continue to obtain subsequent data waveform, the current pulse width values that will acquire are assigned to β, as β ∈ [b* (1- α), b* (1+ α)], (b+ β)/γ 2 is assigned to b, until β is not belonging to [a* (1- α), a* (1+ α)] ∩ [b* (1- α), b* (1+ α)], β is assigned to c at this time, code character C is saved in character-coded data;
5, continue to obtain subsequent data waveform, the current pulse width values that will acquire are assigned to β, as β ∈ [c* (1- α), c* (1+ α)], (c+ β)/γ 3 is assigned to c, until β is not belonging to [a* (1- α), a* (1+ α)] ∩ [b* (1- α), b* (1+ α)] ∩ [c* (1- α), c* (1+ α)], is assigned to d for β at this time, and code character D is saved in character-coded data;
6, continue to obtain subsequent data waveform, the current pulse width values that will acquire are assigned to β, as β ∈ [d* (1- α), d* (1+ α)], (d+ β)/γ 4 is assigned to d, until β is not belonging to [a* (1- α), a* (1+ α)] ∩ [b* (1- α), b* (1+ α)] ∩ [c* (1- α), c* (1+ α)] ∩ [d* (1- α), d* (1+ α)], is assigned to e for β at this time, saves in character-coded data Code character E.
By above-mentioned algorithm, can be realized the pulse width values of high level pulse and low level pulse in infrared signal It is encoded to character-coded data and saves, which, which can be, is stored in receiving device (such as infrared signal receiver or distant Control device) memory in, in itself memory or external memory.
The infrared coded data saved with pulse width values occupies 204 bytes in storage, due to former infrared coding number The number of one group of characterization pulse width values needs to occupy at least two bytes in, and code character only uses a byte, therefore In processing method provided in this embodiment, the character-coded data recompiled only takes up former infrared coded data and is storing 50% or so of space, saves memory space.
Certainly, in order to correctly parse the character-coded data of storage, classification data value should also be saved, it is preferred that Using character-coded data as the data segment of infrared character code storing data content store, using each classification data value as The content of the parsing section of infrared character code storing data stores;Wherein, arrangement of each classification data value in parsing section is suitable Stored sequencing is consistent for the first time with code character each in data segment for sequence.
For example, recompiling to obtain character-coded data (ABCDCDCDCCCCCCC according to above-mentioned infrared coded data DCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE, AACE), this is stored in to the data segment of infrared character code storing data, while by classification data value for character-coded data (3611,1793,562,1112,53800) are stored in the parsing section of infrared character code storing data, as follows:
3611,1793,562,1112,5380,ABCDCDCDCCCCCCCDCCCCCCCCCCCDCCC CCCCDCCCCCCC CCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, the distributing order of classification data value (3611,1793,562,1112,53800) is with different pulse widths The sequence consensus that value obtains for the 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, each different pulse width values The sequencing obtained for the first time is as follows: 3611,1793,562,1112,563,1113,561,1794,560,559,1109, 3590,3610,53590,53800, and with classification data be worth corresponding pulse width values first time obtain sequencing such as Under: 3611,1793,562,1112,53800.Therefore, only from numerically understanding, the distributing order of classification data value is selected Make the sequencing of the first time acquisition of the pulse width values of those classification data values.
Based on actual needs, can also increase in infrared character code storing data infrared signal total duration value and Carrier value, the total duration value and carrier value of certain infrared signal need to obtain or determine in a step 101, in each coding Character make when being saved one time it is corresponding count is incremented, according to the respective preservation number of each code character and corresponding point Total duration value and carrier value are stored in the parsing section end of infrared character code storing data by the sum of products of class data value, Such as infrared character code storing data are as follows:
3611,1793,562,1112,5380,118368,38,ABCDCDCDCCCCCCCDCCCCCCCC CCCDCCCCC CCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDC DCDCCCDCDCDCE,AACE。
Wherein, 118368 be infrared signal total duration value, unit is consistent with pulse width values, and usual microsecond, 38 is infrared The carrier value of signal, the unit of carrier value are usually kHz, it is of course possible to separately be specified.
It can also be recorded in infrared character code storing data and press strong data segment, such as infrared word including key title Accord with code storage data are as follows:
power,3611,1793,562,1112,5380,118368,38,ABCDCDCDCCCCCCCDCCCC CCCCCCC DCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE,AACE。
Wherein, " powe " is stored in the key title by strong data segment, can according to key possessed by remote controler into Row setting, such as the key for indicating volume adjustment, adjusting the functions such as platform, picture control, details are not described herein.
The additional information number including brand manufacturers and device model can also be recorded in infrared character code storing data According to section, such as infrared character code storing data are as follows:
Hisense,LED55XT800UCD,power,3611,1793,562,1112,5380,118368,38,ABC DC DCDCCCCCCCDCCCCCCCCCCCDCCCCCCCDCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDC DCDCE,AACE。
Wherein, " Hisense " occupied additional information data section is for storing brand manufacturers, " LED55XT800UCD " Occupied additional information data section is for depositing device model.
It include the data such as brand manufacturers, device model, key title in record according to the infrared coded data of the example above Afterwards, obtained infrared character code storing data (136 byte) still only takes up infrared coding in storage according to the present invention The 67% of data (204 bytes), is greatly reduced the memory space of occupancy.
The embodiment of the present invention has the beneficial effect that: by classifying to the pulse width values in infrared signal, with storage The small code character in space replaces pulse width values of the absolute value of mutual difference in predetermined threshold range, and to compile Code character is encoded to obtain to infrared signal occupies the smaller character-coded data of memory space, to realize that saving storage is empty Between purpose.
Implement two
Referring to fig. 2, it is based on same invention thought, the embodiment of the present invention provides the processing method of another infrared data, packet It includes:
201, the infrared signal that infrared sending device is sent is received, first data in the data waveform of infrared signal are obtained The pulse width values of waveform, data waveform include high level pulse and low level pulse.
202, using the pulse width values got for the first time as first classification data value, and it is assigned to first coding Character saves first code character in character-coded data.
203, the pulse width values of the data waveform in infrared signal after first data waveform are sequentially obtained, judgement obtains The current pulse length value the got absolute value with -1 classification data value of pth and the difference of each classification data value before respectively Whether in predetermined threshold range, if so, the classification data value institute assignment with the absolute value of difference in predetermined threshold range Code character substitution current pulse length value after be stored in character-coded data;If not, it is determined that current pulse length value For p-th of classification data value, it is stored in character-coded data after substituting current pulse length value with p-th of code character;Its In, p=2,3,4 ... .N, N are the natural number more than or equal to 2.
First three step is roughly the same with embodiment one, the difference is that further include:
204, higher two code characters of repetitive rate in character-coded data are respectively defined as digital " 0 " and number " 1 ", It is replaced per 8 adjacent bit digitals by a digital group with hexadecimal number, and character-coded data is recompiled;Wherein, The code character of the interlude of character-coded data less than 8 with " 0 " polishing, the code character of character-coded data tail end is not 8, foot remains unchanged.
For example, according to implement an obtained infrared character code storing data (Hisense, LED55XT800UCD, power,3611,1793,562,1112,5380,118368,38,ABCDC DCDCCCCCCCDCCCCCCCCCCCDCCCCCCC DCCCCCCCCCCCDCCABCCCCCDCCCCCCCDCCCDCDCDCDCCCDCDCDCE, AACE), volume that can be high by repetitive rate Code character C, D are replaced respectively with digital " 0 " and number " 1 ", and every 8 continuous numbers are formed a hexadecimal data, With digital " 0 " polishing, the code character that the code character E of corresponding data waveform total duration is adjacent is remained unchanged for insufficient position, is obtained The infrared character code storing data of optimization is as follows:
Hisense,LED55XT800UCD,power,3611,1793,562,1112,53800,118368,38,AB, 0x54,0x04,0x00,0x40,0x40,0x04,AB,0x04,0x04,0x55,0x15,CEAACE。
It is described as follows with one of hexadecimal data, such as 0x54, with digital " 0 " and digital " 1 " substitution table It is shown as 0x01010100, that is, corresponds to character code CDCDCDCC, other hexadecimal datas have same corresponding relationship, herein It will not enumerate.
The memory space for 68 bytes that the infrared character code storing data of above-mentioned optimization only takes up, can greatly save Memory space.Certainly thought other modifications can also be carried out according to the present invention, still in the scope of the present invention.
Embodiment three
Referring to Fig. 3, the embodiment of the present invention provides a kind of processing unit of infrared data, comprising:
Receiving unit 301, the infrared signal sent for receiving infrared sending device, obtains the data waveform of infrared signal In first data waveform pulse width values, data waveform includes high level pulse and low level pulse;And for sequentially Obtain the pulse width values of the data waveform in infrared signal after first data waveform;
Taxon 302, for using the pulse width values got for the first time as first classification data value;And
The each classification number of current pulse length value respectively with -1 classification data value of pth and before for judging to get According to value difference absolute value whether in predetermined threshold range, if so, current pulse length value is attributed to the exhausted of difference To classification data value of the value in predetermined threshold range, if not, it is determined that current pulse length value is p-th of classification data value; Wherein, p=2,3,4 ... .N, N are the natural number more than or equal to 2;
Processing unit 303, for first classification data value to be assigned to first code character, in character-coded data First code character of middle preservation;And the current pulse length value got in taxon judgement is classified with pth -1 respectively When the absolute value of the difference of data value and each classification data value before is in predetermined threshold range, existed with the absolute value of difference Character code is stored in after the code character substitution current pulse length value of classification data value institute assignment in predetermined threshold range In data;And the current pulse length value that gets of taxon judgement respectively with -1 classification data value of pth and before When the absolute value of the difference of each classification data value is not in predetermined threshold range, current PRF is substituted with p-th of code character It is stored in character-coded data after width value.
Certainly, based on the considerations of different needs and more optimized coding, receiving unit 301 and processing unit 303 can be with With following function:
Processing unit 303 is also used to be respectively defined as counting by higher two code characters of repetitive rate in character-coded data Word " 0 " and number " 1 " are replaced with hexadecimal number by a digital group per 8 adjacent bit digitals, and carried out to character-coded data It recompiles;Wherein, the code character of the interlude of character-coded data less than 8 with " 0 " polishing, character-coded data tail The code character at end remaining unchanged less than 8.
Processing unit 303 is also used to using character-coded data as in the data segment of infrared character code storing data Storage is stored, is stored each classification data value as the content of the parsing section of infrared character code storing data;Wherein, Ge Gefen Stored sequencing is consistent for the first time with code character each in data segment for class data value putting in order in parsing section.
Receiving unit 301, is also used to: make when each code character is saved one time it is corresponding count is incremented, according to each The respective sum of products for saving number and corresponding classification data value of a code character, determines the total duration of infrared signal Value and carrier value;Processing unit 303 is also used to for total duration value and carrier value being stored in the solution of infrared character code storing data Analyse section end.
Processing unit 303, being also used to record in infrared character code storing data includes key title by number of package evidence Section.
Processing unit 303, being also used to record in infrared character code storing data includes brand manufacturers and device model Additional information data section.
The embodiment of the present invention has the beneficial effect that: obtaining high level pulse and low level in infrared signal by receiving unit The pulse width values of pulse classify to the pulse width values in infrared signal by taxon, small with memory space The absolute value that code character replaces mutual difference is less than or equal to the pulse width values of predetermined threshold range, and passes through place Reason unit is encoded to obtain with code character to infrared signal occupies the smaller character-coded data of memory space, to realize Save the purpose of memory space.
Example IV
Referring to fig. 4, the embodiment of the present invention also provides a kind of coding/decoding method of infrared data, comprising:
401, successively obtain the code character in character-coded data.
For infrared character code storing data obtained in embodiment one, usually first successively obtains infrared character code and deposit The classification data value stored in storage data;After successively obtaining the code character in character-coded data again, then according to each Classification data value putting in order and code character first time each in data segment stored sequencing one in parsing section The corresponding relationship of cause determines the corresponding classification data value of code character.
For the infrared character code storing data of optimization obtained in embodiment one, infrared character is usually first successively obtained The classification data value stored in code storage data;The character recompiled with digital " 0 " and digital " 1 " is successively obtained again Hexadecimal number in coded data parses hexadecimal number and determines the coded word obtained according to each that parsing obtains Symbol, then according to each classification data value, putting in order in parsing section is deposited for the first time with code character each in data segment The consistent corresponding relationship of the sequencing of storage determines the corresponding classification data value of code character.It should be noted that in embodiment The infrared character code storing data of obtained optimization in two saves coded word due to not saving code character or part directly Symbol, therefore the code character that may be used can be preset or save code character, calling when to parse.
402, using the corresponding classification data value of code character as pulse width values, according to the code character of acquisition in character Pulse width values are converted to high level pulse or low level pulse export by the arrangement position in coded data.
The embodiment of the present invention has the beneficial effect that: reverse-engineering is carried out to character-coded data, with classification data value institute table The pulse width values of sign replace the code character got, and using pulse width values as output high level pulse or low level arteries and veins Punching, to realize the decoding of character-coded data.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (15)

1. a kind of processing method of infrared data characterized by comprising
The infrared signal that infrared sending device is sent is received, first data in the data waveform of the infrared signal are obtained The pulse width values of waveform, the data waveform include high level pulse and low level pulse;
Using the pulse width values got for the first time as first classification data value, and it is assigned to first coded word Symbol saves first code character in character-coded data;
Sequentially obtain the pulse width of the data waveform in the infrared signal after first data waveform Value judges each described point of the presently described pulse width values got respectively with the classification data value of pth -1 and before Whether the absolute value of the difference of class data value is in predetermined threshold range, if so, with the absolute value of difference in the predetermined threshold The code character of classification data value institute assignment within the scope of value is stored in institute after substituting presently described pulse width values It states in character-coded data;If not, it is determined that presently described pulse width values are p-th of classification data value, with p-th of institute It states after code character substitutes presently described pulse width values and is stored in the character-coded data;Wherein, p=2,3, 4 ... .N, N are the natural number more than or equal to 2;
Higher two code characters of repetitive rate in the character-coded data are respectively defined as digital " 0 " and number " 1 ", It is replaced per 8 adjacent bit digitals by a digital group with hexadecimal number, and the character-coded data is recompiled;Its In, the code character of the interlude of the character-coded data less than 8 with " 0 " polishing, the character-coded data The code character of tail end remaining unchanged less than 8.
2. processing method as described in claim 1, which is characterized in that further include using the character-coded data as infrared word The content storage for according with the data segment of code storage data, stores each classification data value as the infrared character code The content of the parsing section of data stores;Wherein, each classification data value it is described parsing section in put in order with it is described Stored sequencing is consistent for the first time for each code character in data segment.
3. processing method as claimed in claim 2, which is characterized in that further include being saved in each described code character Make an at time it is corresponding count is incremented, according to each respective preservation number of code character and corresponding classification The sum of products of data value determines the total duration value and carrier value of the infrared signal, by the total duration value and the carrier wave Value is stored in the parsing section end of the infrared character code storing data.
4. processing method as claimed in claim 2, which is characterized in that further include in the infrared character code storing data Record includes key title by strong data segment.
5. processing method as claimed in claim 2, which is characterized in that further include in the infrared character code storing data Record includes the additional information data section of brand manufacturers and device model.
6. processing method as described in claim 1, which is characterized in that the code character is English alphabet or number.
7. a kind of processing unit of infrared data characterized by comprising
Receiving unit, the infrared signal sent for receiving infrared sending device, in the data waveform for obtaining the infrared signal The pulse width values of first data waveform, the data waveform include high level pulse and low level pulse;And it uses In the pulse width values for sequentially obtaining the data waveform in the infrared signal after first data waveform;
Taxon, for using the pulse width values got for the first time as first classification data value;And
The each institute of presently described pulse width values respectively with the classification data value of pth -1 and before for judging to get The absolute value of the difference of classification data value is stated whether in predetermined threshold range, if so, presently described pulse width values are returned Category is the classification data value of the absolute value of difference in the predetermined threshold range, if not, it is determined that presently described pulse Width value is p-th of classification data value;Wherein, p=2,3,4 ... .N, N are the natural number more than or equal to 2;
Processing unit, for first classification data value to be assigned to first code character, in character-coded data Save first code character;And the presently described pulse width values that get of taxon judgement respectively with The absolute value of the difference of the classification data value of pth -1 and each classification data value before is in the predetermined threshold range When interior, replaced with the code character of classification data value institute assignment of the absolute value of difference in the predetermined threshold range For being stored in the character-coded data after presently described pulse width values;And it is got in taxon judgement Presently described pulse width values each classification data value respectively with the classification data value of pth -1 and before difference Absolute value not in the predetermined threshold range when, after substituting presently described pulse width values with p-th of code character It is stored in the character-coded data;Higher two code characters of repetitive rate in the character-coded data is fixed respectively Justice is digital " 0 " and number " 1 ", is replaced per 8 adjacent bit digitals by a digital group with hexadecimal number, and compile to the character Code data are recompiled;Wherein, the code character of the interlude of the character-coded data less than 8 with " 0 " Polishing, the code character the remaining unchanged less than 8 of the character-coded data tail end.
8. processing unit as claimed in claim 7, which is characterized in that the processing unit is also used to the character code Data are stored as the content of the data segment of infrared character code storing data, using each classification data value as described red The content of the parsing section of outer character code storing data stores;Wherein, each classification data value is in the parsing section Putting in order, stored sequencing is consistent for the first time with the code character each in the data segment.
9. processing unit as claimed in claim 8, which is characterized in that the receiving unit is also used to: in each volume Code character make when being saved one time it is corresponding count is incremented, according to each respective preservation number of code character and respectively it is right The sum of products for the classification data value answered determines the total duration value and carrier value of the infrared signal;
The processing unit is also used to for the total duration value and the carrier value being stored in the infrared character code storage number According to parsing section end.
10. processing unit as claimed in claim 8, which is characterized in that the processing unit is also used in the infrared character Record includes key title by strong data segment in code storage data.
11. processing unit as claimed in claim 8, which is characterized in that the processing unit is also used in the infrared character Record includes the additional information data section of brand manufacturers and device model in code storage data.
12. processing unit as claimed in claim 7, which is characterized in that the code character is English alphabet or number.
13. a kind of coding/decoding method of infrared data is obtained for parsing using processing method as claimed in any one of claims 1 to 6 The character-coded data arrived characterized by comprising
Successively obtain the code character in the character-coded data;
Using the corresponding classification data value of the code character as the pulse width values, according to the coded word of acquisition The arrangement position in the character-coded data is accorded with, the pulse width values are converted into high level pulse or low level pulse Output.
14. coding/decoding method as claimed in claim 13, which is characterized in that described successively to obtain in the character-coded data The code character, further includes:
Obtain the hexadecimal number in the character-coded data recompiled with digital " 0 " and digital " 1 ", solution It analyses the hexadecimal number and the code character obtained is determined according to each that parsing obtains.
15. coding/decoding method according to claim 13 or 14, which is characterized in that described successively to obtain the character-coded data In the code character before, successively obtain the classification data value stored in the infrared character code storing data;
After the code character successively obtained in the character-coded data, existed according to each classification data value Stored sequencing is consistent corresponding for the first time with the code character each in data segment for putting in order in parsing section Relationship determines the corresponding classification data value of the code character.
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 CN105427577A (en) 2016-03-23
CN105427577B true 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)

Families Citing this family (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
CN109637111B (en) * 2018-12-25 2020-08-28 歌尔科技有限公司 Infrared signal compression method and device, user equipment and storage medium
CN109523772B (en) * 2018-12-29 2021-10-12 东莞钜威动力技术有限公司 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
CN111260854B (en) * 2020-03-10 2022-02-15 深圳来电科技有限公司 Circuit and method for improving infrared identification sensitivity and mobile power supply leasing equipment
CN113850988B (en) * 2020-12-24 2022-09-27 广东朝歌智慧互联科技有限公司 Key value correction method, device, equipment and computer readable medium
CN112330948B (en) * 2021-01-04 2021-04-27 杭州涂鸦信息技术有限公司 Infrared remote control code matching method and device, computer equipment 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

Also Published As

Publication number Publication date
CN105427577A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105427577B (en) A kind of processing method of infrared data, processing unit and coding/decoding method
CN105306062B (en) A kind of coding and storing method of infrared data, device and coding/decoding method
CN107610445B (en) Infrared self-learning data coding method and circuit thereof
CN109739747A (en) A kind of general analytic method of serial communication information protocol
CN108255555B (en) A kind of system language switching method and terminal device
CN104252627A (en) SVM (support vector machine) classifier training sample acquiring method, training method and training system
RU2014111963A (en) METHOD AND DEVICE FOR CHECKING THE CORRECTNESS OF FUNCTIONING OF SERIAL DATA TRANSFER
WO2001041043A1 (en) Electronic label reading system
CN110515951A (en) A kind of BOM standardized method, system and electronic equipment and storage medium
CN103745590A (en) Infrared remote coding method
CN103823760A (en) High-efficiency data storage and analysis method
EP3547577B1 (en) Data transmission method and terminal
CN111046685A (en) Grouping paging-based locking type double-prefix probe anti-collision calculation method
CN104392600A (en) Method for storing by collecting different infrared frequencies
CN102377894B (en) Method and device for revising imaging box chip
CN111597411B (en) Method and system for distinguishing and identifying power specification data frames
CN103793979B (en) Method for upgrading photon receiving end
CN102332083B (en) Information transmission methods and devices for radio frequency identification reader and tag
CN102156846A (en) RFID (Radio Frequency Identification) based method and device for transmitting information between reader and label
CN209216052U (en) Sensing device, electronic equipment and EM induction system for time writer
CN107945477A (en) The method and device that infrared or wireless remote control signals data are compressed
CN104240491B (en) The digitizing solution of infrared signal
CN105553483B (en) A kind of method and device generating LZ77
CN109343728A (en) Sensing device, electronic equipment and EM induction system for time writer
CN102541873B (en) Code sorting method and 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
CP01 Change in the name or title of a patent holder
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.