[go: up one dir, main page]

CN111968361A - Infrared repeated code learning method and infrared remote control system applied to Internet of things - Google Patents

Infrared repeated code learning method and infrared remote control system applied to Internet of things Download PDF

Info

Publication number
CN111968361A
CN111968361A CN202010897348.0A CN202010897348A CN111968361A CN 111968361 A CN111968361 A CN 111968361A CN 202010897348 A CN202010897348 A CN 202010897348A CN 111968361 A CN111968361 A CN 111968361A
Authority
CN
China
Prior art keywords
infrared
data
remote control
function
extraction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010897348.0A
Other languages
Chinese (zh)
Other versions
CN111968361B (en
Inventor
张亚鑫
陈飞
姚友斌
程庭宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Aikesi Zhichuang Technology Co ltd
Original Assignee
Chengdu Aikesi Zhichuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Aikesi Zhichuang Technology Co ltd filed Critical Chengdu Aikesi Zhichuang Technology Co ltd
Priority to CN202010897348.0A priority Critical patent/CN111968361B/en
Publication of CN111968361A publication Critical patent/CN111968361A/en
Application granted granted Critical
Publication of CN111968361B publication Critical patent/CN111968361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The invention discloses an infrared repeated code learning method and an infrared remote control system applied to the Internet of things.

Description

Infrared repeated code learning method and infrared remote control system applied to Internet of things
Technical Field
The invention relates to the technical field of infrared remote control, in particular to an infrared repeated code learning method and an infrared remote control system applied to the Internet of things.
Background
The infrared remote control equipment is an important function in an internet of things system, particularly for the household market, and the mainstream mode of the infrared remote control equipment is still controlled by sending infrared signals except that a few serial ports and IP control interfaces are opened for household appliances such as televisions, set top boxes, air conditioners and the like. However, infrared control codes are incompatible with each other for products from different manufacturers, and are incompatible with each other for different types of products from the same manufacturer. In order to be compatible with different infrared devices, an infrared remote control code learning method is provided at present, after learning is completed, the purpose that different infrared devices are controlled through one infrared remote control device is achieved, and the use process is convenient and fast.
However, the conventional infrared remote control code learning method can only simulate the clicking function of the keys of the infrared remote controller, cannot simulate the long-press function, and is particularly important for controlling the long-press function of equipment such as a television and a player, for example, the television is controlled to change channels or increase or decrease volume rapidly through the original factory remote controller, if the long-press function cannot be learned, a user can only click the same key repeatedly, and the experience effect is very poor.
Disclosure of Invention
The invention aims to provide an infrared repeated code learning method and an infrared remote control system applied to the Internet of things, which can learn infrared repeated codes and realize the simulation of a key length pressing function.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is an infrared repeated code learning method, including:
s1: generating a learning instruction according to a function ID, wherein the function ID corresponds to the current key function of the infrared remote controller of the current controlled equipment;
s2: acquiring infrared codes sent by an infrared remote controller of current controlled equipment according to the learning instruction, wherein the coding structure of the infrared codes sequentially comprises a carrier frequency, a plurality of alternately repeated pulse signals and interval signals, the first and the last of the alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes;
s3: determining the value range of the extraction coefficient according to the infrared waveform data, and taking the minimum value of the value range of the extraction coefficient as the current value of the extraction coefficient, wherein the value range of the extraction coefficient is expressed as follows:
1≤n≤(len-8)/8
wherein len represents the total byte number of the infrared waveform data, and n represents an extraction coefficient and is an integer;
s4: multiplying the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extracting data forward from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched;
s5: sequentially intercepting data forwards from the beginning of the data to be matched in the infrared waveform data, and performing waveform matching on the intercepted data and the data to be matched each time;
s6: judging whether the number of times of successful continuous matching reaches a preset number, if so, performing step S7, and if not, performing step S8;
s7: judging that the data to be matched is a repeated code of infrared waveform data, pairing the repeated code with a function ID, and writing the paired repeated code into an infrared remote control code file corresponding to the current controlled equipment;
s8: and selecting the next value of the current value of the extraction coefficient to replace the current value, and repeating the step S4 until the current value of the extraction coefficient is the last value of the value range.
Preferably, the predetermined factor is 4.
Preferably, the preset number of times is 3.
In order to solve the technical problem, the invention adopts another technical scheme that: the utility model provides an infrared remote control system for thing networking, infrared remote control system includes infrared study terminal, mobile terminal and high in the clouds server, infrared study terminal includes infrared acquisition module and host system, mobile terminal establishes wireless connection with host system, mobile terminal establishes remote communication with the high in the clouds server and is connected:
the mobile terminal is used for generating a learning instruction according to a function ID (identity) and sending the learning instruction to the main control module, wherein the function ID corresponds to the current key function of the infrared remote controller of the current controlled equipment;
the main control module is used for controlling the infrared acquisition module to acquire the infrared codes transmitted by the infrared remote controller of the current controlled equipment according to the learning instruction, wherein the encoding structure of the infrared codes sequentially comprises a carrier frequency and a plurality of alternately repeated pulse signals and interval signals, the first and the last of the plurality of alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes;
the main control module is used for determining the value range of the extraction coefficient according to the infrared waveform data, taking the minimum value of the value range of the extraction coefficient as the current value of the extraction coefficient, and the value range of the extraction coefficient is expressed as:
1≤n≤(len-8)/8
wherein len represents the total byte number of the infrared waveform data, and n represents an extraction coefficient and is an integer;
the main control module is used for multiplying the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extracting data forwards from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched;
the main control module is used for sequentially intercepting data forwards from the beginning of the data to be matched in the infrared waveform data and performing waveform matching on the intercepted data and the data to be matched each time;
the main control module is used for judging whether the number of times of successful continuous matching reaches a preset number, judging that the data to be matched is a repeated code of infrared waveform data when the number of times of successful continuous matching reaches the preset number, sending the repeated code to the mobile terminal, selecting the next value of the current value of the extraction coefficient to replace the current value when the number of times of continuous matching does not reach the preset number, and repeating the process after the current value of the extraction coefficient is multiplied by the preset coefficient to obtain the extraction length until the current value of the extraction coefficient is the last value of the value range;
the mobile terminal is further used for creating an infrared remote control code file corresponding to the current controlled equipment, pairing the repeated codes with the function ID, writing the repeated codes into the infrared remote control code file, and uploading the infrared remote control code file to a cloud server.
Preferably, the predetermined factor is 4.
Preferably, the preset number of times is 3.
Preferably, the infrared learning terminal further comprises an infrared emission module, and the mobile terminal is used for downloading an infrared remote control code file corresponding to the current controlled device from a cloud server and extracting each function ID and a repetition code matched with each function ID from the infrared remote control code file;
the mobile terminal is used for generating a long-press remote control instruction according to the function ID and sending the long-press remote control instruction to the main control module;
the main control module is used for storing each function ID and the matched repeated codes thereof, taking out the repeated codes corresponding to the function ID according to the long-press remote control instruction, and controlling the infrared emission module to continuously emit the repeated codes so as to simulate the long-press function of the key.
Preferably, the wireless communication connection is a bluetooth connection or a WIFI connection.
Preferably, the remote communication connection is a mobile network connection or a WIFI connection.
Different from the prior art, the invention has the beneficial effects that: the learning and the simulation of long-term pressing of the keys of any equipment remote controller are realized, the user experience is greatly improved, the learned infrared codes can be stored at the cloud, the control equipment is prevented from being learned again every time, and the installation and debugging efficiency of Internet of things projects is greatly improved.
Drawings
Fig. 1 is a schematic flow chart of an infrared repeated code learning method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an infrared remote control system applied to the internet of things according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of an infrared repetitive code learning method according to an embodiment of the present invention. The infrared repeated code learning method of the embodiment comprises the following steps:
s1: and generating a learning instruction according to the function ID, wherein the function ID corresponds to the current key function of the infrared remote controller of the current controlled equipment.
The function ID may be manually set by a user, the user needs to learn a current key with a long-press function on the remote controller, for example, volume +, and set the function ID to 001, and after the function ID is set, a learning instruction is generated according to the function ID. Of course, the function ID may be automatically set according to a preset policy.
S2: the method comprises the steps of collecting infrared codes sent by an infrared remote controller of current controlled equipment according to a learning instruction, wherein the coding structure of the infrared codes sequentially comprises a carrier frequency, a plurality of alternately repeated pulse signals and interval signals, the first and the last of the alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes.
The infrared code is sent by the infrared remote controller when a user presses a current key on the infrared remote controller of the current controlled device for a long time. In one application, the coding structure of the infrared code is shown in table 1.
TABLE 1 coding structure of infrared coding
Figure BDA0002658889070000041
Figure BDA0002658889070000051
S3: determining the value range of the extraction coefficient according to the infrared waveform data, and taking the minimum value of the value range of the extraction coefficient as the current value of the extraction coefficient, wherein the value range of the extraction coefficient is expressed as follows:
1≤n≤(len-8)/8
wherein len represents the total number of bytes of the infrared waveform data, and n represents the extraction coefficient and is an integer.
First, according to the coding structure of table 1, if there is a repetition code, the pulse signal at the end of coding is necessarily a part of the repetition code, and the infrared coding corresponding to the carrier frequency and the current key function takes at least 8 bytes, i.e. 2 bytes of carrier frequency and 6 bytes of waveform data (two pulse signals plus one interval signal), which cannot be a part of the repetition code, so that the data of this part is not considered when searching for the repetition code, which is also the meaning of len-8.
Secondly, if a certain segment of infrared code is a repeated code, it means that the infrared code is required to appear at least twice, for example, the data length of len-8 is 8 bytes, and the repeated code is 8/2-4 bytes at the longest, because if a certain segment of infrared code exceeds 4 bytes, the same data as the certain segment of infrared code cannot appear in the remaining data length. This means (len-8)/2.
Finally, (len-8)/2/4, that is, (len-8)/8, is used as the unit number of the repetition code since the minimum unit of the repetition code is at least one interval signal and one pulse signal, occupying 4 bytes in length in the coding structure.
When step S3 is performed for the first time, n is 1.
S4: and multiplying the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extracting data forwards from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched.
In the present embodiment, the predetermined coefficient is 4. That is, the extraction length is 4 n. Since the minimum unit length of the repetition code is 4 bytes, the maximum length cannot exceed 4 × (len-8)/8, and data exceeding this length cannot be a repetition code.
S5: and (3) sequentially intercepting data forwards from the beginning of the data to be matched in the infrared waveform data, and performing waveform matching on the intercepted data and the data to be matched each time.
The data is sequentially intercepted forwards in the infrared waveform data, namely, the data before the data to be matched is intercepted into a plurality of sections, and the length of each section is the same as that of the data to be matched.
S6: and judging whether the number of times of successful continuous matching reaches the preset number, if so, performing step S7, and if not, performing step S8.
In the present embodiment, the preset number of times is 3. In general, since the error range of the duration of the interval signal or the pulse signal is within ± 5%, 4 or more times of code repetition are required to be regarded as the repetition code, and thus the preset number of times is set to 3.
S7: and judging that the data to be matched is a repeated code of the infrared waveform data, and writing the repeated code and the function ID into an infrared remote control code file corresponding to the current controlled equipment after pairing.
S8: and selecting the next value of the current value of the extraction coefficient to replace the current value, and repeating the step S4 until the current value of the extraction coefficient is the last value of the value range.
When the method goes to step S8, the first matching is finished, it is described that the data to be matched with the extraction length of 4 is not a repetition code, at this time, the next value (i.e. 2) of the current value of the extraction coefficient needs to be substituted for the current value, after step S4 is repeated, the extraction length of 4 × 2 is 8, and the data to be matched is obtained by re-extracting the data forward according to the extraction length. That is, if the matching is finished each time it proceeds to step S8, the value of n is incremented by 1, and step S4 is repeated.
Referring to fig. 2, an architecture diagram of an infrared remote control system applied to the internet of things according to an embodiment of the present invention is shown. The infrared remote control system of the embodiment comprises an infrared learning terminal 1, a mobile terminal 2 and a cloud server 3, wherein the infrared learning terminal 1 comprises a main control module 11 and an infrared acquisition module 12, the mobile terminal 2 is in wireless communication connection with the main control module 11, and the mobile terminal 2 is in remote communication connection with the cloud server 3. The wireless communication connection may be a bluetooth connection or a WIFI connection. The telecommunication connection may be a mobile network connection or a WIFI connection.
The mobile terminal 2 is configured to generate a learning instruction according to the function ID, and send the learning instruction to the main control module 11, where the function ID corresponds to a current key function of the infrared remote controller of the current controlled device. The function ID may be manually set by the user, the user needs to learn the current key with the long-press function on the remote controller, for example, volume +, and set the function ID to 001, and after the function ID is set, the mobile terminal 2 generates a learning instruction according to the function ID. Of course, the function ID may be automatically set according to a preset policy
The main control module 11 is configured to control the infrared acquisition module 12 to acquire an infrared code sent by an infrared remote controller of a current controlled device according to a learning instruction, where the coding structure of the infrared code is sequentially a carrier frequency and a plurality of alternately repeated pulse signals and interval signals, a first and a last of the plurality of alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes. The infrared code is sent by the infrared remote controller when a user presses a current key on the infrared remote controller of the current controlled device for a long time.
The main control module 11 is configured to determine a value range of the extraction coefficient according to the infrared waveform data, and use a minimum value of the value range of the extraction coefficient as a current value of the extraction coefficient, where the value range of the extraction coefficient is expressed as:
1≤n≤(len-8)/8
wherein len represents the total number of bytes of the infrared waveform data, and n represents the extraction coefficient and is an integer.
First, according to the coding structure of table 1, if there is a repetition code, the pulse signal at the end of coding is necessarily a part of the repetition code, and the infrared coding corresponding to the carrier frequency and the current key function takes at least 8 bytes, i.e. 2 bytes of carrier frequency and 6 bytes of waveform data (two pulse signals plus one interval signal), which cannot be a part of the repetition code, so that the data of this part is not considered when searching for the repetition code, which is also the meaning of len-8.
Secondly, if a certain segment of infrared code is a repeated code, it means that the infrared code is required to appear at least twice, for example, the data length of len-8 is 8 bytes, and the repeated code is 8/2-4 bytes at the longest, because if a certain segment of infrared code exceeds 4 bytes, the same data as the certain segment of infrared code cannot appear in the remaining data length. This means (len-8)/2.
Finally, (len-8)/2/4, that is, (len-8)/8, is used as the unit number of the repetition code since the minimum unit of the repetition code is at least one interval signal and one pulse signal, occupying 4 bytes in length in the coding structure.
When n is taken for the first time, n is 1
The main control module 11 is configured to multiply the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extract data forward from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched. In the present embodiment, the predetermined coefficient is 4. That is, the extraction length is 4 n. Since the minimum unit length of the repetition code is 4 bytes, the maximum length cannot exceed 4 × (len-8)/8, and data exceeding this length cannot be a repetition code.
The main control module 11 is configured to sequentially intercept data from the start of the data to be matched forward in the infrared waveform data, and perform waveform matching on the data intercepted each time and the data to be matched. The data is sequentially intercepted forwards in the infrared waveform data, namely, the data before the data to be matched is intercepted into a plurality of sections, and the length of each section is the same as that of the data to be matched.
The main control module 11 is configured to determine whether the number of times of successful continuous matching reaches a preset number, determine that the data to be matched is a repetitive code of the infrared waveform data when the preset number is reached, send the repetitive code to the mobile terminal 2, select a next value of a current value of the extraction coefficient to replace a current value when the preset number is not reached, and repeat a process after the current value of the extraction coefficient is multiplied by the preset coefficient to obtain an extraction length until the current value of the extraction coefficient is a last value of a value range.
In the present embodiment, the preset number of times is 3. In general, since the error range of the duration of the interval signal or the pulse signal is within ± 5%, 4 or more times of code repetition are required to be regarded as the repetition code, and thus the preset number of times is set to 3.
If the data to be matched is not the repeated code, the first matching is finished, which indicates that the data to be matched with the extraction length of 4 is not the repeated code, at this time, the next value (namely 2) of the current value of the extraction coefficient is required to replace the current value, after the process of multiplying the current value of the extraction coefficient by the preset coefficient to obtain the extraction length is repeated, the extraction length of 4 × 2 is 8, and the data to be matched is obtained by re-extracting the data forward according to the extraction length. That is, if the matching is completed each time and the process proceeds to step S8, the value of n is incremented by 1, and the process after the current value of the extraction coefficient is multiplied by the preset coefficient to obtain the extraction length is repeated.
The mobile terminal 2 is further configured to create an infrared remote control code file corresponding to the current controlled device, pair the repetition code with the function ID, write the repetition code into the infrared remote control code file, and upload the infrared remote control code file to the cloud server 3.
In this embodiment, the infrared learning terminal 1 further includes an infrared emission module 13, and the mobile terminal 2 is configured to download an infrared remote control code file corresponding to the current controlled device from the cloud server 3, and extract each function ID and a repetition code paired therewith from the infrared remote control code file;
the mobile terminal 2 is used for generating a long-press remote control instruction according to the function ID and sending the long-press remote control instruction to the main control module 11;
the main control module 11 is configured to store each function ID and its paired repetition code, take out the repetition code corresponding to the function ID according to the long-press remote control instruction, and control the infrared emission module 13 to continuously emit the repetition code to simulate the key long-press function.
The mobile terminal 2 may provide a remote controller simulation interface, and the user presses a certain key in the remote controller simulation interface for a long time, for example, the long time exceeds 500 milliseconds, at this time, the mobile terminal 2 acquires a function ID corresponding to the simulation key, and generates a long-press remote control instruction according to the function ID. When the user releases the key, the mobile terminal 2 can stop sending the repeated codes by long-pressing the parameters in the remote control command and sending the parameters to the main control module 11.
In this way, the infrared repeated code learning method and the infrared remote control system applied to the internet of things of the embodiments of the present invention determine the extraction length according to the total byte length of the infrared code sent by the infrared remote controller, extract the data to be matched forward from the end of the last pulse signal of the infrared code according to the extraction length, match the data to be matched forward for a plurality of times, determine that the data to be matched is a repeated code when the number of consecutive matching times reaches the preset number, thereby realizing the purposes of learning the infrared repeated codes and simulating the long-press function of the keys, realizing the learning and simulation of the long-press function of the keys of the remote controller of any equipment, greatly improving the user experience, and the infrared codes after learning can be stored at the cloud, so that the control equipment is prevented from learning again every time, and the installation and debugging efficiency of the Internet of things project is greatly improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. An infrared repeated code learning method is characterized by comprising the following steps:
s1: generating a learning instruction according to a function ID, wherein the function ID corresponds to the current key function of the infrared remote controller of the current controlled equipment;
s2: acquiring infrared codes sent by an infrared remote controller of current controlled equipment according to the learning instruction, wherein the coding structure of the infrared codes sequentially comprises a carrier frequency, a plurality of alternately repeated pulse signals and interval signals, the first and the last of the alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes;
s3: determining the value range of the extraction coefficient according to the infrared waveform data, and taking the minimum value of the value range of the extraction coefficient as the current value of the extraction coefficient, wherein the value range of the extraction coefficient is expressed as follows:
1≤n≤(len-8)/8
wherein len represents the total byte number of the infrared waveform data, and n represents an extraction coefficient and is an integer;
s4: multiplying the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extracting data forward from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched;
s5: sequentially intercepting data forwards from the beginning of the data to be matched in the infrared waveform data, and performing waveform matching on the intercepted data and the data to be matched each time;
s6: judging whether the number of times of successful continuous matching reaches a preset number, if so, performing step S7, and if not, performing step S8;
s7: judging that the data to be matched is a repeated code of infrared waveform data, pairing the repeated code with a function ID, and writing the paired repeated code into an infrared remote control code file corresponding to the current controlled equipment;
s8: and selecting the next value of the current value of the extraction coefficient to replace the current value, and repeating the step S4 until the current value of the extraction coefficient is the last value of the value range.
2. The infrared repeated code learning method as claimed in claim 1, wherein the predetermined coefficient is 4.
3. The infrared repeated code learning method as claimed in claim 2, wherein the predetermined number of times is 3.
4. The infrared remote control system applied to the Internet of things is characterized by comprising an infrared learning terminal, a mobile terminal and a cloud server, wherein the infrared learning terminal comprises an infrared acquisition module and a main control module, the mobile terminal is in wireless communication connection with the main control module, and the mobile terminal is in remote communication connection with the cloud server;
the mobile terminal is used for generating a learning instruction according to a function ID (identity) and sending the learning instruction to the main control module, wherein the function ID corresponds to the current key function of the infrared remote controller of the current controlled equipment;
the main control module is used for controlling the infrared acquisition module to acquire the infrared codes transmitted by the infrared remote controller of the current controlled equipment according to the learning instruction, wherein the encoding structure of the infrared codes sequentially comprises a carrier frequency and a plurality of alternately repeated pulse signals and interval signals, the first and the last of the plurality of alternately repeated pulse signals and interval signals are pulse signals, and the carrier frequency, the pulse signals and the interval signals are all 2 bytes;
the main control module is used for determining the value range of the extraction coefficient according to the infrared waveform data, taking the minimum value of the value range of the extraction coefficient as the current value of the extraction coefficient, and the value range of the extraction coefficient is expressed as:
1≤n≤(len-8)/8
wherein len represents the total byte number of the infrared waveform data, and n represents an extraction coefficient and is an integer;
the main control module is used for multiplying the current value of the extraction coefficient by a preset coefficient to obtain an extraction length, and extracting data forwards from the end of the last pulse signal of the infrared waveform data according to the extraction length to obtain data to be matched;
the main control module is used for sequentially intercepting data forwards from the beginning of the data to be matched in the infrared waveform data and performing waveform matching on the intercepted data and the data to be matched each time;
the main control module is used for judging whether the number of times of successful continuous matching reaches a preset number, judging that the data to be matched is a repeated code of infrared waveform data when the number of times of successful continuous matching reaches the preset number, sending the repeated code to the mobile terminal, selecting the next value of the current value of the extraction coefficient to replace the current value when the number of times of continuous matching does not reach the preset number, and repeating the process after the current value of the extraction coefficient is multiplied by the preset coefficient to obtain the extraction length until the current value of the extraction coefficient is the last value of the value range;
the mobile terminal is further used for creating an infrared remote control code file corresponding to the current controlled equipment, pairing the repeated codes with the function ID, writing the repeated codes into the infrared remote control code file, and uploading the infrared remote control code file to a cloud server.
5. The infrared remote control system of claim 4 wherein the predetermined factor is 4.
6. The infrared remote control system of claim 5 wherein the predetermined number of times is 3.
7. The infrared remote control system of claim 6, wherein the infrared learning terminal further comprises an infrared emission module, and the mobile terminal is configured to download an infrared remote control code file corresponding to a currently controlled device from a cloud server, and extract each function ID and a repetition code of a pairing thereof from the infrared remote control code file;
the mobile terminal is used for generating a long-press remote control instruction according to the function ID and sending the long-press remote control instruction to the main control module;
the main control module is used for storing each function ID and the matched repeated codes thereof, taking out the repeated codes corresponding to the function ID according to the long-press remote control instruction, and controlling the infrared emission module to continuously emit the repeated codes so as to simulate the long-press function of the key.
8. The infrared remote control system of claim 4, wherein the wireless communication connection is a Bluetooth connection or a WIFI connection.
9. The infrared remote control system of claim 4, wherein the remote communication connection is a mobile network connection or a WIFI connection.
CN202010897348.0A 2020-08-31 2020-08-31 Infrared repeated code learning method and infrared remote control system applied to Internet of things Active CN111968361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010897348.0A CN111968361B (en) 2020-08-31 2020-08-31 Infrared repeated code learning method and infrared remote control system applied to Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010897348.0A CN111968361B (en) 2020-08-31 2020-08-31 Infrared repeated code learning method and infrared remote control system applied to Internet of things

Publications (2)

Publication Number Publication Date
CN111968361A true CN111968361A (en) 2020-11-20
CN111968361B CN111968361B (en) 2022-04-19

Family

ID=73399458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010897348.0A Active CN111968361B (en) 2020-08-31 2020-08-31 Infrared repeated code learning method and infrared remote control system applied to Internet of things

Country Status (1)

Country Link
CN (1) CN111968361B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112735117A (en) * 2020-12-28 2021-04-30 深圳市路畅科技股份有限公司 Filtering method, system and application of IR analysis based on NEC standard
CN115565358A (en) * 2022-10-12 2023-01-03 深圳市永达电子信息股份有限公司 An infrared remote control copy prevention method and device

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01248997A (en) * 1988-03-28 1989-10-04 Matsushita Electric Works Ltd Motor control method
CN101989379A (en) * 2009-07-31 2011-03-23 宁波家天下智能系统有限公司 Learning method and transmitting method of infrared cod signal and remote controller
CN102096998A (en) * 2009-12-10 2011-06-15 中国联合网络通信集团有限公司 Remote control information receiving and processing method and system as well as digital television receiving device
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method
CN102467816A (en) * 2010-11-18 2012-05-23 深圳艾科创新微电子有限公司 Infrared remote control signal decoding method and device
CN103426292A (en) * 2013-09-03 2013-12-04 湖南工业大学 Infrared remote control, infrared code learning method and infrared code emission method
CN103582883A (en) * 2011-02-24 2014-02-12 A9.Com公司 Improved encoding and decoding of variable-length data with group formats
CN103854466A (en) * 2012-11-29 2014-06-11 陕西灵彩信源信息技术有限公司 Design of infrared remote controller with learning function
CN104240492A (en) * 2014-09-26 2014-12-24 深圳市中兴移动通信有限公司 Method, device and terminal for debugging infrared remote control signals
CN104392600A (en) * 2014-11-26 2015-03-04 福建求实智能股份有限公司 Method for storing by collecting different infrared frequencies
CN104658238A (en) * 2013-11-18 2015-05-27 广东美的制冷设备有限公司 Household electrical appliance and remote control setting method thereof
CN105118285A (en) * 2015-09-25 2015-12-02 广州视睿电子科技有限公司 Anti-interference infrared remote control decoding method and system
US9373250B2 (en) * 2014-12-30 2016-06-21 Smk Electronics Corporation Remote controller having one shot automatic mapping of learned function
CN106448129A (en) * 2016-10-26 2017-02-22 青岛海信电器股份有限公司 Method and device for removing interference pulse in infrared remote control data
CN106448128A (en) * 2016-10-26 2017-02-22 青岛海信电器股份有限公司 Processing method and system of infrared remote control data
CN107545717A (en) * 2016-06-23 2018-01-05 瑞昱半导体股份有限公司 Infrared learning device
CN107610445A (en) * 2017-10-12 2018-01-19 长沙蒲公英智能科技有限公司 The data-encoding scheme and its circuit of infrared self study
CN108182795A (en) * 2018-01-11 2018-06-19 鹤壁天海电子信息系统有限公司 A kind of infrared data learning method, device and electronic equipment
CN109064733A (en) * 2018-09-30 2018-12-21 珠海全志科技股份有限公司 Adaptive infrared signal coding/decoding method, computer installation and its control device

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01248997A (en) * 1988-03-28 1989-10-04 Matsushita Electric Works Ltd Motor control method
CN101989379A (en) * 2009-07-31 2011-03-23 宁波家天下智能系统有限公司 Learning method and transmitting method of infrared cod signal and remote controller
CN102096998A (en) * 2009-12-10 2011-06-15 中国联合网络通信集团有限公司 Remote control information receiving and processing method and system as well as digital television receiving device
CN102467816A (en) * 2010-11-18 2012-05-23 深圳艾科创新微电子有限公司 Infrared remote control signal decoding method and device
CN102129769A (en) * 2011-01-14 2011-07-20 利尔达科技有限公司 Universal remote control method
CN103582883A (en) * 2011-02-24 2014-02-12 A9.Com公司 Improved encoding and decoding of variable-length data with group formats
CN103854466A (en) * 2012-11-29 2014-06-11 陕西灵彩信源信息技术有限公司 Design of infrared remote controller with learning function
CN103426292A (en) * 2013-09-03 2013-12-04 湖南工业大学 Infrared remote control, infrared code learning method and infrared code emission method
CN104658238A (en) * 2013-11-18 2015-05-27 广东美的制冷设备有限公司 Household electrical appliance and remote control setting method thereof
CN104240492A (en) * 2014-09-26 2014-12-24 深圳市中兴移动通信有限公司 Method, device and terminal for debugging infrared remote control signals
CN104392600A (en) * 2014-11-26 2015-03-04 福建求实智能股份有限公司 Method for storing by collecting different infrared frequencies
US9373250B2 (en) * 2014-12-30 2016-06-21 Smk Electronics Corporation Remote controller having one shot automatic mapping of learned function
CN105118285A (en) * 2015-09-25 2015-12-02 广州视睿电子科技有限公司 Anti-interference infrared remote control decoding method and system
CN107545717A (en) * 2016-06-23 2018-01-05 瑞昱半导体股份有限公司 Infrared learning device
CN106448129A (en) * 2016-10-26 2017-02-22 青岛海信电器股份有限公司 Method and device for removing interference pulse in infrared remote control data
CN106448128A (en) * 2016-10-26 2017-02-22 青岛海信电器股份有限公司 Processing method and system of infrared remote control data
CN107610445A (en) * 2017-10-12 2018-01-19 长沙蒲公英智能科技有限公司 The data-encoding scheme and its circuit of infrared self study
CN108182795A (en) * 2018-01-11 2018-06-19 鹤壁天海电子信息系统有限公司 A kind of infrared data learning method, device and electronic equipment
CN109064733A (en) * 2018-09-30 2018-12-21 珠海全志科技股份有限公司 Adaptive infrared signal coding/decoding method, computer installation and its control device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
顾晓红: "学习型遥控器中的码型识别", 《电子与封装》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112735117A (en) * 2020-12-28 2021-04-30 深圳市路畅科技股份有限公司 Filtering method, system and application of IR analysis based on NEC standard
CN115565358A (en) * 2022-10-12 2023-01-03 深圳市永达电子信息股份有限公司 An infrared remote control copy prevention method and device

Also Published As

Publication number Publication date
CN111968361B (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN111968361B (en) Infrared repeated code learning method and infrared remote control system applied to Internet of things
CN106657197B (en) File uploading method and device
CN104244054B (en) A kind of remote control method of multi-terminal equipment and related device and system
CN104157129B (en) Infrared pattern acquisition methods, Cloud Server, infrared transponder and system
US10720048B2 (en) Infrared remote control learning method and device
CN100466005C (en) An electrical appliance control device and method realized by a set-top box
CN105070035B (en) The real-time compression method and device of infrared remote control code stream
CN104473556A (en) Method and device for controlling cooking device and cooking device
CN113742174B (en) Cloud mobile phone application monitoring method, device, electronic equipment and storage medium
CN102608929A (en) Method for controlling cooking information output of cooking electrical system
CN105827321A (en) Nonlinear compensation method, nonlinear compensation device and nonlinear compensation system in multi-carrier optical communication system
JP2013535127A (en) Programming of general-purpose remote control device
CN107423040A (en) Live application development method and device
CN105957332A (en) Method for learning and using infrared remote controller codes and learning type remote controller
CN105391605A (en) Quick network access method, system and equipment for intelligent WIFI equipment
WO2023098002A1 (en) Method, system and apparatus for controlling household appliance, and storage medium and electronic apparatus
CN101859487A (en) Electronic book and remote control method capable of realizing remote control TV function
CN110990144B (en) A task determination method and related equipment
US20110298646A1 (en) Code set determination for a remote control
CN110992672A (en) Infrared remote controller learning and encoding method, infrared remote controller system and storage medium
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN113325750A (en) Scene intelligent adjusting method, system, device and storage medium
CN201584053U (en) Universal integrated remote controller
CN101465047B (en) Intelligent remote controller and control method thereof
CN108931923B (en) Device control method and apparatus, storage medium, and electronic apparatus

Legal Events

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