CN109920240B - Method, device and equipment for automatically matching infrared controller and infrared equipment - Google Patents

Method, device and equipment for automatically matching infrared controller and infrared equipment Download PDF

Info

Publication number
CN109920240B
CN109920240B CN201910082153.8A CN201910082153A CN109920240B CN 109920240 B CN109920240 B CN 109920240B CN 201910082153 A CN201910082153 A CN 201910082153A CN 109920240 B CN109920240 B CN 109920240B
Authority
CN
China
Prior art keywords
infrared
controller
signal
equipment
code library
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
CN201910082153.8A
Other languages
Chinese (zh)
Other versions
CN109920240A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910082153.8A priority Critical patent/CN109920240B/en
Publication of CN109920240A publication Critical patent/CN109920240A/en
Application granted granted Critical
Publication of CN109920240B publication Critical patent/CN109920240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model provides a method, device and equipment of infrared controller and infrared equipment automatic matching, relates to communication technology field, can realize the automatic matching of infrared controller and infrared equipment, and the matching process is more intelligent, has promoted user experience, and this method specifically includes: the method comprises the steps that an infrared controller receives a first infrared code value of a first key sent by electronic equipment; the infrared controller sends a first infrared signal according to the first infrared code value of the first key; the infrared controller automatically determining whether the infrared device is responsive to the first infrared signal; if the determined infrared equipment responds to the first infrared signal, the infrared controller automatically returns first information to the electronic equipment; the infrared controller receives information of a first infrared code library sent by the electronic equipment, and the first infrared code library is an infrared code library corresponding to a first infrared code value determined by the electronic equipment according to the first information.

Description

