CN108986444B - Infrared code learning method and transmitting equipment thereof - Google Patents

Infrared code learning method and transmitting equipment thereof Download PDF

Info

Publication number
CN108986444B
CN108986444B CN201710414732.9A CN201710414732A CN108986444B CN 108986444 B CN108986444 B CN 108986444B CN 201710414732 A CN201710414732 A CN 201710414732A CN 108986444 B CN108986444 B CN 108986444B
Authority
CN
China
Prior art keywords
infrared
signal
code
coding
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710414732.9A
Other languages
Chinese (zh)
Other versions
CN108986444A (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.)
Oceans King Lighting Science and Technology Co Ltd
Oceans King Dongguan Lighting Technology Co Ltd
Shenzhen Oceans King Lighting Engineering Co Ltd
Original Assignee
Oceans King Lighting Science and Technology Co Ltd
Oceans King Dongguan Lighting Technology Co Ltd
Shenzhen Oceans King Lighting Engineering 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 Oceans King Lighting Science and Technology Co Ltd, Oceans King Dongguan Lighting Technology Co Ltd, Shenzhen Oceans King Lighting Engineering Co Ltd filed Critical Oceans King Lighting Science and Technology Co Ltd
Priority to CN201710414732.9A priority Critical patent/CN108986444B/en
Publication of CN108986444A publication Critical patent/CN108986444A/en
Application granted granted Critical
Publication of CN108986444B publication Critical patent/CN108986444B/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

Abstract

The invention is suitable for the technical field of infrared, and provides an infrared code learning method and an infrared code transmitting device, wherein the method comprises the following steps: receiving an infrared code learning instruction sent by gateway equipment; acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway equipment from the infrared signal; and setting a number corresponding to the infrared coding signal. According to the embodiment of the invention, the infrared code learning instruction sent by the gateway equipment is received, the infrared code sending equipment is activated to carry out infrared code learning and obtain the infrared signal, then the infrared code signal corresponding to the learning instruction is extracted from the infrared signal and stored, and further the corresponding serial number is set for the infrared code signal, so that the infrared code is convenient to call after learning, and the problems that the existing infrared code learning technology depends on manual learning, the learning efficiency is low, special infrared code learning equipment is needed for assistance, the learning difficulty is high, and the equipment is inconvenient to update are solved.

Description

