Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method for setting a remote control function for electronic equipment, and aims to provide electronic equipment which can replace an original remote controller to control controlled equipment. The method for setting the remote control function of the electronic equipment is applied to the smart phone, so that the smart phone has the remote control function and replaces an original remote controller to control the controlled equipment.
Furthermore, the electronic equipment provided by the invention can replace a plurality of original remote controllers to control a plurality of controlled equipment. The controlled device may be various products and devices that can be controlled by a remote controller, including various household appliances equipped with a remote controller, such as remote-controlled television sets and air conditioners. The original remote controller can be a remote controller equipped when the controlled equipment leaves a factory and other devices capable of remotely and wirelessly controlling the controlled equipment, including various infrared remote controllers, radio frequency remote controllers and the like.
Referring to fig. 1, a method for setting a remote control function for an electronic device according to an embodiment of the present invention specifically includes the following steps:
101. the electronic equipment acquires and stores an operation interface image of an original remote controller, and sets an identifier of the operation interface image, wherein the operation interface image comprises N trigger areas.
The electronic equipment provided by the invention comprises a display screen used for displaying an operation interface image of an original remote controller to a user. Optionally, the operation interface image may be generated from a photograph of the original remote controller. For example, the electronic device obtains a picture of an original remote controller, divides the picture of the original remote controller into N trigger regions according to the key distribution of the original remote controller, and generates an operation interface image of the original remote controller. Each of the N trigger areas corresponds to a key, and N is an integer greater than or equal to 1.
Specifically, the electronic device may receive a photograph of the original remote controller from the other device through the external interface. For example, the electronic device may be connected to a personal computer via a USB (universal serial bus) interface, and a photograph of the original remote controller is obtained from the personal computer. Or communicate with the smartphone through a near field communication (nearfield communication) interface to obtain a picture of the original remote control from the smartphone. Alternatively, the electronic device itself may include a camera, and the picture of the original remote controller is obtained by taking a picture of the original remote controller.
And after the electronic equipment acquires the picture of the original remote controller, acquiring an operation interface image of the original remote controller according to the picture of the original remote controller. The electronic equipment displays the picture of the original remote controller and the operation interface image to a user through the display screen.
The operation interface image is obtained by processing the photo of the original remote controller to a certain degree, and comprises N trigger areas. Wherein N may be the number of keys on the original remote controller. One trigger area is a certain area in the operation interface image, one trigger area represents a key on the electronic equipment, and one trigger area corresponds to a key on the original remote controller. The embodiment provides two optional methods for processing a picture of an original remote controller to obtain an operation interface image, which are specifically as follows:
the electronic equipment removes the objects except the original remote controller in the picture, only keeps the part of the picture including the original remote controller, and adjusts the part of the picture to be suitable for the size displayed by the display screen. Further, the electronic device divides the picture of the original remote controller into N trigger areas according to the distribution of the keys of the original remote controller, wherein each trigger area comprises one key, and one trigger area corresponds to one key included in the trigger area.
Or, the user can directly process the picture of the original remote controller through the image processing function provided by the electronic device, including selecting the area to be reserved or removed in the picture, and dividing a plurality of trigger areas in the reserved area, wherein one trigger area corresponds to one key of the original remote controller. Further, the electronic device may provide a trigger area customization function by which the user may divide a number of trigger areas out of the N trigger areas provided in the operation interface image. Any trigger area marked by the user in a self-defining mode can also correspond to one key of the original remote controller. In this way, the total number of the trigger regions on the operation interface image may exceed the total number of the keys on the original remote controller, and then there may be a case where one key on the original remote controller corresponds to two or more trigger regions. In this case, the two trigger regions corresponding to the same key on the original remote controller may have the same or different functions. For example, in a specific application scenario, for a common key on an original remote controller, the key may correspond to two trigger regions, and the two trigger regions correspond to the same function, so that a user may operate according to personal habits or preferences. In another specific application scenario, a key on the original remote controller has multiple functions, for example, a long press and a short press correspond to different functions, and two or more trigger regions corresponding to the key may correspond to one function of the key respectively.
In order to make the user clearly recognize, the trigger area on the operation interface image may be marked. The trigger zone or zones are marked, for example by means of a closed line or by coloring. The electronic equipment can provide a default marking mode and can also provide a function of selecting the marking mode and the number of marks by a user so as to meet personal preference and operation habits of the user.
Optionally, the electronic device may obtain and store operation interface images of a plurality of original remote controllers, where one operation interface image corresponds to one original remote controller. The electronic equipment distinguishes different operation interface images through the identification of the operation interface images.
Specifically, the electronic device numbers a plurality of operation interface images, and the numbers are used as identifiers of the operation interface images. Or the user can be provided with a list consisting of the identifications of the operation interface images, and the user respectively specifies the identifications of the operation interface images for different operation interface images. The identification of the operation interface image can be words such as an air conditioner remote controller, a television remote controller and the like. Alternatively, the user may directly input an identification of the operation interface image.
102. And receiving a key control signal sent by the original remote controller, and generating key control information according to the key control signal.
The key control signal is a control signal sent by the original remote controller. The key control information includes a binary code sequence carried by the key control signal, or information generated after the binary code sequence is further encoded, encrypted, and the like.
When a user operates a key on the original remote controller, the original remote controller sends out a key control signal, and the electronic equipment receives the key control signal sent out by the original remote controller and generates key control information according to the key control signal. The key control information corresponds to the key control signals one by one, and the electronic equipment can realize the interconversion of the key control signals and the key control information.
Optionally, the electronic device receives a first key control signal directly sent by the original remote controller, and generates key control information according to the first key control signal. Specifically, after receiving the first key control signal, the electronic device converts the first key control signal into a voltage signal, performs filtering compensation and converts the voltage signal into a digital signal, then obtains a binary code sequence carried by the key control signal through high-frequency sampling, and uses the binary code sequence as key control information.
Or, in a specific application scenario, the electronic device completes the function of acquiring the binary code sequence carried by the key control signal through the transceiver. Specifically, the transceiver receives a first key control signal sent by an original remote controller, acquires a binary code sequence carried by the first key control signal, and uses the binary code sequence as key control information.
The electronic equipment can be connected with the transceiver through the earphone interface, so that the transceiver sends the key control information to the electronic equipment through the second key control signal. The second key control signal is an audio signal generated by coding the binary code sequence. Of course, the electronic device may be connected to the transceiver through other interfaces, such as a MiniUSB (universal serial bus) interface. Correspondingly, the second key control signal is in a signal form which is generated by the transceiver from the first key control signal and meets the interface protocol of the electronic equipment and the transceiver, and is used for sending the key control information to the electronic equipment.
103. And determining the associated trigger area from the N trigger areas, and acquiring the attribute information of the associated trigger area.
After the electronic device generates the key control information according to the key control signal, the key control signal needs to be associated with a trigger area. Therefore, when the user needs to control the controlled device through the electronic device, the user operates the trigger area associated with the key control signal, and the electronic device restores the key control information into the key control signal and transmits the key control signal.
The associated trigger area is a trigger area which needs to be associated with the key control information in the N trigger areas of the operation interface. The present embodiment provides two optional ways of determining the associated trigger area, which are as follows:
the electronic device may use any one of the N trigger areas that has not been associated with any key control information as an associated trigger area. Specifically, optionally, the electronic device numbers the N trigger areas, and selects a trigger area with the smallest number as an associated trigger area from the trigger areas that are not associated with any key control information.
Alternatively, the electronic device may provide the functionality of customizing the associated trigger zone by the user. Specifically, the electronic device displays an operation interface image to a user through the display screen, and simultaneously provides a user input interface for the user to select the trigger area. For example, electronic devices have a touch screen as a user input interface. After the electronic equipment generates the key control information, an inquiry window is displayed to a user through a display screen, the user is requested to designate the associated trigger area in the N trigger areas, and therefore the associated trigger area is determined according to the selection of the user.
And after the electronic equipment determines the associated trigger area, acquiring the attribute information of the associated trigger area. The attribute information of the associated trigger area is information for identifying the associated trigger area. Optionally, the attribute information of the associated trigger area may be description information of a position of the associated trigger area on the operation interface image, or number information corresponding to the associated trigger area after numbering the N trigger areas, or information capable of identifying the associated trigger area in other forms.
Optionally, in combination with step 101, after acquiring the operation interface image of the original remote controller, the electronic device generates and stores attribute information of the N trigger areas, and when the associated trigger area is determined, the electronic device may acquire the attribute information of the associated trigger area from the stored attribute information of the N trigger areas.
104. And mapping the key control information with the identification of the operation interface image and the attribute information of the associated area, and storing the mapping in a database.
The electronic equipment establishes the association between the key control information and the associated trigger area through the database. Specifically, after acquiring the attribute information of the associated trigger area, the electronic device maps the key control information with the identifier of the operation interface image and the attribute information of the associated area and stores the mapped key control information in the database, and then, the key control information can be acquired by querying the identifier of the operation interface image and the attribute information of the associated area in the database.
Optionally, in combination with step 102, in an application scenario where the electronic device receives the second key control signal sent by the transceiver, the transceiver may add a start bit, a stop bit, and a check bit to the key control information. The check bit is a check code generated according to the key control information according to a preset check mode, and the check mode can be parity check or cyclic redundancy check and the like. After the electronic equipment receives the second key control signal sent by the transceiver, before the key control information is stored in the database, the key control information is firstly verified according to the verification code, and after the verification is passed, the key control information, the identifier of the operation interface image and the attribute information of the associated area are mapped and stored in the database. If the verification fails, the key control information is discarded and the process jumps to step 102 to restart the execution.
By circularly executing the step 101 and the step 104, the corresponding relation between the key control information and the trigger area is recorded through the mapping tables of the key control information and the trigger areas in the database, so that the key control information corresponding to different keys on the original remote controller is respectively associated with different trigger areas on the electronic equipment.
According to the method for setting the remote control function for the electronic equipment, provided by the embodiment of the invention, the operation interface image of the original remote controller is obtained, and finally, a key control signal sent by the original remote controller is associated with a trigger area on the operation interface image. Because the key control signal corresponding to each key on the original remote controller can be associated with one of the N trigger areas on the operation interface image, the electronic equipment can completely replace the original remote controller.
Furthermore, by implementing the method for setting the remote control function provided by the invention on the electronic equipment provided by the invention for multiple times, multiple operation interface images are obtained, wherein each operation interface image corresponds to one original remote controller, so that the electronic equipment can support the function of controlling multiple controlled devices, namely, the electronic equipment replaces the multiple original remote controllers to control the multiple controlled devices, and convenience is provided for users as much as possible.
Based on the embodiment corresponding to fig. 1, another embodiment of the present invention provides a method for an electronic device to remotely control a controlled device, so that a user can control the controlled device by using the electronic device provided in this embodiment instead of an original remote controller. Referring to fig. 2, the method specifically includes the following steps:
201. the electronic equipment acquires a trigger indication of a user.
The trigger instruction is used for designating one trigger area in the N trigger areas of the operation interface image as a selected trigger area. Optionally, the electronic device displays an operation interface image of the original remote controller to the user through the display screen, and acquires a trigger instruction of the user through the touch screen. In this way, the user can indicate the selected trigger area among the N trigger areas by a touch operation.
Optionally, in a specific application scenario, the electronic device stores operation interface images of a plurality of original remote controllers, and one operation interface image corresponds to one original remote controller. Therefore, in actual operation, the user needs to select one operation interface image from the plurality of operation interface images. And the different operation interface images are distinguished through the identification of the operation interface images.
202. And acquiring the identifier of the operation interface image and the attribute information of the selected trigger area, and inquiring the key control information associated with the identifier of the operation interface image and the attribute information of the selected trigger area in a database.
The selected trigger area is a trigger area on an operation interface image. The electronic equipment identifies the selected trigger area through the identification of the operation interface image and the attribute information of the selected trigger area.
And acquiring the key control information associated with the identifier of the operation interface image and the attribute information of the selected trigger area, namely the key control information associated with the selected trigger area by querying a database.
203. And generating a key control signal according to the key control information, and sending the key control signal to the controlled equipment of the original remote controller.
Optionally, the electronic device generates a first key control signal according to the key control information, and sends the first key control signal to the controlled device of the original remote controller. The first key control signal is used for controlling the controlled equipment.
Or, in a specific application scenario, the electronic device completes the function of sending the key control signal to the controlled device through the transceiver. Specifically, the electronics generate a second key control signal according to the key control information and send the second key control signal to the transceiver. The transceiver receives the second key control signal, generates a first key control signal according to the second key control signal, and then sends the first key control signal to the controlled equipment of the original remote controller.
As long as the key control signal sent by the electronic equipment is the same as the key control signal sent by the original remote controller, the electronic equipment and the original remote controller can both control the controlled equipment, so that a user can replace the original remote controller to control the controlled equipment through the electronic equipment.
If the electronic device fails to control the controlled device or has an error, the method for setting the remote control function for the electronic device, which is provided by the embodiment corresponding to fig. 1, is executed to receive the key control signal sent by the original remote controller, generate key control information according to the key control signal, and establish association between the key control information and the selected trigger area through the database. Through the mutual conversion of the key control signal and the key control information, the selected trigger area and the corresponding key on the original remote controller complete the same control function.
Further, in combination with the embodiment corresponding to fig. 1, the key control information corresponding to each key on the original remote controller is respectively associated with different trigger areas on the electronic device, so that the electronic device can completely replace the original remote controller to control the controlled device, thereby achieving the purpose of replacing the original remote controller to control the controlled device.
The electronic equipment can store operation interface images of a plurality of original remote controllers, wherein one operation interface image corresponds to one original remote controller. The electronic equipment displays the current operation interface image to a user through a display screen, and controls different controlled equipment by switching among a plurality of operation interface images. The original remote controller may be a remote controller equipped in the factory of the controlled device, including an infrared remote controller, a radio frequency remote controller, and the like. Meanwhile, the original remote controller may also be the electronic device described in this embodiment, that is, two electronic devices may also be used in place of each other to control the same controlled device.
The method for the electronic equipment to remotely control the controlled equipment, provided by the embodiment of the invention, comprises the steps of determining the selected trigger area by acquiring the trigger instruction of a user, inquiring the key control information associated with the identifier of the operation interface image and the attribute information of the selected trigger area from the database, generating a key control signal according to the key control information, and sending the key control signal to the controlled equipment of the original remote controller so as to replace the original remote controller to control the controlled equipment. Further, the electronic device can support a function of controlling a plurality of controlled devices by managing a plurality of operation interface images, that is, control a plurality of controlled devices instead of a plurality of original remote controllers, thereby providing convenience to a user to the greatest extent possible.
Based on the embodiment corresponding to fig. 1, an embodiment of the present invention provides an electronic device 30, configured to execute the method described in the embodiment corresponding to fig. 1. Referring to fig. 3, the electronic device 30 includes an acquisition unit 301, a transceiving unit 302, and a control unit 303.
The obtaining unit 301 is configured to obtain and store an operation interface image of an original remote controller, and set an identifier of the operation interface image. The operation interface image includes N trigger areas.
The transceiver unit 302 is configured to receive a key control signal sent by an original remote controller, and generate key control information according to the key control signal.
A control unit 303, configured to determine an associated trigger area from the N trigger areas, and acquire attribute information of the associated trigger area. The associated trigger area is a trigger area which needs to be associated with the key control information in the N trigger areas of the operation interface.
The control unit 303 is further configured to map the key control information with the identifier of the operation interface image and the attribute information of the associated area, and store the mapping in the database.
Optionally, the obtaining unit 301 is specifically configured to obtain a picture of the original remote controller, divide the picture of the original remote controller into N trigger regions according to the key distribution of the original remote controller, and generate an operation interface image of the original remote controller. Wherein each of the N trigger areas corresponds to a key.
Optionally, the transceiver unit 302 is specifically configured to receive a first key control signal directly sent by an original remote controller, and generate key control information according to the first key control signal. Or,
and receiving a second key control signal sent by the transceiver, and generating key control information according to the second key control signal, wherein the second key control signal is generated by the transceiver from the first key control signal.
Optionally, the electronic device 30 is connected to the transceiver through an earphone interface or a MiniUSB mini-usb interface.
Optionally, the key control information includes: a binary code sequence carried by the key control signal.
In conjunction with the embodiment corresponding to fig. 3, the embodiment of the present invention provides another electronic device 40, which is shown in fig. 4 and can be embedded in or is a microprocessor computer, such as: a portable device such as a general-purpose computer, a client-side customization machine, a mobile phone terminal, or a tablet, the electronic device 40 includes: at least one processor 401, a memory 402, a bus 403, a receiver 404 and a transmitter 405, the at least one processor 401, the memory 402, the receiver 404 and the transmitter 405 being connected by the bus 403 and performing communication with each other.
The bus 403 may be an ISA (industry standard architecture) bus, a PCI (peripheral component interconnect) bus, an EISA (extended industry standard architecture) bus, or the like. The bus 403 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus. Wherein:
the memory 402 is used for executing the application program code of the inventive arrangements, which is stored in the memory and controlled by the processor 401.
The memory may be a read only memory ROM or other types of static storage devices that may store static information and instructions, a random access memory RAM or other types of dynamic storage devices that may store information and instructions, an electrically erasable programmable read only memory EEPROM, or the like, which are coupled to the processor via a bus.
The processor 401 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
The processor 401 is configured to call the program code in the memory 402 to perform the operations of the acquiring unit and the controlling unit in the embodiment of the apparatus corresponding to fig. 3. The receiver 404 and the transmitter 405 are configured to perform the operations of the transceiving unit in the corresponding device embodiment of fig. 3. For the specific description of each module, reference is made to the device embodiment corresponding to fig. 3, which is not described herein again.
The embodiment of the invention provides the electronic equipment, which associates a key control signal sent by the original remote controller with a trigger area on the operation interface image by acquiring the operation interface image of the original remote controller. Because the key control signal corresponding to each key on the original remote controller can be associated with one of the N trigger areas on the operation interface image, the electronic equipment can completely replace the original remote controller.
Further, the electronic device provided by the embodiment of the invention can control various controlled devices by managing a plurality of operation interface images, that is, replace a plurality of original remote controllers to control a plurality of controlled devices, thereby providing convenience for users to the greatest extent.
Based on the embodiment corresponding to fig. 2, another embodiment of the present invention provides an electronic device 50 for executing the method described in the embodiment corresponding to fig. 2. Referring to fig. 5, the electronic device 50 includes an interaction unit 501, a control unit 502, and a transceiving unit 503.
The interaction unit 501 is configured to obtain a trigger instruction of a user, where the trigger instruction is used to specify one of N trigger areas of an operation interface image as a selected trigger area.
The control unit 502 is configured to obtain the identifier of the operation interface image and the attribute information of the selected trigger area, and query, in the database, the key control information associated with the identifier of the operation interface image and the attribute information of the selected trigger area.
The transceiving unit 503 is configured to generate a key control signal according to the key control information, and send the key control signal to the controlled device of the original remote controller.
Optionally, the transceiver unit 503 is specifically configured to generate a first key control signal according to the key control information, and send the first key control signal to the controlled device of the original remote controller. Or,
and generating a second key control signal according to the key control information, and sending the second key control signal to the transceiver so that the transceiver can generate a first key control signal according to the second key control signal and send the first key control signal to the controlled equipment of the original remote controller.
Optionally, the electronic device is connected to the transceiver through an earphone interface or a MiniUSB mini-usb interface.
In connection with the embodiment corresponding to fig. 5, another embodiment of the present invention provides another electronic device 60, which is shown in fig. 6 and can be embedded in or be a microprocessor computer itself, such as: a portable device such as a general-purpose computer, a client customizing machine, a mobile phone terminal, or a tablet, the electronic device 60 includes: at least one processor 601, a memory 602, a bus 603, a receiver 604 and a transmitter 605, the at least one processor 601, the memory 602, the receiver 604 and the transmitter 605 being coupled via the bus 603 and communicating with each other.
The bus 603 may be an ISA (industry standard architecture) bus, a PCI (peripheral component interconnect) bus, an EISA (extended industry standard architecture) bus, or the like. The bus 603 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus. Wherein:
the memory 602 is used for executing the application program code of the present invention, and the application program code of the present invention is stored in the memory and controlled by the processor 601.
The memory may be a read only memory ROM or other types of static storage devices that may store static information and instructions, a random access memory RAM or other types of dynamic storage devices that may store information and instructions, an electrically erasable programmable read only memory EEPROM, or the like, which are coupled to the processor via a bus.
The processor 601 may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
The processor 601 is configured to call the program code in the memory 602 to perform the operations of the interaction unit and the control unit in the device embodiment corresponding to fig. 5. The receiver 604 and the transmitter 605 are configured to perform the operations of the transceiving unit in the device embodiment corresponding to fig. 5. For the specific description of each module, reference is made to the device embodiment corresponding to fig. 5, which is not described herein again.
The electronic device provided by the embodiment of the invention determines the selected trigger area by acquiring the trigger instruction of the user, inquires the key control information associated with the identifier of the operation interface image and the attribute information of the selected trigger area from the database, generates the key control signal according to the key control information, and sends the key control signal to the controlled device of the original remote controller, thereby replacing the original remote controller to control the controlled device. Further, the electronic device can support a function of controlling a plurality of controlled devices by managing a plurality of operation interface images, that is, control a plurality of controlled devices instead of a plurality of original remote controllers, thereby providing convenience to a user to the greatest extent possible.
Through the above description of the embodiments, it is clear to those skilled in the art that the touch controller in the present invention can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Taking this as an example but not limiting: the computer-readable medium may include RAM (random access memory), ROM (read only memory), EEPROM (electrically erasable programmable read only memory), CD-ROM (compact disc read only memory) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.