Method, device and equipment for automatically matching infrared controller and infrared equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for automatically matching an infrared controller with an infrared device.
Background
With the development of electronic technology, people have more and more electronic products. For example: in the home life, more and more household appliances such as televisions, Set-Top boxes (also called Set Top boxes), air conditioners, and the like are owned. In order to facilitate control, most household appliances are provided with a remote controller for wirelessly controlling the household appliances, so that convenient control experience is provided for users. The infrared remote controller is widely applied to household appliances due to the advantages of simple structure, low power consumption, strong anti-interference capability, high reliability, low cost and the like.
In an actual scene, when a user replaces a new infrared remote controller for the household appliance or before the universal remote controller is used for controlling the household appliance, the new infrared remote controller or the universal remote controller needs to be matched with the household appliance. That is, the new infrared remote controller or universal remote controller needs to learn the infrared code value adopted when each key transmits the infrared signal, so as to control the household appliance to execute the operation corresponding to each key.
For example: when the universal remote controller is matched with the television, the universal remote controller can acquire the infrared code values corresponding to the plurality of power keys and then send the infrared signals of the infrared code values one by one. In the process, a user needs to observe the state of the television all the time, and operates the universal remote controller after observing that the television is turned on so as to inform that the infrared signal currently sent by the universal remote controller can be used for controlling the television. Subsequently, the universal remote controller determines infrared code values corresponding to other keys according to the infrared code values corresponding to the infrared signals, and matching with the television is completed. Therefore, the whole matching process depends on observation and operation of the user, the energy of the user is consumed, the intelligence is insufficient, and the user experience is poor.
Disclosure of Invention
The method, the device and the equipment for automatically matching the infrared controller and the infrared equipment can achieve automatic matching of the infrared controller and the second infrared equipment, do not depend on a user any more, are more intelligent, and improve user experience.
In a first aspect, the present application provides a method, comprising: the method comprises the steps that an infrared controller receives a first infrared code value of a first key sent by electronic equipment; the infrared controller sends a first infrared signal according to the first infrared code value of the first key; the infrared controller automatically determining whether the infrared device is responsive to the first infrared signal; if the determined infrared equipment responds to the first infrared signal, the infrared controller automatically returns first information to the electronic equipment; the infrared controller receives information of a first infrared code library sent by the electronic equipment, and the first infrared code library is an infrared code library corresponding to a first infrared code value determined by the electronic equipment according to the first information.
Therefore, in the prior art, in the process of matching the infrared controller with the infrared device, a user is relied on to manually observe whether the infrared device responds or not, and the infrared controller is operated when the infrared device responds, so as to complete matching. However, in the method provided by the application, the infrared controller can automatically detect whether the infrared device responds, the observation and operation of the user are not relied on, the whole process is more intelligent, and the user experience is improved.
In one possible implementation mode, the infrared controller comprises a jack and a plug, the plug of the infrared controller is inserted into a power socket, and the power plug of the infrared device is inserted into the jack of the infrared controller; the infrared controller automatically determines whether the infrared device responds to the first infrared signal, and specifically includes: before or at the same time of sending the first infrared signal, the infrared controller automatically detects an electric signal output by a jack of the infrared controller and determines that the infrared equipment is in a first state; after the infrared controller sends the first infrared signal, automatically detecting the electric signal output by the jack of the infrared controller again, and determining that the infrared equipment is in a second state; and if a second state different from the first state is detected in a preset time period, determining that the infrared equipment responds to the first infrared signal, otherwise, determining that the infrared equipment does not respond to the first infrared signal. Therefore, the application provides a method for detecting whether the infrared device responds by the infrared controller.
In one possible implementation, the automatically determining whether the infrared device responds to the first infrared signal by the infrared controller specifically includes: after the infrared controller sends the first infrared signal, if the infrared controller receives the infrared signal sent by the infrared equipment in a preset time period, the infrared equipment is determined to respond to the first infrared signal, and otherwise, the infrared equipment is determined not to respond to the first infrared signal. Thus, the present application provides yet another method for an infrared controller to detect whether an infrared device is responding.
In one possible implementation, the automatically determining whether the infrared device responds to the first infrared signal by the infrared controller specifically includes: before or at the same time of sending the first infrared signal, the infrared controller automatically detects whether the infrared equipment displays images or plays sound, and determines that the infrared equipment is in a first state; after the infrared controller sends the first infrared signal, automatically detecting whether the infrared equipment displays images or plays sound again, and determining that the infrared equipment is in a second state; and if a second state different from the first state is detected in a preset time period, determining that the infrared equipment responds to the first infrared signal, otherwise, determining that the infrared equipment does not respond to the first infrared signal. Thus, the present application provides yet another method for an infrared controller to detect whether an infrared device is responding.
In a possible implementation manner, the information of the first infrared code library is a download address of the first infrared code library; after the infrared controller receives the information of the first infrared code library sent by the electronic equipment, the method further comprises the following steps: the infrared controller requests data of a first infrared code library from the server according to the download address, receives and stores the data of the first infrared code library sent by the server, and the data of the first infrared code library comprises the corresponding relation between the identification of each key in the first infrared code library and the infrared code value. Therefore, the application provides a method for acquiring an infrared code library matched with infrared equipment.
In a possible implementation manner, the information of the first infrared code library is data of the first infrared code library, and the data of the first infrared code library includes a correspondence between an identifier of each key in the first infrared code library and an infrared code value. Therefore, the application provides another method for acquiring the infrared code library matched with the infrared equipment.
In a possible implementation manner, after the infrared controller receives the information of the first infrared code library sent by the electronic device, the method further includes: the infrared controller receives the identifier of the second key sent by the electronic equipment; and the infrared controller searches a third infrared code value corresponding to the identifier of the second key from the first infrared code library, and sends a third infrared signal according to the third infrared code value, wherein the third infrared signal can be used for controlling the infrared equipment. Therefore, after the infrared controller and the infrared equipment are successfully matched, the infrared controller can search corresponding infrared code values from the matched infrared code library according to the identification of the key sent by the electronic equipment and send an infrared signal, and therefore the infrared equipment is controlled.
In one possible implementation manner, the receiving, by the infrared controller, the first infrared code value of the first key sent by the electronic device includes: the method comprises the steps that an infrared controller receives a first infrared code value of a first key sent by electronic equipment and a first identifier, wherein the first identifier is a code library identifier corresponding to the first infrared code value; if the determined infrared device responds to the first infrared signal, the infrared controller automatically returns first information to the electronic device, and the method specifically comprises the following steps: if the determined infrared device responds to the first infrared signal, the infrared controller automatically returns the first identifier to the electronic device.
In a possible implementation manner, after the infrared controller receives the first infrared code value of the first key sent by the electronic device, the method further includes: the infrared controller receives a second infrared code value of the first key sent by the electronic equipment; if the infrared equipment does not respond to the first infrared signal, the infrared controller sends a second infrared signal according to a second infrared code value of the first key; the infrared controller automatically determining whether the infrared device is responsive to the second infrared signal; if the determined infrared equipment responds to the first infrared signal, the infrared controller automatically returns second information to the electronic equipment; and the infrared controller receives information of a second infrared code library sent by the electronic equipment, and the second infrared code library is an infrared code library corresponding to a second infrared code value determined by the electronic equipment according to the second information.
In a second aspect, the present application provides a method for matching an infrared controller with an infrared device, including:
the electronic equipment receives a first input, and the first input indicates that the infrared controller is matched with the infrared equipment; the electronic equipment sends a first infrared code value of a first key to the infrared controller so that the infrared controller sends a first infrared signal to control the infrared equipment according to the first infrared code value; the electronic equipment receives first information sent by the infrared controller, and the first information indicates that the infrared equipment responds to a first infrared signal sent by the infrared controller; and the electronic equipment sends information of a first infrared code library to the infrared controller according to the first information, wherein the first infrared code library is an infrared code library corresponding to a first infrared code value determined by the electronic equipment according to the first information.
In a possible implementation, the method further includes: the electronic equipment sends a second infrared code value of the first key to the infrared controller if not receiving the first information within a preset time period; or after receiving second information sent by the infrared controller, the electronic device sends a second infrared code value of the first key to the infrared controller, wherein the second information indicates that the infrared device does not respond to the first infrared signal.
In a possible implementation manner, the third information indicates that the infrared device responds to a second infrared signal sent by the infrared controller, and the second infrared signal is an infrared signal generated by the infrared controller according to a second infrared code value; and the electronic equipment determines the second infrared code library as the infrared code library matched with the infrared equipment according to the second information, and sends the information of the second infrared code library to the infrared controller.
In a third aspect, the present application provides a method for matching an infrared controller with an infrared device, including:
the method comprises the steps that an infrared controller receives an automatic matching instruction sent by electronic equipment, and a first infrared code value of a first key is locally stored in the infrared controller; the infrared controller sends a first infrared signal according to the first infrared code value of the first key; the infrared controller automatically determining whether the infrared device is responsive to the first infrared signal; if the infrared equipment is determined to respond to the first infrared signal, the infrared controller automatically determines that the first infrared code library is matched with the infrared equipment, and the first infrared code library is an infrared code library corresponding to the first infrared code value; if the infrared equipment does not respond to the first infrared signal, the infrared controller sends a second infrared signal according to a second infrared code value of the first key; the infrared controller automatically determining whether the infrared device is responsive to the second infrared signal; and if the infrared equipment is determined to respond to the second infrared signal, the infrared controller automatically determines that the second infrared code library is matched with the infrared equipment, and the second infrared code library is a code library corresponding to the second infrared code value.
In one possible implementation manner, after the infrared controller automatically determines that the first infrared code library matches the infrared device, or after the infrared controller automatically determines that the second infrared code library matches the infrared device, the method further includes: and the infrared controller returns a message that the automatic matching is successful to the electronic equipment.
In a fourth aspect, the present application provides a method for matching an infrared controller with an infrared device, where the infrared controller includes a jack and a plug, the plug of the infrared controller is plugged into a power socket, and the jack of the infrared controller is plugged into a power plug of the infrared device, and the method includes:
the method comprises the steps that an infrared controller receives a first infrared code value and a first identification of a first key sent by electronic equipment, wherein the first identification is a code library identification corresponding to the first infrared code value; the infrared controller sends a first infrared signal according to the first infrared code value; the infrared controller automatically determining whether the infrared device is responsive to the first infrared signal; if the infrared device is determined to respond to the first infrared signal, the infrared controller returns a first identifier to the electronic device; the infrared controller receives an address of a first infrared code library sent by the electronic equipment, wherein the address of the first infrared code library is a download address of the infrared code library corresponding to a first identifier requested by the electronic equipment to the server according to the first identifier returned by the infrared equipment; and the infrared controller requests the server to download the data of the first infrared code library according to the address of the first infrared code library.
In a possible implementation manner, the method further includes: the infrared controller receives a second infrared code value and a second identifier of the first key sent by the electronic equipment, wherein the second identifier is a code library identifier corresponding to the second infrared code value; if the infrared equipment is determined not to respond to the first infrared signal, the infrared controller sends a second infrared signal according to the second infrared code value; the infrared controller automatically determining whether the infrared device is responsive to the second infrared signal; if the infrared device is determined to respond to the second infrared signal, the infrared controller returns a second identifier to the electronic device; the infrared controller receives an address of a second infrared code library sent by the electronic equipment, wherein the address of the second infrared code library is a download address of the infrared code library corresponding to a second identifier requested by the electronic equipment to the server according to the second identifier returned by the infrared equipment; and the infrared controller requests the server to download the data of the second infrared code library according to the address of the second infrared code library.
In a fifth aspect, the present application provides a method for matching an infrared controller with an infrared device, including: the electronic equipment receives a first input, wherein the first input indicates a remote controller for creating the infrared equipment; the electronic equipment sends a first infrared code value and a first identifier of a first key to the infrared controller, wherein the first identifier is a code library identifier corresponding to the first infrared code value; the electronic equipment receives a first identifier sent by the infrared controller; the electronic equipment acquires the address of the first infrared code library from the server according to the first identification, and sends the address of the first infrared code library to the infrared controller, so that the infrared controller can acquire the data of the first infrared code library from the server according to the address of the first infrared code library, wherein the first infrared code library corresponds to the first identification.
In a possible implementation, the method further includes: after the electronic equipment is in a preset time period, sending a second infrared code value and a second identifier of the first key to the infrared controller; or after receiving first information sent by the infrared controller, the electronic device sends a second infrared code value and a second identifier of the first key to the infrared controller, wherein the first information indicates that the infrared device does not respond to the first infrared signal. And the second identifier is a code library identifier corresponding to the second infrared code value.
In a possible implementation manner, after the electronic device sends the second infrared code value and the second identifier of the first key to the infrared controller, the electronic device receives the second identifier sent by the infrared device; and the electronic equipment acquires the address of the second infrared code library from the server according to the second identifier and sends the address of the second infrared code library to the infrared controller, so that the infrared controller acquires the data of the second infrared code library from the server according to the address of the second infrared code library, wherein the second infrared code library corresponds to the second identifier.
In a sixth aspect, the present application provides an infrared controller, including: the processor, the memory, the wireless communication module, the infrared signal emitting module and the processor are coupled, the memory is used for storing computer program codes, the computer program codes comprise computer instructions, and when the processor reads the computer instructions from the memory, the infrared controller is enabled to execute the method for matching the infrared controller and the infrared device in any one of the possible implementation manners of the first aspect, the third aspect and the fourth aspect.
A seventh aspect provides an infrared controller, including: the infrared equipment comprises a processor, a memory, a wireless communication module, an infrared signal transmitting module, jacks and plugs, wherein the memory, the wireless communication module and the infrared signal transmitting module are coupled with the processor; the memory is for storing computer program code, the computer program code including computer instructions that, when read from the memory by the processor, cause the infrared controller to perform the steps of: receiving a first infrared code value of a first key sent by electronic equipment; sending a first infrared signal according to a first infrared code value of the first key; automatically determining whether the infrared device is responsive to the first infrared signal; if the determined infrared equipment responds to the first infrared signal, automatically returning first information to the electronic equipment; and receiving information of a first infrared code library sent by the electronic equipment, wherein the first infrared code library is an infrared code library corresponding to a first infrared code value determined by the electronic equipment according to the first information.
In one possible implementation, the infrared controller further includes: and the power conversion module is used for converting alternating current accessed from the plug into low-voltage direct current to supply power for the infrared controller.
In an eighth aspect, the present application provides an electronic device, including: a processor, a memory and a touch screen, the memory and the touch screen being coupled to the processor, the memory being configured to store computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the method of matching an infrared controller to an infrared device as in any of the possible implementations of the second aspect and the fifth aspect.
A ninth aspect is a computer storage medium comprising computer instructions that, when executed on a terminal, cause the terminal to perform a method for matching an infrared controller with an infrared device as in any possible implementation manner of the first, third, and fourth aspects.
A tenth aspect is a computer storage medium comprising computer instructions that, when executed on a terminal, cause the terminal to perform a method for matching an infrared controller with an infrared device as in any one of the possible implementations of the second aspect and the fifth aspect.
An eleventh aspect is a computer program product for causing a computer to perform a method for matching an infrared controller with an infrared device as in any one of the possible implementations of the first, third and fourth aspects, when the computer program product is run on the computer.
A twelfth aspect is a computer program product, which, when run on a computer, causes the computer to execute the method of matching an infrared controller with an infrared device as in any one of the possible implementations of the second and fifth aspects.
Drawings
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2A is a schematic structural diagram of an infrared controller according to an embodiment of the present disclosure;
fig. 2B is a schematic structural diagram of a system composed of an infrared controller and an infrared device according to an embodiment of the present disclosure;
fig. 3A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3B is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of a method for automatically matching an infrared controller with an infrared device according to an embodiment of the present disclosure;
fig. 5A-5F are schematic user interface diagrams of some electronic devices provided by embodiments of the present application;
fig. 6A to 6B are schematic user interfaces of further electronic devices according to embodiments of the present disclosure;
fig. 7 is a schematic flowchart of another method for automatically matching an infrared controller with an infrared device according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of another communication system provided in the embodiment of the present application;
fig. 9 is a schematic flowchart of another method for automatically matching an infrared controller with an infrared device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure. The system may include an infrared controller 301, a first infrared device 302, an electronic device 303, and a server 304. It should be noted that the infrared controller 301 may control a plurality of infrared devices through infrared signals, or the infrared controller 301 may be used to control different infrared devices. The infrared code libraries corresponding to each infrared device (including the corresponding relationship between the identifier and the infrared code value for matching all the keys of each infrared device) are generally different, so that automatic matching is required before the infrared controller 301 controls a certain infrared device to determine the infrared code library corresponding to the infrared device. Here, the infrared controller 301 and one of the infrared devices (the first infrared device 302) are exemplified.
The electronic device 303 provides a user interaction interface for the infrared controller 301, so that a user can control the infrared controller 301 through the interface, and the user can perform management such as registration, upgrading, control and the like on the infrared controller 301. For example: instructing the infrared controller 301 to send an infrared signal, instructing the infrared controller 301 to turn on an automatic matching function, and the like.
In a specific implementation, a user may operate the infrared controller 301 by operating an APP (e.g., a remote controller APP or a smart home cloud APP) installed on the electronic device 303. Another example is: the user may also input a web page address associated with the server in the browser address of the electronic device 303, so that the electronic device 303 logs in to a management page of the infrared controller 301, and the infrared controller 301 and the like are controlled through the management page, which is not limited in this embodiment of the application.
In some embodiments of the present application, the electronic device 303 may establish a communication connection with the infrared controller 301 through the server 304. In other words, the electronic device 303 and the infrared controller 301 may be connected to the server 304 through a wired network, a WIFI network, a mobile data network, or the like. It is understood that the connection between the electronic device 303 and the server 304 may be the same as or different from the connection between the infrared controller 301 and the server 304.
In other embodiments of the present application, the electronic device 303 may also establish a local connection directly with the infrared controller 301. For example: the electronic device 303 may be connected to the infrared controller 301 by means of a wire, WIFI, bluetooth, ZigBee (ZigBee), or the like.
In still other embodiments of the present application, the electronic device 303 may be the same device as the infrared controller 301, and then the user may directly operate the interface on the electronic device 303 to cause the electronic device 303 to emit an infrared signal or the like.
The first infrared device 302 may be a television, a network box, a set-top box, an air conditioner, a refrigerator, a washing machine, a water dispenser, an air purifier, an electric lamp, an electric fan, an intelligent sound box, a curtain, a floor sweeping robot, or other intelligent household devices in a specific implementation.
The infrared controller 301 may be a universal remote controller, an air conditioner companion, an infrared socket, or the like in a specific implementation.
In a specific implementation, the electronic device 303 may be a mobile phone, a tablet computer, a Personal Computer (PC), a Personal Digital Assistant (PDA), a smart watch, a netbook, a wearable electronic device, an in-vehicle device, or the like.
In the present application, the infrared controller 301 and the first infrared device 302 may be electrically connected through a power line. In some embodiments, a power source is connected to the infrared controller 301 and the first infrared device may be powered via a power cord connected to the first infrared device. Thus, during the automatic matching of the infrared controller 301 with the first infrared device, the infrared controller 301 may also determine whether the first infrared device 302 is responsive by detecting a change in power (or a change in current or a change in voltage) of the power line.
In other embodiments, the infrared controller 301 may determine whether the first infrared device 302 responds by collecting a sound signal of the first infrared device 302, or collecting an image signal of the first infrared device 302. The specific detection method will be described in detail below.
In still other embodiments, the infrared controller 301 may also determine that the first infrared device 302 is responsive via an infrared signal transmitted by the first infrared device 302 in response. For example: after the infrared controller 301 transmits the first infrared signal, the infrared controller 301 switches the transmission state to the reception state. Then, if the first infrared device 302 receives the first infrared signal and responds (e.g., turns on or off), a specific infrared signal may be sent. The infrared controller 301 may confirm that the first infrared device 302 responds after receiving the specific infrared signal, that is, the infrared controller 301 detects that the first infrared device 302 responds. If the first infrared device 302 does not respond after receiving the first infrared signal, then no particular infrared signal will occur. That is, if the infrared controller 301 does not receive the specific infrared signal transmitted by the first infrared device 302 for a certain period of time after switching the transmission state to the reception state, it may be considered that the first infrared device 302 does not respond.
It can be seen that, in the embodiment of the present application, in the process of matching the infrared controller 301 with the first infrared device 302, after the infrared controller 301 sends the detected infrared signal (for example, the infrared signal corresponding to the first key), it may automatically detect whether the first infrared device 302 responds. When detecting that the first infrared device 302 has a response, it may be automatically determined that the currently transmitted detected infrared signal may be used to control the first infrared device 302, and further determine infrared code values for controlling other keys of the first infrared device 302 according to the infrared code values corresponding to the detected infrared signal, thereby completing an automatic matching process between the infrared controller 301 and the first infrared device 302. Compared with the prior art, in the matching process, the state of the first infrared device 302 can be observed no longer depending on a user, and the infrared controller is operated when the first infrared device 302 responds, so that the whole process is more intelligent, and the user experience is improved.
Fig. 2A shows a schematic structural diagram of the infrared controller 301. The infrared controller 301 may include a processor 201, a memory 202, a wireless communication module 203, an infrared signal emitting module 204, an input interface 207, and a battery 214, among others.
The memory 202 is used for storing application program codes to support the infrared controller 301 to perform corresponding operations.
The processor 201 is configured to support the infrared controller 301 to execute the above application program codes, so as to implement corresponding functions of the infrared controller 301, for example: instructing the infrared signal transmitting module 204 to transmit an infrared signal to the first infrared device; determining whether the current, voltage or power changes according to the detection data sent by the detection module 205, and further determining whether the first infrared device responds; or whether the first infrared device responds or not is determined according to image data or audio data sent by the camera 208 or the microphone 209.
And the wireless communication module 203 is used for supporting wireless connection between the infrared controller 301 and other equipment. For example: the infrared controller 301 is wirelessly connected to the server 304, or the electronic device 303. The specific wireless connection manner may include a Wireless Local Area Network (WLAN) (e.g., a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a Global Navigation Satellite System (GNSS), Frequency Modulation (FM), a Near Field Communication (NFC), and the like. The wireless communication module 203 may be one or more devices integrating at least one communication processing module.
And the infrared signal transmitting module 204 is configured to support the infrared controller 301 to generate and transmit an infrared signal corresponding to the infrared code value. In some embodiments of the present application, the infrared controller may further include an infrared receiving module for receiving infrared signals emitted by other infrared devices, such as: after the infrared controller 301 sends the detected infrared signal, the infrared controller 301 turns on the infrared receiving module to receive the infrared signal sent by the first infrared device, so that the infrared controller 301 determines that the first infrared device responds according to the infrared signal.
The input interface 207, which may include keys, may be used to support functions such as resetting, connecting, etc. of the infrared controller 301.
The battery 214 may be used to power the internal devices of the infrared controller 301, such as the processor 201, the wireless communication module 203, the infrared signal emitting module 204, and other devices.
In some embodiments of the present application, the infrared controller 301 further comprises: plug 212 and power conversion module 213, and detection module 205 and jack 206.
The plug 212 may be used to plug into an electrical outlet and connect to an external power source, such as an external ac power source.
The power conversion module 213 may be configured to support the infrared controller 301 to convert the ac power received from the plug 212 into low-voltage dc power for supplying power to low-voltage devices such as the processor 201. Thus, in embodiments where the infrared controller has a power conversion module 213, the battery 214 may be absent.
The jack 206, which is directly connected to the plug 212 via a power cord, may be used to support the infrared controller 301 in electrical connection with an infrared device (e.g., the first infrared device 302), and the like. For example: the power plug of the first infrared device 302 is plugged into the jack 206 of the infrared controller 301, that is, the first infrared device 302 and the infrared controller 301 are electrically connected through a power cord.
The detection module 205 may detect power consumption information of the first infrared device 302 connected to the jack 206, for example: the data of current, voltage, power, etc. on the power line connecting the first infrared device 302, i.e. the electrical signal (current, voltage, or power) of the detection output jack 206 is sampled and sent to the processor 201 for processing. The sampling mode may be a transformer sampling mode, that is, the current, voltage or power on the power line between the plug 212 and the jack 206 is detected by means of mutual inductance. In a specific implementation, the detection module 205 may be a current transformer, or a voltage transformer, or a power transformer, or the like. The electric quantity transformer can provide various data such as current, voltage, power and the like. The sampling method may be a resistance sampling method or the like. For example: the detection module 205 may sample the current, voltage, and power of a resistor connected in series between the plug 212 and the jack 206, and reflect the current, voltage, or power of the output jack 206 through the current, voltage, or power of the resistor, which is not limited in this embodiment.
In other embodiments of the present application, the infrared controller 301 may further include at least one camera 208, or the infrared controller may include at least one first interface that may be used to connect to a camera. In this way, the infrared controller 301 may detect whether the first infrared device has a change in an image through the camera 208 provided therein or the camera connected to the first interface, that is, determine whether the first infrared device responds.
In still other embodiments of the present application, the infrared controller 301 may further include at least one microphone 209, or the like, or the infrared controller may include at least one second interface that may be used to connect the microphone. In this way, the infrared controller 301 may detect whether the first infrared device has a sound change through the microphone 209 of the infrared controller or the microphone connected through the second interface, that is, determine whether the electronic device responds.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the infrared controller 301. It may have more or fewer components than shown in fig. 2A, may combine two or more components, or may have a different configuration of components. For example, the second infrared controller 301 may further include an indicator light 210 (which may indicate whether the infrared controller 301 is plugged into an electrical outlet, an infrared signal is occurring, a match is being made with the first infrared device, etc.), a display 211 (which may prompt a user for relevant information), and so forth. The various components shown in fig. 2A may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
As a specific implementation, fig. 2B shows an example of the connection relationship between the infrared controller 301 and the first infrared device 302. For example: the infrared controller 301 is an air conditioner companion and the first infrared device 302 is an air conditioner.
For example, a power plug of the first infrared device 302 (e.g., an air conditioner) may be plugged directly into a jack of the infrared controller 301, and a plug of the infrared controller 301 may be plugged into a socket (e.g., a power outlet) to which a power source is connected. Thus, the power outlet may provide power to the infrared controller 301, and the infrared controller 301 may also provide power to the first infrared device 302 when in operation. In the process of automatically matching the infrared controller 301 and the first infrared device 302 provided in this embodiment of the application, after the infrared controller 301 sends the infrared signal for detection, the infrared controller 301 may further automatically detect whether the first infrared device 302 responds. For example: after the power plug of the first infrared device 302 is plugged into the jack of the infrared controller 301, when the infrared controller 301 transmits the infrared signal of the power key, the infrared controller 301 may determine whether the first infrared device 302 is powered on or powered off, that is, whether the first infrared device responds, by detecting a power change, a current change, or a voltage change output by the jack.
In some embodiments, the electronic device 303 may be the same device as the infrared controller 301, for example, a cell phone with infrared emission capability. The communication between the electronic device 303 and the infrared controller 301 described herein may be understood as communication between internal modules of the same device, and will not be described in detail below.
Fig. 3A shows a schematic structural diagram of the electronic device 303.
The electronic device 303 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 303. In other embodiments of the present application, the electronic device 303 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
In some embodiments of the present application, the processor 110 may determine whether the first infrared device responds according to the information sent by the infrared controller 301, determine whether to continue sending other infrared code values of the first key to the infrared controller 301, determine an identification of the infrared code bank matching the first infrared device 302 according to the information sent by the infrared controller 301, and so on.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments of the present application, the memory may store data of an infrared code library of the infrared device, such as: and matching the corresponding relation between the identification of each key of the infrared equipment and the infrared code value, and the like.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). The I2S interface may be used for audio communication. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. It should be understood that the interface connection relationship between the modules according to the embodiment of the present invention is only illustrative, and does not limit the structure of the electronic device 303. In other embodiments of the present application, the electronic device 303 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 303. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 303 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 303 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied on the electronic device 303. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 303, including Wireless Local Area Networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite Systems (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 303 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 303 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 303 implements display functions via the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 303 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 303 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 303 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 303 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 303 may support one or more video codecs. In this way, the electronic device 303 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU may implement applications such as intelligent recognition of the electronic device 303, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device 303. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, a phonebook, etc.) created during use of the electronic device 303, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 303 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 303 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic device 303 can listen to music through the speaker 170A or listen to a hands-free call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic device 303 answers a call or voice information, it can answer the voice by placing the receiver 170B close to the human ear.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 303 may be provided with at least one microphone 170C. In other embodiments, the electronic device 303 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 303 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and the like.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal.
The gyro sensor 180B may be used to determine the motion pose of the electronic device 303. The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 303 may calculate altitude, aid in positioning and navigation, from barometric pressure values measured by the barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 303 may detect the opening and closing of the flip holster using the magnetic sensor 180D.
The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 303 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 303 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 303 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 303 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The electronic device 303 can detect that the user holds the electronic device 303 close to the ear by using the proximity light sensor 180G, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The electronic device 303 may adaptively adjust the brightness of the display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 303 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 303 may utilize the collected fingerprint characteristics to implement fingerprint unlocking, access to an application lock, fingerprint photographing, fingerprint answering, and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 303 implements a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 303 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device 303 at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic device 303 may receive a key input, and generate a key signal input related to user setting and function control of the electronic device 303.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic device 303 by being inserted into the SIM card interface 195 or by being pulled out of the SIM card interface 195. The electronic device 303 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 303 interacts with the network through the SIM card to implement functions such as a call and data communication. In some embodiments, the electronic device 303 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 303 and cannot be separated from the electronic device 303.
The software system of the electronic device 303 may be a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the invention takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 303.
Fig. 3B is a block diagram of a software structure of the electronic device 303 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3B, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes a number of predefined functions.
In this embodiment of the application, the application layer includes a first application, and the first application may be an APP of the infrared controller 301, or an APP of a smart home, or the like. The first application provides a user interaction interface for the infrared controller 301, so that a user can control the infrared controller through the interface of the first application, and the user infrared controller 301 performs management such as registration, upgrading and control. For example: instructing the infrared controller 301 to send an infrared signal, instructing the infrared controller 301 to turn on an automatic matching function, and the like.
As shown in FIG. 3B, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 303. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary work flows of software and hardware of the electronic device 303 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
As shown in fig. 4, a flowchart of a method for automatically matching an infrared controller and a first infrared device provided in the embodiment of the present application is applied to the system architecture shown in fig. 1, and specifically includes the following steps:
s101, the electronic equipment receives a first input of a user.
When a user wants to control the first infrared device by using the infrared controller, the infrared controller is matched with the first infrared device. That is, the infrared controller learns the infrared code values corresponding to the keys for controlling the first infrared device. The user can complete the process of starting the infrared controller to learn the infrared code values of the keys by operating the electronic equipment.
The first input may be an input of a process of touching the infrared controller to start learning the infrared code values of the respective keys, that is, an input of a matching process of touching the infrared controller with the first infrared device.
In some examples of the application, a user opens a first application (for example, an application of an infrared controller or an application of a smart home) on an electronic device (for example, a mobile phone), and executes a first input on an interface of the first application. The first input may be, for example, an operation of clicking the add control 501 in the interface of the remote control list shown in fig. 5A to trigger the mobile phone to create a remote control of the first infrared device (e.g., a television). That is, in response to the first input, the electronic device begins to perform an automatic matching process of the infrared controller with the first infrared device. It should be noted that the remote controller created in the first application of the electronic device may be understood as an operation interface of the infrared controller provided for the user. Namely, the user can make the infrared controller send a corresponding infrared signal by operating the key on the remote controller on the electronic device, so as to control the first infrared device.
In still other examples of the present application, the first input may also be a series of operations. The first application of the electronic device may further support user selection of any one or any number of a type of the first infrared device, a brand of the first infrared device, a model of the first infrared device, and the like. Because the infrared code values that the first infrared equipment of different grade type, different brand, different model corresponds are different, consequently, after the user has selected brand, type, the model of first infrared equipment, can further reduce the scope of the infrared code value that infrared controller needs to detect, be favorable to shortening the automatic matching process of infrared controller and first infrared equipment.
For example: as shown in fig. 5A, the user may click on an add control 501 in the interface of the remote control list of the first application. In response to the clicking operation, the handset may display an interface 502 as shown in fig. 5B, selecting an interface for the device type. Included in this interface 502 may be an identification of various types of devices that the first application supports creating a remote control, such as: an icon 503 and a name 504 of a television, an icon and a name of an air conditioner, an icon and a name of a network box, and the like. The user may then click on the identity of the television in interface 502, such as icon 503 or name 504, to trigger the handset to create a remote control for the television. In some examples, the user may also select a brand of television. That is, after responding to the click operation of the user on the identifier of the television, the mobile phone may further display an interface 505 shown in fig. 5C, i.e., a brand selection interface. This interface 505 comprises an identification of the respective brand of which the first application supports the creation of a television remote control, for example: "Changhong" 506, "Philip," "Haier," "Hisense," and the like. The user may make a selection based on the brand of his television. If the user's home television brand is Changhong, the user may click on "Changhong" 506 in interface 505. In other examples, the user may also select the model of the television, and the specific operation is similar to the selection of the device type and brand, and is not listed. In still other examples, after the user has selected the device type, brand, model, etc. of the first infrared device, the mobile phone may further display an interface 511 as in fig. 5F, on which prompt information may be displayed to prompt the user of the selected device type, brand, model, etc. for the user to determine. If the user determines that the information of the first infrared device is correct, the user can click a 'yes' button, and the mobile phone starts to create a remote controller of the first infrared device. If the user needs to modify the information, the user can click the no button, and the mobile phone returns to the previous interface or other interfaces. In summary, through the above-mentioned series of operations (i.e., the first input), the mobile phone starts to create a remote controller of a television with a brand of "Changhong", i.e., in response to the series of operations, the electronic device starts to perform an automatic matching process of the infrared controller with the first infrared device.
In some embodiments of the present application, after the electronic device receives the first input of the user, the electronic device starts to perform an automatic matching process between the infrared controller and the first infrared device, and the electronic device may also display a prompt message on an interface of the first application to prompt the user that the infrared controller and the first infrared device are being matched. For example: as shown in fig. 5E, the electronic device displays a prompt box 508 on the interface 507 of the first application, prompting "match with long rainbow tv, please wait". It will be appreciated that the electronic device may prompt the user in other ways as well, such as by sound, images, animation, and so forth. The electronic device may not prompt the user, which is not limited in this application.
S102, the electronic equipment acquires the infrared code values of the first key and the code library identifications corresponding to the infrared code values from the server according to the first input of the user.
The server maintains an infrared code library corresponding to the remote controller of each infrared device, namely, one infrared device corresponds to one infrared code library, and the infrared code library has a corresponding relation between the identification of all keys for controlling the infrared device and an infrared code value. And each infrared code library on the server corresponds to a code library identifier, and the code library identifier is the only identifier of the code library. That is, a unique infrared code library can be queried through code library identification.
In some embodiments, information about the device type, brand, model, etc. of each infrared device may also be maintained on the server. In other words, the infrared code library can be searched in a classified manner through information such as device type, brand, model and the like.
It will be appreciated that different types of devices have different keys, and that the ir code values for different keys will typically be different. For example: the television has power keys, volume +, volume-, channel +, channel-, return keys, home keys, etc. For another example: the air purifier has power keys, intensity +, intensity-, mute keys, etc. Another example is: the air conditioner has a power key, a temperature +, a temperature-, a wind direction key, a wind speed +, a wind speed-, a sleep key, and the like. Infrared devices of the same type and different brands may have the same keys, but the infrared code values for the same keys are typically different. Infrared devices of the same type and brand of different models may have the same keys, but the infrared code values corresponding to the same keys are generally different. Therefore, before a certain infrared device is to be controlled, the infrared controller needs to be matched with the infrared device, that is, to learn the infrared code values corresponding to the keys for controlling the infrared device. For example: the infrared controller is matched with the first infrared equipment for controlling the first infrared equipment.
The first key is used as a key for testing in the process of automatically matching the infrared controller and the infrared equipment. That is to say, whether the code library in which the infrared code value is located can be matched with the infrared device is determined by testing whether the infrared code value corresponding to the first key can be used for controlling the infrared device.
For example, since different infrared devices mostly have different keys, and a power key (i.e., a switch key) is generally a key that each infrared device has, the power key may be used as the first key. For another example, since different types of infrared devices have keys with different functions, and the keys with different functions bring different device responses, a key convenient for detecting the device response may also be selected as the first key according to the difficulty level of detecting the device response.
In some embodiments, the first input of the user creates a remote controller of the first infrared device, and the electronic device obtains, from the server, infrared code values corresponding to the first keys (e.g., power keys) of all the infrared devices and a code library identifier corresponding to each infrared code value. In other embodiments, the first input of the user creates a remote controller of a first infrared device (e.g., a television set of a changhong brand) of a certain brand of a certain device type, and the electronic device obtains, from the server, infrared code values corresponding to first keys of all infrared devices of the brand of the certain device type and code library identifications corresponding to the infrared code values.
For example: the infrared code value of first button includes first infrared code value and second infrared code value, and the code base sign that first infrared code value corresponds is first sign, and the code base sign that second infrared code value corresponds is the second sign.
S103, the electronic equipment sends the first infrared code value of the first key to the infrared controller.
In some embodiments of the application, the electronic device sequentially sends the acquired infrared code values of the first key according to a certain time interval and a certain sequence, until the infrared controller returns a message that matching is successful, the electronic device stops sending the infrared code values of the first key. For example, this step is described by taking the example that the electronic device first transmits the first infrared code value and the first identifier.
It will be appreciated that during certain time intervals as described above, the infrared controller may complete a detection process of whether an infrared code value matches the first infrared device. That is, during the one time interval, the infrared controller may determine whether the infrared code value is available for controlling the first infrared device, and a specific detection method will be described in detail below. That is, the duration of one time interval is greater than or equal to the detection time of whether the infrared controller completes one infrared code value matching the first infrared device.
The certain sequence may be a sequence of the code library identifications corresponding to the infrared code values, or a sequence of download times of the infrared code libraries (for example, the download times are from large to small), or a time sequence of uploading the infrared code libraries (for example, the uploading time is from morning to evening), and the like. It can be understood that the more the infrared code library is downloaded, the more frequently the infrared code library is used, the higher the matching probability of the infrared controller and the first infrared device is, which is beneficial to reducing the matching time and improving the efficiency of automatic matching. Similarly, the earlier the uploading time of the infrared code library is, the earlier the factory time of the infrared equipment of the type is indicated, and the higher the matching probability of the infrared controller and the first infrared equipment is, so that the matching time is favorably reduced, and the matching efficiency is improved. The method and the device for transmitting the infrared code value of the first key of the electronic equipment are not limited in sequence.
In other embodiments of the present application, the electronic device may also wait for the infrared controller to send a message after sending the infrared code value of the first key. And if the infrared controller detects that the first infrared equipment responds, the electronic equipment returns a message of successful matching to the electronic equipment, and the electronic equipment does not send the infrared code value for detection any more. If the infrared controller does not detect that the first infrared device responds within a certain time, a message of failed matching can be returned to the electronic device, and the electronic device continues to send the next infrared code value, and so on.
In further embodiments of the present application, when the electronic device sends the infrared code value of the first key to the infrared controller, the electronic device may also send a code library identifier corresponding to the infrared code value of the first key. In this way, when the infrared controller determines that the infrared code value of a certain first key matches the first infrared device, it may directly determine that the code library identifier corresponding to the infrared code value matches the code library identifier of the first infrared device, which may refer to the description in step S106 and is not described here again.
In some examples, the electronic device establishes a local connection with the infrared controller, and then the electronic device may directly send each infrared code value of the first key and the code library identifier corresponding to each infrared code value to the infrared controller in sequence. In some examples, the electronic device may sequentially send, through a router in the local area network, each infrared code value of the first key and a code library identifier corresponding to each infrared code value to the infrared controller. In other examples, the electronic device may establish a connection with the first infrared controller through the server, and then the electronic device may send each infrared code value of the first key and the code library identifier corresponding to each infrared code value to the infrared controller through the server. The embodiment of the present application does not limit this.
It should be noted that, in this document, the communication between the electronic device and the infrared controller may be direct communication between the electronic device and the infrared controller through a local connection, or indirect communication between the electronic device and the infrared controller through a server, or communication through a router in a local area network in which the electronic device and the infrared controller are located, which is described in a unified manner herein and will not be described repeatedly below.
And S104, the infrared controller sends a first infrared signal according to the first infrared code value of the first key.
The infrared controller sends a first infrared signal according to a first infrared code value after receiving the first infrared code value of the first key sent by the electronic equipment, namely the first infrared signal contains the first infrared code value.
And S105, the infrared controller automatically detects whether the first infrared equipment responds. If the infrared controller determines that the first infrared device responds, step S106 is executed, otherwise step S111 is executed.
After the infrared controller sends the first infrared signal (including the first infrared code value of the first key), if the first infrared signal can be used for controlling the first infrared device, the first infrared device may perform a corresponding operation, that is, respond. If the first infrared signal cannot be used for controlling the first infrared device, the first infrared device does not perform corresponding operation, that is, no response occurs. The first key is still taken as the power key for explanation. For example: when the first infrared device is in a power-off state, after the infrared controller sends the first infrared signal, if the first infrared device is powered on, the first infrared device responds, and if the first infrared device is not powered on, the first infrared device does not respond. For another example: when the first infrared device is in a power-on state, after the infrared controller sends the first infrared signal, if the first infrared device is powered off, the response is given, and if the first infrared device is not powered off, the response is not given.
Since whether the first infrared device responds or not, the prior art relies on human observation by the user. And, when observing that the first infrared apparatus takes place to respond, the user needs the artificial operation in order to inform the infrared controller. For example: the electronic equipment is manually operated and informed to the infrared controller by the electronic equipment. In this application, infrared controller can automated inspection first infrared equipment have the response after sending first infrared signal, no longer need the state of artificially observing first infrared equipment promptly to and artificially operate infrared controller or electronic equipment, realized infrared controller and first infrared equipment's automatic matching.
In some embodiments of the present application, as shown in fig. 2B, the infrared controller has a plug and a jack, the power plug of the first infrared device is plugged into the jack of the infrared controller, and typically the plug of the infrared controller is connected to a power socket of an external power source, and the external power source supplies power to the first infrared device via the infrared controller. During the process of matching the infrared controller with the first infrared device, the infrared controller may determine whether the first infrared device responds by detecting an electrical signal of the infrared device, i.e., an electrical signal output at the jack of the infrared controller.
Illustratively, the infrared controller detects the actual power of the infrared device before transmitting the infrared signal. And after the infrared controller sends the infrared signal, detecting the actual power of the infrared equipment again, and determining whether the first infrared equipment responds or not according to the detected actual power change condition.
The first key is taken as a power key, and whether the first infrared device is powered on or powered off is taken as an example of whether the first infrared device responds. It can be understood that, after receiving the infrared signal sent by the infrared controller, the first infrared device changes from the power-off state to the power-on state or from the power-on state to the power-off state if a response occurs. Then the actual power of the first infrared device changes and the change in output power is detected at the jack electrically connected to the first infrared device. Thus, the infrared controller can determine whether the first infrared device is responding by detecting a change in power output at the jack.
For example: before sending an infrared signal (such as a first infrared signal), the infrared controller detects the power value output by the jack connected with the first infrared device and determines the first working state of the first infrared device. After the infrared signal (for example, the first infrared signal) is sent, the infrared controller detects the power value output by the jack again, and determines the second working state of the first infrared device. And if the first state is different from the second state, determining that the first infrared equipment responds. For example: and if the first working state is a starting state and the second working state is a shutdown state, determining that the first infrared equipment responds. Another example is: and if the first working state is a shutdown state and the second working state is a startup state, determining that the first infrared equipment responds.
Wherein the first infrared device may be considered to be in the on state if the power value is continuously detected to be greater than the first threshold value (e.g., 3W, device-to-device, first threshold value may be different) for a certain time interval (e.g., 2 seconds). In order to improve the detection accuracy, it may also be determined that the first infrared device is in the power-on state after the power value is continuously detected to be greater than the first threshold for a predetermined number of times within a specific time interval (e.g., 2 seconds).
If the power value is continuously detected to be less than or equal to the first threshold value within a certain time interval (e.g., 2 seconds), the first infrared device may be considered to be in the off state.
In other embodiments of the present application, the infrared controller may employ different detection methods for different response responses of the first infrared device.
Illustratively, the first infrared device responds with a change in sound, such as: the first infrared device is a television or the like. The infrared controller may then pick up the sound signal of the first infrared device by connecting a sound pick-up device, such as a microphone, to the sound pick-up device. For example: the first infrared device is in the power-off state firstly, no sound signal exists, after the infrared signal sent by the infrared controller is received, the first infrared device is started, and the sound signal can be detected when the first infrared device is in the power-on state. Another example is: the first infrared device is in a power-on state firstly, then a sound signal can be detected, after the infrared signal sent by the infrared controller is received, the first infrared device is powered off, and when the first infrared device is in a power-off state, then the sound signal cannot be detected. In other words, the infrared controller may determine whether the first infrared device is responding by detecting a change in the sound signal.
As another example, the first infrared device may respond with an image change on its display, such as: the first infrared device is a television or the like. Then, the infrared controller may collect an image signal of the first infrared device through the camera device by connecting the camera device. For example: the first infrared device is in a power-off state firstly, no image signal exists, after the infrared signal sent by the infrared controller is received, the first infrared device is powered on, and the image signal can be detected when the first infrared device is in a power-on state. Another example is: the first infrared device is in a power-on state firstly, then an image signal can be detected, after the infrared signal sent by the infrared controller is received, the first infrared device is powered off, and if the first infrared device is in a power-off state, then no image signal exists. In other words, the infrared controller may determine whether the first infrared device responds by detecting a change in the image signal.
In still other embodiments of the present application, the infrared controller may also determine that the first infrared device is responsive via an infrared signal transmitted by the first infrared device in response. For example: after the infrared controller sends the first infrared signal, the infrared controller switches the sending state to the receiving state. Then, if the first infrared device receives the first infrared signal and responds (for example, power on or power off), a specific infrared signal can be sent. After receiving the specific infrared signal, the infrared controller may confirm that the first infrared device responds, that is, the infrared controller detects that the first infrared device responds. If the first infrared device does not respond after receiving the first infrared signal, no specific infrared signal occurs. That is, if the infrared controller switches the transmission state to the reception state and does not receive the specific infrared signal transmitted by the first infrared device for a certain period of time, it may be determined that the first infrared device does not respond.
It should be noted that, the embodiment of the present application is not limited to a specific method for the infrared controller to automatically detect whether the first infrared device responds.
S106, the infrared controller returns the first information to the electronic equipment.
The first information is used for informing the infrared controller that the first infrared device responds, and the first information may be, for example, a first infrared code value, a first identifier, or other specific information.
Illustratively, the infrared controller automatically detects that the first infrared device responds, indicating that the sent first infrared signal can control the first infrared device, and then the first infrared code value adopted by the first infrared signal can be determined to match the first infrared device, that is, the first infrared code value is determined to match the infrared code value of the first key of the first infrared device, and then the infrared code values corresponding to other keys in the infrared code library where the first infrared code value is located also match the first infrared device.
In some embodiments of the present application, the infrared controller may return the first information to the electronic device, and the electronic device returns, according to the first information, information of the infrared code library corresponding to the first identifier, for example: and (5) executing the steps S107 and S108 by the download address of the infrared code library of the first infrared device and the like.
In other embodiments of the present application, when the infrared controller stores the first identifier, the data of the infrared code library corresponding to the first identifier may also be directly obtained from the server according to the first identifier, that is, S106a is executed. In some examples, the electronic device sequentially sends the acquired infrared code values of the first key at certain time intervals and in a certain sequence, and the electronic device stops sending other infrared code values of the first key for detection until the infrared controller returns a message that matching is successful. In this case, after determining that the first infrared code value matches the first infrared device, the infrared controller may send a message that the matching is successful to the electronic device, so that the electronic device stops sending other infrared code values of the first key. That is, before the infrared controller completes the step S106a, it performs the step S110 after the step S106a by sending the message that the matching is successful, such as the first information (e.g., S106), to the electronic device. In other examples, the electronic device continues to transmit the other infrared code values for the first key after receiving a message that the infrared controller returns a failed match. Then step S106 is replaced with step S106a, and then step S118 is executed. Because the electronic device has not received the message of failed matching returned by the infrared controller, the electronic device does not send any other infrared code value of the first key, and after receiving the message that the infrared controller sends the infrared code library of the infrared device in step S110 and successfully acquires the infrared code library, it can be known that the process of automatic matching is completed.
S107, the electronic device requests the server for information of a first infrared code library according to the first information, wherein the first infrared code library is an infrared code library corresponding to the first identifier.
The information of the first infrared code library may be data of the first infrared code library, for example: and the corresponding relation between each key in the first infrared code library and the infrared code value. The information of the first infrared code library can also be a download address of the first infrared code library, and the data of the first infrared code library can be acquired according to the download address.
In some embodiments, when the first information received by the electronic device is the first infrared code value, the electronic device may determine, according to the first infrared code value, that the infrared code library corresponding to the first identifier matches the first infrared device, that is, the first infrared code library matches the first infrared device, and request the server for information of the first infrared code library.
In other embodiments, when the first information received by the electronic device is the first identifier, the electronic device may directly determine that the infrared code library corresponding to the first identifier matches the first infrared device, that is, the first infrared code library matches the first infrared device, and directly request the server for information of the infrared code library corresponding to the first identifier.
In still other embodiments, when the first information received by the electronic device is specific information, the electronic device may determine the infrared code value (first infrared code value) last sent to the infrared controller before the specific information, and the code library identifier (first identifier) corresponding to the infrared code value, and determine that the code library identifier (first identifier) corresponding to the infrared code value is an identifier matching the infrared code library of the first infrared device. That is, the first infrared code repository matches the first infrared device. And then, requesting the information of the first infrared code library from the server.
If the information of the first infrared code library is already stored in the electronic device, for example, the information of the first infrared code library is already acquired in step S102, the electronic device may not execute steps S107 and S108, and directly send the information of the existing first infrared code library to the infrared controller.
When the information of the first infrared code library is the data of the first infrared code library, the infrared controller directly stores the data of the first infrared code library. If the information of the first infrared code library is the download address of the first infrared code library, the infrared controller downloads the data matching the first infrared code library from the server according to the download address (shown as step S109 in the figure).
In some embodiments, the data of the first infrared code library is a correspondence between an identifier (keyID) of each key of the first infrared device and an infrared code value. Subsequently, when a user clicks a certain key (e.g., a second key, such as a temperature "+" key of an air conditioner, a temperature-up key) on a remote controller newly created by the electronic device, the electronic device sends the keyID corresponding to the key to the infrared controller, and the infrared controller can locally find the infrared code value corresponding to the keyID, convert the infrared code value into an infrared signal, and send the infrared signal out. After receiving the infrared signal, the first infrared device (such as an air conditioner) can determine a corresponding infrared code value according to the infrared signal, and execute corresponding operation (such as controlling the temperature rise of air outlet of the air conditioner) according to the infrared code value, namely, a user can complete control over the first infrared device through the infrared controller.
It can be understood that, when the information of the first infrared code library is the data of the first infrared code library, the electronic device may send the data of the first infrared code library matching the first infrared device to the infrared controller once or in several times.
After the electronic device sends the first infrared code library to the infrared controller, the infrared controller will feed back a message that the first infrared code library is successfully acquired after receiving the message, that is, step S110.
S110, the infrared controller returns a message that the first infrared code library is successfully acquired to the electronic equipment.
After receiving the message, the electronic device indicates that the infrared controller has acquired the data matching the infrared code library of the first infrared device. That is, the automatic matching process of the infrared controller and the first infrared device is completed.
In some embodiments, the electronic device may display a prompt message for prompting the user that the matching of the infrared controller with the first infrared device is complete. As shown in fig. 5D, the mobile phone may display an interface 509, on which a prompt information box 510 is displayed, for prompting the user that the infrared controller and the first infrared device are successfully matched, for example: "the long rainbow television remote controller has been successfully matched". It can be understood that the mobile phone may also prompt in other manners such as sound, image, animation, and the like, which is not limited in this embodiment of the application.
In other embodiments, after the infrared controller is successfully matched with the first infrared device, the mobile phone may display the identifier of the newly created remote controller in the remote controller list of the first application. For example: as shown in fig. 6A, the mobile phone displays an interface 601 of the first application, which is an interface of a remote controller list of the first application. The interface 601 displays the identification of each remote controller that the infrared controller has created. Wherein the identification 602 of the television is the identification of the newly created remote controller. In response to the user clicking on the identification 602 of the tv set, the handset displays the interface 603 shown in fig. 6B, i.e. the control panel of the tv remote control.
In some embodiments, after step S110, the electronic device may further request, from the server, key information of the remote controller of the first infrared device according to the determined code library identifier (e.g., the first identifier) matching the infrared code library of the first infrared device, so that the electronic device arranges the control panel of the remote controller according to the key information. The key information of the remote controller of the first infrared device includes names of all keys used for controlling the first infrared device and identifications (keyIDs) corresponding to the keys. In other embodiments, when downloading the infrared code library matching the first infrared device, the infrared controller also downloads key information of the remote controller of the first infrared device at the same time, and then sends the key information of the remote controller of the first infrared device to the electronic device. Or the data of the first infrared controller downloaded by the infrared controller also comprises key information of the first infrared code library, and the key information in the first infrared code library is the same as the key information of the remote controller of the first infrared device. The embodiment of the application does not limit the way for the electronic equipment to acquire the key information.
After the electronic device acquires the key information of the first infrared device, the electronic device lays out the controls corresponding to the keys on the control panel of the remote controller of the first infrared device according to the key information, and associates the names of the keys corresponding to the controls with the key identifiers (keyids).
Wherein the newly created remote control panel may be displayed according to a predefined display format. For example: a general control panel is defined in advance, and then, the display is performed according to the condition of each key corresponding to the first infrared device (for example, according to the key information), for example: in this universal control panel, keys not required for use by the first infrared device (such as those not included in the key information described above) are grayed out or otherwise indicated to the user as being unusable. Another example is: the layout may be performed according to each key in the code library matched with the first infrared device, that is, only keys (such as the keys included in the key information) required by the first infrared device may be displayed on the control panel of the newly created remote controller, that is, the control panels of the remote controllers corresponding to different infrared devices may be different, and the specific layout manner of the control panel of the remote controller is not limited.
When a user needs to use the infrared controller to control the first infrared device, the user can control the infrared controller to send a corresponding infrared signal by operating keys on a control panel of the television remote controller displayed on the electronic device, so that the first infrared device executes corresponding operation. For example: when the electronic equipment detects that the user clicks the power key, the electronic equipment sends the keyID corresponding to the power key to the infrared controller according to the key information, the infrared controller searches the infrared code value corresponding to the keyID of the power key locally, and corresponding infrared signals are sent by adopting the searched infrared code value. After receiving the infrared signal, the first infrared device acquires an infrared code value contained therein, and executes an operation corresponding to the infrared code value, that is, executes a shutdown operation when the first infrared device is in a startup state. Or when the first infrared equipment is in the power-off state, the power-on operation is executed.
Generally, the keyID corresponding to each key is no more than 4 bytes of data, and the infrared code value corresponding to each key is much more than 4 bytes of data, for example, 128 bytes. Therefore, the electronic equipment transmits the key ID with smaller data volume to the infrared controller, and then the infrared controller searches the corresponding infrared code value, so that the time of responding to the user operation of the infrared controller is favorably prolonged, and the time delay is reduced.
And S111, the electronic equipment sends the second infrared code value of the first key to the infrared controller.
For example, if the electronic device has not received the first information (e.g., the first identifier) returned by the infrared controller within the preset time period, it indicates that the first infrared device has not responded. Or the electronic device receives a notification that the first infrared device does not respond returned by the first controller. That is, the infrared code value (i.e., the first infrared code value) adopted by the infrared signal (i.e., the first infrared signal) transmitted this time does not match the first infrared device. The electronic device needs to detect whether the next infrared code value (second infrared code value) matches the first infrared device. Then, the electronic device sends the second infrared code value and the second identifier of the first key to the infrared controller, so that the infrared controller sends a second infrared signal of the second infrared code value in the following process, and whether the second infrared code value is matched with the first infrared device is detected.
And S112, the infrared controller sends a second infrared signal according to the second infrared code value of the first key.
And after receiving a second infrared code value and a second identifier of the first key sent by the electronic equipment, the infrared controller sends a second infrared signal according to the second infrared code value, namely the second infrared signal contains the second infrared code value.
S113, the infrared controller detects whether the first infrared device responds.
In this step, reference may be made to the related description in step S105, and details are not repeated.
And S114, if the infrared controller determines that the first infrared equipment has a response, returning second information to the electronic equipment.
The second information is used for informing the infrared controller that the first infrared device responds, and the second information may be, for example, a second infrared code value, a second identifier, or other specific information. The content of the second information may refer to the description of the first information in step S106, and is not described herein again.
The infrared controller automatically detects that the first infrared device has a response, and indicates that the sent second infrared information can control the first infrared device, and then the second infrared code value adopted by the second infrared signal can be determined to be matched with the first infrared device, that is to say, the second infrared code value is determined to be matched with the infrared code value of the first key of the first infrared device, and then the infrared code values corresponding to other keys in the infrared code library where the second infrared code value is located are also matched with the first infrared device.
In some embodiments of the present application, the infrared controller may return the second information to the electronic device, and the electronic device returns, according to the second information, information of the infrared code library corresponding to the second identifier, for example: and acquiring a download address of the infrared code library of the first infrared device, and the like, namely executing step S115.
In other embodiments of the present application, when the infrared controller stores the second identifier, the data of the infrared code library corresponding to the second identifier may also be directly obtained from the server according to the second identifier, that is, S114a is executed. In some examples, the electronic device sequentially sends the acquired infrared code values of the first key at certain time intervals and in a certain sequence, and the electronic device stops sending other infrared code values of the first key for detection until the infrared controller returns a message that matching is successful. In this case, after determining that the second infrared code value matches the first infrared device, the infrared controller may send a message that the matching is successful to the electronic device, so that the electronic device stops sending other infrared code values of the first key. That is, before the infrared controller completes the step S114a, it performs the step S118 after the step 114a of sending the message that the matching is successful to the electronic device, such as sending the second information (e.g., S114). In other examples, the electronic device continues to send other infrared code values for the first key for detection after receiving a message that the infrared controller returns a failed match. Then step S114 is replaced with step S114a, and then step S118 is executed. Because the electronic device has not received the message of failed matching returned by the infrared controller, the electronic device will not send other infrared code values of the first key any more, and after receiving the message that the infrared controller sends the infrared code library of the infrared device in step S118 and successfully acquires the infrared code library, it can be known that the process of automatic matching is completed.
If the infrared controller determines that the first infrared device does not respond, the electronic device still does not receive the code library identifier or the specific information returned by the infrared controller within the specific time period, and the electronic device can continue to send other infrared code values of the first key and the code library identifier corresponding to each infrared code value to the infrared controller after the preset time period. And the infrared controller sends corresponding infrared signals according to other infrared code values until the first infrared device is detected to respond. And determining an infrared code value of the infrared signal enabling the first infrared device to have a response, and a code library identifier corresponding to the infrared code value. And taking the infrared code library corresponding to the code library identification as a matched infrared code library of the first infrared device. For further details, reference is made to the description of further relevant matters in the present application.
S115, the electronic device requests the server for information of a second infrared code library according to the second information, wherein the second infrared code library is an infrared code library corresponding to the second identifier.
The information of the second infrared code library can be data of the second infrared code library, the data include infrared code values corresponding to keys in the second infrared code library, the information of the second infrared code library can also be a download address of the second infrared code library, and the data of the second infrared code library can be acquired according to the download address.
And S116, the electronic equipment sends the acquired information of the second infrared code library to the infrared controller.
And then, when the infrared controller receives the infrared code values of the keys of the infrared code library corresponding to the second identifier, directly storing the infrared code values. If the download address of the infrared code library corresponding to the second identifier is received, the infrared controller downloads data matching the second infrared code library from the server according to the download address (shown as step S117 in the figure).
And S118, the first infrared control returns a message that the second infrared code library is successfully acquired to the electronic equipment.
After S118, similar to the above step S110, the electronic device may further obtain key information of the remote controller of the first infrared device from the server or the infrared controller, or store the key information itself, where the key information includes names of all keys used for controlling the first infrared device and identification (KeyID) of each key. And then, the electronic equipment creates a control panel of the remote controller matched with the first infrared equipment according to the key information of the remote controller of the first infrared equipment.
Steps S115 to S118 are similar to steps S107 to S110, and reference may be made to the description of the relevant contents, which is not repeated herein.
The above embodiment is described by taking an example in which the infrared controller stores data matching the infrared code library of the first infrared device. In other embodiments of the present application, the infrared controller may also store data matching the infrared code library of the first infrared device, instead of storing the data matching the infrared code library of the first infrared device. In other words, when the user wants to control the first infrared device by using the infrared controller, the electronic device needs to be matched with the first infrared device. That is, the electronic device learns the infrared code values corresponding to the keys for controlling the first infrared device. The user can complete the process of learning the infrared code values of the keys by the electronic equipment by operating the electronic equipment.
Illustratively, the automatic matching of the electronic device with the first infrared device includes: the above steps S101-S106, S107, S111-S114 and S115 in the embodiment shown in FIG. 4 are performed, and the above steps S106a, S108, S109, S110, S114a, S116, S117 and S118 are not performed. That is, after the electronic device downloads the data matching the infrared code library of the first infrared device from the server, that is, after step S107 or S115 is executed, that is, after the electronic device acquires the corresponding relationship between the infrared code value matching the first infrared device and the key, the electronic device does not send the data of the infrared code library to the infrared controller. After the electronic equipment creates the remote controller for the first infrared equipment, when detecting that a user clicks a certain key on the newly created remote controller of the electronic equipment, the infrared code value corresponding to the key is sent to the infrared controller, and then the infrared controller sends a corresponding infrared signal according to the infrared code value so as to control the first infrared equipment to execute corresponding operation. Therefore, the workload of searching the infrared code value by the infrared controller is reduced, and the processing complexity of the infrared controller is reduced.
It should be noted that, in the foregoing embodiment, step S102 is described by taking a case where the server maintains an infrared code library of multiple infrared devices, and neither the electronic device nor the infrared controller stores an infrared code value of the infrared code library of the infrared device or an infrared code value of a part of keys (for example, a test key used in an automatic matching process, such as a first key).
In other embodiments of the present application, ir code values for at least some of the keys of the plurality of ir devices (e.g., the test key, such as the first key, used in the auto-match process) may be maintained on the electronic device. In some examples, as shown in fig. 7, a flowchart of a method for automatically matching an infrared controller and a first infrared device provided in an embodiment of the present application is shown. The electronic equipment is stored with a plurality of infrared code libraries of infrared equipment and the identification of each infrared code library. And infrared code values corresponding to all keys of each infrared device are stored in each infrared code library.
Then, in this example, the method described in steps S101 to S118 in fig. 4 described above is different in that:
after step S101 is executed, that is, after the electronic device receives the first input, the electronic device may locally acquire the infrared code value corresponding to the corresponding first key in each infrared code library and the code library identifier corresponding to the infrared code value, and then execute step S103. (i.e., step S201 is replaced with step S102 in FIG. 4.)
After step S106, the electronic device receives the first information returned by the infrared controller, determines that the first identifier matches the identifier of the infrared code library of the first infrared device according to the first information, searches the data of the infrared code library corresponding to the first identifier locally, and sends the data of the infrared code library corresponding to the first identifier to the infrared controller. (i.e., steps S107-S109 are replaced with steps S202-S203 in FIG. 4).
Or, after step S114, the electronic device receives the second information returned by the infrared controller, may determine, according to the second information, that the second identifier matches the identifier of the infrared code library of the first infrared device, search, from the local, data of the infrared code library corresponding to the second identifier, and send the data of the infrared code library corresponding to the second identifier to the infrared controller. (i.e., steps S115-S117 are replaced with steps S204-S205 in FIG. 4).
Or the electronic device receives other information returned by the infrared controller, can determine the identifier of the infrared code library matched with the first infrared device according to the information, searches the data of the infrared code library corresponding to the identifier of the code library from the local, and sends the data of the infrared code library corresponding to the identifier of the code library to the infrared controller. (not shown in FIG. 7)
In some examples, after the electronic device executes S202 or S204, the found infrared code library is used as an infrared code library matched with the first infrared device, the electronic device does not send the infrared code library to the infrared controller, but when it is detected that a user clicks a certain key on a remote controller newly created by the electronic device, an infrared code value corresponding to the key is sent to the infrared controller, and then the infrared controller sends a corresponding infrared signal according to the infrared code value to control the first infrared device to execute a corresponding operation. Therefore, the workload of searching the infrared code value by the infrared controller is reduced, and the processing complexity of the infrared controller is reduced.
The same steps as in fig. 4 can be referred to the description of the embodiment related to fig. 4 above.
In other examples, only the infrared code value of the first key (e.g., the test key used in the automatic matching process) of each infrared device and the code library identifier corresponding to the infrared code value of the first key may be stored on the electronic device. And maintaining infrared code libraries of a plurality of infrared devices and the identification of each infrared code library on the server. The infrared code library stores infrared code values corresponding to the keys. Therefore, subsequently, after the infrared controller determines the infrared code value of the first key matched with the first infrared device, the infrared code values corresponding to other keys can be downloaded from the server according to the code library identifier.
Then, in this example, the method described in steps S101 to S118 in fig. 4 described above is different in that:
after step S101 is executed, that is, after the electronic device receives the first input, the electronic device may locally acquire the infrared code value corresponding to each first key and the code library identifier corresponding to the infrared code value, and then execute step S103. (i.e., step S201 is replaced with step S102 in FIG. 4.)
The following other steps can still refer to the description of the relevant contents in fig. 4.
In still other embodiments of the present application, infrared code values for at least some of the keys of the plurality of infrared devices (e.g., the test key, such as the first key, used in the auto-match process) may be maintained on the infrared controller.
In some examples, the infrared controller has stored thereon infrared code libraries for a plurality of infrared devices, and an identification of each infrared code library. And infrared code values corresponding to all keys of each infrared device are stored in each infrared code library. Then, in this example, the method described in steps S101 to S118 in fig. 4 described above is different in that:
after step S101 is executed, that is, after the electronic device receives the first input of the user, the electronic device notifies the infrared controller to start the matching process with the first infrared device. And then, the infrared controller locally acquires the infrared code values corresponding to the first keys and the code library identifications corresponding to the infrared code values. And sending the infrared code values corresponding to the first keys one by one, and detecting whether the first infrared equipment responds. When the first infrared equipment is determined to respond, the code library identification corresponding to the currently sent infrared code value is determined to be matched with the code library identification of the first infrared equipment, and the data of the infrared code library of the first infrared equipment is determined according to the code library identification and is used for subsequently controlling the first infrared equipment. After determining the code library identification matched with the first infrared equipment, the infrared controller sends a message to the electronic equipment to indicate that the infrared controller determines the code library identification matched with the first infrared equipment, and the message carries the code library identification matched with the first infrared equipment. The electronic equipment can acquire the key information according to the code library identification and establish a remote controller interface capable of remotely controlling the first infrared equipment. Or after the infrared controller determines the code library identification matched with the first infrared device, the infrared controller identifies corresponding key information to the code library of the electronic device.
In this example, the infrared controller may perform the steps of sending the infrared signal and detecting whether the infrared device responds, which may be referred to the related description in the related embodiment of fig. 4, and other contents may be referred to the related description in the related embodiment.
In other examples, only the infrared code value of the first key (the test key used in the automatic matching process) in each infrared device and the code library identifier corresponding to the infrared code value of the first key may also be stored on the infrared controller. And an infrared code library of a plurality of infrared devices is maintained on the server or the electronic device, and the infrared code library stores the corresponding relation between each key and the infrared code value. Therefore, subsequently, after the infrared controller determines that the infrared code value of the first key of the first infrared device is matched, the data of the infrared code library corresponding to the code library identification can be downloaded from the server or the electronic device according to the code library identification corresponding to the infrared code value. Similarly, after obtaining the data of the infrared code library, the infrared controller may notify the electronic device to match the code library identifier of the first infrared device, so that the electronic device obtains the corresponding key information.
The infrared controller may perform the steps of sending the infrared signal and detecting whether the infrared device responds as described above with reference to the embodiment of fig. 4, and the step of obtaining the data of the infrared code library from the server or the electronic device may be described with reference to the embodiment of fig. 4 or the embodiment of fig. 7, and other contents may be described with reference to the relevant contents in the embodiment described above.
Fig. 8 is a schematic diagram of another system architecture provided in the embodiment of the present application. The system may include a smart socket 801, a first infrared device 802, an electronic device 803, and a server (not shown). The electronic device 803 may have an infrared emitting module that may control a plurality of infrared devices (including the first infrared device 802) by transmitting infrared signals, or control different infrared devices. The infrared code library of the infrared device needs to be matched before the electronic device 803 controls the infrared device for the first time. The electronic device 803 and one of the infrared devices (e.g., the first infrared device 802) are exemplified here.
The smart socket 803 is plugged into a power socket, and the plug of the first infrared device 802 is plugged into the jack of the smart socket. The smart socket 803 may detect a change in current, voltage, or power at the jack (i.e., on the power line where the smart socket 803 is connected to the first infrared device) and notify the electronic device 303. The smart socket 803 may include the processor 201, the memory 202, the wireless communication module 203, the detection module 205, the socket 206, the plug 212, the power conversion module 213, and other devices in the infrared controller 301, and the description of the related devices refers to the above embodiments and is not repeated herein.
The electronic device 803 provides an interface for user interaction so that a user can manipulate the first infrared device 802 through the interface. In a specific implementation, a user may operate the first infrared device 802 by operating an APP (e.g., a remote controller APP or a smart home cloud APP) installed on the electronic device 803.
In some embodiments of the present application, the electronic device 803 may establish a communication connection with the smart jack 801 through a server. In other words, the electronic device 803 and the smart jack 801 may be connected to the server through a wired, WIFI, or mobile data network, respectively. It is understood that the connection between the electronic device 803 and the server may be the same as or different from the connection between the smart socket 801 and the server.
In other embodiments of the present application, the electronic device 803 may also establish a local connection directly with the smart jack 801. For example: the electronic device 803 may be connected to the smart socket 801 by means of wire, WIFI, bluetooth, ZigBee (ZigBee), or the like.
As shown in fig. 9, a flowchart of a method for automatically matching an electronic device and a first infrared device provided in the embodiment of the present application may be applied to the system architecture shown in fig. 8, specifically as follows:
s901, the electronic equipment receives a first input of a user.
The first input may be an input that triggers the electronic device to start a process of learning the infrared code values of the respective keys, that is, an input that triggers a matching process of the electronic device and the first infrared device.
In some examples of the application, a user opens a first application (e.g., an application of a smart home, etc.) on an electronic device (e.g., a mobile phone), and performs a first input on an interface of the first application. The first input may be, for example, an operation of clicking the add control 501 in the interface of the remote control list shown in fig. 5A to trigger the mobile phone to create a remote control of the first infrared device (e.g., a television). That is, in response to the first input, the electronic device begins to perform an automatic matching process with the first infrared device.
In still other examples of the present application, the first input may also be a series of operations. The first application of the electronic device may further support user selection of any one or any number of a type of the first infrared device, a brand of the first infrared device, a model of the first infrared device, and the like. Because the infrared code values corresponding to the first infrared devices of different types, brands and models are different, after the user selects the brand, the type and the model of the first infrared device, the range of the infrared code values required to be detected by the electronic device can be further reduced, and the automatic matching process of the electronic device and the first infrared device is favorably shortened.
S902, the electronic equipment acquires the infrared code values of the first key and the code library identifications corresponding to the infrared code values from the server according to the first input of the user.
S903, the electronic device acquires the first state of the first infrared device through the intelligent socket.
For example, the smart jack may detect a current, voltage, or power condition of a first infrared device plugged into the jack and feed back the current, voltage, or power condition to the electronic device. Then, the electronic device obtains a first state of the first infrared device according to the current, voltage or power condition of the first infrared device. The first state may be a power-on state or a power-off state, and the first state refers to a state of the first infrared device when the electronic device has not sent the infrared signal. The manner in which the smart socket detects the current, voltage or power of the first infrared device may refer to the above embodiments.
S904, the electronic device sends a first infrared signal according to the first infrared code value of the first key.
The electronic equipment immediately sends the first infrared code value after acquiring the first state.
S905, the electronic device obtains the second state of the first infrared device through the intelligent socket.
The electronic device obtains the current, voltage or power condition of the first infrared device from the smart socket again, and accordingly obtains the second state of the first infrared device, wherein the second state can be a power-on state or a power-off state, and the second state refers to the state of the first infrared device after the electronic device sends the infrared signal. The manner in which the smart socket detects the current, voltage or power of the first infrared device may refer to the above embodiments.
The electronic device may be to obtain the second status of the first infrared device from the smart socket after transmitting the first infrared signal for a period of time. The duration of the certain time period is greater than or equal to the duration of one-time automatic detection completed by the electronic device, and the duration of one-time automatic detection completed comprises a time period from the time when the electronic device sends the first infrared signal to the time when the first infrared device receives the first infrared signal, the time when the first infrared device responds according to the first infrared signal, and a time period when the electronic device detects the response of the first infrared device. That is, if the first infrared signal is capable of controlling the first infrared device, the electronic device may detect that the first infrared device is responding after the certain period of time.
S906, if the electronic device determines that the first state is different from the second state, then S907 is executed, otherwise S908 is executed.
And if the first state and the second state are different, the first infrared device responds, the first infrared signal can be used for controlling the first infrared device, otherwise, the first infrared signal cannot be used for controlling the first infrared device.
S907, the electronic device requests the server for the data of the code base corresponding to the code base identification of the first infrared code value, namely the data of the first infrared code base, according to the code base identification of the first infrared code value.
The data of the first infrared code library comprises the corresponding relation between each key in the first infrared code library and the infrared code value.
S908, the electronic device sends a second infrared signal corresponding to the second infrared code value of the first key.
And S909, the electronic device acquires the third state of the first infrared device through the smart socket.
In this step, reference may be made to the related description in step S905, which is not repeated herein.
S910, the electronic device determines that the first state is different from the third state, and then the electronic device requests the server for data of the second infrared code library according to the code library identifier of the second infrared code value. Otherwise, the electronic device sends a third infrared code value of the first key, then acquires a fourth state of the first infrared device, and determines whether the first state and the fourth state are the same.
By analogy, if the fourth state is different from the first state, the third infrared code value is determined to be the infrared code value matched with the first infrared device, and the infrared code library where the third infrared code value is located is the infrared code library matched with the first infrared device. And if the fourth state is the same as the first state, the electronic equipment continues to send the next infrared code value of the first key to the infrared equipment until the latest state of the first infrared equipment is acquired to be the same as the first state. Assuming that the electronic device sends the nth infrared code value of the first key to the infrared controller, the nth infrared code value is not sent before, and the nth state of the first infrared device is acquired again. And if the Nth state is different from the first state, determining that the Nth infrared code value is the infrared code value matched with the first infrared equipment, and downloading the corresponding infrared code library according to the code library identifier corresponding to the Nth infrared code value, namely the infrared code library matched with the first infrared equipment.
It is to be understood that the above-mentioned terminal and the like include hardware structures and/or software modules corresponding to the respective functions for realizing the above-mentioned functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. 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 embodiments.
In the embodiment of the present application, the terminal and the like may be divided into functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application 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 unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
In the above embodiment, a scenario in which the controller transmits the infrared signal to control the controlled device is described, and the scheme of the embodiment of the application may also be considered to be applied to a scenario in which the controller communicates with the controlled device in a bluetooth or WIFI manner.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should 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.

