A High-efficiency Compression Algorithm for Infrared Remote Control Code Library of Air Conditioner

By dividing the air-conditioning remote control code library into coding areas and waveform areas, the generation and transmission of control code groups for different states and temperatures are realized, which solves the problem of large data volume in the air-conditioning remote control code library and realizes universal remote control of multiple models of air conditioners. and efficient storage.

CN111817725BActive Publication Date: 2024-10-11JINAN SINE LEAD ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010850557.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-21
Publication Date
2024-10-11
Estimated Expiration
2040-08-21

AI Technical Summary

Technical Problem

Due to the inconsistent protocol standards of various air conditioner manufacturers, the existing air conditioner remote control code library results in a huge amount of data stored and transmitted, making it difficult to achieve universal remote control of different models of air conditioners.

Method used

The infrared remote control code library is divided into a coding area and a waveform area. The coding area is responsible for restoring the control code group, and the waveform area is responsible for restoring the control code group into an infrared code waveform, which is encoded and decoded through carrier frequency, modulation mode, bit sequence and other information. Realize the generation and transmission of control code groups for different states and temperatures.

Benefits of technology

It realizes universal remote control of multiple types of air conditioners, has high compression rate, small storage space, and strong adaptability. It can adapt to 1,000 common air conditioner infrared codes and is suitable for smart homes and Internet of Things systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111817725B_ABST
    Figure CN111817725B_ABST
Patent Text Reader

Abstract

The high-efficiency compression algorithm of the universal air conditioner infrared remote control code library of the present invention comprises a coding step and a decoding step, wherein the method of the coding step is as follows: firstly, the infrared code of the to-be-compressed coding protocol is divided into a coding area and a waveform area, wherein the coding area stores the basic code group, the control code rule, and the position information of the control code in the basic code group, and the waveform area stores the carrier frequency, modulation mode, bit order, number of guide codes and pulse width, high and low level pulse width of the 0 code and 1 code of the data code, and the like. The high-efficiency compression algorithm of the universal air conditioner infrared remote control code library of the present invention, the control code group obtained by the coding area operation can be restored to the infrared code group without distortion after the operation of the waveform area, and finally the infrared code waveform is obtained according to the carrier frequency value in the waveform area, so as to realize the corresponding control of the air conditioner. A "universal" infrared code library is established, which provides conditions for intelligent control of smart homes, smart hotels, and the Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a high-efficiency compression algorithm for an infrared remote control code library for an air conditioner, and more specifically, to a high-efficiency compression algorithm for an infrared remote control code library for an air conditioner that utilizes a coding region and a waveform region to restore an infrared code waveform. Background Art

[0002] The infrared remote control codes for home appliances such as TVs and stereos are encoded in one key, such as channel, volume, etc. The code of the key is output when the key is pressed. The number and types are small, which creates conditions for learning remote controls.

[0003] However, the infrared code of the air conditioner remote control is different from that of other home appliance remote controls. One button carries multiple status information at the same time. For example, power on / off, mode, temperature, wind sweeping mode and wind speed, etc. When you press a button, all these statuses must be sent out at once. As a result, a button has many combinations of key codes in different modes, that is, the same button sends different codes in different states. Therefore, the code is very long, which makes it difficult to learn and store.

[0004] Ordinary infrared remote controls for home appliances generally use dedicated remote control chips, such as those from Nec, Philips, Toshiba, and Sony, and their encoding format is fixed. It is mainly composed of a guide code, a user code, a data code, a repeat code or a data inverse code, and an end code. One key has only one code.

[0005] The air conditioner remote control code is different. Each air conditioner manufacturer uses CPU to make remote control chips according to their own requirements. There is no unified protocol standard in the air conditioner industry. There are many types of coding, such as no boot code (TV and audio have them), and the verification method is cumulative sum (TV and audio generally use the inverse code).

[0006] The protocols are stipulated by each manufacturer. Even different models of the same manufacturer and brand may have different protocols. It is not realistic to find a universal decoding method. Therefore, the most common method to achieve remote control of a specific model of air conditioner is the learning method, which stores the waveform data of commonly used commands in the corresponding address after learning. When remote control is required, the waveform data is called out from the corresponding address, and then restored to an infrared signal and sent out through the infrared transmitter. This method can only be used for a certain brand of air conditioner remote control.

[0007] In smart product industries such as smart home, smart hotel and Internet of Things, there is a need for remote control of various models of air conditioners from different air conditioner manufacturers. The solution is to establish a "universal" infrared code library, collect the infrared codes of various models from multiple manufacturers, arrange them according to a certain pattern, and use a code table to represent the infrared code of each model of air conditioner. When using it, first adjust the code table by manual input or automatic search, and then call out the corresponding control instructions from the code table.

[0008] The current universal air conditioner remote control code library records all command contents in an enumerated manner, so it must occupy a large storage space. Taking Mitsubishi Heavy Industries (09NV), which has the largest number of coding formats, as an example, its data code part is 14Byte (112 bits), two guide codes and one end code. If the high and low level pulse widths of the data code are represented by 1Byte data respectively, the two guide codes are represented by 4Byte data, and the one end code is represented by 2Byte data. One state requires 2×112+4+2=230Byte of data. There are five air conditioning modes: cooling, dehumidification, air supply, heating and automatic. In each mode, the temperature needs to change from 16℃ to 30℃ (the automatic mode has only one temperature). There are two wind directions at each temperature value: automatic and manual. For each wind direction, there are four wind speeds: automatic gear and one to three gears. In each state, there are two operations: turn on and turn off. Therefore, the total number of control states is: (4×15+1)×2×4×2=976. The total control code group data volume is 224.480KByte.

[0009] The infrared code of one model of air conditioner under one brand has such a large amount of data. The universal infrared code library needs to collect the infrared codes of thousands of models together, which will reach a data volume of more than 200MByte. This makes the storage and transmission of the code library very difficult. Therefore, compressing the data of the infrared code library is an essential step. Summary of the invention

[0010] In order to overcome the disadvantages of the above technical problems, the present invention provides a high-efficiency compression algorithm for an air conditioner infrared remote control code library.

[0011] The high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention comprises a coding step and a decoding step, and is characterized in that the method of the coding step is as follows: firstly, the infrared code of the to-be-compressed coding protocol is divided into a coding area and a waveform area, the coding area stores basic code groups, control code rules, and position information of the control code in the basic code group, the basic code group is an infrared code of a certain state, and the control code comprises a switch code, a mode code, a temperature code, a wind direction code, a wind speed code, a function conversion code, a check bit code, an inverse code, and a repeat code; the waveform area stores the carrier frequency, modulation mode, bit sequence, number and pulse width of the guide code, high and low level pulse width of the 0 code and 1 code of the data code, number and pulse width and position of the interval code, number and format of the cyclic code, number and pulse width of the end code; the coding area is responsible for restoring the control code group under the required state and temperature, and the waveform area is responsible for restoring the control code group to an infrared code waveform;

[0012] The decoding steps are:

[0013] 1) For other required states and temperatures, firstly, the states and temperatures are brought into the control code rules in the coding area, and the control codes of the required states and temperatures are calculated. Then, these control code groups are replaced with the control codes of the corresponding positions in the basic code group according to their respective positions in the basic code group, and the control code groups of other states and temperatures are obtained;

[0014] 2). Then, according to the cyclic code rule in the waveform area, add the required cycle to the control code group to obtain a complete control code group, and then insert the control code group between the guide code and the end code; if there is an interval code, then insert and exit the interval code at the interval code position;

[0015] 3). Substitute the pulse width values ​​of the guide code, data 0 code and 1 code, interval code and end code into the control code group to restore the waveform of the infrared code;

[0016] 4). Finally, according to the carrier frequency value in the waveform area, the infrared code waveform is amplitude modulated on the carrier frequency and sent to the infrared transmitter for transmission to realize the control of the air conditioner, thus completing the entire decoding process.

[0017] The high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention, the basic code group is a startup code of a selected mode, temperature, wind direction and wind speed, such as a startup code of cooling 16°C and automatic wind direction and wind speed.

[0018] The high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention, the coding area sequentially stores basic code group data, switch code data, mode code data, temperature code data, wind direction code data, wind speed code data, function conversion code data, check code data, inverse code data and repetition code data; the basic code data sequentially stores the number of the current coding format in the total format, the total length of the infrared code group under the current format, the total length of the coding area including the format number, the total length of the basic code group, and the basic code group; the switch code data sequentially stores the switch code partition length, switch code type, and switch code position; the mode code data sequentially stores the mode code partition length, mode code type, and mode code position; The mode code type and mode code position are stored in sequence in the temperature code data; the temperature code partition length, temperature code type and temperature code position are stored in sequence in the temperature code data; the wind direction code partition length, wind direction code type and wind direction code position are stored in sequence in the wind direction code data; the wind speed code partition length, wind speed code type and wind speed code position are stored in sequence in the wind speed code data; the function conversion code partition length, conversion code type and conversion code position are stored in sequence in the function conversion code data; the check code partition length, check code type and check code position are stored in sequence in the check code data; the inverse code partition length and inverse code type are stored in sequence in the inverse code data; the repeat code partition length and repeat code type are stored in sequence in the repeat code data.

[0019] The high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention stores a switch code preamble in the switch code data, and stores a switch code attribute byte of 1 byte length in the switch code preamble, wherein the upper 4 bits are the switch code flag code 1, and the lower 4 bits are equal to 0 to indicate the state switch code, equal to 1 to indicate the incremental switch code, equal to 2 to indicate the 4-bit switch code, equal to 3 to indicate the byte switch code, equal to 4 to indicate the 4-bit mode and shutdown combination code, equal to 5 to indicate the byte mode and shutdown combination code, equal to 6 to indicate the 4-bit wind direction and shutdown combination code, equal to 7 to indicate the byte wind direction and shutdown combination code, equal to 8 to indicate the 4-bit wind speed and shutdown combination code, equal to 9 to indicate the byte wind speed and shutdown combination code, and equal to F to indicate an independent shutdown code;

[0020] Among them, the status switch code has no shutdown code, and the control code of the current state is used. When the air conditioner is in the off state, a control code is sent once to turn on the air conditioner; when the air conditioner is in the on state, a control code is sent once to turn off the air conditioner; the incremental switch code, the startup code is the same as the shutdown code, when the air conditioner is in the off state, a switch code is sent once to turn on the air conditioner, and when the air conditioner is in the on state, a switch code is sent once to turn off the air conditioner; the byte or 4-bit switch code represents the startup and shutdown codes by different code values, such as 23 for startup and 20 for shutdown, sending a startup code to turn on the air conditioner, sending a shutdown code group to turn off the air conditioner; mode and shutdown combination code, mode code ± constant is the shutdown code, there are two types of 4 bits and 1 byte; wind direction and shutdown combination code, wind direction code ± constant is the shutdown code, there are two types of 4 bits and 1 byte; wind speed and shutdown combination code, wind speed code ± constant is the shutdown code, there is only one type of 4 bits; an independent shutdown code is a shutdown code that is inconsistent with other control codes, followed by the number of bytes of the independent shutdown code length and the specific independent shutdown code group.

[0021] The invention discloses a high-efficiency compression algorithm for the infrared remote control code library of the air conditioner. The mode code data stores a mode preamble, and the mode preamble stores a mode code attribute byte of 1 byte length. The upper 4 bits are the mode code flag code 2, and the lower 4 bits are equal to 0 to represent a 4-bit mode code, equal to 1 to represent a 1-bit mode code of a byte, equal to 2 to represent a 2-bit mode code of a byte, equal to 3 to represent a 3-bit mode code of a byte, equal to 5 to represent a 5-bit mode code of a byte, and equal to 6 to represent a mode and wind speed code. In the 4-bit mode code, the code representing the cooling / dehumidification mode, the air supply / heating mode, and the automatic mode are stored. The byte of the information of the mode code, mode code position, and position high and low bits. The high 4 bits of the cooling / dehumidification mode code byte = cooling mode code, and the low 4 bits = dehumidification mode code. The high 4 bits of the air supply / heating mode code byte = air supply mode code, and the low 4 bits = heating mode code. The high 4 bits of the automatic mode code byte are fixed to 0x01, and the low 4 bits = automatic mode code. The mode code position byte indicates the number of bytes of the mode code in the basic code group position. The position high and low bytes are equal to 0x01, indicating that the mode code is in the low 4 bits of the position byte, and equal to 0x10, indicating that the mode code is in the high 4 bits of the position byte.

[0022] The byte 1-bit mode code stores bytes representing the incremental mode code and the mode code position information. The mode code stored in the incremental mode code byte remains unchanged. The air conditioning mode is switched by changing the number of times the mode code is sent. The mode code position information byte indicates the number of bytes of the mode code in the basic code group position. The byte 2-bit mode code stores bytes representing the cooling / dehumidification / air supply / automatic mode code, the heating mode code, and the mode code position information. The 1-byte incremental mode code is stored in the cooling / dehumidification / air supply / automatic mode code byte. The air conditioning mode is switched by changing the number of times the 1-byte incremental mode code is sent. The air conditioner switches between cooling, dehumidification, air supply and automatic modes. The heating mode code byte stores a 1-byte incremental mode code, and the mode code position information byte indicates the number of bytes of the mode code in the basic code group position; the 3-bit mode code byte stores bytes indicating cooling / automatic mode code, dehumidification mode code, heating / air supply mode code and mode code position information; the cooling / automatic mode code byte stores a 1-byte cooling / automatic mode code, the dehumidification mode code byte stores a 1-byte dehumidification mode code, and the heating / air supply mode code byte stores a 1-byte heating / air supply mode code;