Infrared code learning method and transmitting equipment thereof
Technical Field
The invention belongs to the technical field of infrared, and particularly relates to an infrared code learning method and an infrared code transmitting device.
Background
The existing remote control device mainly transmits equipment through infrared signals, each control command corresponds to one infrared code signal, and if equipment manufacturers need to adjust the control commands or control strategies, the infrared codes corresponding to the control commands or the control strategies need to be adaptively adjusted, so that the equipment executes corresponding operations according to the adjusted infrared codes. However, in the existing infrared code learning technology, the infrared codes in the infrared code transmitting device storage module need to be adjusted on site through special infrared code learning devices, manual learning is carried out manually depending on manpower, the learning efficiency is low, special infrared code learning devices are needed for assistance, the learning difficulty is high, and the devices are not convenient to update.
Disclosure of Invention
The embodiment of the invention aims to provide an infrared code learning method and an infrared code transmitting device, and aims to solve the problems that the existing infrared code learning technology depends on manual learning, the learning efficiency is low, special infrared code learning equipment is needed for assistance, the learning difficulty is high, and the equipment is not convenient to update.
In a first aspect, an embodiment of the present invention provides a method for learning an infrared code, where the learning of the infrared code includes:
receiving an infrared code learning instruction sent by gateway equipment;
acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway equipment from the infrared signal; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and setting a number corresponding to the infrared coding signal.
In a second aspect, an embodiment of the present invention provides an infrared encoded transmitting apparatus, including:
the code learning instruction receiving unit is used for receiving an infrared code learning instruction sent by the gateway equipment;
the infrared coding signal acquisition unit is used for acquiring infrared signals and extracting the infrared coding signals sent by the gateway equipment from the infrared signals; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and the number setting unit is used for setting a number corresponding to the infrared coding signal.
In a third aspect, an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
receiving an infrared code learning instruction sent by gateway equipment;
acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway equipment from the infrared signal; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and setting a number corresponding to the infrared coding signal.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the following steps:
receiving an infrared code learning instruction sent by gateway equipment;
acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway equipment from the infrared signal; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and setting a number corresponding to the infrared coding signal.
The implementation of the infrared coding learning method and the infrared coding transmitting device provided by the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, the infrared code learning instruction sent by the gateway equipment is received, the infrared code sending equipment is activated to learn the infrared codes, then the infrared code signal corresponding to the learning instruction is extracted from the obtained infrared signal, and after the extraction is finished, the infrared code signal is stored and the corresponding number is set for the infrared code signal, so that the infrared codes are convenient to call after learning. Therefore, the infrared code transmitting device does not need to be adjusted on site by a special infrared code learning device, and the infrared code transmitting device can automatically learn the infrared codes according to the learning instruction and the infrared code signals, so that the infrared code learning efficiency is improved, the learning difficulty of the infrared code transmitting device is reduced, and the equipment manufacturer can conveniently update the control strategy.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a learning method for infrared codes according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an implementation of the infrared code learning method S102 according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating an implementation of the infrared code learning methods S201 to S203 according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating an implementation of a method for learning infrared codes according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an infrared-coded transmitting device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the embodiment of the invention, the infrared code learning instruction sent by the gateway equipment is received, the infrared code sending equipment is activated to carry out infrared code learning and obtain the infrared signal, then the infrared code signal corresponding to the learning instruction is extracted from the infrared signal and stored, and further the corresponding serial number is set for the infrared code signal, so that the infrared code is convenient to call after learning, and the problems that the existing infrared code learning technology depends on manual learning, the learning efficiency is low, special infrared code learning equipment is needed for assistance, the learning difficulty is high, and the equipment is inconvenient to update are solved.
In the embodiment of the invention, the execution subject of the process is the infrared coded transmitting equipment. The transmitting equipment of the infrared codes is equipment with an infrared transmitting module, and other equipment is controlled through infrared signals. The infrared encoded transmitting device may be a stand-alone device including, but not limited to: an infrared transponder, an infrared remote control device; the infrared coded transmitting device can also be integrated into other devices to work as a functional module, such as a mobile terminal comprising an infrared transmitting module. Fig. 1 shows a flowchart of an implementation of a learning method for infrared codes according to an embodiment of the present invention, which is detailed as follows:
in S101, an infrared code learning instruction transmitted by the gateway device is received.
In this embodiment, after acquiring new infrared code information, the gateway device generates an infrared code learning instruction, where the infrared code learning instruction is used to inform the transmitting device of the infrared code that infrared code learning needs to be performed. It should be noted that the infrared code transmitting device may obtain the infrared code learning instruction through a radio frequency communication module, such as a WiFi communication module, a bluetooth communication module, a low power consumption bluetooth communication module, and other radio frequency network communication modules; the infrared code learning instruction can also be acquired by an infrared signal receiving module.
Optionally, in this embodiment, after the transmitting device of the infrared code is turned on, and/or during the working process, a code query instruction is sent to the gateway device at a preset time interval, and the gateway device determines whether the infrared code in the transmitting device of the infrared code needs to be updated according to the code query instruction. And if the gateway equipment determines that the infrared code transmitting equipment needs to perform infrared code learning, sending an infrared code learning instruction to the infrared code transmitting equipment, and executing the relevant operation of S101. Since the transmitting device of the infrared code may be in a closed state when the gateway device initiates the learning operation of the infrared code, and the learning opportunity of the infrared code will be missed, in order to solve the problem, the transmitting device of the infrared code may actively send a code query instruction to the gateway device, so that the gateway device determines whether the infrared code updating needs to be performed on the transmitting device of the infrared code according to the query instruction.
Optionally, in this embodiment, the infrared code learning instruction includes a device identifier. The gateway device can broadcast the infrared code learning instruction through the radio frequency communication network or the infrared communication network, the infrared code transmitting device extracts the device identification contained in the instruction after receiving the infrared code learning instruction, matches the device identification with the local device identification, and if the matching is successful, the related operation of S102 is executed; otherwise, if the matching is unsuccessful, continuing to wait for receiving the infrared code learning instruction sent by the gateway equipment. Because a plurality of infrared code transmitting devices can belong to the same gateway device, the infrared code learning instruction sent by the same gateway device is received. Therefore, in order to determine whether the device corresponding to the infrared code learning instruction is the self device by each infrared code transmitting device, the device identification contained in the infrared code learning instruction needs to be matched.
Optionally, in this embodiment, the gateway device is to be connected to a server. The user can upload the new control strategy to the server, and the server sends the control strategy to the corresponding gateway equipment after receiving the control strategy, so that the gateway equipment can learn the infrared coding emission equipment associated with the control strategy. After receiving the control policy sent by the server, the gateway device will perform the relevant operation of S101.
In S102, acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway device from the infrared signal; the infrared coding signal is generated by the gateway device according to a control strategy sent by the server and a preset infrared coding conversion algorithm.
In this embodiment, after receiving the infrared code learning instruction sent by the gateway device, the infrared code transmitting device monitors and acquires the infrared signals in the environment, extracts and stores the infrared code signals sent by the gateway device from the acquired infrared signals.
In this embodiment, after receiving a control policy sent by a server, a gateway device converts the control policy into an infrared encoded signal according to a preset infrared code conversion algorithm; wherein, different infrared code signals determine the corresponding control strategy by identifying the jump times of high and low levels of the infrared signals and the duration of each level.
Specifically, the control policy sent by the server may include a signal format of the infrared encoded signal, and the gateway device generates the corresponding infrared encoded signal according to the signal format corresponding to the control policy. If the control strategy sent by the server is as follows: and after the high level of the infrared signal lasts for 3s, jumping to the low level and lasting for 2s, then jumping to the high level and lasting for 1.3s, and ending. The gateway device can directly generate the corresponding infrared coding signal according to the control strategy.
Specifically, the control policy sent by the server may be operation instruction information, and the gateway device queries a corresponding infrared encoding mode according to the operation instruction information, and generates a corresponding infrared encoding instruction according to the operation instruction information included in the control policy and the sequence of each operation instruction information. If the server issues a combined control strategy: starting up, adjusting the volume to 50 percent and adjusting the brightness to 50 percent. After receiving the control strategy, the gateway device queries a corresponding relation table of the operation instructions and the infrared codes, determines that three operation instructions of starting up, adjusting the volume to 50% and adjusting the brightness to 50% correspond to obtain the infrared codes, and generates infrared code signals of the control strategy according to the three infrared codes and the corresponding sequence.
Optionally, in this embodiment, the server may adjust an infrared code corresponding to an existing control policy. Because some infrared coded signals are easily influenced by environmental factors in the using process, the controlled equipment is identified as another operation instruction after receiving the infrared coded signals and executes wrong operation, and therefore, in order to optimize the infrared coded signals, the infrared codes of the existing control strategy can be adjusted. Specifically, the adjusting process may be: and the server sends the control strategy number to be adjusted and the corresponding infrared coding rule to the controlled equipment and the gateway equipment. After receiving the information, the gateway device executes the relevant operations of S101 and S102, so that the transmitting device of the infrared code adjusts the infrared code signal corresponding to the infrared strategy; on the other hand, the controlled device updates the control strategy after receiving the information, so that after receiving the adjusted infrared coding signal, the controlled device executes the operation corresponding to the control strategy.
In S103, a number corresponding to the infrared encoding signal is set.
In this embodiment, after acquiring a complete ir encoded signal, the transmitting device of the ir code will identify the encoding rule of the ir encoded signal. For example, signal characteristic parameters and coding rules related to the ir-encoded signal, such as the number of transitions, the timing of the transitions, the values of the high and low levels, the duration of the levels, and the overall time of the signal of the ir-encoded signal, are stored, so as to reproduce the ir-encoded signal according to the above information.
In this embodiment, the ir-coded transmitting device will assign a number to each ir-coded signal to identify the ir-coded signal. When a user needs to send the infrared coding signal, the corresponding serial number is directly sent to the transmitting equipment of the infrared code, and then the corresponding infrared coding signal is sent.
As can be seen from the above, in the infrared code learning method provided in the embodiment of the present invention, the infrared code learning instruction sent by the gateway device is received, the infrared code sending device is activated to perform infrared code learning, then the infrared code signal corresponding to the learning instruction is extracted from the obtained infrared signal, and after the infrared code signal is extracted, the infrared code signal is stored and the corresponding number is set for the infrared code signal, so that the infrared code is called after learning. Therefore, the infrared code transmitting device does not need to be adjusted on site by a special infrared code learning device, and the infrared code transmitting device can automatically learn the infrared codes according to the learning instruction and the infrared code signals, so that the infrared code learning efficiency is improved, the learning difficulty of the infrared code transmitting device is reduced, and the equipment manufacturer can conveniently update the control strategy.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of an infrared code learning method S102 according to another embodiment of the present invention. Compared with the previous embodiment, the infrared code learning method S102 provided in this embodiment specifically includes S201 to S204.
In S201, it is monitored whether the infrared signal satisfies a preset signal start determination condition.
In this embodiment, after receiving an infrared code learning instruction sent by a gateway device, an infrared code transmitting device continuously monitors an infrared signal in an environment, matches the acquired infrared signal with a preset code start triggering condition, and determines whether to start recording the infrared signal.
In this embodiment, if the transmitting device of the infrared code determines that a certain infrared code signal meets a preset code start triggering condition, the transmitting device locks the infrared signal and performs the relevant operation of S202; otherwise, the infrared signal is continuously monitored and matched with the code starting triggering condition. Optionally, if none of the received infrared information satisfies the preset code start triggering condition within a preset time, the related operation of S201 is stopped. If the receiving time exceeds the waiting receiving time, the infrared coding signal returned by the gateway equipment is not received, the monitoring is stopped, and the normal working mode is returned.
Optionally, in this implementation, the start-of-encoding trigger condition is to determine whether the infrared signal is an infrared pulse signal with a preset frequency. Before sending the infrared code signal, the gateway device adds a high-frequency pulse signal in front of the infrared code signal as a start mark of the infrared code signal. The infrared coded transmitting device continuously monitors whether the received infrared signal has the infrared pulse signal with the preset frequency through the infrared signal receiving module. If a certain infrared signal contains the infrared pulse signal with the preset frequency, the infrared signal meets the preset code starting triggering condition.
Optionally, in this embodiment, the encoding start triggering condition is to determine whether the level of the infrared signal is greater than a preset level threshold. The gateway device may send an ir signal with a higher level as a start flag before sending the ir encoded signal. Since the general signal strength of the environmental noise is small, that is, the level value of the signal is relatively small, the gateway device may indicate that the transmitting device of the infrared code needs to start recording the infrared signal as the infrared code signal by transmitting a high-level infrared signal having a large difference from the environmental noise.
In S202, if the infrared signal satisfies a preset signal start determination condition, recording of the infrared signal is started.
In this embodiment, when the sending device of the infrared code determines that the infrared signal meets the preset code start triggering condition, the infrared signal is stored. Specifically, the infrared-coded transmitting device may record the infrared signal by means of a waveform map, a sequence of sampled data, or the like.
In S203, if it is detected that the infrared signal satisfies a preset signal end determination condition, recording of the infrared signal is stopped.
In this embodiment, when the infrared-coded transmitting device detects that the infrared signal satisfies the preset signal-end determination condition, it will stop recording the infrared signal, and perform the correlation operation of S204 on the infrared signal obtained in the time interval: and the time from the moment when the infrared signal meets the code starting triggering condition to the moment when the infrared signal meets the signal ending judging condition.
Optionally, in this embodiment, the preset signal ending determining condition may also be the same as the preset coding start triggering condition, and specifically, the preset signal ending determining condition may be: and judging whether the infrared signal is an infrared pulse signal with a preset frequency or not, or judging whether the level of the infrared signal is greater than a preset level threshold value or not. When the transmitting equipment of the infrared code monitors that the infrared signal meets the preset code starting triggering condition again, the infrared code signal is determined to be finished.
Optionally, in this embodiment, the preset encoding end condition may be: and judging whether the infrared signal reaches a preset signal length. Since the corresponding signal length of each ir-encoded signal may be the same, when the ir-encoded transmitting device records that the obtained ir signal has reached the preset signal length, it indicates that the ir signal has been recorded and belongs to a complete ir-encoded signal, and ends the recording, and performs the relevant operation of S203. It should be noted that the transmitting device of the infrared code may determine the signal length of the infrared code according to the time length of acquiring the infrared signal.
In S204, the recorded infrared signal is taken as the infrared encoding signal.
In this embodiment, the infrared encoded transmitting device takes the infrared signal acquired in S202 as the infrared encoded signal and stores it. Optionally, the transmitting device of the infrared code may also extract a signal characteristic parameter of the infrared signal, use the signal characteristic parameter as the signal characteristic parameter of the infrared code, and then generate a corresponding infrared code signal through the signal characteristic parameter.
In the embodiment of the invention, the infrared coded transmitting equipment extracts the corresponding interval signal in the infrared signal as the infrared coded signal by detecting whether the infrared signal meets the coding start triggering condition and the signal end judging condition, so that the identification efficiency and the identification accuracy of the infrared coded signal are improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of the infrared code learning method S201 to S203 according to another embodiment of the present invention. With respect to the embodiment shown in fig. 2, the method S201 to S203 for learning the infrared code provided in this embodiment includes the following steps:
further, as another embodiment of the present invention, the S201 includes S301 and S302:
in S301, if it is monitored that the level value of the infrared signal has jumped, the holding time of the level value is determined.
In this embodiment, the ir encoded transmitting device will monitor whether the level of the received ir signal is changed, for example, from low to high or from high to low. If the transmitting device of the infrared code detects that the level value of the infrared signal jumps, the step S301 is executed.
In this embodiment, the ir-coded transmitting device recognizes whether the ir signal has a transition by capturing the falling and/or rising edge of the ir signal. Optionally, the ir encoded transmitting device will determine whether the ir signal has jumped or not based on the falling time of the falling edge and the difference between the falling levels and/or the rising time of the rising edge and the difference between the rising levels of the level values of the ir signal. The standard level jump is equivalent to a pulse signal, and in an ideal environment, the duration of the level jump should be 0, but due to the influence of environmental noise in the environment, the level jump has a certain fall time and rise time, so that whether the level change belongs to the level jump can be determined according to the comparison between the fall time and the rise time of the level jump and a preset time threshold.
In this embodiment, the ir encoded transmitting device will obtain the duration of the level value after determining that the ir signal has hopped. Specifically, the IR coded transmitting device may detect whether the second transition of the IR signal occurs and use the time interval between the first and second transitions as the duration of the level value.
Optionally, in this embodiment, if the second jump of the infrared signal is detected within a preset maximum level holding time, that is, the holding time of the level value is greater than the preset maximum level holding time, the maximum level holding time is taken as the holding time of the level value, and the recording of the duration time of the infrared signal is stopped.
In S302, it is determined whether the infrared signal includes a signal start identifier according to the retention time of the level value and a preset encoding format recognition algorithm.
In the present embodiment, since the partial infrared coded signal will use a low level or a high level lasting for a fixed time as the signal start indicator, for example, a National Electrical Code (NEC Code) uses a high level lasting for 9ms as the start indicator. Therefore, the infrared coded transmitting device can match with a preset coding format recognition algorithm according to the duration time of the level value, determine whether the level value is the signal starting identifier in the preset coding rule, and then determine whether the infrared signal contains the signal starting identifier.
In this embodiment, the preset encoding format recognition algorithm may include a plurality of encoding format rules, and the infrared encoding transmitting device matches the holding time of the level value with each encoding format rule, and then determines whether there is a matching encoding format rule in the holding time of the level value. If the infrared signal does not conform to any infrared coding rule, the infrared signal does not contain the infrared coding signal.
In this embodiment, the S202 specifically includes:
in S303, if the infrared signal includes a signal start identifier, recording of the infrared signal is started.
In this embodiment, when the transmitting device of the infrared code determines that the infrared signal includes the signal start identifier, it indicates that the infrared signal satisfies the preset signal start determination condition, and then starts to record the infrared signal.
In the embodiment of the invention, when monitoring the infrared signal level to jump, the infrared coded transmitting equipment determines the duration of the level after jumping, then determines whether the duration of the level is matched with the signal start identifier of the infrared code, and then determines to start recording the infrared signal, so that the recording start time of the infrared coded signal is identified, and the accuracy of acquiring the infrared coded signal is improved.
Further, as another embodiment of the present invention, the S203 specifically includes:
in S304, if the level value of the infrared signal does not jump within a preset time, the recording of the infrared signal is stopped.
In this embodiment, when the infrared encoding transmitting device detects that the level value of the infrared signal does not change within the preset time during the recording process, it is determined that the infrared encoding signal has been transmitted. Since the infrared signal with the level jump belongs to the unnatural waveform signal, when the infrared signal does not jump any more within the preset time, it indicates that the infrared signal in the environment is no longer the infrared coded signal sent by the gateway device.
In the embodiment of the invention, the infrared coded transmitting equipment takes the fact that whether the level of the infrared signal is overtime or not and does not jump as a signal ending judgment condition. When the transmitting equipment of the infrared code judges that the infrared signal jumps within the preset time, the recording is continued, and the timing is performed again; when the transmitting equipment of the infrared code determines that the infrared signal does not jump after the preset time is exceeded, the recording is finished, so that the recording finishing time of the infrared code signal is identified, and the accuracy of acquiring the infrared code signal is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating an implementation of a method for learning infrared codes according to another embodiment of the present invention. The infrared code learning method provided in this embodiment includes the following steps, which are detailed as follows:
since the specific implementation processes of S401 to S403 are completely the same as those of S101 to S103, the detailed description is please refer to the related descriptions of S101 to S103, and will not be described herein again.
Further, as another embodiment of the present invention, after the step S103, the method further includes:
in S404, an ir code transmission instruction is received, where the ir code transmission instruction includes the number.
In this embodiment, the infrared code transmitting device may obtain the infrared code transmitting instruction sent by the gateway device or other terminals through the radio frequency network receiving module, and may also obtain the infrared code transmitting instruction sent by other terminals through the infrared signal receiving module.
In this embodiment, the infrared code sending instruction will include the number of the infrared code signal to be sent, and the gateway device or other control terminal determines the control policy indicated by each number by obtaining the correspondence table between the control policy and the number, and then encapsulates the number in the infrared code sending instruction.
In S405, according to the number included in the infrared code transmission instruction, an infrared code signal corresponding to the number is generated and transmitted.
In this embodiment, after receiving the infrared code sending instruction, the infrared code sending device extracts the number included in the infrared code sending instruction, and queries the infrared code signal corresponding to the number according to a preset correspondence list between the number and the infrared code signal.
Optionally, in this embodiment, if the transmitting device of the infrared code does not inquire the infrared code signal corresponding to the number, a wrong number instruction is returned to notify the transmitting end of the infrared code transmitting instruction to re-determine the correct number.
In this embodiment, after the transmitting device of the infrared code inquires the infrared code signal corresponding to the serial number, the transmitting device of the infrared code reproduces the infrared code signal according to the stored infrared code signal and sends the infrared code signal to the controlled device corresponding to the transmitting device of the infrared code, so that the controlled device executes the operation of the control strategy corresponding to the controlled device according to the infrared code.
Optionally, in this embodiment, the transmitting device of the infrared code will generate a corresponding infrared code signal according to the characteristic parameter of the infrared code signal. The characteristic parameters of the infrared code are the duration and the jump time of each high and low level in the infrared code signal. The infrared encoding transmitting device will generate a corresponding infrared encoding signal through a Pulse Width Modulation (PWM) module.
Specifically, in the present embodiment, the infrared-coded transmitting device determines the duration of each high-low level by a timer. When the value of the timer reaches the duration time corresponding to the high level, simulating the high level to jump to the low level by closing the PWM module, and resetting the timer; and when the value of the timer reaches the duration time corresponding to the low level, the PWM module is started to simulate the low level to jump to the high level, and the timer is reset. By repeating the above two steps, the corresponding infrared code signal is produced.
In the embodiment of the invention, the corresponding infrared coding signal is generated by sending the infrared coding sending instruction to the infrared coding sending device, so that the aim of controlling other controlled devices is fulfilled.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a schematic structural diagram of an infrared encoded transmitting device according to an embodiment of the present invention, and referring to fig. 5, the infrared encoded transmitting device includes:
a code learning instruction receiving unit 51, configured to receive an infrared code learning instruction sent by the gateway device;
an infrared code signal acquiring unit 52, configured to acquire an infrared signal, and extract an infrared code signal sent by the gateway device from the infrared signal; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and the number setting unit 53 is used for setting a number corresponding to the infrared coding signal.
Optionally, the infrared coded signal acquiring unit 52 specifically includes:
a start judgment monitoring unit for monitoring whether the infrared signal meets a preset signal start judgment condition;
the infrared code recording unit is used for starting to record the infrared signal if the infrared signal meets a preset signal starting judgment condition;
the end judgment monitoring unit is used for stopping recording the infrared signal if the infrared signal is detected to meet a preset signal end judgment condition;
and the infrared coding signal setting unit is used for taking the recorded infrared signal as the infrared coding signal.
Optionally, the start judgment monitoring unit specifically includes:
the level jump monitoring unit is used for determining the holding time of the level value if the level value of the infrared signal is monitored to jump;
the holding time length judging unit is used for determining whether the infrared signal contains a signal starting identifier or not according to the holding time of the level value and a preset coding format recognition algorithm;
the infrared coding recording unit is specifically configured to: and if the infrared signal contains a signal starting identifier, starting to record the infrared signal.
Optionally, the end determination monitoring unit is specifically configured to: and the encoding end determining unit is used for stopping recording the infrared signal if the level value of the infrared signal does not jump within a preset second time.
Optionally, the infrared-coded transmitting device further includes:
the sending instruction receiving unit is used for receiving an infrared code sending instruction, and the infrared code sending instruction comprises the code;
and the infrared signal generating unit is used for generating and transmitting an infrared coding signal corresponding to the code according to the code contained in the infrared code transmitting instruction.
Therefore, the infrared code transmitting device provided in the embodiment of the present invention can also activate the infrared code transmitting device to perform infrared code learning by receiving the infrared code learning instruction transmitted by the gateway device, and then extract the infrared code signal corresponding to the learning instruction from the acquired infrared signal, and after the infrared code signal is extracted, store the infrared code signal and set the corresponding number for the infrared code signal, so as to facilitate calling the infrared code after learning. Therefore, the infrared code transmitting device does not need to be adjusted on site by a special infrared code learning device, and the infrared code transmitting device can automatically learn the infrared codes according to the learning instruction and the infrared code signals, so that the infrared code learning efficiency is improved, the learning difficulty of the infrared code transmitting device is reduced, and the equipment manufacturer can conveniently update the control strategy.
Fig. 6 is a schematic diagram of a terminal device according to another embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62, such as an infrared coded learning program, stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the above-described respective infrared code learning method embodiments, such as S101 to S103 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the units in the above-described device embodiments, such as the functions of the units 51 to 53 shown in fig. 5.
Illustratively, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to accomplish the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into a code learning instruction receiving unit, an infrared code signal acquiring unit, and a number setting unit, and each unit has the following specific functions:
the code learning instruction receiving unit is used for receiving an infrared code learning instruction sent by the gateway equipment;
the infrared code signal acquisition unit is used for acquiring an infrared code signal sent by the gateway equipment according to a preset infrared code receiving algorithm; the infrared encoding signal is specifically as follows: the gateway equipment generates the infrared coding signal according to a control strategy sent by a server and a preset infrared coding conversion algorithm;
and the number setting unit is used for setting a number corresponding to the infrared coding signal.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An infrared coding learning method is characterized by comprising the following steps:
receiving an infrared code learning instruction sent by gateway equipment;
acquiring an infrared signal, and extracting an infrared coding signal sent by the gateway equipment from the infrared signal; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm; the control strategy comprises operation instruction information or signal format of infrared coding signals for adjusting the existing control strategy; the infrared coded signal generated by the gateway equipment is sent out as infrared information;
and setting a number corresponding to the infrared coding signal.
2. The learning method according to claim 1, wherein the acquiring an infrared signal and extracting an infrared encoded signal sent by the gateway device from the infrared signal specifically includes:
monitoring whether the infrared signal meets a preset signal starting judgment condition or not;
if the infrared signal meets a preset signal initial judgment condition, starting to record the infrared signal;
if the infrared signal is detected to meet a preset signal end judgment condition, stopping recording the infrared signal;
and taking the recorded infrared signal as the infrared coding signal.
3. The learning method according to claim 2, wherein the monitoring whether the infrared signal satisfies a predetermined signal start determination condition specifically includes:
if the level value of the infrared signal is monitored to jump, determining the retention time of the level value;
determining whether the infrared signal contains a signal starting identifier or not according to the retention time of the level value and a preset coding format recognition algorithm;
if the infrared signal meets a preset signal starting judgment condition, starting to record the infrared signal, specifically:
and if the infrared signal contains a signal starting identifier, starting to record the infrared signal.
4. The learning method according to claim 2, wherein the step of stopping recording the infrared signal is to stop recording the infrared signal if the infrared signal is detected to satisfy a predetermined signal end determination condition
And if the level value of the infrared signal does not jump within the preset time, stopping recording the infrared signal.
5. The learning method according to any one of claims 1 to 4, wherein the setting of the number corresponding to the IR encoding signal further comprises:
receiving an infrared code sending instruction, wherein the infrared code sending instruction comprises the serial number;
and generating and transmitting an infrared coding signal corresponding to the number according to the number contained in the infrared coding transmission instruction.
6. An infrared-coded transmitting device, comprising:
the code learning instruction receiving unit is used for receiving an infrared code learning instruction sent by the gateway equipment;
the infrared coding signal acquisition unit is used for acquiring infrared signals and extracting the infrared coding signals sent by the gateway equipment from the infrared signals; the infrared coding signal is generated by the gateway equipment according to a control strategy sent by a server and a preset infrared coding conversion algorithm; the control strategy comprises operation instruction information or signal format of infrared coding signals for adjusting the existing control strategy; the infrared coded signal generated by the gateway equipment is sent out as infrared information;
and the number setting unit is used for setting a number corresponding to the infrared coding signal.
7. The transmitting device according to claim 6, wherein the infrared encoded signal acquiring unit specifically includes:
a start judgment monitoring unit for monitoring whether the infrared signal meets a preset signal start judgment condition;
the infrared code recording unit is used for starting to record the infrared signal if the infrared signal meets a preset signal starting judgment condition;
the end judgment monitoring unit is used for stopping recording the infrared signal if the infrared signal is detected to meet a preset signal end judgment condition;
and the infrared coding signal setting unit is used for taking the recorded infrared signal as the infrared coding signal.
8. The transmitting device according to claim 7, wherein the start judgment monitoring unit specifically includes:
the level jump monitoring unit is used for determining the holding time of the level value if the level value of the infrared signal is monitored to jump;
the holding time length judging unit is used for determining whether the infrared signal contains a signal starting identifier or not according to the holding time of the level value and a preset coding format recognition algorithm;
the infrared coding recording unit is specifically configured to:
and if the infrared signal contains a signal starting identifier, starting to record the infrared signal.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201710414732.9A 2017-06-05 2017-06-05 Infrared code learning method and transmitting equipment thereof Active CN108986444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710414732.9A CN108986444B (en) 2017-06-05 2017-06-05 Infrared code learning method and transmitting equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710414732.9A CN108986444B (en) 2017-06-05 2017-06-05 Infrared code learning method and transmitting equipment thereof