Claims (19)

1. A method for matching an infrared controller with an infrared device is characterized by comprising the following steps:
the method comprises the steps that an infrared controller receives a first infrared code value of a first key sent by electronic equipment;
the infrared controller sends a first infrared signal according to the first infrared code value of the first key;
the infrared controller automatically determining whether an infrared device is responsive to the first infrared signal;
if the infrared device is determined to respond to the first infrared signal, the infrared controller automatically returns first information to the electronic device;
the infrared controller receives information of a first infrared code library sent by the electronic equipment, and the first infrared code library is an infrared code library corresponding to the first infrared code value determined by the electronic equipment according to the first information.
2. The method of claim 1, wherein the infrared controller comprises a jack and a plug, the plug of the infrared controller is plugged into a power socket, and the power plug of the infrared device is plugged into the jack of the infrared controller;
the infrared controller automatically determining whether the infrared device responds to the first infrared signal specifically includes:
before or at the same time of sending the first infrared signal, the infrared controller automatically detects an electric signal output by a jack of the infrared controller and determines that the infrared equipment is in a first state;
after the infrared controller sends the first infrared signal, automatically detecting the electric signal output by the jack of the infrared controller again, and determining that the infrared equipment is in a second state;
and if the second state different from the first state is detected in a preset time period, determining that the infrared equipment responds to the first infrared signal, otherwise, determining that the infrared equipment does not respond to the first infrared signal.
3. The method of claim 1, wherein the infrared controller automatically determining whether an infrared device is responsive to the first infrared signal comprises:
after the infrared controller sends the first infrared signal, if the infrared controller receives the infrared signal sent by the infrared equipment within a preset time period, the infrared equipment is determined to respond to the first infrared signal, otherwise, the infrared equipment is determined not to respond to the first infrared signal.
4. The method of claim 1, wherein the infrared controller automatically determining whether an infrared device is responsive to the first infrared signal comprises:
before or at the same time of sending the first infrared signal, the infrared controller automatically detects whether the infrared equipment displays images or plays sound, and determines that the infrared equipment is in a first state;
after the infrared controller sends the first infrared signal, automatically detecting whether the infrared equipment displays images or plays sound again, and determining that the infrared equipment is in a second state;
and if the second state different from the first state is detected in a preset time period, determining that the infrared equipment responds to the first infrared signal, otherwise, determining that the infrared equipment does not respond to the first infrared signal.
5. The method according to any one of claims 1-4, wherein the information of the first infrared code library is a download address of the first infrared code library;
after the infrared controller receives the information of the first infrared code library sent by the electronic equipment, the method further comprises the following steps: and the infrared controller requests the server for the data of the first infrared code library according to the download address, receives and stores the data of the first infrared code library sent by the server, wherein the data of the first infrared code library comprises the corresponding relation between the identification of each key in the first infrared code library and the infrared code value.
6. The method according to any one of claims 1 to 4, wherein the information of the first infrared code library is data of the first infrared code library, and the data of the first infrared code library includes a correspondence between an identifier of each key in the first infrared code library and an infrared code value.
7. The method of any one of claims 1-4, wherein after the infrared controller receives the information of the first infrared code library transmitted by the electronic device, the method further comprises:
the infrared controller receives an identifier of a second key sent by the electronic equipment;
and the infrared controller searches a third infrared code value corresponding to the identifier of the second key from the first infrared code library, and sends a third infrared signal according to the third infrared code value, wherein the third infrared signal can be used for controlling the infrared equipment.
8. The method according to any one of claims 1-4, wherein the receiving, by the infrared controller, the first infrared code value of the first key sent by the electronic device comprises:
the infrared controller receives the first infrared code value of the first key sent by the electronic equipment and a first identifier, wherein the first identifier is a code library identifier corresponding to the first infrared code value;
if it is determined that the infrared device responds to the first infrared signal, the infrared controller automatically returns first information to the electronic device, and the method specifically includes:
and if the infrared device is determined to respond to the first infrared signal, the infrared controller automatically returns the first identifier to the electronic device.
9. A method for matching an infrared controller with an infrared device is characterized by comprising the following steps:
the method comprises the steps that the electronic equipment receives a first input, and the first input indicates that an infrared controller is matched with the infrared equipment;
the electronic equipment sends a first infrared code value of a first key to the infrared controller so that the infrared controller sends a first infrared signal to control the infrared equipment according to the first infrared code value;
the electronic equipment receives first information sent by the infrared controller, wherein the first information indicates that the infrared equipment responds to the first infrared signal sent by the infrared controller;
and the electronic equipment sends the information of the first infrared code library to the infrared controller according to the first information, wherein the first infrared code library is the infrared code library corresponding to the first infrared code value determined by the electronic equipment according to the first information.
10. A method for matching an infrared controller with an infrared device is characterized by comprising the following steps:
the method comprises the steps that an infrared controller receives an automatic matching instruction sent by electronic equipment, and a first infrared code value of a first key is locally stored in the infrared controller;
the infrared controller sends a first infrared signal according to the first infrared code value of the first key;
the infrared controller automatically determining whether an infrared device is responsive to the first infrared signal;
if the infrared equipment is determined to respond to the first infrared signal, the infrared controller automatically determines that a first infrared code library is matched with the infrared equipment, and the first infrared code library is an infrared code library corresponding to the first infrared code value;
if the infrared equipment does not respond to the first infrared signal, the infrared controller sends a second infrared signal according to a second infrared code value of the first key;
the infrared controller automatically determining whether the infrared device is responsive to the second infrared signal;
and if the infrared equipment is determined to respond to the second infrared signal, the infrared controller automatically determines that a second infrared code library is matched with the infrared equipment, and the second infrared code library is a code library corresponding to the second infrared code value.
11. The method of claim 10, wherein after the infrared controller automatically determines that a first infrared code library matches the infrared device, or after the infrared controller automatically determines that a second infrared code library matches the infrared device, the method further comprises:
and the infrared controller returns a message of successful automatic matching to the electronic equipment.
12. An infrared controller, comprising: a processor, a memory, a wireless communication module, an infrared signal emitting module, the memory, the wireless communication module, the infrared signal emitting module, and the processor are coupled, the wireless communication module is configured to communicate wirelessly, the infrared signal emitting module is configured to emit an infrared signal, the memory is configured to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, to cause the infrared controller to perform the method of matching an infrared controller with an infrared device as claimed in any one of claims 1-8, 10, and 11.
13. An infrared controller, comprising: the infrared device comprises a processor, a memory, a wireless communication module, an infrared signal transmitting module, a jack and a plug, wherein the memory, the wireless communication module and the infrared signal transmitting module are coupled with the processor, the wireless communication module is used for carrying out wireless communication, the infrared signal transmitting module is used for transmitting an infrared signal, the plug of the infrared controller is inserted into a power socket, and the jack of the infrared controller is inserted into a power plug of an infrared device; the memory is configured to store computer program code comprising computer instructions that, when read from the memory by the processor, cause the infrared controller to perform the steps of:
receiving a first infrared code value of a first key sent by electronic equipment;
sending a first infrared signal according to the first infrared code value of the first key;
automatically determining whether an infrared device is responsive to the first infrared signal;
if the infrared equipment is determined to respond to the first infrared signal, returning first information to the electronic equipment;
and receiving information of a first infrared code library sent by the electronic equipment, wherein the first infrared code library is the infrared code library corresponding to the first infrared code value determined by the electronic equipment according to the first information.
14. The infrared controller of claim 13, further comprising: and the power conversion module is used for converting alternating current flowing in from a plug of the infrared controller into low-voltage direct current to supply power for the infrared controller.
15. An electronic device, comprising: a processor, a memory, and a touch screen, the memory, the touch screen coupled with the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the method of matching an infrared controller to an infrared device of claim 9.
16. A computer storage medium comprising computer instructions which, when run on a terminal, cause the terminal to perform the method of matching an infrared controller to an infrared device of any one of claims 1-8, 10 and 11.
17. A computer storage medium comprising computer instructions that, when executed on a terminal, cause the terminal to perform the method of infrared controller matching infrared devices of claim 9.
18. A computer program product, which, when run on a computer, causes the computer to perform a method of matching an infrared controller to an infrared device as claimed in any one of claims 1 to 8, 10 and 11.
19. A computer program product, which, when run on a computer, causes the computer to perform the method of matching an infrared controller with an infrared device of claim 9.
CN201910082153.8A 2019-01-28 2019-01-28 Method, device and equipment for automatically matching infrared controller and infrared equipment Active CN109920240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910082153.8A CN109920240B (en) 2019-01-28 2019-01-28 Method, device and equipment for automatically matching infrared controller and infrared equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910082153.8A CN109920240B (en) 2019-01-28 2019-01-28 Method, device and equipment for automatically matching infrared controller and infrared equipment