[0023] The byte of the 5-bit mode code stores bytes representing the cooling mode code, dehumidification mode code, air supply mode code, heating mode code, automatic mode code, and mode code position information; the cooling mode code byte stores 1 byte of cooling mode code, the dehumidification mode code byte stores 1 byte of dehumidification mode code, the air supply mode code byte stores 1 byte of air supply mode code, the heating mode code byte stores 1 byte of heating mode code, and the automatic mode code byte stores 1 byte of automatic mode code; the mode and wind speed code stores bytes representing the cooling mode code, dehumidification mode code, air supply mode code, heating mode code, and automatic mode code. The 4 high bits of the cooling mode code byte are the cooling wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the cooling wind speed first gear and second gear cooling mode code. The 4 high bits of the dehumidification mode code byte are fixed to 0, and the low 4 bits are the dehumidification mode code; the 4 high bits of the air supply mode code byte are fixed to 0, and the low 4 bits are the air supply mode code; the 4 high bits of the heating mode code byte are the heating wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the heating wind speed first gear and second gear cooling mode code; the 4 high bits of the automatic mode code byte are the automatic wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the automatic wind speed first gear and second gear cooling mode code.

[0024] The invention discloses a high-efficiency compression algorithm for an air conditioner infrared remote control code library. The temperature code data stores a temperature preamble, a temperature limit code, and a temperature code position byte. The temperature preamble stores a temperature code attribute of 1 byte length. The upper 4 bits are the temperature code flag code 3. The lower 4 bits are equal to 0 to represent a decimal temperature code, equal to 1 to represent a temperature increment code, equal to 2 to represent a 4-bit irregular temperature code, equal to 3 to represent a byte irregular temperature code, equal to 4 to represent a 4-bit positive and reverse temperature code, equal to 5 to represent a byte positive and reverse temperature code, equal to 6 to represent a byte multiple positive and reverse temperature code, equal to 7 to represent a high-order code plus a positive and reverse code, equal to 8 to represent a low-order code positive and reverse code, and equal to 9 to represent a wind direction and temperature code. The decimal temperature code represents a range of 16 to 30° C., and the temperature code value is consistent with the required temperature value. The temperature increment code stores bytes representing a temperature increase code and a temperature decrease code. The temperature increase code byte is a 1-byte temperature increase code, and the temperature decrease code is a 1-byte temperature decrease code. The 4-bit irregular temperature code stores It stores 16 / 17 degree temperature code, 18 / 19 degree temperature code, 20 / 21 degree temperature code, 22 / 23 degree temperature code, 24 / 25 degree temperature code, 26 / 27 degree temperature code, 28 / 29 degree temperature code, and 30 degree temperature code bytes. The high 4 bits of the 16 / 17 degree temperature code byte are the 16 degree temperature code, and the low 4 bits are the 17 degree temperature code. The high 4 bits of the 18 / 19 degree temperature code byte are the 18 degree temperature code, and the low 4 bits are the 19 degree temperature code. The high 4 bits of the 20 / 21 degree temperature code byte are the 20 degree temperature code. , the lower 4 bits are 21 degrees temperature code, the upper 4 bits of the 22 / 23 degrees temperature code byte are 22 degrees temperature code, and the lower 4 bits are 23 degrees temperature code, the upper 4 bits of the 24 / 25 degrees temperature code byte are 24 degrees temperature code, and the lower 4 bits are 25 degrees temperature code, the upper 4 bits of the 26 / 27 degrees temperature code byte are 26 degrees temperature code, and the lower 4 bits are 27 degrees temperature code, the upper 4 bits of the 28 / 29 degrees temperature code are 28 degrees temperature code, and the lower 4 bits are 29 degrees temperature code, the upper 4 bits of the 30 degrees temperature code byte are 30 degrees temperature code, and the lower 4 bits are 0;

[0025] The byte irregular temperature code stores 16 degree temperature code, 17 degree temperature code, 18 degree temperature code, 19 degree temperature code, 20 degree temperature code, 21 degree temperature code, 22 degree temperature code, 23 degree temperature code, 24 degree temperature code, 25 degree temperature code, 26 degree temperature code, 27 degree temperature code, 28 degree temperature code, 29 degree temperature code, and 30 degree temperature code bytes, and each temperature code byte stores 1 byte of temperature code; the lower 4 bits of the temperature code byte in the 4-bit positive sequence and reverse sequence temperature code are constants, and the upper 4 bits are equal to 0, indicating that the temperature code = positive sequence + constant, equal to 1, indicating that the temperature code = positive sequence - constant, equal to 4, indicating that the temperature code = reverse sequence + constant, and equal to 5, indicating that the temperature code = reverse sequence - constant; among them, the positive sequence is 0 = 16 ° C, E = 3 0℃; in reverse order, E=16℃, 0=30℃, the same below; in the byte positive order reverse order temperature code, a sign byte and a constant byte are stored, the sign byte equal to 00 means temperature code = positive order + constant, equal to 01 means temperature code = positive order - constant, equal to 04 means temperature code = reverse order + constant, equal to 05 means temperature code = reverse order - constant, and the constant byte stores the constant; in the byte multiple positive order reverse order temperature code, a multiplier byte, a sign byte and a constant byte are stored, temperature code = multiplier * positive and reverse order ± constant, a 1-byte multiplier is stored in the multiplier byte, a sign byte equal to 00 means positive order + constant, equal to 01 means positive order - constant, equal to 04 means reverse order + constant, equal to 05 means reverse order - constant, and a 1-byte constant is stored in the constant byte;

[0026] The high-order code plus the positive and reverse temperature code stores the high-order code, the operator byte, and the constant byte. The high 4 bits of the high-order code and the operator byte are the high-order code, and the low 4 bits are equal to 0 to represent the positive sequence + constant, equal to 1 to represent the positive sequence - constant, equal to 4 to represent the reverse sequence + constant, and equal to 5 to represent the reverse sequence - constant. The temperature code = the high-order code + (positive and reverse sequence ± constant), and the constant byte stores a 1-byte constant; the low-order code plus the positive and reverse temperature code stores the low-order code, the operator byte, and the constant byte. The high 4 bits of the low-order code and the operator byte are the low-order code, and the low 4 bits are equal to 0 to represent the positive sequence + constant, equal to 1 to represent the positive sequence - constant, equal to 4 to represent the reverse sequence + constant, and equal to 5 to represent the reverse sequence - constant. The temperature code = (positive and reverse sequence ± constant) + low-order code, and the constant byte stores a 1-byte constant;

[0027] The temperature code limit byte includes a temperature limit type byte and a temperature limit code byte. The upper 4 bits of the temperature limit type byte equal to 0 indicate no limit, and equal to 1 indicate limit. The lower 4 bits equal to 0 indicate dehumidification mode temperature limit, equal to 1 indicate air supply mode temperature limit, equal to 2 indicate automatic mode temperature limit, equal to 3 indicate dehumidification and air supply mode temperature limit, equal to 4 indicate dehumidification and automatic mode temperature limit, equal to 5 indicate air supply and automatic mode temperature limit, equal to 6 indicate dehumidification, air supply and automatic mode temperature limit, equal to 7 indicate automatic wind direction air supply and automatic mode temperature limit, equal to 8 indicate manual wind direction air supply and automatic mode temperature limit. The temperature limit code byte stores a 1-byte temperature limit code.

[0028] The invention discloses a high-efficiency compression algorithm for an air conditioner infrared remote control code library. The wind direction code data stores a wind direction prefix code and a wind direction code position byte. The wind direction prefix code stores a wind direction code attribute byte with a length of 1 byte. The upper 4 bits are wind direction code flag code 4. The lower 4 bits are equal to 0 to indicate no wind direction code, equal to 1 to indicate an incremental wind direction code, equal to 2 to indicate a 4-bit two-bit wind direction code, equal to 3 to indicate a 4-bit five-bit wind direction code, equal to 4 to indicate a byte two-bit wind direction code, equal to 5 to indicate a byte five-bit wind direction code, and equal to 6 to indicate an independent wind direction code. The wind direction is stored in the incremental wind direction code. Code byte, wind direction code position byte. The wind direction code byte stores a 1-byte incremental wind direction code. The wind direction code position byte stores the number of bytes of the wind direction code in the basic code group position. The 4-bit two-bit wind direction code stores the wind direction code, wind direction code position, and position high and low bytes. The high 4 bits of the wind direction code byte are the automatic wind direction code, and the low 4 bits are the manual direction code. The wind direction code position indicates the number of bytes of the wind direction code in the basic code group position. If the position high and low bytes are equal to 01, it means that the wind direction code is located in the low 4 bits of the position byte. If they are equal to 10, it means that the wind direction code is located in the high 4 bits of the position byte.

[0029] The 4-bit five-bit wind direction code stores the automatic / manual one wind direction code, manual two-three wind direction codes, manual four wind direction codes, wind direction code position, wind direction code high and low bytes. The high 4 bits of the automatic / manual one wind direction code byte are the automatic wind direction code, and the low 4 bits are the manual one wind direction code. The high 4 bits of the manual two-three wind direction code byte are the manual two wind direction code, and the low 4 bits are the manual three wind direction code. The high 4 bits of the manual four wind direction code byte are the manual four wind direction code, and the low 4 bits are 0. The wind direction code position byte stores the number of bytes of the wind direction code in the basic code group position. The high and low bytes of the position are equal to 01, indicating that the wind direction code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind direction code is in the high 4 bits of the position byte; the two-byte wind direction code stores the automatic wind direction code, manual wind direction code, and wind direction code position byte. The automatic wind direction code byte stores 1 byte of automatic wind direction code, and the manual wind direction code byte stores 1 byte of automatic wind direction code. The code byte stores a 1-byte manual wind direction code, and the wind direction code position byte stores the number of bytes of the wind direction code at the basic code group position; the byte five-bit wind direction code stores the automatic wind direction code, manual one wind direction code, manual two wind direction code, manual three wind direction code, manual four wind direction code, manual five wind direction code, and wind direction code position, which respectively store a 1-byte automatic wind direction code, manual one wind direction code, manual two wind direction code, manual three wind direction code, manual four wind direction code, manual five wind direction code, and the number of bytes of the wind direction code at the basic code group position; the independent wind direction code stores the wind direction code length, manual wind direction code byte 1, manual wind direction code byte 2, ..., manual wind direction code byte n bytes, which respectively store the number of bytes of the independent manual wind direction code length, the first byte of the independent manual wind direction code, the second byte of the independent manual wind direction code, ..., the last byte of the independent manual wind direction code, where n≥1.

[0030] The invention discloses a high-efficiency compression algorithm for the air conditioner infrared remote control code library. The wind speed code data stores a wind speed preamble and a wind speed position byte. The wind speed preamble stores a wind speed code attribute byte with a length of 1 byte. The upper 4 bits are the wind speed code flag code 5. The lower 4 bits are equal to 0 to indicate no wind speed code, equal to 1 to indicate a wind speed increment code, equal to 2 to indicate a 4-bit two-bit wind speed code, equal to 3 to indicate a byte wind speed code, equal to 4 to indicate a 4-bit wind direction wind speed code, and equal to 5 to indicate a byte wind direction wind speed code. The wind speed increment code stores a wind speed code, a dehumidification wind speed code, and a wind speed code position byte. The wind speed code stores a 1-byte increment wind speed code. The dehumidification wind speed code byte is equal to 00. The wind speed code position byte stores the wind speed code in the basic code. The number of bytes in the group position; the 4-bit wind speed code stores the automatic gear / first gear wind speed code, the second and third gear wind speed code, the dehumidification wind speed code, the wind speed code position and the position high and low bytes. The high 4 bits of the automatic gear / first gear wind speed code byte are the automatic gear wind speed code, and the low 4 bits are the first gear wind speed code. The high 4 bits of the second and third gear wind speed code byte are the second gear wind speed code, and the low 4 bits are the third gear wind speed code. The low 4 bits of the dehumidification wind speed code byte are the dehumidification wind speed code. The high 4 bits are equal to 0, indicating that there is no wind speed limit code, and equal to 1, indicating that there is a wind speed limit code. The wind speed code position byte stores the number of bytes of the wind speed code in the basic code group position. The high and low bytes of the position are equal to 01, indicating that the wind speed code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind speed code is in the high 4 bits of the position byte;

[0031] The byte wind speed code stores the automatic wind speed code, the first wind speed code, the second wind speed code, the third wind speed code, the dehumidification wind speed code, and the wind speed code position byte, respectively storing 1-byte automatic wind speed code, the first wind speed code, the second wind speed code, the third wind speed code, the no wind speed limit code or the dehumidification wind speed limit code, and the number of bytes of the wind speed code in the basic code group position; the 4-bit wind direction and speed code stores the automatic wind direction and speed code 1, the automatic wind direction and speed code 2, the manual wind direction and speed code 1, the manual wind direction and speed code 2, the dehumidification wind speed code, the wind speed code position, and the position code high and low bytes. The high 4 bits of the automatic wind direction and speed code 1 byte are Automatic gear, the lower 4 bits are the first gear, the automatic wind direction and wind speed code 2 bytes, the high 4 bits are the second gear, and the low 4 bits are the third gear, the manual wind direction and wind speed code 1, the high 4 bits are the automatic gear, and the low 4 bits are the first gear, the manual wind direction and wind speed code 2 bytes, the high 4 bits are the second gear, and the low 4 bits are the third gear, the dehumidification wind speed code byte low 4 bits are the dehumidification wind speed code, the high 4 bits are equal to 0, indicating that there is no wind speed limit code, and equal to 1, indicating that there is a wind speed limit code, the wind speed code position byte stores the number of bytes of the wind speed code in the basic code group position, the position high and low bytes are equal to 01, indicating that the wind speed code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind speed code is in the high 4 bits of the position byte;