Publications (2)

Publication Number Publication Date
CN108986444A CN108986444A (en) 2018-12-11
CN108986444B true CN108986444B (en) 2021-06-22

Family

ID=64501271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710414732.9A Active CN108986444B (en) 2017-06-05 2017-06-05 Infrared code learning method and transmitting equipment thereof

Country Status (1)

Country Link
CN (1) CN108986444B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113744516B (en) * 2021-09-10 2023-12-22 广东朝歌智慧互联科技有限公司 Remote controller infrared learning method and device, remote controller and storage medium
CN114167741A (en) * 2021-11-29 2022-03-11 珠海格力电器股份有限公司 Control instruction transmission method, device and storage medium
TWI809768B (en) * 2022-03-18 2023-07-21 生原家電股份有限公司 Electrical equipment remote control frequency learning system and method
CN115231421A (en) * 2022-07-22 2022-10-25 日立楼宇技术(广州)有限公司 Light curtain control method and device, elevator light curtain and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383941A (en) * 2008-10-24 2009-03-11 四川长虹电器股份有限公司 Interactive television program system and interactive television implementing method
CN201590145U (en) * 2009-07-31 2010-09-22 宁波家天下智能系统有限公司 Intelligent household control system
CN101898339A (en) * 2009-05-26 2010-12-01 海洋王照明科技股份有限公司 Counting alarm electric screw driver
CN102945597A (en) * 2012-10-15 2013-02-27 福建格通电子信息科技有限公司 Updatable infrared repeater system and update method thereof
CN203135915U (en) * 2013-02-01 2013-08-14 深联致远(北京)科技有限公司 Intelligent household gateway
CN104113456A (en) * 2014-07-11 2014-10-22 东莞市康茂电子有限公司 Smart home device remote control method and remote control open system
WO2015000391A1 (en) * 2013-07-02 2015-01-08 恬家(上海)信息科技有限公司 Infrared transmitting and receiving circuit and implementation method thereof
CN204189289U (en) * 2014-10-10 2015-03-04 安福县海能实业股份有限公司 A kind of WIFI universal remote control device and control system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030197625A1 (en) * 1998-08-10 2003-10-23 Stefan F. Szuba Infrared controllers integrated with incandescent and halogen lamp power drivers
KR100631796B1 (en) * 2004-08-18 2006-10-11 주식회사 코맥스 Home Network System and Learning Method Using Learning Remote Control Repeater
US9142120B2 (en) * 2008-12-23 2015-09-22 At&T Intellectual Property I, L.P. Remote control device signal distribution
CN201504341U (en) * 2009-07-31 2010-06-09 宁波家天下智能系统有限公司 Universal remote controller of intelligent household control system
CN101697248B (en) * 2009-09-27 2012-05-30 华为技术有限公司 Learning type infrared remote control device and method
US8712245B1 (en) * 2012-12-27 2014-04-29 Tubetime Inc. System and method for infrared dongle
CN103489305A (en) * 2013-09-16 2014-01-01 华南理工大学 Infrared remote control learning system and method applied to smart home furnishing system
CN104778829B (en) * 2014-01-11 2017-10-13 广州合立正通信息科技有限公司 A kind of control method of infrared equipment
CN104900046B (en) * 2015-05-25 2018-11-23 小米科技有限责任公司 infrared learning method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383941A (en) * 2008-10-24 2009-03-11 四川长虹电器股份有限公司 Interactive television program system and interactive television implementing method
CN101898339A (en) * 2009-05-26 2010-12-01 海洋王照明科技股份有限公司 Counting alarm electric screw driver
CN201590145U (en) * 2009-07-31 2010-09-22 宁波家天下智能系统有限公司 Intelligent household control system
CN102945597A (en) * 2012-10-15 2013-02-27 福建格通电子信息科技有限公司 Updatable infrared repeater system and update method thereof
CN203135915U (en) * 2013-02-01 2013-08-14 深联致远(北京)科技有限公司 Intelligent household gateway
WO2015000391A1 (en) * 2013-07-02 2015-01-08 恬家(上海)信息科技有限公司 Infrared transmitting and receiving circuit and implementation method thereof
CN104113456A (en) * 2014-07-11 2014-10-22 东莞市康茂电子有限公司 Smart home device remote control method and remote control open system
CN204189289U (en) * 2014-10-10 2015-03-04 安福县海能实业股份有限公司 A kind of WIFI universal remote control device and control system