Publications (2)

Publication Number Publication Date
CN109920240A CN109920240A (en) 2019-06-21
CN109920240B true CN109920240B (en) 2020-10-09

Family

ID=66960917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910082153.8A Active CN109920240B (en) 2019-01-28 2019-01-28 Method, device and equipment for automatically matching infrared controller and infrared equipment

Country Status (1)

Country Link
CN (1) CN109920240B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110533898B (en) * 2019-09-06 2021-02-26 百度在线网络技术(北京)有限公司 Wireless control learning system, method, apparatus, device and medium for controlled device
CN111127870B (en) * 2019-12-30 2021-09-21 深圳小佳科技有限公司 Remote control method, remote controller, remote control system and storage medium
CN113129578A (en) * 2019-12-31 2021-07-16 深圳Tcl数字技术有限公司 Matching method, control method, system and storage medium of infrared equipment
CN111402570B (en) * 2020-02-11 2021-08-17 广州创知科技有限公司 Infrared remote control signal receiving method, receiving system, receiving device and storage medium
CN111338221B (en) * 2020-02-21 2023-07-25 珠海荣邦电子科技有限公司 Multi-device self-adaptive control method, device and system
CN111913417A (en) * 2020-07-03 2020-11-10 深圳市浩博高科技有限公司 Control method and controller
CN113961131A (en) 2020-07-03 2022-01-21 瑞昱半导体股份有限公司 Processing method and processing device for user-defined key based on android platform
CN114078314B (en) * 2020-08-17 2023-05-02 深圳绿米联创科技有限公司 Infrared code matching method, device and system, electronic equipment and storage medium
CN113793495A (en) * 2021-09-15 2021-12-14 云茂互联智能科技(厦门)有限公司 Wireless control method and device
CN115035701A (en) * 2022-06-07 2022-09-09 深圳恩浦诺科技有限公司 Omnidirectional remote control device and control method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9258710B2 (en) * 2013-05-29 2016-02-09 Panasonic Intellectual Property Corporation Of America Wireless communication device, wireless communication method, remote operation device and remote operation method
CN103546832B (en) * 2013-10-17 2016-05-18 北京闪联云视信息技术有限公司 The matching process of home appliance remote controller and system
CN105282583B (en) * 2014-06-18 2018-05-08 Tcl集团股份有限公司 A kind of remote controler intelligent Matching system and implementation method
CN105741532B (en) * 2014-12-11 2019-08-16 华为终端有限公司 Terminal and infrared remote control matching method with function of infrared remote control
CN104574927A (en) * 2014-12-14 2015-04-29 杭州赫智电子科技有限公司 Infrared matching method and infrared matching system with feedback function
CN104574930B (en) * 2014-12-31 2018-08-14 上海摩软通讯技术有限公司 Configuration method, mobile terminal and the household electric appliances of mobile terminal home control function
CN106611489A (en) * 2015-10-22 2017-05-03 联发科技(新加坡)私人有限公司 Method and electronic device for automatically matching remote control signal