[0032] The byte wind direction and wind speed code sequentially stores automatic wind direction and wind speed code 1, automatic wind direction and wind speed code 2, automatic wind direction and wind speed code 3, automatic wind direction and wind speed code 4, manual wind direction and wind speed code 1, manual wind direction and wind speed code 2, manual wind direction and wind speed code 3, manual wind direction and wind speed code 4, dehumidification wind speed code, and wind speed code position byte, respectively storing automatic wind direction automatic wind speed code, automatic wind direction first gear wind speed code, automatic wind direction second gear wind speed code, automatic wind direction third gear wind speed code, manual wind direction automatic wind speed code, manual wind direction first gear wind speed code, manual wind direction second gear wind speed code, manual wind direction third gear wind speed code, no wind speed limit code or dehumidification wind speed limit code, and the number of bytes of the wind speed code in the basic code group position.

[0033] The invention discloses a high-efficiency compression algorithm for an infrared remote control code library for an air conditioner. The function conversion code data stores a function conversion preamble and a function conversion code position byte. The function conversion preamble stores a function code attribute byte with a length of 1 byte, wherein the upper 4 bits are a conversion flag code 6, and the lower 4 bits are equal to 0 to indicate no function conversion code, equal to 1 to indicate a 4-bit function conversion code, equal to 2 to indicate a byte function conversion code, and equal to 3 to indicate a mode and function conversion code. The 4-bit function conversion code stores a function conversion code type, a power-on / off code, a mode conversion code, a temperature conversion code, a wind direction conversion code, a wind speed conversion code 1, a wind speed conversion code 2, a function code position and position high and low bytes. Bit7=0 of the function conversion code type byte indicates no power-on / off conversion, and Bit7=1 indicates power-on / off conversion. Bit6=0 indicates no mode conversion, and Bit6=1 indicates mode conversion. Bit5=0 indicates no temperature conversion, and Bit5=1 indicates There is temperature conversion; Bit4 = 0 means no wind direction conversion, Bit4 = 1 means there is wind direction conversion; Bit3 = 0 means no wind speed conversion, Bit3 = 1 means there is wind speed conversion, Bit2 to Bit0 are undefined, and the default is 0; the high 4 bits of the switch code byte are the opening code, and the low 4 bits are the closing code; the high 4 bits of the mode conversion code byte are the mode conversion code, and the low 4 bits are the automatic mode code, the high 4 bits of the temperature conversion code byte are the temperature increase code, and the low 4 bits are the temperature decrease code; the high 4 bits of the wind direction conversion code are the automatic wind direction code, and the low 4 bits are the manual wind direction code; the high 4 bits of wind speed conversion code 1 are the automatic gear code, and the low 4 bits are the first gear code; the high 4 bits of wind speed conversion code 2 are the second gear code, and the low 4 bits are the third gear code; the function code position stores the number of bytes of the function conversion code in the basic code group position, and the position high and low bytes are equal to 01, indicating that the function conversion code is in the low 4 bits of the position byte, and equal to 10, indicating that the function conversion code is in the high 4 bits of the position byte;

[0034] The byte function conversion code stores the function conversion code type, power on / off code, mode conversion code, temperature conversion code 1, temperature conversion code 2, wind direction conversion code, wind speed conversion code, and function code position byte; Bit7=0 of the function conversion code type byte indicates no power on / off conversion, Bit7=1 indicates power on / off conversion; Bit6=0 indicates no mode conversion, Bit6=1 indicates mode conversion; Bit5=0 indicates no temperature conversion, Bit5=1 indicates temperature conversion; Bit4=0 indicates no wind direction conversion, Bit4=1 indicates wind direction conversion; Bit3=0 indicates no wind speed conversion, Bit3=1 indicates wind speed conversion; Bit2 to Bit4=0 indicates no wind direction conversion, Bit4=1 indicates wind direction conversion; Bit3=0 indicates no wind speed conversion, Bit3=1 indicates wind speed conversion; Bit2 to Bit4=1 indicates no wind direction conversion, Bit3=1 indicates wind speed conversion; Bit2 to Bit4=0 indicates no wind direction conversion, Bit3=1 indicates wind speed conversion; Bit3=0 indicates no wind speed ...1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3=1 indicates wind speed conversion, Bit3 t0 is undefined and defaults to 0; the power on / off code, mode conversion code, temperature conversion code 1, temperature conversion code 2, wind direction conversion code, wind speed conversion code, and function code position byte respectively store the number of bytes of the power on / off code, mode conversion code, temperature increase code, temperature decrease code, manual wind direction code, wind speed conversion code, and function conversion code in the basic code group position; 5 function conversion code bytes and one function code position byte are stored in the mode and function conversion code, and the 5 function conversion code bytes respectively store 1 byte of the cooling mode code, the dehumidification mode code, the air supply mode code, the heating mode code, and the automatic mode code, and the function code position byte stores the number of bytes of the function conversion code in the basic code group position;

[0035] The high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention stores a check code data including a check code preamble and a check code position byte, and stores a check code attribute byte with a length of 1 byte in the check code preamble, wherein the upper 4 bits are the check code flag code 7, and the lower 4 bits are equal to 0 to indicate no check code, equal to 1 to indicate a 4-bit addition check code, equal to 2 to indicate a byte addition check code, equal to 3 to indicate a 4-bit addition ± constant check code, equal to 4 to indicate a byte addition ± constant check code, and equal to 5 to indicate a constant -4 bits. The addition check code is equal to 6, which means the constant-byte addition check code. It is equal to 7, which means the 4-bit XOR operation check code. It is equal to 8, which means the byte XOR operation check code. The 4-bit addition operation check code stores the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the Nth addend address, the high and low bits of the Nth addend, the number of check code bits, the position of the check code and the high and low bytes of the position. The number of addition operation bytes stores the number of addends involved in the addition operation. The first addend address byte Indicates the number of bytes of the first addend in the code group. The high and low bytes of the first addend are equal to 01, which means that the lower 4 bits of the data in the address are taken as the addend, and equal to 10, which means that the upper 4 bits of the data in the address are taken as the addend. The second addend address byte indicates the number of bytes of the second addend in the code group. The high and low bytes of the second addend are equal to 01, which means that the lower 4 bits of the data in the address are taken as the addend, and equal to 10, which means that the upper 4 bits of the data in the address are taken as the addend, ..., the Nth addend address byte indicates the number of bytes of the Nth addend in the code group. The high and low byte equal to 01 means that the low 4 bits of the data in the address are taken as the addend, and equal to 10 means that the high 4 bits of the data in the address are taken as the addend, check code = addend 1 + addend 2 + ... + addend N, the check code bit byte equal to 0F means that the operation result takes the low 4 bits, and equal to FF means that the operation result takes the low 8 bits, the check code position byte stores the number of bytes where the check code is located in the basic code group position, the high and low byte of the position equal to 01 means that the check code is in the low 4 bits of the position byte, and equal to 10 means that the check code is in the high 4 bits of the position byte;

[0036] The byte addition operation check code byte stores the number of addition operations, the first addend address, the second addend address, ..., the N1th addend address, and the check code position byte, respectively storing the number of addends involved in the addition operation, the number of bytes of the first addend located in the code group, the number of bytes of the second addend located in the code group, ..., the number of bytes of the N1th addend located in the code group, and the number of bytes of the check code located in the basic code group, check code = addend 1 + addend 2 + ... + addend N1;

[0037] The 4-bit addition ± constant check code stores the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the N2 addend address, the high and low bits of the N2 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position; the constant operation symbol byte equal to 00 represents addition operation, and equal to 11 represents subtraction operation, the constant byte stores a 1-byte constant, and the check code = (addend 1 + addend 2 + ... + addend N2) ± constant;

[0038] The number of addition operations, the first addend address, the second addend address, ..., the N3 addend address, the constant operation symbol, the constant, and the check code position byte are stored in the byte addition ± constant check code, and the check code = (addend 1 + addend 2 + ... + addend N3) ± constant; the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the N4 addend address, the high and low bits of the N4 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position are stored in the constant ± 4Bit addition check code, and the check code = constant ± (addend 1 + addend 2 + ... + addend N4); the number of addition operations, the first addend address, the second addend address, ..., the N4 addend address, the high and low bits of the N4 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position are stored in the constant ± byte addition check code. N5 addend address, constant operation symbol, constant, check code position byte, check code = constant ± (addend 1 + addend 2 + ... + addend N5); the number of XOR operations, the first XOR address, the high and low bits of the first XOR, the second XOR address, the high and low bits of the second XOR, ..., the N6th XOR address, the high and low bits of the N6th XOR, the number of check code bits, the check code position and the high and low position bytes are stored in the 4-bit XOR operation check code, and the check code = XOR number 1 ⊕ XOR number 2 ⊕ ... ⊕ XOR number N6, "⊕" represents XOR operation; the number of XOR operations, the first XOR address, the second XOR address, ..., the N7th XOR address, the check code position are stored in the byte XOR operation check code, and the check code = XOR number 1 ⊕ XOR number 2 ⊕ ... ⊕ XOR number N7.

[0039] The invention discloses a high-efficiency compression algorithm for the air conditioner infrared remote control code library. The inverse code data stores an inverse code preamble, and the inverse code preamble stores an inverse code attribute byte with a length of 1 byte. The upper 4 bits are the inverse code flag code 8, and the lower 4 bits are equal to 0 to indicate no inverse code, equal to 1 to indicate immediately following inverse code, and equal to 2 to indicate interval inverse code. The immediately following inverse code stores immediately following inverse code bytes, and Bit7=0 of immediately following inverse code bytes indicates that the switch code does not have an inverse code, and Bit7=1 indicates that the switch code has an inverse code, Bit6=0 indicates that the mode code does not have an inverse code, and Bit6=1 indicates that the mode code has an inverse code, and Bit5= 0 indicates that the temperature code does not have an inverse code, Bit5=1 indicates that the temperature code has an inverse code, Bit4=0 indicates that the wind direction code does not have an inverse code, Bit4=1 indicates that the wind direction code has an inverse code, Bit3=0 indicates that the wind speed code does not have an inverse code, Bit3=1 indicates that the wind speed code has an inverse code, Bit2=0 indicates that the conversion code does not have an inverse code, Bit2=1 indicates that the conversion code has an inverse code, Bit1 and Bit0 are undefined and default to 0; the interval inverse code stores the starting address of the code group to be reversed and the number of bytes of the code group to be reversed, respectively storing the starting byte number of the code group to be reversed in the control code group and the number of reversed code groups;

[0040] The repetition code data stores a repetition code prefix, and the repetition code prefix stores a repetition code attribute byte of 1 byte length, wherein the upper 4 bits are the repetition code flag code 9, and the lower 4 bits are equal to 0 to indicate no repetition code, equal to 1 to indicate immediately following repetition code, and equal to 2 to indicate interval repetition code; immediately following repetition code stores immediately following repetition code bytes, and Bit7=0 of immediately following repetition code bytes indicates that the switch code does not have a repetition code, and Bit7=1 indicates that the switch code has a repetition code; Bit6=0 indicates that the mode code does not have a repetition code, and Bit6=1 indicates that the mode code has a repetition code; Bit5=0 indicates that the temperature code does not have a repetition code. Complex code, Bit5=1 indicates that the temperature code has a repetitive code; Bit4=0 indicates that the wind direction code does not have a repetitive code, and Bit4=1 indicates that the wind direction code has a repetitive code; Bit3=0 indicates that the wind speed code does not have a repetitive code, and Bit3=1 indicates that the wind speed code has a repetitive code; Bit2=0 indicates that the conversion code does not have a repetitive code, and Bit2=1 indicates that the conversion code has a repetitive code; Bit1 and Bit0 are undefined and default to 0; the interval repetitive code stores the starting address of the code group to be repeated and the number of bytes of the code group to be repeated, which respectively store the starting byte number of the code group to be repeated in the basic code group and the number of code groups to be repeated.

[0041] The invention discloses a high-efficiency compression algorithm for an air conditioner infrared remote control code library, wherein the waveform region stores waveform region length, carrier frequency, modulation mode and bit order, total number of infrared code bits, number of guide codes, first guide code pulse width, second guide code pulse width, third guide code pulse width, fourth guide code pulse width, data 0 code low level pulse width, data 0 code high level pulse width, data 1 code low level pulse width, data 1 code high level pulse width, interval code format, first interval code pulse width, second interval code pulse width, third interval code pulse width, fourth interval code pulse width, first interval code position, second interval code position, third interval code position, fourth interval code position, cyclic code format, cyclic pattern, incomplete byte format, first incomplete byte position, first incomplete byte bit position, second incomplete byte position, second incomplete byte bit position, third incomplete byte position, third incomplete byte bit position, end bit format, end code first pulse width, end code second pulse width, end code third pulse width byte;