Also Published As

Publication number Publication date
CN108986444A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
CN108986444B (en) Infrared code learning method and transmitting equipment thereof
EP2924669B1 (en) Method and apparatus for transmitting infrared signal and remote controller
US10720048B2 (en) Infrared remote control learning method and device
CN108206997B (en) Bluetooth connection method and device
CN110021792B (en) Charging control method and device, terminal equipment and computer storage medium
US10140853B2 (en) Household appliances infrared remote waveform replication learning method and system
US20180224812A1 (en) Household appliance control method and device, and central processing device
CN104574930B (en) Configuration method, mobile terminal and the household electric appliances of mobile terminal home control function
CN103379446B (en) Multi-terminal control method and device based on wifi
CN109064733A (en) Adaptive infrared signal coding/decoding method, computer installation and its control device
RU2015137291A (en) METHOD AND DEVICE FOR MANAGING INTELLECTUAL HOUSING DEVICE
CN108922163A (en) A kind of learning method of infrared remote control, device, terminal and storage medium
CN113034886A (en) Remote control method and device
CN107742520B (en) Voice control method, device and system
CN110855318A (en) Tire pressure sensor upgrading method, device, equipment and medium
CN107564266B (en) Remote controller code learning method and remote controller learning device
EP2908312A1 (en) Self-adaptive intelligent voice device and method
CN101753225B (en) RF channel deciding and conversing method and RF wireless transmit-receive system thereof
CN116022006A (en) BMS system control method and device, electronic equipment and storage medium
EP4246819A1 (en) Intelligent lamp, signal adaptive identification method therefor, and computer-readable storage medium
CN109996100B (en) Control method of intelligent remote controller, storage medium and remote controller
US9257040B2 (en) Method and device for learning and playing back electromagnetic signals
CN103544831A (en) Method for realizing infrared equipment identification through infrared characteristic extraction
CN106909390B (en) NCSI setting method and device realized based on BMC
CN103945252A (en) Electronic equipment awakening method and device, Bluetooth module and electronic equipment

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