Also Published As

Publication number Publication date
CN109920240A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109920240B (en) Method, device and equipment for automatically matching infrared controller and infrared equipment
CN109584879B (en) Voice control method and electronic equipment
CN110138959B (en) Method for displaying prompt of human-computer interaction instruction and electronic equipment
CN110134316B (en) Model training method, emotion recognition method, and related device and equipment
CN111752443A (en) Method, related device and system for controlling page by display equipment
CN111650840B (en) Intelligent household scene arranging method and terminal
CN113272745B (en) Smart home equipment sharing system and method and electronic equipment
CN111628916B (en) Method for cooperation of intelligent sound box and electronic equipment
CN113885759A (en) Notification message processing method, device, system and computer readable storage medium
CN111614524A (en) Multi-intelligent-device linkage control method, device and system
CN113961157B (en) Display interaction system, display method and equipment
CN111505946B (en) Equipment control method and equipment
KR102269387B1 (en) Information sharing method depends on a situation and electronic device supporting the same
CN113254409A (en) File sharing method, system and related equipment
CN112237031B (en) Method for accessing intelligent household equipment to network and related equipment
CN112543447A (en) Device discovery method based on address list, audio and video communication method and electronic device
CN111835904A (en) Method for starting application based on context awareness and user portrait and electronic equipment
CN113170019A (en) Caller identification method based on application and terminal equipment
CN114115770A (en) Display control method and related device
CN112150778A (en) Environmental sound processing method and related device
CN114650330A (en) Method, electronic equipment and system for adding operation sequence
CN113970888A (en) Household equipment control method, terminal equipment and computer readable storage medium
CN115022807A (en) Express delivery information reminding method and electronic equipment
CN113380240A (en) Voice interaction method and electronic equipment
CN115248693A (en) Application management method 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