[0042] The waveform area length byte stores the total number of bytes in the entire waveform area, the carrier frequency byte stores the infrared transmission carrier frequency value, the high 4 bits of the modulation mode and bit order byte are equal to 0 to indicate that the modulation mode is PPM, equal to 1 to indicate that the modulation mode is PWM, the low 4 bits are equal to 0 to indicate that the low bit is in the front, and equal to 1 to indicate that the high bit is in the front; the total number of digits of the infrared code is 2 bytes, and the total number of digits of the infrared code after restoration is stored; the number of guide code bytes is equal to 00 to indicate no guide code, equal to 01 to indicate with 1-bit guide code, equal to 02 to indicate with 2-bit guide code, equal to 03 to indicate with 3-bit guide code, and equal to 04 to indicate with 4-bit guide code; the pulse width of the first guide code is a low level of 2 bytes, the pulse width of the second guide code is a high level of 2 bytes, and the pulse width of the third guide code is 0. The pulse width of the boot code is a 2-byte low level, and the pulse width of the fourth boot code is a 2-byte high level; the low level of data 0 code, the high level of data 0 code and the low level of data 1 code are all 1-byte pulse width values, and the high level of data 1 code is a 2-byte pulse width value; Bit7=0 of the interval code format byte indicates no interval code, Bit7=1 indicates interval code; Bit6=0 indicates byte interval, Bit6=1 indicates frame interval; Bit5-Bit4=00 indicates 1-bit interval code, Bit5-Bit4=01 indicates 2-bit interval code, Bit5-Bit4=10 indicates 3-bit interval code, Bit5-Bit4=11 indicates 4-bit interval code; Bit3-B The value of it0 is the number of interval codes; the first interval code pulse width, the second interval code pulse width, the third interval code pulse width and the fourth interval code pulse width are all two bytes; Bit7=0 of the first interval code position byte, the second interval code position byte, the third interval code position byte and the fourth interval code position byte indicates that there is no guide code behind it, and Bit7=1 indicates that there is a guide code behind it, and Bit6-bit0 stores the position of the interval code; Bit7=0 of the cyclic code format byte indicates only interval without cycle, Bit7=1 indicates cycle, Bit6-bit4=000 indicates the same cycle frame by frame, Bit6-bit4=001 indicates different cycle frame by frame, and ... indicates different cycle it4=010 indicates inter-frame loop, Bit6-bit4=011 indicates local loop, and the value of Bit3-Bit0 is the total number of frames; the loop pattern includes different loop bytes frame by frame, inter-frame loop bytes, and local loop bytes; Bit7-bit4 of the different loop bytes frame by frame stores the number of frames with the same loop in the previous data, and Bit3-bit0 stores the number of frames with the same loop in the subsequent data; Bit7-bit4 of the inter-frame loop bytes stores the number of frames to be looped, and Bit3-bit0 stores the number of frames to be looped, and Bit7-bit4 of the local loop bytes stores the same number of frames before the intermediate interval, and Bit3-bit0 stores the same number of frames after the intermediate interval;The incomplete byte format byte Bit7 = 0 indicates no incomplete byte, Bit7 = 1 indicates an incomplete byte, Bit6-bit0 stores the number of incomplete bytes, and the incomplete byte position indicates the number of bytes of each incomplete byte in the infrared code group; the bit position of the incomplete byte indicates the number of valid bits of each incomplete byte, and the data ranges from 1 to 7; the end bit format byte equal to 00 indicates no end code, equal to 01 indicates a 1-bit end code, equal to 02 indicates a 2-bit end code, and equal to 03 indicates a 3-bit end code; the end code pulse width uses 2 bytes to represent the pulse width values ​​of 1 to 3 end codes. ;

[0043] The beneficial effects of the present invention are as follows: the high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention divides the infrared code into two parts: the coding area and the waveform area. The coding area is responsible for restoring the control code group under the required state and temperature, by storing an infrared code of a selected state as the basic code group, and storing the operation rules of various control codes and the positions in the basic code group. For other required states and temperatures, new control codes are obtained by operation of the control code rules, and the control codes at the corresponding positions in the basic code group are replaced to obtain control code groups under other states and temperatures. The waveform area is responsible for restoring the control code group to the infrared code waveform, by encoding waveform parameters such as the carrier frequency, modulation mode, bit order, number and pulse width value of the guide code, data code, interval code and end code discarded in the infrared coding analysis, the cyclic code rule, the incomplete byte rule, etc., and adding the corresponding byte length information, arranging them according to a certain rule, and describing the waveform of this protocol format in detail. The control code group obtained by the operation in the coding area can be restored to the infrared code group without distortion after the operation in the waveform area. Finally, according to the carrier frequency value in the waveform area, the infrared code group modulates the carrier frequency to obtain the infrared code waveform, and the infrared signal is emitted through the infrared transmitter to achieve the corresponding control of the air conditioner. By combining the remote control codes of various types of air conditioners together, an "infrared code library" can be established to achieve the purpose of remotely controlling various types of air conditioners from different air conditioner manufacturers, providing conditions for remote control of various types of air conditioners by smart control systems such as smart homes, smart hotels and the Internet of Things.

[0044] The advantages of the high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention are as follows:

[0045] ①. High compression rate, 1,000 common air conditioner infrared codes can be compressed into 32KB storage space, with small data volume. It brings convenience to the storage and transmission of the code library, and creates conditions for the embedded code library of the intelligent air conditioner controller;

[0046] ②Easy to decode, each partition has a code group length and a flag character, which is easy to identify during decoding without error;

[0047] ③. Strong adaptability, able to adapt to 1,000 common air-conditioning infrared codes;

[0048] ④. Strong scalability. For new code groups that are not included in the coding rules, you only need to add them to the coding rules according to the new code group rules and upgrade the decoding program to adapt to various infrared codes;

[0049] ⑤. Good versatility. It can be used not only in single-chip microcomputer control systems, but also in smart phones, PADs and other systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of the first half of the air conditioning code in the Mitsubishi Heavy Industries (09NV) protocol format;

[0051] Figure 2 This is a diagram of the second half of the air conditioner code in the Mitsubishi Heavy Industries (09NV) protocol format. DETAILED DESCRIPTION

[0052] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0053] Through the analysis of 2000 commonly used air conditioner infrared codes, the following rules can be drawn:

[0054] ①. The modulation method of air conditioner remote control code is the same as that of TV remote control, which is mainly pulse width modulation (PWM) and pulse position modulation (PPM). It’s just that the pulse width values ​​are different in various protocol formats;

[0055] ②. The air conditioner remote control code mainly consists of three parts: guide code, data code and end code. The data code generally includes user code, key code and check code. For the same coding protocol, the user code is the same in all states of the code group. The key code also contains information such as power on / off, mode, temperature, wind direction, wind speed, etc. The key code and check code change with the control state and temperature;

[0056] ③. Although there are many infrared codes for different models of air conditioners from different manufacturers, the number of protocol formats used is limited. There are only more than 150 protocol formats among 2,000 infrared codes. The so-called protocol format is a type of infrared code that uses the same modulation method, pulse width, key code position, check code algorithm, and only has different user codes. The infrared code protocol format will be displayed in the "Infrared Remote Control Code Analyzer". For the same protocol format, the same compression and decoding methods can be used.

[0057] In order to realize the universalization of various air-conditioning controls, the universal parts of air-conditioning controls are extracted, and the personalized controls of each manufacturer, such as health, lighting, timing and energy saving, are discarded and treated as user codes. Universal controls include: power on / off, mode (limited to five types: cooling, dehumidification, air supply, heating and automatic), temperature (limited to 16-30℃), wind direction (limited to five types: automatic wind direction and manual position 1, 2, 3 and 4), wind speed (limited to automatic gear and four gears: 1, 2 and 3). Through these conditional limitations and unifications, the number of control states is greatly simplified while meeting various application scenarios, creating conditions for compressing the code base.

[0058] The core of the compression algorithm of the present invention is to divide a format of infrared code into two parts: a coding area and a waveform area. The coding area is responsible for restoring the control code group under the required state and temperature, while the waveform area is responsible for restoring the control code group into an infrared code waveform.

[0059] The coding area first stores the infrared code of a state, such as the power-on code of refrigeration 16℃, automatic wind direction, and automatic wind speed as the basic code group. If there are cyclic codes, only one of them is selected as the basic code group. At the same time, the control codes analyzed by the infrared remote control code analyzer, such as power on / off, mode, temperature, wind direction, wind speed, state conversion, check bit, reverse code and repetitive code rules, as well as the position of these control codes in the basic code group, are converted into corresponding codes and calculation formulas and followed by the basic code group.

[0060] During decoding, for other required states and temperatures, you only need to substitute them into the coding and calculation formulas behind the basic code group to calculate the control code for the required state and temperature. Then, these control code groups are replaced with the control codes at the corresponding positions in the basic code group according to their respective positions in the basic code group, and the control code group at the required state or temperature is obtained. The unchanged part of the basic code group can be regarded as the user code.

[0061] The waveform area is arranged behind the coding area, and converts the carrier frequency, modulation mode, bit order, number and pulse width of the guide code, pulse width of the data code 0 and 1, number and pulse width and position of the interval code, number and format of the cyclic code, number and pulse width of the end code and other information into corresponding codes and data.

[0062] During decoding, the restored control code group is added with the required cycles according to the cyclic code rules in the waveform area to obtain a complete control code group. Then the control code group is inserted between the guide code and the end code. If there is an interval code, insert the interval code at the interval code position. In the third step, substitute the pulse width values ​​of the guide code, data code 0 and 1, interval code, and end code into the control code group to restore the infrared code waveform. Finally, according to the carrier frequency value in the waveform area, the infrared code waveform is amplitude modulated on the carrier frequency and sent to the infrared transmitter for transmission, thus completing the entire decoding process.

[0063] The compression code group includes two parts: coding area coding and waveform area coding. The composition and function are shown in Table 1:

[0064] Table 1

[0065]

[0066] The coding area consists of 10 partitions: basic code group partition, switch code partition, mode code partition, temperature code partition, wind direction code partition, wind speed code partition, function conversion code partition, reverse code area and repeat code group partition. As shown in Table 2, the components and meanings of the coding area are given, where the address is the position of each control code in the entire coding area, in bytes.

[0067] Table 2

[0068]

[0069]

[0070] The switch codes are mainly of the following types:

[0071] ①. An independent shutdown code that is inconsistent with other control codes;

[0072] ②, Status switch code, there is no shutdown code, the current status control code is used. When the air conditioner is in the off state, send a control code once to turn on the air conditioner; when the air conditioner is in the on state, send a control code once to turn off the air conditioner;

[0073] ③. Incremental power on / off code, the power on code is the same as the power off code. When the air conditioner is in the off state, send the power on code once to turn on the air conditioner; when the air conditioner is in the on state, send the power on code once to turn off the air conditioner;

[0074] ④, 1 byte or 4-bit power on / off code, different code values ​​are used to represent the power on and power off codes, such as 23 for power on and 20 for power off. Send the power on code to turn on the air conditioner. Send the power off code group to turn off the air conditioner;

[0075] ⑤, Mode and shutdown combination code, mode code ± constant is shutdown code. There are two types: 4bit and 1 byte;

[0076] ⑥. Wind direction and shutdown combination code, wind direction code ± constant is shutdown code. There are two types: 4bit and 1 byte;

[0077] ⑦. Wind speed and shutdown combination code, wind speed code ± constant is the shutdown code. There is only one type of 4 bits.

[0078] The switch partition coding rules are as follows. For the convenience of description, the addresses all start from 1, the same below.

[0079] Table 3 gives the power on / off preamble code partitioning and coding rules:

[0080] Table 3

[0081]

[0082]

[0083] Table 4 gives the incremental switch code encoding rules:

[0084] Table 4

[0085] address Function Detailed description of data Remark 3 Switch code 1 byte switch code The power on and off codes are the same 4 Switch code position The number of bytes where the switch code is in the basic code group position

[0086] Table 5 gives the 4-bit switch code encoding rules:

[0087] Table 5

[0088]

[0089] Table 6 gives the byte switch code encoding rules:

[0090] Table 6

[0091] address Function Detailed description of data Remark 3 Boot code 1 byte boot code 4 Shutdown code 1 byte shutdown code 5 Switch code position The number of bytes where the switch code is in the basic code group position

[0092] Table 7 gives the 4-bit mode and close code encoding rules:

[0093] Table 7

[0094] address Function Detailed description of data Remark 3 Shutdown code High 4 bits = sign, 0 for addition, 1 for subtraction; low 4 bits = constant Shutdown code = mode ± constant 4 Switch code position The number of bytes where the switch code is in the basic code group position 5 Position High Low 0x01: lower 4 bits, 0x10: upper 4 bits

[0095] Table 8 gives the byte mode and close code encoding rules:

[0096] Table 8

[0097] address Function Detailed description of data Remark 3 symbol 0x00 = add, 0x11 = subtract 4 constant 1-byte constant, add 0 in front if it is less than 1 byte Shutdown code = mode ± constant 5 Switch code position The number of bytes where the switch code is in the basic code group position

[0098] Table 9 gives the 4-bit wind direction and close code encoding rules:

[0099] Table 9

[0100]

[0101]

[0102] Table 10 gives the byte direction and close code encoding rules:

[0103] Table 10

[0104] address Function Detailed description of data Remark 3 symbol 0x00 = add, 0x11 = subtract 4 constant 1-byte constant, add 0 in front if it is less than 1 byte Shutdown code = wind direction ± constant 5 Switch code position The number of bytes where the switch code is in the basic code group position

[0105] Table 11 gives the 4-bit wind speed and shutdown code encoding rules:

[0106] Table 11

[0107] address Function Detailed description of data Remark 3 Shutdown code High 4 bits = sign, 0 for addition, 1 for subtraction; low 4 bits = constant Shutdown code = wind direction ± constant 4 Switch code position The number of bytes where the switch code is in the basic code group position 5 Switch code high and low 0x01: lower 4 bits, 0x10: upper 4 bits

[0108] Table 12 gives the byte wind speed and close code encoding rules:

[0109] Table 12

[0110] address Function Detailed description of data Remark 3 symbol 0x00 = add, 0x11 = subtract 4 constant 1-byte constant, add 0 in front if it is less than 1 byte Shutdown code = wind direction ± constant 5 Switch code position The number of bytes where the switch code is in the basic code group position

[0111] Table 13 gives the independent shutdown code encoding rules:

[0112] Table 13

[0113] address Function Detailed description of data Remark 3 Shutdown code length The length of the independent shutdown code is N bytes. 4 Shutdown code byte 1 Independent shutdown code first byte 4+N Shutdown code byte N The last byte of the independent shutdown code

[0114] There are two main types of pattern codes:

[0115] ①, 4-bit or 1-byte mode code, using different code values ​​to represent different modes, including 1 to 5-bit mode codes; ②, mode and wind speed combination code.

[0116] Table 14 gives the pattern code partition encoding rules:

[0117] Table 14

[0118]

[0119]

[0120] Table 15 gives the 4-bit mode code encoding rules:

[0121] Table 15

[0122] address Function Detailed description of data Remark 3 Cooling / Dehumidification mode code High 4 bits = cooling mode code; low 4 bits = dehumidification mode code 4 Air supply / heating mode code High 4 bits = air supply mode code; low 4 bits = heating mode code 5 Automatic mode code The upper 4 bits are fixed at 0x01; the lower 4 bits = automatic mode code 6 Mode code position The number of bytes where the mode code is in the basic code group position 7 Position High Low 0x01: lower 4 bits, 0x10: upper 4 bits

[0123] Table 16 gives the byte 1 bit pattern code encoding rules:

[0124] Table 16

[0125] address Function Detailed description of data Remark 3 Incremental Mode Code 1 byte incremental mode code 4 Mode code position The number of bytes where the mode code is in the basic code group position

[0126] Table 17 gives the byte 2 bit pattern code encoding rules:

[0127] Table 17

[0128] address Function Detailed description of data Remark 3 Cooling / Dehumidification / Air Supply / Auto Mode Code 1 byte incremental mode code 4 Heating mode code 1 byte incremental mode code 5 Mode code position The number of bytes where the mode code is in the basic code group position

[0129] Table 18 gives the byte 3 bit pattern code encoding rules:

[0130] Table 18

[0131] address Function Detailed description of data Remark 3 Cooling / Auto mode code 1 byte cooling / automatic mode code 4 Dehumidification mode code 1 byte dehumidification mode code 5 Heating / air supply mode code 1 byte heating / air supply mode code 6 Mode code position The number of bytes where the pattern code is in the basic code group position

[0132] Table 19 gives the byte 5-bit mode code encoding rules:

[0133] Table 19

[0134]

[0135] Table 20 gives the encoding rules for mode and wind speed code:

[0136] Table 20

[0137]

[0138] The temperature code includes three parts: temperature value calculation, temperature value limit and temperature position. The temperature value calculation includes:

[0139] ①, Decimal temperature code, temperature code = temperature value, such as 26 degrees, temperature code = 26, decimal number, 1 byte;

[0140] ② Temperature increment code, there is no specific temperature value, only two codes: temperature increase and temperature decrease, mainly used in switch increment code mode;

[0141] ③, 4-bit and 1-byte temperature code, different code values ​​represent different temperatures, and the temperature code is calculated according to the formula;

[0142] ④. Temperature and wind direction combination code: the temperature code for the same temperature value in automatic wind direction and manual wind direction is different;

[0143] ⑤. There is no regular temperature code. There is no corresponding relationship between the temperature code and the temperature value, so they need to be listed separately.

[0144] The coding rules and calculation formulas for temperature partitions are as follows:

[0145] Table 21 gives the temperature zone coding rules:

[0146] Table 21

[0147]

[0148]

[0149] Table 22 gives the decimal temperature code encoding rules:

[0150] Table 22

[0151] address Function Detailed description of data Remark 3 Required temperature value 16-30, the value is consistent with the required temperature value Decimal

[0152] Table 23 gives the temperature increment code encoding rules:

[0153] Table 23

[0154] address Function Detailed description of data Remark 3 Temperature increase code 1 byte temperature increase code 4 Temperature reduction code 1 byte temperature reduction code

[0155] Table 24 gives the 4-bit irregular temperature code encoding rules:

[0156] Table 24

[0157]

[0158] Table 25 gives the byte irregular temperature code encoding rules:

[0159] Table 25

[0160]

[0161]

[0162] Table 26 gives the 4-bit positive and reverse temperature code encoding rules:

[0163] Table 26

[0164]

[0165] Table 27 gives the byte positive and reverse temperature code encoding rules:

[0166] Table 27

[0167]

[0168] Table 28 gives the byte multiple positive and reverse temperature code encoding rules:

[0169] Table 28

[0170]

[0171] Table 29 gives the high-order code plus positive and reverse temperature code encoding rules:

[0172] Table 29

[0173]

[0174] Table 30 gives the encoding rules of low-order code plus positive and reverse temperature code:

[0175] Table 30

[0176]

[0177] Table 31 gives the temperature code restriction encoding rules:

[0178] Table 31

[0179]

[0180]

[0181] Table 32 gives the 4-bit temperature code position encoding rules:

[0182] Table 32

[0183] address Function Detailed description of data Remark X+3 Temperature code position The number of bytes where the temperature code is in the basic code group position X+4 Position High Low 0x01: lower 4 bits, 0x10: upper 4 bits

[0184] Table 33 gives the 1-byte temperature code position encoding rules:

[0185] Table 33

[0186] address Function Detailed description of data Remark X+3 Temperature code position The number of bytes where the temperature code is located in the basic code group

[0187] There are two main types of wind direction: automatic wind direction and manual wind direction. Manual wind direction is divided into positions one, two, three, and four. There are mainly the following types of wind direction codes:

[0188] ①, without wind direction code;

[0189] ②, Wind direction incremental code, automatic wind direction and manual wind direction have the same code, and switch between the two when the button is pressed. Mainly used in the switch incremental code format;

[0190] ③, 4-bit or 1-byte wind direction code, with different code values ​​representing different wind directions;

[0191] ④. Wind direction and closing combination code, including 1-byte and 4-bit types;

[0192] ⑤. Wind direction and temperature combination code, 1 byte;

[0193] ⑥. Wind direction and wind speed combination code, including 1-byte and 4-bit types;

[0194] ⑦. Wind direction and function conversion code, including 1-byte and 4-bit types;

[0195] ⑧. Different from the control code group, an independent wind direction code.

[0196] The coding rules for wind direction code partitions are as follows:

[0197] Table 34 gives the wind preamble coding rules:

[0198] Table 34

[0199]

[0200]

[0201] Table 35 gives the incremental wind direction code encoding rules:

[0202] Table 35

[0203] address Function Detailed description of data Remark 3 Wind direction code 1-byte incremental wind direction code 4 Wind direction code position The number of bytes of the wind direction code in the basic code group position

[0204] Table 36 gives the 4-bit two-bit wind direction code encoding rules:

[0205] Table 36

[0206] address Function Detailed description of data Remark 3 Wind direction code High 4 bits: automatic wind direction code; low 4 bits: manual wind direction code 4 Wind direction code position The number of bytes of the wind direction code in the basic code group position 5 Position High Low 0x01: lower 4 bits, 0x10: upper 4 bits

[0207] Table 37 gives the 4-bit five-digit wind direction code encoding rules:

[0208] Table 37

[0209]

[0210] Table 38 gives the encoding rules of the two-byte wind direction code:

[0211] Table 38

[0212]

[0213] Table 39 gives the encoding rules of the five-bit wind direction code:

[0214] Table 39

[0215]

[0216]

[0217] Table 40 gives the independent wind direction code encoding rules:

[0218] Table 40

[0219] address Function Detailed description of data Remark 3 Wind direction code length The number of bytes of the independent manual wind direction code length, assumed to be N bytes 4 Manual wind direction code byte 1 Independent manual wind direction code first byte 4+N Manual wind direction code byte N The last byte of the independent manual wind direction code

[0220] In automatic wind direction and manual wind direction, the wind speed mainly has four gears: automatic gear and first, second, and third gear. There are mainly the following types of wind speed codes:

[0221] ①. Wind speed incremental code, the wind speed code of each gear is the same, and it switches between gears when the button is pressed. It is mainly used in the switch incremental code format;

[0222] ②, 4-bit or 1-byte wind speed code, using different code groups to represent different wind speeds;

[0223] ③. Wind direction and wind speed combination code, divided into 1 byte and 4 bits;

[0224] ④. Wind speed and shutdown combination code, 4 bits.

[0225] The wind speed code partition coding rules are as follows:

[0226] Table 41 gives the wind speed preamble encoding rules:

[0227] Table 41

[0228]

[0229] Table 42 gives the wind speed increment code encoding rules:

[0230] Table 42

[0231]

[0232] Table 43 gives the 4-bit wind speed code encoding rules:

[0233] Table 43

[0234]

[0235]

[0236] Table 44 gives the byte wind speed code encoding rules:

[0237] Table 44

[0238]

[0239] Table 45 gives the 4-bit wind direction and wind speed code encoding rules:

[0240] Table 45

[0241]

[0242] Table 46 gives the encoding rules of byte wind direction and wind speed code:

[0243] Table 46

[0244]

[0245] Some infrared codes have function conversion codes. When the mode, temperature, wind direction or wind speed changes, some bytes or 4 bits will change accordingly. This is the function conversion code, which has the following types:

[0246] ①, 1 byte or 4-bit function conversion code, different code values ​​represent different function changes;

[0247] ②, mode and function conversion combination code, mode ± constant is the function conversion code;

[0248] ③. Wind direction and function conversion combination code;

[0249] ④. Wind speed and function conversion combination code;

[0250] The function conversion code partition coding rules are as follows:

[0251] Table 47 gives the function conversion prefix encoding rules:

[0252] Table 47

[0253]

[0254] Table 48 gives the 4-bit function conversion code encoding rules:

[0255] Table 48

[0256]

[0257] Table 49 gives the byte function conversion code encoding rules:

[0258] Table 49

[0259]

[0260]

[0261] Table 50 gives the encoding rules for mode and function conversion codes:

[0262] Table 50

[0263] address Function Detailed description of data Remark 3 Function conversion code 1 1 byte to cool mode code 4 Function conversion code 2 1 byte to dehumidification mode code 5 Function conversion code 3 1 byte transfer wind mode code 6 Function conversion code 4 1 byte converted thermal mode code 7 Function conversion code 5 1 byte to automatic mode code 8 Function code location The number of bytes where the function conversion code is located in the basic code group position

[0264] Some infrared codes have check codes. Check code operations mainly include two types: cumulative sum and XOR operations. The check code partition coding rules and operation formulas are as follows:

[0265] Table 51 gives the verification prefix encoding rules:

[0266] Table 51

[0267]

[0268]

[0269] Table 52 gives the 4-bit addition check code encoding rules:

[0270] Table 52

[0271]

[0272] Table 53 gives the byte addition check code encoding rules:

[0273] Table 53

[0274]

[0275] Table 54 gives the 4-bit addition ± constant check code encoding rules:

[0276] Table 54

[0277]

[0278]

[0279] Table 55 gives the byte addition ± constant check code encoding rules:

[0280] Table 55

[0281]

[0282] Table 56 gives the constant ±4-bit addition check code partition encoding rules:

[0283] Table 56

[0284]

[0285]

[0286] Table 57 gives the constant ± byte addition check code encoding rules:

[0287] Table 57

[0288]

[0289] Table 58 gives the 4-bit XOR check code encoding rules:

[0290] Table 58

[0291]

[0292] Table 59 gives the encoding rules of the byte XOR check code:

[0293] Table 59

[0294]

[0295]

[0296] Table 59

[0297] Some infrared codes have inverse codes, which are the opposite of the above control codes and change synchronously with the control codes. They must be marked in the coding area. There are two main types of inverse codes: one that follows the control code and one that has a certain interval between the control code and the control code.

[0298] The encoding rules for the reverse code partition are as follows:

[0299] Table 60 gives the inverse code prefix encoding rules:

[0300] Table 60

[0301]

[0302] Table 61 gives the following inverse encoding rules:

[0303] Table 61

[0304]

[0305] Table 62 gives the interval inverse encoding rules:

[0306] Table 62

[0307] address Function Detailed description of data Remark 3 The starting address of the reverse code group is required The starting byte number of the reverse code group in the basic code group 4 Number of reverse code groups required The number of code groups that need to be reversed

[0308] Some infrared codes also have repeating codes, which are exactly the same as the above control codes and change synchronously with the control codes. They must be marked in the coding area. Repeating codes are mainly divided into two types: those that follow the control code and those that have a certain interval between them. The coding rules for repeating code partitions are as follows:

[0309] Table 63 gives the repetition code preamble encoding rules:

[0310] Table 63

[0311]

[0312] Table 64 gives the encoding rules for the following repetition code:

[0313] Table 64

[0314]

[0315]

[0316] Table 65 gives the encoding rules of the interval repetition code:

[0317] Table 65

[0318] address Function Detailed description of data Remark 3 The starting address of the code group to be repeated The starting byte number of the code group to be repeated in the basic code group 4 Number of code groups to be repeated The number of code groups to be repeated

[0319] The waveform area is to encode the carrier frequency, modulation mode, bit order and other information lost when the original infrared code group is analyzed by the infrared code analyzer, as well as the pulse width of the guide code, data code, interval code and end code according to certain rules and formulas, and arrange them after the coding area for use in restoring the reconstructed control code group into the corresponding infrared waveform during decoding.

[0320] Table 66 gives the waveform area coding rules:

[0321] Table 66

[0322]

[0323]

[0324]

[0325] Example description:

[0326] Still taking Mitsubishi Heavy Industries (09NV), which has the largest number of protocol formats, as an example, the code encoding process in the encoding area and the waveform area is explained. The waveform obtained by the infrared code analyzer is as follows Figure 1 and Figure 2 As shown in the figure, the analysis results of the first half and the second half of the air conditioner encoding in the Mitsubishi Heavy Industries (09NV) protocol format are given respectively. It can be seen that its modulation mode is pulse width modulation (PWM), the carrier frequency is 38.0kHz, the bit order is low bit first, and the total number of data bits is 112. Its 0 code is 400μs low level and 400μs high level, and the 1 code is 400μs low level and 1400μs high level.

[0327] The basic code group obtained by the infrared code analyzer is: 23, CB, 26, 01, 00, 24, 03, 0F, 00, 00, 00, 07, 09, 5B. Its control byte is shown in Table 67, and the other bytes remain unchanged.

[0328] Table 67

[0329]

[0330] Table 68 gives the waveform parameter area coding rules:

[0331] Table 68

[0332]

[0333] Table 69 gives the coding rules for the coding area calculation area:

[0334] Table 69

[0335]

[0336]

[0337] Table 70 gives the waveform area calculation area coding rules:

[0338] Table 70

[0339]

[0340] The final compressed code group is: 02, 5F, 4A, 0E, 23, CB, 26, 01, 00, 24, 03, 0F, 00, 00, 00, 07, 09, 5B, 05, 13, 24, 20, 06, 08, 25, 03, 02, 07, 01, 18, 07, 07, 38, 04, 01, 15, 07, 08, 05, 44, 00, 38, 09, 0C, 55, 0 0, 02, 03, 05, 38, 3A, 3B, 3D, 02, 09, 02, 62, 40, 08, 07, 0A, 74, 06, 06, 07, 08, 09, 0C, 0D, 0E , 02, 80, 02, 90, 15, 38, 10, 70, 02, 00, F4, 00, F4, 1B, 1B, 1B, 00, 5D, 00, 00, 00, 01, 00, 1B.

[0341] The compressed code group is 95 Byte in total, the original control code group is 224.480 KByte, and the compression rate is as high as 1:2363.

[0342] Although the above examples do not contain reverse codes, repeated codes, intervals, cycles, or incomplete bytes, they actually reflect the average compression rate. Analysis of 2,000 infrared codes shows that the average code length of an air conditioner code group is 11 bytes (88 bits), and the total average code length after compression is about 100 bytes. There are about 150 protocol formats, plus different user codes of the same format, the total number is about 220.

[0343] Assuming that the average code length after compression is 128Byte, and the total number of different protocol formats is 256, then the storage space required for 1000 commonly used code libraries is 128×256=32KByte, which can be fully accommodated by a single-chip microcomputer with a slightly larger capacity. For example, a 64KB FLASH single-chip microcomputer, half of which is used for decoding program space and half for code library space. This can form an embedded air-conditioning infrared code library system, which can be widely used in intelligent air-conditioning control systems.

[0344] Since the lengths of various format code groups after compression are inconsistent, if fixed-length storage is used, it will cause a waste of storage space. In order to save storage space, variable-length storage is generally used. In order to quickly and accurately query the required infrared code group in the code library, an index page is set before the infrared code group to store the starting address of various format infrared code groups. A byte of FF is inserted between various format code groups for isolation.

[0345] 32KB of storage space requires 15 bits of addressing data. For convenience of calculation, a 2-byte 16-bit address is used.

[0346] The code table on the index page uses a decimal system, from 000 to 999, for a total of 1000 codes. The code table is arranged according to different manufacturers, consistent with the commonly used remote control code table, and can be used universally. Each code table contains two code addresses, and the relationship between the code and the code address is: code address = 2 × code table value.

[0347] If you need to query the infrared code with code 100, the query steps are as follows:

[0348] ①. Convert 100 to hexadecimal number 0x64;

[0349] ②. Calculate the starting address of the code table, 2×64=0xC8;

[0350] ③. Read 2 bytes of data from the two addresses 0xC8 and 0xC9 respectively, the data in the C8 address is the high bit, and the data in the C9 address is the low bit. These 2 bytes of data are the infrared code storage start address of code 100;

[0351] ④. Read infrared code data from the storage start address;

[0352] ⑤. The second address after the storage start address is the total length of this format code group. The storage start address + the total length of this format code group is the end address of this format code group that needs to be read;

[0353] ⑥. The data read from the storage start address to the end address is the infrared code group of this format. Decode the five parameters that need to be controlled, namely, the switch, mode, temperature, wind direction and wind speed, according to the decoding rules, and you can restore the infrared waveform of the code in the state that needs to be controlled.

[0354] The code library storage format is shown in Table 71.

[0355] Table 71

[0356]

[0357] The characteristics of the high-efficiency compression algorithm of the air conditioner infrared remote control code library of the present invention are as follows:

[0358] ①. High compression rate, which can compress 1000 common air conditioner infrared codes into 32KB storage space, with small data volume. It brings convenience to the storage and transmission of code library, and creates conditions for the embedded code library of intelligent air conditioner controller;

[0359] ②Easy to decode, each partition has a code group length and a flag character, which is easy to identify during decoding without error;

[0360] ③. Strong adaptability, able to adapt to 1,000 common air-conditioning infrared codes;

[0361] ④. Strong scalability. For new code groups that are not included in the coding rules, you only need to add them to the coding rules according to the new code group rules and upgrade the decoding program to adapt to various infrared codes;

[0362] ⑤. Good versatility. It can be used not only in single-chip microcomputer control systems, but also in smart phones, PADs and other systems.

Claims

1. A high-efficiency compression algorithm for an air conditioner infrared remote control code library, comprising an encoding step and a decoding step, characterized in that: The method of the encoding step is as follows: firstly, the infrared code of the to-be-compressed encoding protocol is divided into an encoding area and a waveform area, the encoding area stores basic code groups, control code rules, and position information of the control code in the basic code group, the basic code group is an infrared code of a certain state, and the control code includes a switch code, a mode code, a temperature code, a wind direction code, a wind speed code, a function conversion code, a check bit code, an inverse code, and a repeat code; the waveform area stores the carrier frequency, modulation mode, bit sequence, number and pulse width of the guide code, high and low level pulse widths of the 0 code and 1 code of the data code, number and pulse width and position of the interval code, number and format of the cyclic code, number and pulse width of the end code; the encoding area is responsible for restoring the control code group under the required state and temperature, and the waveform area is responsible for restoring the control code group to an infrared code waveform; The decoding steps are: 1) For other required states and temperatures, firstly, the states and temperatures are brought into the control code rules in the coding area, and the control codes of the required states and temperatures are calculated. Then, these control code groups are replaced with the control codes of the corresponding positions in the basic code group according to their respective positions in the basic code group, and the control code groups of other states and temperatures are obtained; 2). Then, according to the cyclic code rule in the waveform area of ​​the control code group, add the required cycle to obtain a complete control code group, and then insert the control code group between the guide code and the end code; if there is an interval code, then insert and exit the interval code at the interval code position; 3). Substitute the pulse width values ​​of the guide code, data 0 code and 1 code, interval code and end code into the control code group to restore the waveform of the infrared code; 4). Finally, according to the carrier frequency value in the waveform area, the infrared code waveform is amplitude modulated on the carrier frequency and sent to the infrared transmitter for transmission to realize the control of the air conditioner, thus completing the entire decoding process.

2. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 1 is characterized in that: The basic code group is a startup code for a selected mode, temperature, wind direction, and wind speed.

3. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 1 or 2, characterized in that: The coding area stores basic code group data, power on / off code data, mode code data, temperature code data, wind direction code data, wind speed code data, function conversion code data, check code data, inverse code data and repetition code data in sequence; the basic code data stores the number of the coding format in the total format, the total length of the infrared code group under the format, the total length of the coding area including the format number, the total length of the basic code group and the basic code group in sequence; the power on / off code data stores the switch code partition length, switch code type and switch code position in sequence; the mode code data stores the mode code partition length, mode code type and mode code position in sequence; The temperature code data sequentially stores the temperature code partition length, temperature code type, and temperature code position; the wind direction code data sequentially stores the wind direction code partition length, wind direction code type, and wind direction code position; the wind speed code data sequentially stores the wind speed code partition length, wind speed code type, and wind speed code position; the function conversion code data sequentially stores the conversion code partition length, conversion code type, and conversion code position; the check code data sequentially stores the check code partition length, check code type, and check code position; the inverse code data sequentially stores the inverse code partition length and inverse code type; the repetition code data sequentially stores the repetition code partition length and repetition code type.

4. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The power on / off code data stores a power on / off prefix code, and the power on / off prefix code stores a 1-byte-long power on / off code attribute byte, of which the upper 4 bits are the power on / off code flag code 1, and the lower 4 bits are equal to 0 for the state power on / off code, equal to 1 for the incremental power on / off code, equal to 2 for the 4-bit power on / off code, equal to 3 for the byte power on / off code, equal to 4 for the 4-bit mode and shutdown combination code, equal to 5 for the byte mode and shutdown combination code, equal to 6 for the 4-bit wind direction and shutdown combination code, equal to 7 for the byte wind direction and shutdown combination code, equal to 8 for the 4-bit wind speed and shutdown combination code, equal to 9 for the byte wind speed and shutdown combination code, and equal to F for an independent shutdown code; Among them, the status switch code and the switch code use the control code of the current state. When the air conditioner is in the off state, a control code is sent once to turn on the air conditioner; when the air conditioner is in the on state, a control code is sent once to turn off the air conditioner; the incremental switch code, the power-on code is the same as the power-off code. When the air conditioner is in the off state, a switch code is sent once to turn on the air conditioner, and when the air conditioner is in the on state, a switch code is sent once to turn off the air conditioner; the byte or 4-bit switch code represents the power-on code and the power-off code through different code values. Sending the power-on code turns on the air conditioner, and sending the power-off code turns off the air conditioner; the mode and power-off combination code, the mode code ± constant is the power-off code, and there are two types: 4 bits and 1 bytes; the wind direction and power-off combination code, the wind direction code ± constant is the power-off code, and there are two types: 4 bits and 1 bytes; the wind speed and power-off combination code, the wind speed code ± constant is the power-off code, and there is only one type of 4 bits; an independent power-off code is a power-off code that is inconsistent with other control codes, followed by the number of bytes of the independent power-off code length and the specific independent power-off code group.

5. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The mode code data stores a mode prefix, which stores a 1-byte mode code attribute byte. The upper 4 bits are the mode code flag code 2, and the lower 4 bits are equal to 0 for a 4-bit mode code, equal to 1 for a 1-bit mode code, equal to 2 for a 2-bit mode code, equal to 3 for a 3-bit mode code, equal to 5 for a 5-bit mode code, and equal to 6 for a mode and wind speed code. In the 4-bit mode code, there are stored the cooling / dehumidification mode code, the air supply / heating mode code, the automatic mode code, the mode code position, the bit Set the bytes of high and low bit information, the high 4 bits of the cooling / dehumidification mode code byte = cooling mode code, the low 4 bits = dehumidification mode code, the high 4 bits of the air supply / heating mode code byte = air supply mode code, the low 4 bits = heating mode code, the high 4 bits of the automatic mode code byte are fixed to 0x01, the low 4 bits = automatic mode code, the mode code position byte indicates the number of bytes where the mode code is located in the basic code group, the position high and low bits are equal to 0x01, indicating that the mode code is located in the low 4 bits of the position byte, and equal to 0x10, indicating that the mode code is located in the high 4 bits of the position byte; The byte 1-bit mode code stores bytes representing the incremental mode code and the mode code position information. The mode code stored in the incremental mode code byte remains unchanged. The air conditioning mode is switched by changing the number of times the mode code is sent. The mode code position information byte indicates the number of bytes of the mode code in the basic code group position. The byte 2-bit mode code stores bytes representing the cooling / dehumidification / air supply / automatic mode code, the heating mode code, and the mode code position information. The 1-byte incremental mode code is stored in the cooling / dehumidification / air supply / automatic mode code byte. The air conditioning mode is switched by changing the number of times the 1-byte incremental mode code is sent. The air conditioner switches between cooling, dehumidification, air supply and automatic modes. The heating mode code byte stores a 1-byte incremental mode code, and the mode code position information byte indicates the number of bytes of the mode code in the basic code group position; the 3-bit mode code byte stores bytes indicating cooling / automatic mode code, dehumidification mode code, heating / air supply mode code and mode code position information; the cooling / automatic mode code byte stores a 1-byte cooling / automatic mode code, the dehumidification mode code byte stores a 1-byte dehumidification mode code, and the heating / air supply mode code byte stores a 1-byte heating / air supply mode code; The byte of the 5-bit mode code stores bytes representing the cooling mode code, dehumidification mode code, air supply mode code, heating mode code, automatic mode code, and mode code position information; the cooling mode code byte stores 1 byte of cooling mode code, the dehumidification mode code byte stores 1 byte of dehumidification mode code, the air supply mode code byte stores 1 byte of air supply mode code, the heating mode code byte stores 1 byte of heating mode code, and the automatic mode code byte stores 1 byte of automatic mode code; the mode and wind speed code stores bytes representing the cooling mode code, dehumidification mode code, air supply mode code, heating mode code, and automatic mode code. The 4 high bits of the cooling mode code byte are the cooling wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the cooling wind speed first gear and second gear cooling mode code. The 4 high bits of the dehumidification mode code byte are fixed to 0, and the low 4 bits are the dehumidification mode code; the 4 high bits of the air supply mode code byte are fixed to 0, and the low 4 bits are the air supply mode code; the 4 high bits of the heating mode code byte are the heating wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the heating wind speed first gear and second gear cooling mode code; the 4 high bits of the automatic mode code byte are the automatic wind speed automatic gear and three-speed cooling mode code, and the low 4 bits are the automatic wind speed first gear and second gear cooling mode code.

6. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The temperature code data stores the temperature prefix, temperature limit code, and temperature code position byte. The temperature prefix stores a byte-long temperature code attribute, of which the upper 4 bits are the mode code flag code 3, and the lower 4 bits are equal to 0 to indicate the decimal temperature code, equal to 1 to indicate the temperature increment code, equal to 2 to indicate the 4-bit irregular temperature code, equal to 3 to indicate the byte irregular temperature code, equal to 4 to indicate the 4-bit positive and reverse temperature code, equal to 5 to indicate the byte positive and reverse temperature code, equal to 6 to indicate the byte multiple positive and reverse temperature code, equal to 7 to indicate the high-order code plus the positive and reverse code, equal to 8 to indicate the low-order code positive and reverse code, and equal to 9 to indicate the wind direction and temperature code; the decimal temperature code indicates that the temperature code value is consistent with the required temperature value within the range of 16 to 30°C; the temperature increment code stores bytes indicating the temperature increase code and the temperature decrease code, the temperature increase code byte is a 1-byte temperature increase code, and the temperature decrease code is a 1-byte temperature decrease code; the 4-bit irregular temperature code stores a 16 / 17 degree temperature code , 18 / 19 degree temperature code, 20 / 21 degree temperature code, 22 / 23 degree temperature code, 24 / 25 degree temperature code, 26 / 27 degree temperature code, 28 / 29 degree temperature code, 30 degree temperature code byte, the high 4 bits of the 16 / 17 degree temperature code byte are the 16 degree temperature code, the low 4 bits are the 17 degree temperature code, the high 4 bits of the 18 / 19 degree temperature code byte are the 18 degree temperature code, the low 4 bits are the 19 degree temperature code, the high 4 bits of the 20 / 21 degree temperature code byte are the 20 degree temperature code, the low 4 bits are the 21 The high 4 bits of the 22 / 23 degree temperature code byte are the 22 degree temperature code, and the low 4 bits are the 23 degree temperature code. The high 4 bits of the 24 / 25 degree temperature code byte are the 24 degree temperature code, and the low 4 bits are the 25 degree temperature code. The high 4 bits of the 26 / 27 degree temperature code byte are the 26 degree temperature code, and the low 4 bits are the 27 degree temperature code. The high 4 bits of the 28 / 29 degree temperature code byte are the 28 degree temperature code, and the low 4 bits are the 29 degree temperature code. The high 4 bits of the 30 degree temperature code byte are the 30 degree temperature code, and the low 4 bits are 0. The byte irregular temperature code stores 16 degree temperature code, 17 degree temperature code, 18 degree temperature code, 19 degree temperature code, 20 degree temperature code, 21 degree temperature code, 22 degree temperature code, 23 degree temperature code, 24 degree temperature code, 25 degree temperature code, 26 degree temperature code, 27 degree temperature code, 28 degree temperature code, 29 degree temperature code, and 30 degree temperature code bytes, and each temperature code byte stores 1 byte of temperature code; the lower 4 bits of the temperature code byte in the 4-bit positive and reverse temperature code are constants, and the upper 4 bits are equal to 0, indicating that the temperature code = positive sequence + constant, equal to 1, indicating that the temperature code = positive sequence - constant, equal to 4, indicating that the temperature code = reverse sequence + constant, and equal to 5, indicating that the temperature code = reverse sequence - constant; among them, the positive sequence is 0=16℃, E=3 0℃; in reverse order, E=16℃, 0=30℃, the same below; in the byte positive order and reverse order temperature code, a sign byte and a constant byte are stored. The sign byte equals 00, indicating that the temperature code = positive order + constant, equals 01, indicating that the temperature code = positive order - constant, equals 04, indicating that the temperature code = reverse order + constant, and equals 05, indicating that the temperature code = reverse order - constant. The constant byte stores the constant; in the byte multiple positive order and reverse order temperature code, a multiplier byte, a sign byte and a constant byte are stored. The temperature code = multiplier * positive and reverse order ± constant. A 1-byte multiplier is stored in the multiplier byte. The sign byte equals 00, indicating that the positive order + constant, equals 01, indicating that the positive order - constant, equals 04, indicating that the reverse order + constant, and equals 05, indicating that the reverse order - constant. The constant byte stores a 1-byte constant. The high-order code plus the positive and reverse temperature code stores the high-order code, the operator byte, and the constant byte. The high 4 bits of the high-order code and the operator byte are the high-order code, and the low 4 bits are equal to 0 to indicate positive sequence + constant, equal to 1 to indicate positive sequence - constant, equal to 4 to indicate reverse order + constant, and equal to 5 to indicate reverse order - constant. The temperature code = high-order code + (positive and reverse order ± constant), and the constant byte stores a 1-byte constant; the low-order code plus the positive and reverse temperature code stores the low-order code, the operator byte, and the constant byte. The high 4 bits of the low-order code and the operator byte are the low-order code, and the low 4 bits are equal to 0 to indicate positive sequence + constant, equal to 1 to indicate positive sequence - constant, equal to 4 to indicate reverse order + constant, and equal to 5 to indicate reverse order - constant. The temperature code = (positive and reverse order ± constant) + low-order code, and the constant byte stores a 1-byte constant; The temperature code limit byte includes a temperature limit type byte and a temperature limit code byte. The upper 4 bits of the temperature limit type byte equal to 0 indicate no limit, and equal to 1 indicate limit. The lower 4 bits equal to 0 indicate dehumidification mode temperature limit, equal to 1 indicate air supply mode temperature limit, equal to 2 indicate automatic mode temperature limit, equal to 3 indicate dehumidification and air supply mode temperature limit, equal to 4 indicate dehumidification and automatic mode temperature limit, equal to 5 indicate air supply and automatic mode temperature limit, equal to 6 indicate dehumidification, air supply and automatic mode temperature limit, equal to 7 indicate automatic wind direction air supply and automatic mode temperature limit, equal to 8 indicate manual wind direction air supply and automatic mode temperature limit. The temperature limit code byte stores a 1-byte temperature limit code.

7. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The wind direction code data stores the wind preamble code and the wind direction code position byte. The wind preamble code stores a byte-long wind direction code attribute byte, of which the upper 4 bits are the wind direction code flag code 4, and the lower 4 bits are equal to 0 for no wind direction code, equal to 1 for incremental wind direction code, equal to 2 for 4Bit two-bit wind direction code, equal to 3 for 4Bit five-bit wind direction code, equal to 4 for byte two-bit wind direction code, equal to 5 for byte five-bit wind direction code, and equal to 6 for independent wind direction code; the incremental wind direction code stores the wind direction code byte and the wind direction code position byte. , the wind direction code byte stores a 1-byte incremental wind direction code, and the wind direction code position byte stores the number of bytes of the wind direction code in the basic code group position; the 4-bit two-bit wind direction code stores the wind direction code, the wind direction code position, and the position high and low bytes. The high 4 bits of the wind direction code byte are the automatic wind direction code, and the low 4 bits are the manual direction code. The wind direction code position indicates the number of bytes of the wind direction code in the basic code group position. If the position high and low bytes are equal to 01, it means that the wind direction code is located in the low 4 bits of the position byte, and if they are equal to 10, it means that the wind direction code is located in the high 4 bits of the position byte; The 4-bit five-bit wind direction code stores the automatic / manual one wind direction code, manual two-three wind direction codes, manual four wind direction codes, wind direction code position, wind direction code high and low bytes. The high 4 bits of the automatic / manual one wind direction code byte are the automatic wind direction code, and the low 4 bits are the manual one wind direction code. The high 4 bits of the manual two-three wind direction code byte are the manual two wind direction code, and the low 4 bits are the manual three wind direction code. The high 4 bits of the manual four wind direction code byte are the manual four wind direction code, and the low 4 bits are 0. The wind direction code position byte stores the number of bytes of the wind direction code in the basic code group position. The high and low bytes of the position are equal to 01, indicating that the wind direction code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind direction code is in the high 4 bits of the position byte; the two-byte wind direction code stores the automatic wind direction code, manual wind direction code, and wind direction code position byte. The automatic wind direction code byte stores 1 byte of automatic wind direction code, and the manual wind direction code byte stores 1 byte of automatic wind direction code. The code byte stores a 1-byte manual wind direction code, and the wind direction code position byte stores the number of bytes of the wind direction code at the basic code group position; the byte five-bit wind direction code stores the automatic wind direction code, manual one wind direction code, manual two wind direction code, manual three wind direction code, manual four wind direction code, manual five wind direction code, and wind direction code position, which respectively store a 1-byte automatic wind direction code, manual one wind direction code, manual two wind direction code, manual three wind direction code, manual four wind direction code, manual five wind direction code, and the number of bytes of the wind direction code at the basic code group position; the independent wind direction code stores the wind direction code length, manual wind direction code byte 1, manual wind direction code byte 2, ..., manual wind direction code byte n bytes, which respectively store the number of bytes of the independent manual wind direction code length, the first byte of the independent manual wind direction code, the second byte of the independent manual wind direction code, ..., the last byte of the independent manual wind direction code, where n≥1.

8. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The wind speed code data stores the wind speed preamble and wind speed position bytes. The wind speed preamble stores a 1-byte wind speed code attribute byte, of which the upper 4 bits are the wind speed code flag code 5, and the lower 4 bits are equal to 0, indicating no wind speed code, equal to 1, indicating a wind speed increment code, equal to 2, indicating a 4-bit four-bit wind speed code, equal to 3, indicating a byte wind speed code, equal to 4, indicating a 4-bit wind direction wind speed code, and equal to 5, indicating a byte wind direction wind speed code; the wind speed increment code stores the wind speed code, the dehumidification wind speed code, and the wind speed code position byte. The wind speed code stores a 1-byte increment wind speed code, the dehumidification wind speed code byte is equal to 00, and the wind speed code position byte stores the number of bytes of the wind speed code in the basic code group position; in the 4B It wind speed code stores automatic gear / first gear wind speed code, second and third gear wind speed code, dehumidification wind speed code, wind speed code position and position high and low bytes. The high 4 bits of the automatic gear / first gear wind speed code byte are the automatic gear wind speed code, and the low 4 bits are the first gear wind speed code. The high 4 bits of the second and third gear wind speed code byte are the second gear wind speed code, and the low 4 bits are the third gear wind speed code. The low 4 bits of the dehumidification wind speed code byte are the dehumidification wind speed code. The high 4 bits are equal to 0, indicating that there is no wind speed limit code, and equal to 1, indicating that there is a wind speed limit code. The wind speed code position byte stores the number of bytes of the wind speed code in the basic code group position. The high and low bytes of the position are equal to 01, indicating that the wind speed code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind speed code is in the high 4 bits of the position byte. The byte wind speed code stores the automatic wind speed code, the first wind speed code, the second wind speed code, the third wind speed code, the dehumidification wind speed code, and the wind speed code position byte, respectively storing 1-byte automatic wind speed code, the first wind speed code, the second wind speed code, the third wind speed code, the no wind speed limit code or the dehumidification wind speed limit code, and the number of bytes of the wind speed code in the basic code group position; the 4-bit wind direction and speed code stores the automatic wind direction and speed code 1, the automatic wind direction and speed code 2, the manual wind direction and speed code 1, the manual wind direction and speed code 2, the dehumidification wind speed code, the wind speed code position, and the position code high and low bytes. The high 4 bits of the automatic wind direction and speed code 1 byte are Automatic gear, the lower 4 bits are the first gear, the automatic wind direction and wind speed code 2 bytes, the high 4 bits are the second gear, and the low 4 bits are the third gear, the manual wind direction and wind speed code 1, the high 4 bits are the automatic gear, and the low 4 bits are the first gear, the manual wind direction and wind speed code 2 bytes, the high 4 bits are the second gear, and the low 4 bits are the third gear, the dehumidification wind speed code byte low 4 bits are the dehumidification wind speed code, the high 4 bits are equal to 0, indicating that there is no wind speed limit code, and equal to 1, indicating that there is a wind speed limit code, the wind speed code position byte stores the number of bytes of the wind speed code in the basic code group position, the position high and low bytes are equal to 01, indicating that the wind speed code is in the low 4 bits of the position byte, and equal to 10, indicating that the wind speed code is in the high 4 bits of the position byte; The byte wind direction and wind speed code sequentially stores automatic wind direction and wind speed code 1, automatic wind direction and wind speed code 2, automatic wind direction and wind speed code 3, automatic wind direction and wind speed code 4, manual wind direction and wind speed code 1, manual wind direction and wind speed code 2, manual wind direction and wind speed code 3, manual wind direction and wind speed code 4, dehumidification wind speed code, and wind speed code position byte, respectively storing automatic wind direction automatic wind speed code, automatic wind direction first gear wind speed code, automatic wind direction second gear wind speed code, automatic wind direction third gear wind speed code, manual wind direction automatic wind speed code, manual wind direction first gear wind speed code, manual wind direction second gear wind speed code, manual wind direction third gear wind speed code, no wind speed limit code or dehumidification wind speed limit code, and the number of bytes of the wind speed code in the basic code group position.

9. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 3 is characterized in that: The function conversion code data stores a function conversion prefix and a function conversion code position byte. The function conversion prefix stores a 1-byte-long function code attribute byte, of which the upper 4 bits are the conversion flag code 6, and the lower 4 bits are equal to 0, indicating no function conversion code, equal to 1, indicating a 4-bit function conversion code, equal to 2, indicating a byte function conversion code, and equal to 3, indicating a mode and function conversion code; the 4-bit function conversion code stores the function conversion code type, power on / off code, mode conversion code, temperature conversion code, wind direction conversion code, wind speed conversion code 1, wind speed conversion code 2, function code position and position high and low bytes. Bit7 of the function conversion code type byte is 0, indicating no power on / off conversion, and Bit7 is 1, indicating power on / off conversion. =Change; Bit6=0 means no mode conversion, Bit6=1 means mode conversion, Bit5=0 means no temperature conversion, Bit5=1 means temperature conversion; Bit4=0 means no wind direction conversion, Bit4=1 means wind direction conversion; Bit3=0 means no wind speed conversion, Bit3=1 means wind speed conversion, Bit2 to Bit0 are undefined, the default is 0; the high 4 bits of the power on / off code byte are the on code, and the low 4 bits are the off code; the high 4 bits of the mode conversion code byte are the mode conversion code, and the low 4 bits are the automatic mode code; the high 4 bits of the temperature conversion code byte are the temperature increase code, and the low 4 bits are the temperature decrease code; the high 4 bits of the wind direction conversion code are the automatic wind direction code, and the low 4 bits are the manual wind direction code; The high 4 bits of wind speed conversion code 1 are the code for switching to automatic gear, and the low 4 bits are the code for switching to first gear; the high 4 bits of wind speed conversion code 2 are the code for switching to second gear, and the low 4 bits are the code for switching to third gear; the function code position stores the number of bytes of the function conversion code in the basic code group position. If the high and low bytes of the position are equal to 01, it means that the function conversion code is in the low 4 bits of the position byte, and if they are equal to 10, it means that the function conversion code is in the high 4 bits of the position byte; The byte function conversion code stores the function conversion code type, power on / off code, mode conversion code, temperature conversion code 1, temperature conversion code 2, wind direction conversion code, wind speed conversion code, and function code position byte; Bit7=0 of the function conversion code type byte indicates no power on / off conversion, Bit7=1 indicates power on / off conversion; Bit6=0 indicates no mode conversion, Bit6=1 indicates mode conversion; Bit5=0 indicates no temperature conversion, Bit5=1 indicates temperature conversion; Bit4=0 indicates no wind direction conversion, Bit4=1 indicates wind direction conversion; Bit3=0 indicates no wind speed conversion, Bit3=1 indicates wind speed conversion; Bit2 to Bit t0 is undefined and defaults to 0; the power on / off code, mode conversion code, temperature conversion code 1, temperature conversion code 2, wind direction conversion code, wind speed conversion code, and function code position byte respectively store the number of bytes of the power on / off code, mode conversion code, temperature increase code, temperature decrease code, manual wind direction code, wind speed conversion code, and function conversion code in the basic code group position; 5 function conversion code bytes and one function code position byte are stored in the mode and function conversion code, and the 5 function conversion code bytes respectively store 1 byte of the cooling mode code, the dehumidification mode code, the air supply mode code, the heating mode code, and the automatic mode code, and the function code position byte stores the number of bytes of the function conversion code in the basic code group position; The check code data stores a check code prefix and a check code position byte. The check code prefix stores a check code attribute byte of 1 byte length, wherein the upper 4 bits are the check code flag code 7, and the lower 4 bits are equal to 0 to indicate no check code, equal to 1 to indicate a 4-bit addition check code, equal to 2 to indicate a byte addition check code, equal to 3 to indicate a 4-bit addition ± constant check code, equal to 4 to indicate a byte addition ± constant check code, equal to 5 to indicate a constant-4-bit addition check code, equal to 6 to indicate a constant-byte addition check code, equal to 7 to indicate a 4-bit exclusive-OR check code, and equal to 8 to indicate a byte exclusive-OR check code; the 4-bit addition check code stores the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the Nth addend address, the high and low bits of the Nth addend, the number of check code bits, the check code position, and the high and low bytes of the position; the number of addition operation bytes stores the number of addends participating in the addition operation, and the first addend address byte indicates that the first addend is located in the code group The first addend high-low byte equals 01, which means that the lower 4 bits of the data in the address are taken as the addend, and equals 10, which means that the upper 4 bits of the data in the address are taken as the addend. The second addend address byte indicates the number of bytes of the second addend in the code group. The second addend high-low byte equals 01, which means that the lower 4 bits of the data in the address are taken as the addend, and equals 10, which means that the upper 4 bits of the data in the address are taken as the addend, ..., the Nth addend address byte indicates the number of bytes of the Nth addend in the code group. The Nth addend high-low byte Equal to 01 means taking the lower 4 bits of the data in the address as the addend, and equal to 10 means taking the upper 4 bits of the data in the address as the addend, check code = addend 1 + addend 2 + ... + addend N, check code bit byte equal to 0F means taking the lower 4 bits of the operation result, equal to FF means taking the lower 8 bits of the operation result, check code position byte stores the number of bytes where the check code is in the basic code group position, position high and low byte equal to 01 means the check code is in the lower 4 bits of the position byte, equal to 10 means the check code is in the upper 4 bits of the position byte; The byte addition operation check code byte stores the number of addition operations, the first addend address, the second addend address, ..., the N1th addend address, and the check code position byte, respectively storing the number of addends involved in the addition operation, the number of bytes of the first addend located in the code group, the number of bytes of the second addend located in the code group, ..., the number of bytes of the N1th addend located in the code group, and the number of bytes of the check code located in the basic code group, check code = addend 1 + addend 2 + ... + addend N1; The 4-bit addition ± constant check code stores the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the N2 addend address, the high and low bits of the N2 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position; the constant operation symbol byte equal to 00 indicates addition operation, and equal to 11 indicates subtraction operation, the constant byte stores a 1-byte constant, and the check code = (addend 1 + addend 2 + ... + addend N2) ± constant; The number of addition operations, the first addend address, the second addend address, ..., the N3 addend address, the constant operation symbol, the constant, and the check code position byte are stored in the byte addition ± constant check code, and the check code = (addend 1 + addend 2 + ... + addend N3) ± constant; the number of addition operations, the first addend address, the high and low bits of the first addend, the second addend address, the high and low bits of the second addend, ..., the N4 addend address, the high and low bits of the N4 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position are stored in the constant ± 4Bit addition check code, and the check code = constant ± (addend 1 + addend 2 + ... + addend N4); the number of addition operations, the first addend address, the second addend address, ..., the N4 addend address, the high and low bits of the N4 addend, the constant operation symbol, the constant, the number of check code bits, the check code position and the high and low bytes of the position are stored in the constant ± byte addition check code. N5 addend address, constant operation symbol, constant, check code position byte, check code = constant ± (addend 1 + addend 2 + ... + addend N5); the number of XOR operations, the first XOR address, the high and low bits of the first XOR, the second XOR address, the high and low bits of the second XOR, ..., the N6th XOR address, the high and low bits of the N6th XOR, the number of check code bits, the check code position and the high and low position bytes are stored in the 4-bit XOR operation check code, and the check code = XOR number 1 ⊕ XOR number 2 ⊕ ... ⊕ XOR number N6, "⊕" represents XOR operation; the number of XOR operations, the first XOR address, the second XOR address, ..., the N7th XOR address, the check code position are stored in the byte XOR operation check code, and the check code = XOR number 1 ⊕ XOR number 2 ⊕ ... ⊕ XOR number N7; The inverted data stores an inverted preamble, and the inverted preamble stores an inverted attribute byte of 1 byte length, of which the upper 4 bits are the inverted flag code 8, and the lower 4 bits equal to 0 indicate no inverted code, equal to 1 indicates immediately following inverted code, and equal to 2 indicates interval inverted code; immediately following inverted code stores immediately following inverted code bytes, and Bit7=0 of immediately following inverted code bytes indicates that the switch code does not have inverted code, Bit7=1 indicates that the switch code has inverted code, Bit6=0 indicates that the mode code does not have inverted code, Bit6=1 indicates that the mode code has inverted code, and Bit5=0 indicates that the temperature code does not have inverted code, Bit5=1 indicates that the temperature code has an inverse code, Bit4=0 indicates that the wind direction code does not have an inverse code, Bit4=1 indicates that the wind direction code has an inverse code, Bit3=0 indicates that the wind speed code does not have an inverse code, Bit3=1 indicates that the wind speed code has an inverse code, Bit2=0 indicates that the conversion code does not have an inverse code, Bit2=1 indicates that the conversion code has an inverse code, Bit1 and Bit0 are undefined and default to 0; the interval inverse code stores the starting address of the code group to be reversed and the number of bytes of the code group to be reversed, respectively storing the starting byte number of the code group to be reversed in the control code group and the number of reverse code groups; The repetition code data stores a repetition code prefix, and the repetition code prefix stores a repetition code attribute byte of 1 byte length, of which the upper 4 bits are the repetition code flag code 9, and the lower 4 bits equal to 0 indicate no repetition code, equal to 1 indicate immediately following repetition code, and equal to 2 indicate interval repetition code; immediately following repetition code stores immediately following repetition code bytes, and Bit7=0 of immediately following repetition code bytes indicates that the switch code does not have a repetition code, and Bit7=1 indicates that the switch code has a repetition code; Bit6=0 indicates that the mode code does not have a repetition code, and Bit6=1 indicates that the mode code has a repetition code; Bit5=0 indicates that the temperature code does not have a repetition code. Repeat code, Bit5=1 indicates that the temperature code has a repeat code; Bit4=0 indicates that the wind direction code does not have a repeat code, Bit4=1 indicates that the wind direction code has a repeat code; Bit3=0 indicates that the wind speed code does not have a repeat code, Bit3=1 indicates that the wind speed code has a repeat code; Bit2=0 indicates that the conversion code does not have a repeat code, Bit2=1 indicates that the conversion code has a repeat code; Bit1 and Bit0 are undefined and default to 0; the interval repetition code stores the starting address of the code group to be repeated and the number of bytes of the code group to be repeated, which respectively store the starting byte number of the code group to be repeated in the basic code group and the number of code groups to be repeated.

10. The high-efficiency compression algorithm of the air conditioner infrared remote control code library according to claim 1 or 2, characterized in that: The waveform area stores waveform area length, carrier frequency, modulation mode and bit order, total number of infrared code bits, number of guide codes, first guide code pulse width, second guide code pulse width, third guide code pulse width, fourth guide code pulse width, data 0 code low level pulse width, data 0 code high level pulse width, data 1 code low level pulse width, data 1 code high level pulse width, interval code format, first interval code pulse width, second interval code pulse width, third interval code pulse width, fourth interval code pulse width, first interval code position, second interval code position, third interval code position, fourth interval code position, cyclic code format, cyclic pattern, incomplete byte format, first incomplete byte position, first incomplete byte bit, second incomplete byte position, second incomplete byte bit, third incomplete byte position, third incomplete byte bit, end bit format, end code first pulse width, end code second pulse width, end code third pulse width byte; The waveform area length byte stores the total number of bytes in the entire waveform area, the carrier frequency byte stores the infrared transmission carrier frequency value, the high 4 bits of the modulation mode and bit order byte are equal to 0 to indicate that the modulation mode is PPM, equal to 1 to indicate that the modulation mode is PWM, the low 4 bits are equal to 0 to indicate that the low bit is in the front, and equal to 1 to indicate that the high bit is in the front; the total number of digits of the infrared code is 2 bytes, and the total number of digits of the infrared code after restoration is stored; the number of guide code bytes is equal to 00 to indicate no guide code, equal to 01 to indicate with 1-bit guide code, equal to 02 to indicate with 2-bit guide code, equal to 03 to indicate with 3-bit guide code, and equal to 04 to indicate with 4-bit guide code; the pulse width of the first guide code is a low level of 2 bytes, the pulse width of the second guide code is a high level of 2 bytes, and the pulse width of the third guide code is 0. The pulse width of the boot code is a 2-byte low level, and the pulse width of the fourth boot code is a 2-byte high level; the low level of data 0 code, the high level of data 0 code and the low level of data 1 code are all 1-byte pulse width values, and the high level of data 1 code is a 2-byte pulse width value; Bit7=0 of the interval code format byte indicates no interval code, Bit7=1 indicates interval code; Bit6=0 indicates byte interval, Bit6=1 indicates frame interval; Bit5-Bit4=00 indicates 1-bit interval code, Bit5-Bit4=01 indicates 2-bit interval code, Bit5-Bit4=10 indicates 3-bit interval code, Bit5-Bit4=11 indicates 4-bit interval code; Bit3-B The value of it0 is the number of interval codes; the first interval code pulse width, the second interval code pulse width, the third interval code pulse width and the fourth interval code pulse width are all two bytes; Bit7=0 of the first interval code position byte, the second interval code position byte, the third interval code position byte and the fourth interval code position byte indicates that there is no guide code behind it, and Bit7=1 indicates that there is a guide code behind it, and Bit6-bit0 stores the position of the interval code; Bit7=0 of the cyclic code format byte indicates only interval without cycle, Bit7=1 indicates with cycle, Bit6-bit4=000 indicates the same cycle frame by frame, Bit6-bit4=001 indicates different cycle frame by frame, and Bit6-bit it4=010 indicates alternate frame loop, Bit6-bit4=011 indicates local loop, and the value of Bit3-Bit0 is the total number of frames; the loop styles include different loop bytes frame by frame, alternate frame loop bytes, and local loop bytes; Bit7-bit4 of the different loop bytes frame by frame stores the number of frames with the same loop in the previous data, and Bit3-bit0 stores the number of frames with the same loop in the subsequent data; Bit7-bit4 of the alternate frame loop bytes stores the number of frames to be looped, and Bit3-bit0 stores the number of frames to be looped; Bit7-bit4 of the local loop bytes stores the same number of frames before the intermediate interval, and Bit3-bit0 stores the same number of frames after the intermediate interval;The incomplete byte format byte Bit7 = 0 indicates no incomplete byte, Bit7 = 1 indicates an incomplete byte, Bit6-bit0 stores the number of incomplete bytes, and the incomplete byte position indicates the number of bytes of each incomplete byte in the infrared code group; the bit position of the incomplete byte indicates the number of valid bits of each incomplete byte, and the data ranges from 1 to 7; the end bit format byte equal to 00 indicates no end code, equal to 01 indicates a 1-bit end code, equal to 02 indicates a 2-bit end code, and equal to 03 indicates a 3-bit end code; the end code pulse width uses 2 bytes to represent the pulse width values ​​of 1 to 3 end codes. ;