WO2019227317A1 - Control method for power key in virtual remote controller and terminal - Google Patents

Control method for power key in virtual remote controller and terminal Download PDF

Info

Publication number
WO2019227317A1
WO2019227317A1 PCT/CN2018/088908 CN2018088908W WO2019227317A1 WO 2019227317 A1 WO2019227317 A1 WO 2019227317A1 CN 2018088908 W CN2018088908 W CN 2018088908W WO 2019227317 A1 WO2019227317 A1 WO 2019227317A1
Authority
WO
WIPO (PCT)
Prior art keywords
test signal
bluetooth
terminal
controlled device
power key
Prior art date
Application number
PCT/CN2018/088908
Other languages
French (fr)
Chinese (zh)
Inventor
彭运生
王伟
夏中林
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201880085334.XA priority Critical patent/CN111557097B/en
Priority to PCT/CN2018/088908 priority patent/WO2019227317A1/en
Publication of WO2019227317A1 publication Critical patent/WO2019227317A1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]

Definitions

  • the present application relates to the field of terminals, and in particular, to a method for controlling a power key in a virtual remote controller and a terminal.
  • Wi-Fi remote control Traditional TV and other home appliances are controlled by infrared remote control, but the infrared remote control must be pointed at the TV when it sends out infrared signals, and there must be no obstacles in the middle. Once blocked, the TV cannot be effectively controlled. Therefore, more and more manufacturers have integrated Wi-Fi or Bluetooth access to wireless networks in their TVs, and infrared remote controls have gradually been replaced by Wi-Fi remotes and Bluetooth remotes. Take the Wi-Fi remote control as an example. When the user connects the Wi-Fi remote control and the TV to the same Wi-Fi network, the Wi-Fi remote control can send corresponding control instructions to the TV by sending a Wi-Fi signal.
  • the Wi-Fi signal sent by the user pressing the power button on the Wi-Fi remote control cannot be used because the Wi-Fi connection established between the TV and the Wi-Fi remote control is disconnected. Received by TV.
  • some TV manufacturers set the power button on the Wi-Fi remote control as an infrared button separately, so that users can send infrared signals to the TV to control the TV on and off after pressing the power button.
  • Some TV manufacturers have modified the function of the power button to control the sleep and wake-up function of the TV. Since the Wi-Fi connection is not disconnected when the TV sleeps, the Wi-Fi signal generated by the user pressing the power button can still be received by the TV .
  • terminals such as mobile phones can also access the LAN where the TV is located.
  • the mobile phone may also create a virtual remote controller corresponding to the Wi-Fi remote controller to send out corresponding Wi-Fi signals, so as to implement the functions of each key in the Wi-Fi remote controller.
  • the mobile phone cannot accurately implement the function of the power button in the remote control because the mobile phone cannot determine whether the power on the TV is controlled by an infrared signal or a Wi-Fi signal.
  • the present application provides a method and terminal for controlling a power key in a virtual remote controller, which can be compatible with controlled devices that control power by different types of signals when creating a virtual remote controller.
  • the present application provides a method for controlling a power key in a virtual remote controller, including: establishing a wireless connection between a terminal and a controlled device, the wireless connection including a Bluetooth connection or a Wi-Fi connection; and the terminal displaying a virtual remote controller to be created In response to the user's first input of the power button, the terminal may send a first test signal to the controlled device through the wireless connection.
  • the first test signal may be a Bluetooth test signal based on a Bluetooth connection, or may be based on Wi-Fi test signal for Wi-Fi connection; if the controlled device can correctly respond to the above first test signal, it means that the power of the controlled device is controlled by the Bluetooth signal, so the terminal can create a correspondence with the above first test signal In this way, after the terminal creates a power key corresponding to the first test signal, if the user receives a second input of the power key by the user, the terminal may send the first test signal corresponding to the power key to the controlled device. So that the controlled device performs a sleep or wake-up operation in response to the first test signal.
  • the terminal can determine the Bluetooth signal or Wi-Fi signal that controls the power of the controlled device through the first test signal, so that during the subsequent use of the virtual remote control by the user, the terminal can control the controlled device according to the determined signal Power.
  • the terminal can create a power key corresponding to its power type.
  • the terminal displaying a power key to be created in the virtual remote control includes: the terminal displaying a test interface of the virtual remote control, the test interface including the power key; or the terminal displaying the virtual remote control User interface, which includes the power button. That is, the terminal can test the specific signal that controls the power of the controlled device when creating the virtual remote control of the controlled device, and can also test and control the power of the controlled device during the process of using the virtual remote control of the controlled device. Specific signals.
  • the method further includes: the terminal prompts the user to input a response status of the controlled device to the first test signal; if it receives an instruction indicating that the controlled device responds correctly Input, the terminal determines that the controlled device responds correctly to the first test signal; if an input indicating that the controlled device cannot respond correctly is received, the terminal determines that the controlled device cannot respond to the first test signal correctly.
  • the method further includes: the terminal prompts the user to click the power button when the controlled device does not respond to the first test signal; if the user clicks the If the power key is pressed, the terminal determines that the controlled device responds correctly to the first test signal; otherwise, the terminal determines that the controlled device cannot respond to the first test signal correctly.
  • the method further includes: if the terminal receives a successful test response from the controlled device, the terminal determines that the controlled device responds correctly to the first test signal; or, if the terminal receives In response to the test failure sent by the controlled device, the terminal determines that the controlled device cannot correctly respond to the first test signal.
  • the wireless connection is a Bluetooth connection
  • the first test signal is a Bluetooth test signal.
  • the Bluetooth test signal includes a Bluetooth code value corresponding to the power button.
  • the terminal creates the first test signal.
  • the corresponding power button includes: the terminal saves a first correspondence between the Bluetooth code value and the power button. In this way, when the user uses the virtual remote control, if it is detected that the user clicks the power button in the virtual remote control, the terminal can send a corresponding Bluetooth code value to the controlled device according to the determined first correspondence relationship, so as to control the controlled device. power supply.
  • the method further includes: the terminal sends a second test signal to the controlled device, the second test signal includes a Bluetooth test signal, Wi-Fi The test signal or the infrared test signal, the second test signal is different from the first test signal; if the controlled device responds correctly to the second test signal, the terminal creates a power key corresponding to the second test signal.
  • the terminal can create a corresponding power button, so that the virtual remote control generated by the terminal can Compatible with different types of controlled devices on the market, improving user operation experience.
  • the second test signal is an infrared test signal;
  • the infrared test signal includes an infrared code value corresponding to the power key;
  • the terminal creates a power key corresponding to the second test signal, including:
  • the terminal saves a second correspondence between the infrared code value and the power key. In this way, when the user uses the virtual remote control, if it is detected that the user clicks the power button in the virtual remote control, the terminal may send a corresponding infrared code value to the controlled device according to the determined second correspondence relationship, so as to control the controlled device. power supply.
  • a remote control application is installed in the terminal.
  • the above method further includes: in response to a user opening the remote control application, the terminal displays a device selection interface of the remote control application.
  • the device selection interface includes At least one type of controlled device; in response to a user's selection operation in the device selection interface, the terminal displays a brand selection interface of the remote control application, the brand selection interface including at least one brand or model of the controlled device; In response to the user's selection operation in the brand selection interface, the terminal prompts the user to establish a wireless connection with the controlled device.
  • the terminal may be a mobile phone
  • the controlled device may be a Bluetooth TV
  • the wireless connection may be a Bluetooth connection
  • the first test signal may be a Bluetooth test signal
  • the second test signal may be Infrared test signal.
  • the present application provides a terminal including a connection unit, a display unit, a transceiver unit, and a creation unit; wherein the connection unit is configured to establish a wireless connection with a controlled device, and the wireless connection includes a Bluetooth connection or Wi-Fi A connection; a display unit for: displaying a power key to be created in the virtual remote control; a transceiver unit for: receiving a user's first input of the power key; sending a first test signal to the controlled device through the wireless connection, The first test signal includes a Bluetooth test signal corresponding to a Bluetooth connection or a Wi-Fi test signal corresponding to a Wi-Fi connection; a creating unit is configured to: if the controlled device responds correctly to the first test signal, create a first test signal The power button corresponding to the signal; the transceiver unit is further configured to: receive a second input from the user to the power button; and send a first test signal to the controlled device through the wireless connection, so that the controlled device responds to the first test signal
  • the display unit is specifically configured to: display a test interface of the virtual remote control, the test interface including the power key; or display a use interface of the virtual remote control, which includes the use interface The power button.
  • the display unit is further configured to: prompt the user to input a response condition of the controlled device to the first test signal; the terminal further includes a determining unit configured to: if it receives an instruction indicating that the controlled device responds correctly If it is input, it is determined that the controlled device responds correctly to the first test signal; if it receives an input indicating that the controlled device cannot respond correctly, it is determined that the controlled device cannot respond correctly to the first test signal.
  • the display unit is further configured to prompt the user to click the power button when the controlled device does not respond to the first test signal;
  • the terminal further includes a determination unit configured to: If it is not detected that the user clicks the power button, it is determined that the controlled device responds correctly to the first test signal; otherwise, it is determined that the controlled device cannot respond to the first test signal correctly.
  • the terminal further includes a determining unit, configured to: if the terminal receives the test success response sent by the controlled device, determine that the controlled device responds correctly to the first test signal; or, if the terminal receives the The test failure response sent by the controlling device determines that the controlled device cannot respond to the first test signal correctly.
  • the wireless connection is a Bluetooth connection
  • the first test signal is a Bluetooth test signal.
  • the Bluetooth test signal includes a Bluetooth code value corresponding to the power button.
  • the creating unit is specifically configured to: save the The first correspondence between the Bluetooth code value and the power key.
  • the foregoing transceiver unit is further configured to send a second test signal to the controlled device.
  • the second test signal includes a Bluetooth test signal, Wi- The Fi test signal or the infrared test signal, the second test signal is different from the first test signal; the creating unit is further configured to: if the controlled device responds correctly to the second test signal, create a power key corresponding to the second test signal.
  • the second test signal is an infrared test signal;
  • the infrared test signal includes an infrared code value corresponding to the power key;
  • the creating unit is specifically configured to: save the infrared code value and the power key The second correspondence between them.
  • a remote control application is installed in the terminal, and the display unit is further configured to display a device selection interface of the remote control application in response to a user's operation of opening the remote control application, and the device selection interface Including at least one type of controlled device; in response to a user's selection operation in the device selection interface, displaying a brand selection interface of the remote control application, the brand selection interface including at least one brand or model of the controlled device In response to the user's selection operation in the brand selection interface, the user is prompted to establish a wireless connection with the controlled device.
  • the present application provides a terminal including: a touch screen, one or more processors, a memory, and one or more programs; wherein the processor is coupled to the memory, and the one or more programs are stored in the memory
  • the processor executes one or more programs stored in the memory, so that the terminal executes the control method of the power button in any of the virtual remote controllers described above.
  • the present application provides a computer storage medium including computer instructions that, when the computer instructions are run on a terminal, cause the terminal to execute a method for controlling a power key in a virtual remote control according to any one of the first aspects.
  • the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to execute the method for controlling a power key in a virtual remote control according to any one of the first aspects.
  • the terminals described in the second and third aspects provided above, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect are all used to execute the corresponding ones provided above.
  • Method therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
  • FIG. 1 is a first schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 2 is a first application scenario diagram for creating a power button in a virtual remote control according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an Android operating system according to an embodiment of the present application.
  • FIG. 4 is a first schematic interaction diagram of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application
  • FIG. 5 is a second application scenario diagram for creating a power button in a virtual remote control according to an embodiment of the present application.
  • FIG. 6 is a third application scenario diagram for creating a power button in a virtual remote controller according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram 4 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application
  • FIG. 8 is a schematic diagram 5 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram 6 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram VII of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram 8 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application
  • FIG. 12 is a second schematic interaction diagram of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram IX of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application
  • FIG. 14 is a second schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 15 is a third schematic structural diagram of a terminal according to an embodiment of the present application.
  • the method for controlling a power key in the virtual remote controller may be applied to a terminal.
  • the terminal may be a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, or a personal digital assistant (PDA).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • Wearable electronic devices, smart watches, and other devices may also be the mobile phone 100 shown in FIG. 1, and the specific form of the terminal is not particularly limited in the embodiment of the present application.
  • the terminal in the embodiment of the present application may be a mobile phone 100.
  • the embodiment will be specifically described below with the mobile phone 100 as an example. It should be understood that the illustrated mobile phone 100 is only an example of a terminal, and the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have Different component configurations.
  • the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
  • the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, and a positioning device.
  • RF radio frequency
  • the mobile phone 100 may include more or fewer components than shown in the figure, or some components may be combined, or different components may be arranged. .
  • the processor 101 is the control center of the mobile phone 100. It uses various interfaces and lines to connect various parts of the mobile phone 100, and executes the mobile phone by running or executing applications stored in the memory 103 and calling data and instructions stored in the memory 103. 100 various functions and processing data.
  • the processor 101 may include one or more processing units; the processor 101 may further integrate an application processor and a modem processor; wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like.
  • the modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 101.
  • the processor 101 may be a Kirin 960 multi-core processor manufactured by Huawei Technologies Co., Ltd.
  • the radio frequency circuit 102 may be used for receiving and transmitting wireless signals during information transmission or communication. Specifically, the radio frequency circuit 102 may receive the downlink data of the base station and process it to the processor 101; in addition, send the uplink data to the base station. Generally, the radio frequency circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuit 102 can also communicate with other devices through wireless communication. The wireless communication may use any communication standard or protocol, including, but not limited to, a global mobile communication system, a general packet wireless service, code division multiple access, broadband code division multiple access, long-term evolution, email, and short message services.
  • the memory 103 is configured to store application programs and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running the application programs and data stored in the memory 103.
  • the memory 103 mainly includes a storage program area and a storage data area, where the storage program area can store an operating system and at least one application required by a function (such as a sound playback function, an image playback function, etc.); the storage data area can store data according to the use of the mobile phone. Data created at 100 (such as audio data, phone book, etc.).
  • the memory 103 may include a high-speed random access memory, and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 103 can store various operating systems, such as those developed by Apple Inc. Operating system, developed by Google Operating system, etc.
  • the touch screen 104 may include a touch-sensitive surface 104-1 and a display 104-2.
  • the touch-sensitive surface 104-1 (for example, a touch panel) can capture touch events on or near the user of the mobile phone 100 (such as the user using a finger, a stylus, etc. on any suitable object on the touch-sensitive surface 104-1). Or operations near the touch-sensitive surface 104-1), and send the collected touch information to other devices such as the processor 101.
  • the user's touch event near the touch-sensitive surface 104-1 can be referred to as hovering touch; hovering touch can mean that the user does not need to directly touch the touchpad in order to select, move, or drag an object (such as an icon). , As long as the user is located near the terminal in order to perform the desired function.
  • the touch-sensitive surface 104-1 capable of floating touch can be implemented using a capacitive type, an infrared light sensor, and an ultrasonic wave.
  • the touch-sensitive surface 104-1 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into contact coordinates, and then When sent to the processor 101, the touch controller may also receive and execute instructions sent by the processor 101.
  • various types such as resistive, capacitive, infrared, and surface acoustic waves can be used to implement the touch-sensitive surface 104-1.
  • the display (also referred to as a display screen) 104-2 may be used to display information input by the user or information provided to the user and various menus of the mobile phone 100.
  • the display 104-2 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the touch-sensitive surface 104-1 may be overlaid on the display 104-2. When the touch-sensitive surface 104-1 detects a touch event on or near the touch-sensitive surface 104-1, it transmits it to the processor 101 to determine the type of the touch event, and then the processor 101 may provide a corresponding visual output on the display 104-2 according to the type of the touch event.
  • the touch-sensitive surface 104-1 and the display screen 104-2 are implemented as two independent components to implement the input and output functions of the mobile phone 100, in some embodiments, the touch-sensitive surface 104- 1 Integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100. It can be understood that the touch screen 104 is formed by stacking multiple layers of materials. Only the touch-sensitive surface (layer) and the display screen (layer) are shown in the embodiments of the present application, and other layers are not described in the embodiments of the present application.
  • the touch-sensitive surface 104-1 may cover the display 104-2, and the size of the touch-sensitive surface 104-1 is larger than the size of the display screen 104-2, so that the display screen 104- 2 is all covered under the touch-sensitive surface 104-1, or the touch-sensitive surface 104-1 can be configured on the front of the mobile phone 100 in the form of a comprehensive board, that is, the user's touch on the front of the mobile phone 100 can be perceived by the mobile phone, so You can achieve a full touch experience on the front of the phone.
  • the touch-sensitive surface 104-1 is configured on the front of the mobile phone 100 in the form of a full board
  • the display screen 104-2 may also be configured on the front of the mobile phone 100 in the form of a full board. Achieve frameless structure.
  • the touch screen 104 may further include one or more sets of sensor arrays. The touch screen 104 may also sense the pressure exerted by the user on the touch screen 104 while sensing a touch event on the user. Wait.
  • the mobile phone 100 may further include a Bluetooth device 105 for implementing data exchange between the mobile phone 100 and other short-range terminals (such as a mobile phone, a smart watch, etc.).
  • the Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip.
  • the mobile phone 100 may further include at least one sensor 106, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor can turn off the power of the display when the mobile phone 100 is moved to the ear.
  • an accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary.
  • attitude of the mobile phone such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc .
  • vibration recognition related functions such as pedometer, tap
  • the mobile phone 100 fingerprint recognition devices, gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors can also be configured Will not repeat them here.
  • Wi-Fi device 107 is used to provide mobile phone 100 with network access that complies with Wi-Fi related standard protocols. Mobile phone 100 can access Wi-Fi access points through Wi-Fi device 107 to help users send and receive email, Browse the web and access streaming media, etc., it provides users with wireless broadband Internet access. In some other embodiments, the Wi-Fi device 107 can also be used as a Wi-Fi wireless access point, and can provide Wi-Fi network access for other terminals.
  • the positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 may specifically be a receiver of a positioning system such as a global positioning system (GPS) or a Beidou satellite navigation system. After receiving the geographic position sent by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends the information to the memory 103 for storage. In other embodiments, the positioning device 108 may be an assisted global positioning system (AGPS) receiver. AGPS is an operation mode for GPS positioning with certain assistance and cooperation.
  • AGPS assisted global positioning system
  • the signal of the base station and the GPS satellite signal can make the mobile phone 100 locate faster; in the AGPS system, the positioning device 108 can obtain positioning assistance through communication with an auxiliary positioning server (such as a mobile phone positioning server).
  • the AGPS system assists the positioning device 108 to complete ranging and positioning services by serving as an auxiliary server.
  • the auxiliary positioning server communicates with the terminal such as the positioning device 108 (ie, the GPS receiver) of the mobile phone 100 through a wireless communication network to provide positioning. assist.
  • the audio circuit 109, the speaker 113, and the microphone 114 may provide an audio interface between the user and the mobile phone 100.
  • the audio circuit 109 may transmit the received electrical data converted electric signal to the speaker 113, and the speaker 113 converts the sound signal into a sound signal for output.
  • the microphone 114 converts the collected sound signal into an electric signal, and the audio circuit 109 After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for sending to another mobile phone, or the audio data is output to the memory 103 for further processing.
  • the peripheral interface 110 is used to provide various interfaces for external input / output devices (such as a keyboard, a mouse, an external display, an external memory, a user identification module card, etc.). For example, it is connected to a mouse through a universal serial bus interface, and is electrically connected to a subscriber identity module (SIM) card provided by a telecommunications operator through a metal contact on a card slot of the subscriber identity module.
  • SIM subscriber identity module
  • the peripheral interface 110 may be used to couple the above-mentioned external input / output peripherals to the processor 101 and the memory 103.
  • the mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) for supplying power to various components.
  • the battery may be logically connected to the processor 101 through the power management chip, so as to manage charging, discharging, and power consumption management through the power supply device 111. And other functions.
  • the mobile phone 100 may further include a camera, a flash, a micro-projection device, a near field communication (NFC) device, and the like, and details are not described herein.
  • a camera a flash
  • a micro-projection device a micro-projection device
  • NFC near field communication
  • the mobile phone 100 may further include an infrared device 112, and the mobile phone 100 may convert any binary coded information into an infrared signal and transmit the infrared signal through the infrared device 112.
  • the mobile phone 100 and the controlled device may store in advance: an infrared signal corresponding to the binary code “0101” (also referred to as an infrared code value) is used to control the power of the controlled device.
  • the mobile phone 100 may send an infrared signal corresponding to the infrared code value “0101” to the controlled device through the infrared device 112.
  • the controlled device parses out the infrared code value corresponding to the infrared signal, it can perform a startup or shutdown operation corresponding to the infrared code value.
  • the mobile phone 100 may also establish a wireless connection with a controlled device (such as a TV) through the Bluetooth device 105 or the Wi-Fi device 107.
  • a controlled device such as a TV
  • a Bluetooth device is provided in both the mobile phone 100 and the TV 200.
  • the processor 101 in the mobile phone 100 can be paired and connected with the TV 200 through the Bluetooth device 105 To establish a Bluetooth connection between the mobile phone 100 and the TV 200.
  • the processor 101 in the mobile phone 100 may create a virtual remote control 201 for controlling the television 200 and display the virtual remote control 201 on the touch screen 104 of the mobile phone 100.
  • the virtual remote control 201 may include buttons such as volume up and down buttons, channel switching buttons, menu buttons, and power button 202.
  • the mobile phone 100 can send the Bluetooth code value corresponding to the button to the TV 200 through a Bluetooth connection.
  • the TV 200 parses the received Bluetooth code value, it can determine which button the user clicked, and then perform the operation corresponding to the button.
  • the Bluetooth code value corresponding to each key in the virtual remote control 201 may be stored in advance by the mobile phone 100 or the television 200.
  • the HID (Human Interface) device protocol or the HOGP (HID Over GATT Profile) protocol can be unified to pre-store the Bluetooth corresponding to each key when the mobile phone 100 and the TV 200 interact.
  • Code value After the mobile phone 100 and the TV 200 are paired or connected successfully, the mobile phone 100 or the TV 200 may send the corresponding relationship between each key and the Bluetooth code value to the other party.
  • the mobile phone 100 may send a Bluetooth test signal to the TV 200 and may also send an infrared test signal to the TV 200. If the TV 200 can respond to the Bluetooth test signal, indicating that the power of the TV 200 is controlled by the Bluetooth signal, the mobile phone 100 can save the first correspondence between the Bluetooth test signal and the power key 202. Subsequently, when it is detected that the user clicks the power button 202, the mobile phone 100 may send a corresponding Bluetooth test signal to the TV 200 according to the first correspondence relationship to control the TV 200 to sleep or wake up.
  • the mobile phone 100 may save the second correspondence between the infrared test signal and the power key 202. Subsequently, when it is detected that the user clicks the power button 202, the mobile phone 100 may send a corresponding infrared test signal to the TV 200 according to the second correspondence relationship to control the power of the TV 200.
  • the mobile phone 100 can create a corresponding power button 202 to control the power of the Bluetooth TV, so that the virtual remote control generated by the mobile phone 100 It can be compatible with different types of Bluetooth TVs on the market, improving the user's operating experience.
  • an operating system which is a Linux-based operating system for mobile devices, and implements various functions in combination with the above-mentioned hardware in the mobile phone 100.
  • an operating system which is a Linux-based operating system for mobile devices, and implements various functions in combination with the above-mentioned hardware in the mobile phone 100.
  • the details of the storage Software architecture of the operating system are only based on The operating system is taken as an example to describe the software environment required by the terminal to implement the technical solution of this embodiment. Those skilled in the art can understand that the embodiments of the present application can also be implemented by other operating systems, such as the IOS operating system.
  • FIG. 3 is a kind of Software architecture diagram of the operating system.
  • the software architecture can be divided into four layers: application layer, application framework layer, function library layer and Linux kernel layer.
  • the application layer is the top layer of the operating system and includes the native applications of the operating system, such as email clients, text messages, calls, calendars, browsers, contacts, and so on. Of course, for developers, developers can write applications and install to this layer.
  • an application program is developed using the Java language and is completed by calling an application programming interface (API) provided by an application framework layer.
  • API application programming interface
  • the application framework layer mainly provides developers with access to various APIs used by applications. Developers can use the application framework to interact with the bottom layer of the operating system (such as function libraries, Linux kernels, etc.) and develop their own application.
  • the application framework is mainly a series of service and management systems for the Android operating system.
  • the application framework mainly includes the following basic services:
  • Activity Manager used to manage the application life cycle and provide common navigation fallback functions
  • Content providers used to manage data sharing and access between different applications
  • Notification Manager Used to control the application to display prompt information (such as Alerts, Notifications, etc.) to the user in the status bar, lock screen, etc .;
  • Clipboard Manager mainly provides copy or paste functions within or between applications
  • View A rich and extensible collection of views that can be used to build an application. It specifically includes many types such as list, grid, text, button, and image.
  • Location Manager (Location Manager): mainly allows applications to access the geographic location of the terminal.
  • the function library layer is the support of the application framework and an important link between the application framework layer and the Linux kernel layer.
  • the function library layer includes some function libraries compiled by the computer program C or C ++. These function libraries can be used by different components in the operating system. They provide services to developers through the application framework layer.
  • the function library may include a libc function library, which is specially customized for embedded Linux-based devices; the function library may also include a multimedia library (Media Framework), which supports playback and recording of audio or video in multiple encoding formats , While supporting still image files, as well as common audio or video encoding formats.
  • the function library also includes an interface management library (Surface Manager), which is mainly responsible for managing access to the display system. It is specifically used to manage the interaction between display and access operations when executing multiple applications. It is also responsible for 2D drawing and 3D Drawings are composited for display.
  • the function library layer can also include other function libraries used to implement various functions of the mobile phone, such as: SGL (Scalable Graphics Library): 2D graphic image processing engine based on XML (Extensible Markup Language) files; SSL (Secure Sockets Layer): It is located between the TVP / IP protocol and various application layer protocols to provide data communication support; OpenGL / ES: support for 3D effects; SQLite: relational database engine; Webkit: Web browser engine; FreeType: bitmap and vector font Support; wait.
  • SGL Scalable Graphics Library
  • XML Extensible Markup Language
  • SSL Secure Sockets Layer
  • Android Runtime is a The operating environment on the operating system is A new type of virtual machine used by the operating system. In Android Runtime, AOT (Ahead-Of-Time) technology is used. When an application is first installed, the bytecode of the application is pre-compiled into machine code, making the application a real native application. , And then run it again, the compilation step is omitted, and startup and execution will become faster.
  • AOT Ahead-Of-Time
  • the Android Runtime may also be replaced by a core function library (Core Libraries) and a Dalvik virtual machine (Dalvik Virtual Machine).
  • the core function library provides most of the functions of the Java language API, and mainly provides the interface of the underlying program library to the application framework layer through the Java native interface (JNI). It also includes some core APIs of the operating system, such as android.os, android.net, android.media, and so on.
  • the Dalvik virtual machine uses a JIT (Just-in-Time) runtime compilation mechanism. Each time a process is started, the virtual machine needs to recompile the bytecode in the background, which will have a certain impact on the startup speed.
  • JIT Just-in-Time
  • Each application runs in an instance of a Dalvik virtual machine, and each Dalvik virtual machine instance is an independent process space.
  • Dalvik virtual machines are designed to efficiently run multiple virtual machines on one device.
  • Dalvik virtual machine executable file format is .dex, dex format is a compression format designed for Dalvik, suitable for systems with limited memory and processor speed.
  • the Dalvik virtual machine relies on the Linux kernel to provide basic functions (threads, underlying memory management). It can be understood that Android Runtime and Dalvik belong to different types of virtual machines, and those skilled in the art can select different forms of virtual machines in different situations.
  • This layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack, and driver model, etc., all based on the Linux kernel.
  • the Linux kernel also acts as an abstraction layer between the hardware and software stacks. This layer has many drivers related to mobile devices.
  • the main drivers are: display driver; Linux-based frame buffer driver; keyboard driver as input device; Flash driver based on memory technology device; camera driver; Bluetooth driver; Wi- Fi driver; USB driver, etc.
  • the application layer further includes a remote control APP (application) capable of simulating an actual remote control, for example, a universal remote control APP, a smart remote control APP, and a remote control smart app.
  • a remote control APP application
  • an intelligent remote control service is also provided in the application program framework layer, and the intelligent remote control service can open an interface to the remote control APP described above.
  • the universal remote control APP can call the above-mentioned intelligent remote control service to send a paired broadcast through a corresponding API, such as a BLE (bluetooth low energy) paired broadcast.
  • the Bluetooth TV can pair with the terminal installed with the universal remote control APP and establish a Bluetooth connection.
  • the universal remote control APP when the universal remote control APP creates the power button in the virtual remote control, it can first call the Bluetooth driver in the Linux kernel layer to send a Bluetooth test signal to the Bluetooth TV through the intelligent remote control service. If the Bluetooth TV can respond to the Bluetooth test signal, The power of the Bluetooth TV is controlled by the Bluetooth signal, so the universal remote control APP can save the first correspondence between the Bluetooth test signal and the power button. If the Bluetooth TV cannot respond to the Bluetooth test signal, the universal remote control app can call the infrared driver to send an infrared test signal to the Bluetooth TV through the intelligent remote control service. If the Bluetooth TV can respond to the infrared test signal, it indicates that the power of the Bluetooth TV is controlled by the infrared signal, and the universal remote control APP can save the second correspondence between the infrared test signal and the power key.
  • the universal remote control app can send the Bluetooth remote control to the Bluetooth TV according to the determined first or second correspondence. Send the corresponding Bluetooth test signal or infrared test signal to control the power of the Bluetooth TV, to avoid the situation that the universal remote control APP cannot be compatible with the Bluetooth TV controlled by the infrared signal and the Bluetooth TV controlled by the Bluetooth signal.
  • a Bluetooth TV with a Bluetooth function is used as an example. It can be understood that the method for controlling a power button in a virtual remote control provided in the embodiments of the present application can be applied to any wireless communication function.
  • the controlled device for example, an air conditioner with a Wi-Fi function, a refrigerator with an NFC function, etc., is not limited in this embodiment of the present application.
  • a mobile phone is used as a terminal, and a Bluetooth TV is used as a controlled device of the mobile phone for example.
  • FIG. 4 is a schematic flowchart of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application. As shown in FIG. 4, the method for controlling the power button in the virtual remote control may include:
  • the mobile phone establishes a Bluetooth connection with the Bluetooth TV.
  • a remote control APP such as a universal remote control app or a remote control smart app installed in the mobile phone.
  • a remote control app Take the universal remote control app as an example.
  • the mobile phone will display the device selection interface 501 of the universal remote control app.
  • the device selection interface 501 may include various types of controlled devices, such as a Bluetooth TV 502, an ordinary TV (that is, an infrared TV), an air conditioner, a set-top box, and a projector. The user can select the specific controlled device that he / she wants to control in the device selection interface 501.
  • the mobile phone can jump to the brand selection interface 601 of the universal remote control app.
  • the brand selection interface 601 includes multiple brands of Bluetooth TVs. The user can select the Bluetooth that he wishes to control in the brand selection interface 601. The specific brand of TV.
  • the above-mentioned brand selection interface 601 may also include multiple models of Bluetooth TVs under each brand, so that the user can select a specific model of a Bluetooth TV of a certain brand in the brand selection interface 601.
  • the universal remote control APP can call the intelligent remote control service in the application framework layer to send a BLE paired broadcast.
  • the mobile phone can prompt the user to open in the controlled device (that is, the Bluetooth TV) Bluetooth function.
  • the user can use the physical remote control of the Bluetooth TV to turn on the Bluetooth function of the Bluetooth TV and enter the search interface for discovering Bluetooth devices. In this way, when the Bluetooth TV searches for nearby Bluetooth devices through the Bluetooth function, it can receive the BLE pairing broadcast sent by the mobile phone.
  • the search list displayed by the Bluetooth TV includes the mobile phone.
  • the Bluetooth TV initiates pairing to the mobile phone, and displays a pairing code on the Bluetooth TV.
  • the Bluetooth connection between the mobile phone and the Bluetooth TV is established after the pairing is successful.
  • the mobile phone After the Bluetooth TV and the mobile phone are successfully paired for the first time, the mobile phone can save the media access control (MAC) address of the successfully paired Bluetooth TV. In this way, when a subsequent mobile phone needs to establish a Bluetooth connection with the Bluetooth TV again, a Bluetooth connection can be established with the Bluetooth TV according to the MAC address, and no pairing process is required at this time.
  • MAC media access control
  • the correspondence relationship between each key in multiple sets of virtual remote controls and the Bluetooth code value can be stored in the mobile phone in advance.
  • the air mouse operation mode there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 1; in the key operation mode, there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 2 .
  • the gesture operation mode there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 3.
  • the mobile phone may select one of the above-mentioned multiple correspondences and send it to the Bluetooth TV. For example, if the mobile phone creates a virtual remote control with a key operation mode by default, the mobile phone can send the above correspondence 2 to a Bluetooth TV; for example, if it is detected that the user manually sets the virtual remote control to an air mouse operation mode, the mobile phone can The above correspondence 1 is sent to the Bluetooth TV.
  • the Bluetooth TV subsequently receives a certain Bluetooth code value sent by the mobile phone, it can determine the specific key triggered by the user according to the received correspondence, and then execute the control command corresponding to the key, such as power on / off, switching Channels, etc.
  • the correspondence relationship between each key of the multiple groups of virtual remote controllers described above and the Bluetooth code value may also be stored in the Bluetooth TV, and each group correspondence has a unique identifier. Then, after the mobile phone establishes a Bluetooth connection with the Bluetooth TV, the mobile phone can send a selected group of corresponding identifications to the Bluetooth TV, so that the Bluetooth TV can subsequently analyze the Bluetooth code value sent by the mobile phone according to the corresponding relationship corresponding to the identification.
  • the Bluetooth TV may also select one of the above-mentioned multiple sets of correspondences, and send the selected correspondence or the identifier of the correspondence to the mobile phone.
  • the mobile phone can create a virtual remote controller corresponding to the operation mode according to the corresponding relationship, and this embodiment of the present application does not place any restrictions on this.
  • the correspondence relationship between the keys and the Bluetooth code value in a set of default virtual remote controllers can be agreed in advance between the mobile phone and the Bluetooth TV, so that after establishing a Bluetooth connection between the mobile phone and the Bluetooth TV, there is no need to send the correspondence to the Bluetooth TV .
  • the Bluetooth code value of each key in the virtual remote control may be defined based on the Bluetooth protocol. Since the working frequency band specified in the Bluetooth protocol does not overlap with the working frequency band of the infrared signal, if the virtual remote control includes a key controlled by the infrared signal, the infrared code value corresponding to the key is generally the same as the Bluetooth code value corresponding to the key Is different.
  • the Bluetooth code value corresponding to the power key is "FF00”
  • the Bluetooth code value corresponding to the power key is "00FF”
  • the power of the Bluetooth TV is controlled by the infrared signal with the infrared code value "FF00”, that is, the Bluetooth TV
  • the Bluetooth TV will trigger the power on / off operation.
  • the Bluetooth TV receives a Bluetooth code value of "00FF”
  • the Bluetooth code value corresponds to the power button
  • the Bluetooth TV still cannot perform the operation of turning on / off the power.
  • the mobile phone displays a test interface of a power key in the virtual remote controller to be created.
  • the mobile phone After the mobile phone establishes a Bluetooth connection with the Bluetooth TV, since the user has selected the option of the Bluetooth TV 502 in the above device selection interface 501, the mobile phone can determine that the opposite end of the current Bluetooth connection is a Bluetooth TV. Most of the keys on the remote control of a Bluetooth TV control the related functions of the Bluetooth TV by sending out a Bluetooth signal. However, the power button that controls the power of the Bluetooth TV may send out a Bluetooth signal or an infrared signal, which is determined by the manufacturer of the Bluetooth TV.
  • the mobile phone can first test the specific signal used to control the power of the Bluetooth TV. For example, as shown in FIG. 8, the mobile phone may display a test interface 801 of a power key in the virtual remote controller to be created, and the test interface 801 includes a power key 802 to be tested. The mobile phone may prompt the user to click the power button 802 in the form of highlighting, text, animation or voice. If it is detected that the user clicks the power button 802, the mobile phone may continue to perform the following steps S403-S406.
  • the mobile phone In response to a user input in the test interface, the mobile phone sends a Bluetooth test signal to the Bluetooth TV.
  • the Bluetooth test signal includes a Bluetooth code value corresponding to a power button.
  • the mobile phone may send the Bluetooth code value corresponding to the power button 802 to the Bluetooth TV through the Bluetooth connection. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the Bluetooth signal according to the response of the Bluetooth TV.
  • the mobile phone in order to enable the mobile phone to know the response status of the Bluetooth TV, the mobile phone can set a button 803 that responds correctly and a button 804 that does not respond correctly in the test interface 801. If it is detected that the user clicks the button 803, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, indicating that the power of the Bluetooth TV is controlled by the Bluetooth signal. At this time, the mobile phone can continue to perform the following step S404 to create a virtual remote control. . If it is detected that the user clicks the button 804, the mobile phone can determine that the Bluetooth TV cannot properly respond to the above Bluetooth test signal, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. At this time, the mobile phone can further test and control by performing the steps S405-S406 Specific signal for Bluetooth TV power.
  • test interface 801 still includes a power key 802.
  • the mobile phone in addition to prompting the user to click the power button 802, the mobile phone can also prompt the user to click the power button 802 again when the Bluetooth TV cannot respond properly. Then, if it is not detected that the user clicks the power button 802 within a preset time after the user clicks the power button 802, the mobile phone can determine that the Bluetooth TV can correctly respond to the above-mentioned Bluetooth test signal. If it is detected that the user clicks the power button 802 within a preset time after the user clicks the power button 802, the mobile phone can determine that the Bluetooth TV cannot respond to the above-mentioned Bluetooth test signal correctly.
  • the Bluetooth TV can also be used. Send a successful test response to the phone via a Bluetooth connection.
  • the Bluetooth TV can also send a test failure response to the mobile phone through the Bluetooth connection. In this way, if the mobile phone receives a successful test response from the Bluetooth TV, the mobile phone can determine that the Bluetooth TV can correctly respond to the above Bluetooth test signal. If the mobile phone does not receive a successful test response from the Bluetooth TV or receives a Bluetooth TV If the test fails, the mobile phone can determine that the Bluetooth TV cannot properly respond to the Bluetooth test signal.
  • the Bluetooth code value of each key in the Bluetooth keyboard has been defined in the HID protocol, for example, the Bluetooth code value of the power key is 0x66, and the Bluetooth code value of the volume "+” key is " 0x80 ", the Bluetooth code value of the volume"-"key is” 0x81 ".
  • the HID protocol also stipulates that each Bluetooth code value is transmitted in a command format of 8 bytes. These 8 bytes include report [0] to report [7], and each byte consists of 8 bits (bite).
  • report [0] 0x01
  • each key in the virtual remote control is a subset of each key in the Bluetooth keyboard
  • the mobile phone can continue to send the code values of the keys to the Bluetooth TV using the command format specified by the HID protocol.
  • the phone because the number of keys in the virtual remote control is small, the phone only needs to use some bytes in report [0] to report [7] to represent the Bluetooth code value of each key in the virtual remote control.
  • the mobile phone can use the 8 bits in report [2] to send the Bluetooth code value of the key to the Bluetooth TV.
  • the mobile phone Take the mobile phone to send the above Bluetooth test signal to the Bluetooth TV as an example. Since the Bluetooth code value of the power button is 0x66, the mobile phone can send the following 8-byte command format to the Bluetooth TV through a Bluetooth connection:
  • the value of report [2] is 0x66.
  • the Bluetooth TV can determine that the key currently triggered by the user is the power key according to the value of report [2]. Then, if the power of the Bluetooth TV is controlled by the Bluetooth code value 0x66, the Bluetooth TV can be triggered to perform a sleep or wake operation.
  • the mobile phone If the Bluetooth TV correctly responds to the Bluetooth test signal, the mobile phone creates and displays a virtual remote control, and the power button in the virtual remote control has a first correspondence relationship with the Bluetooth test signal.
  • step S404 if the mobile phone determines that the Bluetooth TV can correctly respond to the Bluetooth test signal, it indicates that the power of the Bluetooth TV is controlled by the Bluetooth signal. Then, the mobile phone can save the correspondence between the power key 802 and the Bluetooth code value in the Bluetooth test signal (that is, the first correspondence). Because other keys in the virtual remote control except the power key 802 can control the Bluetooth TV by outputting the corresponding Bluetooth code value, the mobile phone can create the entire virtual remote control after determining the Bluetooth code value corresponding to the power key 802. Device. Further, as shown in FIG. 10, the mobile phone can display the created virtual remote controller 1001, and each key in the virtual remote controller 1001 can receive user input.
  • the Bluetooth code value corresponding to the power button 802 can be determined according to the first correspondence, and the Bluetooth code value is sent to the Bluetooth TV through the Bluetooth connection. .
  • the Bluetooth TV receives the Bluetooth code value sent by the mobile phone, it can determine the received Bluetooth code value as the Bluetooth code value corresponding to the power key 802 according to the correspondence between the keys and the Bluetooth code value. Furthermore, the Bluetooth TV can perform a sleep or wake operation corresponding to the power key 802.
  • the function of the power button 802 is generally set to the sleep or wake-up function. After the Bluetooth TV enters the sleep state after performing the sleep operation, other functions in the Bluetooth TV can be turned off, but the Bluetooth function is still running, so that the Bluetooth connection between the mobile phone and the Bluetooth TV will not be disconnected.
  • the mobile phone sends an infrared test signal to the Bluetooth TV.
  • the mobile phone does not receive a successful test response from the Bluetooth TV.
  • the mobile phone can determine that the Bluetooth TV cannot properly respond to the above Bluetooth test signal, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. May be controlled by infrared signals. At this time, the mobile phone may continue to display the test interface 801 shown in FIG. 8 or FIG. 9.
  • the mobile phone can query the infrared code library stored locally to correspond to the brand or model of the Bluetooth TV.
  • the mobile phone can modulate the infrared code value of the power key 802 inquired into an infrared test signal, and send the infrared test signal to the Bluetooth TV.
  • the Bluetooth TV can demodulate the infrared test signal.
  • the Bluetooth TV can perform the corresponding power-on or Shut down operation. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the infrared test signal according to the response of the Bluetooth TV.
  • the mobile phone may first convert the infrared code value of the power key 802 in the first set of infrared code values into a first infrared test signal and send it to the Bluetooth TV. If the Bluetooth TV can respond to the first infrared test signal correctly, it means that the power of the Bluetooth TV is controlled by the first infrared test signal. If the Bluetooth TV cannot respond to the first infrared test signal correctly, the mobile phone can convert the infrared code value of the power key 802 in the second set of infrared code values to a second infrared test signal and send it to the Bluetooth TV until it is determined that the Bluetooth TV power source is controlled. Infrared signal.
  • the mobile phone may report the brand or model of the Bluetooth TV to the server, and the server determines the corresponding set or sets of infrared code values according to the brand or model of the Bluetooth TV, and reports the set or sets
  • the infrared code value of the power key 802 in the infrared code value is sent to the mobile phone.
  • the mobile phone can send an infrared test signal to the Bluetooth TV according to the infrared code value of the power key 802.
  • the mobile phone may call the SDK interface provided by the infrared supplier, and input the parameters such as the identification of the power button, the brand or model of the Bluetooth TV into the SDK interface.
  • the return value that the mobile phone calls the SDK interface is a list, and the list contains the infrared code values of one or more power keys 802 corresponding to the brand or model of the entered Bluetooth TV.
  • the mobile phone can send an infrared test signal to the Bluetooth TV according to the infrared code value of the power key 802.
  • the mobile phone can also prompt the user on the test interface 801 to point the Bluetooth TV within a certain distance and click the power button 802.
  • the Bluetooth TV fails to respond to the Bluetooth test signal, it may be because the Bluetooth TV cannot respond to the Bluetooth code value in the Bluetooth test signal, but the power of the Bluetooth TV may also be other Bluetooth codes. Value controlled.
  • the mobile phone sends the Bluetooth code value "0001" of the power button to the Bluetooth TV based on the correspondence between the keys and the Bluetooth code value in the air mouse operation mode.
  • the Bluetooth TV only supports the key operation mode and does not support air mouse. Operation mode, therefore, the Bluetooth TV cannot respond correctly to the Bluetooth code value "0001" in the Bluetooth test signal described above.
  • the mobile phone can continue to send the Bluetooth test signal corresponding to the power button in other operation modes to the Bluetooth TV according to the method of steps S403-404. If the Bluetooth TV fails to respond correctly to the Bluetooth test signals in all operation modes, as described in step S405, the mobile phone may send an infrared test signal to the Bluetooth TV to detect whether the power of the Bluetooth TV is controlled by the infrared signal.
  • the mobile phone If the Bluetooth TV correctly responds to the infrared test signal, the mobile phone creates and displays a virtual remote control, and the power button in the virtual remote control has a second correspondence relationship with the infrared test signal.
  • step S406 if the mobile phone determines that the Bluetooth TV can correctly respond to the infrared test signal, it indicates that the power of the Bluetooth TV is controlled by the infrared signal. Then, the mobile phone can save the correspondence between the power key 802 and the infrared code value in the infrared test signal (that is, the second correspondence). Because other keys in the virtual remote control except the power key 802 can control the Bluetooth TV by outputting the corresponding Bluetooth code value, the mobile phone can create the entire virtual remote control after determining the infrared code value corresponding to the power key 802. Device. Furthermore, the mobile phone can display the virtual remote controller 1001 shown in FIG. 10, and each key in the virtual remote controller 1001 can receive user input.
  • the mobile phone displays the created virtual remote controller 1001, in addition to testing the power button 801 described above, it can also test whether the Bluetooth TV can respond correctly after the user clicks other buttons in the virtual remote controller 1001.
  • the mobile phone can create and display the above-mentioned virtual remote controller 1001 after testing that the Bluetooth TV responds correctly to three different keys in the virtual remote controller 1001, so as to improve the accuracy of the created virtual remote controller 1001.
  • the infrared code value corresponding to the power key 802 can be determined according to the second corresponding relationship, and then the infrared code value is modulated into an infrared signal and sent to Bluetooth. TV.
  • the Bluetooth TV can demodulate the infrared code value corresponding to the infrared signal, and then perform the power-on or power-off operation corresponding to the power key 802.
  • the mobile phone can determine the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV through testing when the virtual remote control of the Bluetooth TV is created, so that in the subsequent process of using the virtual remote control, the mobile phone can The determined Bluetooth signal or infrared signal controls the power of the Bluetooth TV. In this way, no matter what kind of signal the Bluetooth TV controls the power, the mobile phone can create a power button corresponding to its power type.
  • the mobile phone may also determine a Bluetooth signal or an infrared signal that controls the power of the Bluetooth TV without the user's perception.
  • the method for controlling the power button in the virtual remote control may include:
  • the mobile phone establishes a Bluetooth connection with the Bluetooth TV.
  • step S401 For a specific method for establishing a Bluetooth connection between the mobile phone and the Bluetooth TV, refer to the related description of step S401 in the foregoing embodiment, and details are not described herein again.
  • the mobile phone displays a virtual remote control, and the virtual remote control includes a power button.
  • a virtual remote controller 1001 shown in FIG. 10 is displayed.
  • the virtual remote controller 1001 includes a power key 801, and each key in the virtual remote controller 1001 can receive a user input.
  • the keys in the virtual remote control 1001 except the power key 801 control the Bluetooth TV by outputting the corresponding Bluetooth code value
  • the mobile phone has already stored the virtual remote control 1001 in advance
  • the correspondence between each key in the Bluetooth and the Bluetooth code value is sent to the Bluetooth TV. Therefore, if it is detected that the user clicks any button other than the power button 801, the mobile phone can send the Bluetooth code value corresponding to the button to the Bluetooth TV through the established Bluetooth connection, so that the Bluetooth TV executes according to the received Bluetooth code value.
  • the mobile phone In response to the user's input of the power key in the virtual remote control, the mobile phone sends a Bluetooth test signal to the Bluetooth TV.
  • the mobile phone saves the first correspondence between the power button and the Bluetooth test signal.
  • steps S1203-S1204 during the normal use of the virtual remote controller 1001, if the mobile phone detects that the user clicks the power button 801 in the virtual remote controller 1001 for the first time, it indicates that the user wishes to control the Bluetooth TV to turn on (sleep) / shut down ( wake). However, at this time, the mobile phone is not sure what the specific signal for controlling the power of the Bluetooth TV is, so the mobile phone may first try to send a Bluetooth code value corresponding to the power button 801 to the Bluetooth TV through a Bluetooth connection.
  • the mobile phone may pop up a selection box 1301 in the interface displaying the virtual remote control 1001 to prompt the user to make a selection based on the response of the Bluetooth TV.
  • the selection box 1301 includes a button 1302 that responds correctly and a button 1303 that does not respond correctly. If it is detected that the user clicks the button 1302, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, indicating that the power of the Bluetooth TV is controlled by the Bluetooth signal. Furthermore, the mobile phone can save the first correspondence between the power key 801 and the Bluetooth test signal (for example, the Bluetooth code value of the power key 801). At this time, the power key 801 in the virtual remote controller 1001 is completely created.
  • the mobile phone can determine that the Bluetooth TV cannot respond to the Bluetooth test signal correctly, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. At this time, the mobile phone can perform the following steps S1205-S1206 Further test the specific signals that control the power in the Bluetooth TV.
  • the mobile phone may prompt the user to click the power button 802 again when the Bluetooth TV cannot respond properly as shown in the interface of the virtual remote control 1001. . Then, if it is not detected that the user clicks the power button 802 within a preset time after the user first clicks the power button 802, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, and then save the power button 801 and the Bluetooth test signal (Such as the Bluetooth code value of the power key 801 described above), so that the power key 801 in the virtual remote controller 1001 is completely created.
  • the mobile phone can determine that the Bluetooth TV cannot respond to the above-mentioned Bluetooth test signal correctly, and the mobile phone can perform the following step S1205 -S1206 further tests the specific signals that control the power in the Bluetooth TV.
  • the mobile phone sends an infrared test signal to the Bluetooth TV.
  • the mobile phone saves a second correspondence between the power button and the infrared test signal.
  • the mobile phone can obtain the infrared code value of the power button 802 corresponding to the Bluetooth TV brand or model. Furthermore, the mobile phone can modulate the infrared code value of the power key 802 into an infrared test signal and send it to the Bluetooth TV. After receiving the infrared test signal, the Bluetooth TV can demodulate the infrared test signal. If the demodulated infrared code value is a code value preset by the Bluetooth TV for the on / off function, the Bluetooth TV can perform the corresponding power-on or Shut down operation. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the infrared test signal according to the response of the Bluetooth TV.
  • the mobile phone can still display the information shown in (a) or (b) of FIG. 13 interface. Taking the interface shown in (b) in FIG.
  • the mobile phone may determine The Bluetooth TV can correctly respond to the first infrared test signal, and then save a second correspondence between the power key 801 and the first infrared test signal (for example, the first infrared code value), so that the power key in the virtual remote control 1001 801 was completely created.
  • the mobile phone can determine that the Bluetooth TV cannot properly respond to the first infrared test signal At this time, the mobile phone can continue to generate and send a second infrared test signal corresponding to the second infrared code value until the infrared signal that controls the power of the Bluetooth TV is determined.
  • the mobile phone may display the interface shown in (a) of FIG. 13. If it is detected that the user clicks the button 1302, the mobile phone can determine that the Bluetooth TV can correctly respond to the infrared test signal, indicating that the power of the Bluetooth TV is controlled by the infrared signal. Furthermore, the mobile phone can save the second correspondence between the power key 801 and the infrared test signal (for example, the infrared code value of the power key 801). At this time, the power key 801 in the virtual remote controller 1001 is completely created.
  • the mobile phone can determine that the Bluetooth TV cannot properly respond to the infrared test signal, and at this time, the user can be prompted that the power key 801 in the virtual remote controller 1001 has failed to create.
  • the mobile phone can determine the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV through testing when the user normally uses the virtual remote control, thereby completing the creation process of the power button in the virtual remote control, so that the mobile phone can be used in The user does not perceive the test process and determines the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV.
  • the mobile phone first sends a Bluetooth test signal to test the control signal of the Bluetooth TV power supply, and then sends an infrared test signal to test the control signal of the Bluetooth TV power supply. It can be understood that when the mobile phone creates the power button in the virtual remote control, it can also send an infrared test signal first. If the Bluetooth TV cannot respond to the infrared test signal correctly, the mobile phone can send a Bluetooth test signal to determine whether the Bluetooth TV is correct. In response to the Bluetooth test signal, the embodiment of the present application does not place any restrictions on this.
  • the mobile phone or the server of the universal remote control APP described above may also create a database, and the database may store the correspondence between the brand and type of the Bluetooth TV and the control signal of the power supply in the Bluetooth TV.
  • the power supply control signal is a Bluetooth signal
  • the specific Bluetooth code value is "00FF”.
  • the power supply control signal is an infrared signal
  • the specific infrared code value is "FF00”.
  • the mobile phone when the mobile phone creates a virtual remote control for a Bluetooth TV for the user, if the specific brand and specific model of the Bluetooth TV can be obtained (for example, the specific brand and specific model of the Bluetooth TV are manually entered by the user, or the user uses the mobile phone Scan the QR code of the specific brand and specific model of the Bluetooth TV, etc.), the mobile phone can determine the specific signal to control the power of the Bluetooth TV by querying the corresponding relationship in the above database, thereby creating the power button in the virtual remote control.
  • the specific brand and specific model of the Bluetooth TV for example, the specific brand and specific model of the Bluetooth TV are manually entered by the user, or the user uses the mobile phone Scan the QR code of the specific brand and specific model of the Bluetooth TV, etc.
  • the mobile phone may also determine the control of the power of the Bluetooth TV through steps S401-S406 or S1201-S1206 in the above embodiment. Specific signals and create a power button in the virtual remote.
  • the mobile phone can also establish the corresponding relationship between the specific Bluetooth signal (or infrared signal) determined in the above database and the specific brand and specific model of the Bluetooth TV, so as to improve the use of the database by subsequent mobile phones to determine the power of controlling the Bluetooth TV. Accuracy at specific signals.
  • an embodiment of the present application discloses a terminal.
  • the terminal is configured to implement the methods described in the foregoing method embodiments, and includes: a connection unit 1401 and a display unit 1402. , The transceiver unit 1403, and the creation unit 1404.
  • the connection unit 1401 is used to support the terminal to execute the process S401 in FIG. 4 and the process S1201 in FIG. 12
  • the display unit 1402 is used to support the terminal to execute the process S402 in FIG. 4 and the process S1202 in FIG. 12
  • the transceiver unit 1403 It is used to support the terminal to execute the processes S403 and S405 in FIG. 4 and the processes S1203 and S1205 in FIG.
  • the creation unit 1404 is used to support the terminal to execute the processes S404 and S406 in FIG. 4 and the processes S1204 and S1206 in FIG. .
  • all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
  • an embodiment of the present application discloses a terminal.
  • the terminal may include: a touch screen 1501, wherein the touch screen 1501 includes a touch-sensitive surface 1506 and a display screen 1507;
  • Bluetooth device 1509 is used to perform Bluetooth communication with other Bluetooth devices;
  • Wi-Fi device 1510 is used to perform communication with devices in a wireless local area network; memory 1503; one Or multiple application programs (not shown); and one or more computer programs 1504, each of which may be connected via one or more communication buses 1505.
  • the one or more computer programs 1504 are stored in the memory 1503 and configured to be executed by the one or more processors 1502.
  • the one or more computer programs 1504 include instructions, and the instructions can be used to execute 4 or each step in FIG. 12 and the corresponding embodiment.
  • Each functional unit in each of the embodiments of the present application may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product.
  • the computer software product is stored in a storage device.
  • the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage medium includes: various types of media that can store program codes, such as a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

Abstract

Embodiments of the present application relate to the field of terminals, and disclosed thereby are a control method for a power key in a virtual remote controller and a terminal which are compatible, when creating a virtual remote controller, with a controlled device in which a power supply is controlled by an infrared signal and a controlled device in which a power supply is controlled by a wireless signal. The method comprises: a terminal establishing a wireless connection with a controlled device; the terminal displaying a power key to be created in a virtual remote controller; in response to a first input of a user for the power key, the terminal sending a first test signal to the controlled device by means of the wireless connection, the first test signal comprising a Bluetooth test signal corresponding to a Bluetooth connection or a Wi-Fi test signal corresponding to a Wi-Fi connection; if the controlled device correctly responds to the first test signal, the terminal creating a power key corresponding to the first test signal; in response to a second input of the user for the power key, the terminal sending the first test signal to the controlled device such that the controlled device executes a sleep or wake-up operation.

Description

一种虚拟遥控器中电源键的控制方法及终端Method and terminal for controlling power key in virtual remote control 技术领域Technical field
本申请涉及终端领域,尤其涉及一种虚拟遥控器中电源键的控制方法及终端。The present application relates to the field of terminals, and in particular, to a method for controlling a power key in a virtual remote controller and a terminal.
背景技术Background technique
传统的电视等家电都是通过红外遥控器控制的,但红外遥控器发出红外信号时必须对准电视,并且中间不能有阻挡物,一旦被阻隔就无法有效控制电视。因此,越来越多的厂商在电视内集成了Wi-Fi或蓝牙等接入无线网络的功能,红外遥控器也逐渐被Wi-Fi遥控器、蓝牙遥控器替代。以Wi-Fi遥控器为例,当用户将Wi-Fi遥控器和电视接入同一Wi-Fi网络后,Wi-Fi遥控器可通过发出Wi-Fi信号向电视发送相应的控制指令。Traditional TV and other home appliances are controlled by infrared remote control, but the infrared remote control must be pointed at the TV when it sends out infrared signals, and there must be no obstacles in the middle. Once blocked, the TV cannot be effectively controlled. Therefore, more and more manufacturers have integrated Wi-Fi or Bluetooth access to wireless networks in their TVs, and infrared remote controls have gradually been replaced by Wi-Fi remotes and Bluetooth remotes. Take the Wi-Fi remote control as an example. When the user connects the Wi-Fi remote control and the TV to the same Wi-Fi network, the Wi-Fi remote control can send corresponding control instructions to the TV by sending a Wi-Fi signal.
而当电视的电源关闭后,由于电视与Wi-Fi遥控器之间建立的Wi-Fi连接随之断开,因此,用户按压Wi-Fi遥控器上的电源键所发出的Wi-Fi信号无法被电视接收。对此,一部分电视厂商将Wi-Fi遥控器上的电源键单独设置为红外按键,这样用户按压电源键后可向电视发送红外信号以控制电视的开启和关闭。还有一部分电视厂商将电源键的功能修改为控制电视休眠和唤醒的功能,由于电视休眠时Wi-Fi连接没有断开,因此,用户按压电源键后产生的Wi-Fi信号仍然可以被电视接收。When the power of the TV is turned off, the Wi-Fi signal sent by the user pressing the power button on the Wi-Fi remote control cannot be used because the Wi-Fi connection established between the TV and the Wi-Fi remote control is disconnected. Received by TV. In response, some TV manufacturers set the power button on the Wi-Fi remote control as an infrared button separately, so that users can send infrared signals to the TV to control the TV on and off after pressing the power button. Some TV manufacturers have modified the function of the power button to control the sleep and wake-up function of the TV. Since the Wi-Fi connection is not disconnected when the TV sleeps, the Wi-Fi signal generated by the user pressing the power button can still be received by the TV .
对于支持Wi-Fi的电视,手机等终端也可接入电视所在的局域网内。此时,手机也可创建与上述Wi-Fi遥控器对应的虚拟遥控器发出相应的Wi-Fi信号,以实现Wi-Fi遥控器中各个按键的功能。但是,手机在创建虚拟遥控器中的电源键时,由于手机无法确定电视上的电源是通过红外信号还是Wi-Fi信号控制的,因此手机无法准确实现遥控器中电源键的功能。For Wi-Fi-enabled TVs, terminals such as mobile phones can also access the LAN where the TV is located. At this time, the mobile phone may also create a virtual remote controller corresponding to the Wi-Fi remote controller to send out corresponding Wi-Fi signals, so as to implement the functions of each key in the Wi-Fi remote controller. However, when the mobile phone creates the power button in the virtual remote control, the mobile phone cannot accurately implement the function of the power button in the remote control because the mobile phone cannot determine whether the power on the TV is controlled by an infrared signal or a Wi-Fi signal.
发明内容Summary of the Invention
本申请提供一种虚拟遥控器中电源键的控制方法及终端,在创建虚拟遥控器时可兼容由不同类型的信号控制电源的被控设备。The present application provides a method and terminal for controlling a power key in a virtual remote controller, which can be compatible with controlled devices that control power by different types of signals when creating a virtual remote controller.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above purpose, this application uses the following technical solutions:
第一方面,本申请提供一种虚拟遥控器中电源键的控制方法,包括:终端与被控设备建立无线连接,该无线连接包括蓝牙连接或Wi-Fi连接;终端显示虚拟遥控器中待创建的电源键;响应于用户对该电源键的第一输入,终端可通过该无线连接向被控设备发送第一测试信号,第一测试信号可以是基于蓝牙连接的蓝牙测试信号,也可以是基于Wi-Fi连接的Wi-Fi测试信号;若被控设备能够正确响应上述第一测试信号,则说明被控设备的电源是由蓝牙信号控制的,因此,终端可创建与上述第一测试信号对应的电源键;这样,在终端创建与第一测试信号对应的电源键之后,如果接收到用户对该电源键的第二输入,终端可向被控设备发送与电源键对应的第一测试信号,以使得被控设备响应于第一测试信号执行休眠或唤醒操作。In a first aspect, the present application provides a method for controlling a power key in a virtual remote controller, including: establishing a wireless connection between a terminal and a controlled device, the wireless connection including a Bluetooth connection or a Wi-Fi connection; and the terminal displaying a virtual remote controller to be created In response to the user's first input of the power button, the terminal may send a first test signal to the controlled device through the wireless connection. The first test signal may be a Bluetooth test signal based on a Bluetooth connection, or may be based on Wi-Fi test signal for Wi-Fi connection; if the controlled device can correctly respond to the above first test signal, it means that the power of the controlled device is controlled by the Bluetooth signal, so the terminal can create a correspondence with the above first test signal In this way, after the terminal creates a power key corresponding to the first test signal, if the user receives a second input of the power key by the user, the terminal may send the first test signal corresponding to the power key to the controlled device. So that the controlled device performs a sleep or wake-up operation in response to the first test signal.
可以看出,终端可通过第一测试信号确定出控制被控设备电源的蓝牙信号或Wi-Fi信号,使得用户在后续使用虚拟遥控器的过程中,终端可以根据确定出的信号控制被控设备 的电源。这样,无论对于由蓝牙信号或Wi-Fi信号控制电源的被控设备而言,终端均可创建出与其电源类型对应的电源键。It can be seen that the terminal can determine the Bluetooth signal or Wi-Fi signal that controls the power of the controlled device through the first test signal, so that during the subsequent use of the virtual remote control by the user, the terminal can control the controlled device according to the determined signal Power. In this way, no matter for a controlled device whose power is controlled by a Bluetooth signal or a Wi-Fi signal, the terminal can create a power key corresponding to its power type.
在一种可能的设计方法中,终端显示虚拟遥控器中待创建的电源键,包括:终端显示该虚拟遥控器的测试界面,该测试界面中包括该电源键;或者,终端显示该虚拟遥控器的使用界面,该使用界面中包括该电源键。也就是说,终端可在创建被控设备的虚拟遥控器时测试出控制该被控设备电源的具体信号,也可以在使用被控设备的虚拟遥控器的过程中测试出控制该被控设备电源的具体信号。In a possible design method, the terminal displaying a power key to be created in the virtual remote control includes: the terminal displaying a test interface of the virtual remote control, the test interface including the power key; or the terminal displaying the virtual remote control User interface, which includes the power button. That is, the terminal can test the specific signal that controls the power of the controlled device when creating the virtual remote control of the controlled device, and can also test and control the power of the controlled device during the process of using the virtual remote control of the controlled device. Specific signals.
在一种可能的设计方法中,在终端向被控设备发送第一测试信号之后,还包括:终端提示用户输入被控设备对第一测试信号的响应情况;若接收到指示被控设备正确响应的输入,则终端确定被控设备正确响应第一测试信号;若接收到指示被控设备无法正确响应的输入,则终端确定被控设备无法正确响应第一测试信号。In a possible design method, after the terminal sends the first test signal to the controlled device, the method further includes: the terminal prompts the user to input a response status of the controlled device to the first test signal; if it receives an instruction indicating that the controlled device responds correctly Input, the terminal determines that the controlled device responds correctly to the first test signal; if an input indicating that the controlled device cannot respond correctly is received, the terminal determines that the controlled device cannot respond to the first test signal correctly.
或者,在终端向被控设备发送第一测试信号之后,还包括:终端提示用户在被控设备对第一测试信号没有响应时点击该电源键;若在预设时间内没有检测到用户点击该电源键,则终端确定被控设备正确响应第一测试信号;否则,终端确定被控设备无法正确响应第一测试信号。Alternatively, after the terminal sends the first test signal to the controlled device, the method further includes: the terminal prompts the user to click the power button when the controlled device does not respond to the first test signal; if the user clicks the If the power key is pressed, the terminal determines that the controlled device responds correctly to the first test signal; otherwise, the terminal determines that the controlled device cannot respond to the first test signal correctly.
或者,在终端向被控设备发送第一测试信号之后,还包括:若终端接收到被控设备发送的测试成功响应,则终端确定被控设备正确响应第一测试信号;或者,若终端接收到被控设备发送的测试失败响应,则终端确定被控设备无法正确响应第一测试信号。Alternatively, after the terminal sends the first test signal to the controlled device, the method further includes: if the terminal receives a successful test response from the controlled device, the terminal determines that the controlled device responds correctly to the first test signal; or, if the terminal receives In response to the test failure sent by the controlled device, the terminal determines that the controlled device cannot correctly respond to the first test signal.
在一种可能的设计方法中,上述无线连接为蓝牙连接,上述第一测试信号为蓝牙测试信号,该蓝牙测试信号包括与该电源键对应的蓝牙码值;其中,终端创建与第一测试信号对应的电源键,包括:终端保存该蓝牙码值与该电源键之间的第一对应关系。这样,用户在使用虚拟遥控器时,如果检测到用户点击虚拟遥控器中的电源键,终端可以根据已经确定的第一对应关系向被控设备发送对应的蓝牙码值,以控制被控设备的电源。In a possible design method, the wireless connection is a Bluetooth connection, and the first test signal is a Bluetooth test signal. The Bluetooth test signal includes a Bluetooth code value corresponding to the power button. The terminal creates the first test signal. The corresponding power button includes: the terminal saves a first correspondence between the Bluetooth code value and the power button. In this way, when the user uses the virtual remote control, if it is detected that the user clicks the power button in the virtual remote control, the terminal can send a corresponding Bluetooth code value to the controlled device according to the determined first correspondence relationship, so as to control the controlled device. power supply.
在一种可能的设计方法中,若被控设备无法正确响应第一测试信号,则该方法还包括:终端向被控设备发送第二测试信号,第二测试信号包括蓝牙测试信号、Wi-Fi测试信号或红外测试信号,第二测试信号与第一测试信号不同;若被控设备正确响应第二测试信号,则终端创建与第二测试信号对应的电源键。也就是说,无论是由红外信号控制电源的被控设备,还是由蓝牙信号或Wi-Fi信号控制电源的被控设备,终端均可创建出相应的电源键,使得终端生成的虚拟遥控器能够兼容市面上不同电源键种类的被控设备,提高用户的操作体验。In a possible design method, if the controlled device cannot respond to the first test signal correctly, the method further includes: the terminal sends a second test signal to the controlled device, the second test signal includes a Bluetooth test signal, Wi-Fi The test signal or the infrared test signal, the second test signal is different from the first test signal; if the controlled device responds correctly to the second test signal, the terminal creates a power key corresponding to the second test signal. In other words, whether it is a controlled device whose power is controlled by an infrared signal, or a controlled device whose power is controlled by a Bluetooth signal or Wi-Fi signal, the terminal can create a corresponding power button, so that the virtual remote control generated by the terminal can Compatible with different types of controlled devices on the market, improving user operation experience.
在一种可能的设计方法中,上述第二测试信号为红外测试信号;该红外测试信号包括与该电源键对应的红外码值;其中,终端创建与第二测试信号对应的电源键,包括:终端保存该红外码值与该电源键之间的第二对应关系。这样,用户在使用虚拟遥控器时,如果检测到用户点击虚拟遥控器中的电源键,终端可以根据已经确定的第二对应关系向被控设备发送对应的红外码值,以控制被控设备的电源。In a possible design method, the second test signal is an infrared test signal; the infrared test signal includes an infrared code value corresponding to the power key; and the terminal creates a power key corresponding to the second test signal, including: The terminal saves a second correspondence between the infrared code value and the power key. In this way, when the user uses the virtual remote control, if it is detected that the user clicks the power button in the virtual remote control, the terminal may send a corresponding infrared code value to the controlled device according to the determined second correspondence relationship, so as to control the controlled device. power supply.
在一种可能的设计方法中,终端内安装有遥控类应用,上述方法还包括:响应于用户打开该遥控类应用的操作,终端显示该遥控类应用的设备选择界面,该设备选择界面中包括至少一种类型的被控设备;响应于用户在该设备选择界面中的选择操作,终端显示该遥控类应用的品牌选择界面,该品牌选择界面中包括被控设备的至少一种品牌或型号;响应 于用户在该品牌选择界面中的选择操作,终端提示用户建立与被控设备之间的无线连接。In a possible design method, a remote control application is installed in the terminal. The above method further includes: in response to a user opening the remote control application, the terminal displays a device selection interface of the remote control application. The device selection interface includes At least one type of controlled device; in response to a user's selection operation in the device selection interface, the terminal displays a brand selection interface of the remote control application, the brand selection interface including at least one brand or model of the controlled device; In response to the user's selection operation in the brand selection interface, the terminal prompts the user to establish a wireless connection with the controlled device.
示例性的,上述终端具体可以为手机,上述被控设备具体可以为蓝牙电视,上述无线连接具体可以为蓝牙连接,上述第一测试信号具体可以为蓝牙测试信号,上述第二测试信号具体可以为红外测试信号。For example, the terminal may be a mobile phone, the controlled device may be a Bluetooth TV, the wireless connection may be a Bluetooth connection, the first test signal may be a Bluetooth test signal, and the second test signal may be Infrared test signal.
第二方面,本申请提供一种终端,包括连接单元,显示单元,收发单元和创建单元;其中,连接单元,用于:与被控设备建立无线连接,该无线连接包括蓝牙连接或Wi-Fi连接;显示单元,用于:显示虚拟遥控器中待创建的电源键;收发单元,用于:接收用户对该电源键的第一输入;通过该无线连接向被控设备发送第一测试信号,第一测试信号包括与蓝牙连接对应的蓝牙测试信号或与Wi-Fi连接对应的Wi-Fi测试信号;创建单元,用于:若被控设备正确响应第一测试信号,则创建与第一测试信号对应的电源键;该收发单元,还用于:接收用户对该电源键的第二输入;通过该无线连接向被控设备发送第一测试信号,以使得被控设备响应于第一测试信号执行休眠或唤醒操作。In a second aspect, the present application provides a terminal including a connection unit, a display unit, a transceiver unit, and a creation unit; wherein the connection unit is configured to establish a wireless connection with a controlled device, and the wireless connection includes a Bluetooth connection or Wi-Fi A connection; a display unit for: displaying a power key to be created in the virtual remote control; a transceiver unit for: receiving a user's first input of the power key; sending a first test signal to the controlled device through the wireless connection, The first test signal includes a Bluetooth test signal corresponding to a Bluetooth connection or a Wi-Fi test signal corresponding to a Wi-Fi connection; a creating unit is configured to: if the controlled device responds correctly to the first test signal, create a first test signal The power button corresponding to the signal; the transceiver unit is further configured to: receive a second input from the user to the power button; and send a first test signal to the controlled device through the wireless connection, so that the controlled device responds to the first test signal Perform a sleep or wake operation.
在一种可能的设计方法中,上述显示单元具体用于:显示该虚拟遥控器的测试界面,该测试界面中包括该电源键;或者,显示该虚拟遥控器的使用界面,该使用界面中包括该电源键。In a possible design method, the display unit is specifically configured to: display a test interface of the virtual remote control, the test interface including the power key; or display a use interface of the virtual remote control, which includes the use interface The power button.
在一种可能的设计方法中,上述显示单元还用于:提示用户输入被控设备对第一测试信号的响应情况;终端还包括确定单元,用于:若接收到指示被控设备正确响应的输入,则确定被控设备正确响应第一测试信号;若接收到指示被控设备无法正确响应的输入,则确定被控设备无法正确响应第一测试信号。In a possible design method, the display unit is further configured to: prompt the user to input a response condition of the controlled device to the first test signal; the terminal further includes a determining unit configured to: if it receives an instruction indicating that the controlled device responds correctly If it is input, it is determined that the controlled device responds correctly to the first test signal; if it receives an input indicating that the controlled device cannot respond correctly, it is determined that the controlled device cannot respond correctly to the first test signal.
在一种可能的设计方法中,上述显示单元还用于:提示用户在被控设备对第一测试信号没有响应时点击该电源键;终端还包括确定单元,用于:若在预设时间内没有检测到用户点击该电源键,则确定被控设备正确响应第一测试信号;否则,确定被控设备无法正确响应第一测试信号。In a possible design method, the display unit is further configured to prompt the user to click the power button when the controlled device does not respond to the first test signal; the terminal further includes a determination unit configured to: If it is not detected that the user clicks the power button, it is determined that the controlled device responds correctly to the first test signal; otherwise, it is determined that the controlled device cannot respond to the first test signal correctly.
在一种可能的设计方法中,终端还包括确定单元,用于:若终端接收到被控设备发送的测试成功响应,则确定被控设备正确响应第一测试信号;或者,若终端接收到被控设备发送的测试失败响应,则确定被控设备无法正确响应第一测试信号。In a possible design method, the terminal further includes a determining unit, configured to: if the terminal receives the test success response sent by the controlled device, determine that the controlled device responds correctly to the first test signal; or, if the terminal receives the The test failure response sent by the controlling device determines that the controlled device cannot respond to the first test signal correctly.
在一种可能的设计方法中,上述无线连接为蓝牙连接,第一测试信号为蓝牙测试信号,该蓝牙测试信号包括与该电源键对应的蓝牙码值;上述创建单元,具体用于:保存该蓝牙码值与该电源键之间的第一对应关系。In a possible design method, the wireless connection is a Bluetooth connection, and the first test signal is a Bluetooth test signal. The Bluetooth test signal includes a Bluetooth code value corresponding to the power button. The creating unit is specifically configured to: save the The first correspondence between the Bluetooth code value and the power key.
在一种可能的设计方法中,若被控设备无法正确响应第一测试信号,则上述收发单元还用于:向被控设备发送第二测试信号,第二测试信号包括蓝牙测试信号、Wi-Fi测试信号或红外测试信号,第二测试信号与第一测试信号不同;创建单元,还用于:若被控设备正确响应第二测试信号,则创建与第二测试信号对应的电源键。In a possible design method, if the controlled device fails to respond to the first test signal correctly, the foregoing transceiver unit is further configured to send a second test signal to the controlled device. The second test signal includes a Bluetooth test signal, Wi- The Fi test signal or the infrared test signal, the second test signal is different from the first test signal; the creating unit is further configured to: if the controlled device responds correctly to the second test signal, create a power key corresponding to the second test signal.
在一种可能的设计方法中,第二测试信号为红外测试信号;该红外测试信号包括与该电源键对应的红外码值;上述创建单元,具体用于:保存该红外码值与该电源键之间的第二对应关系。In a possible design method, the second test signal is an infrared test signal; the infrared test signal includes an infrared code value corresponding to the power key; and the creating unit is specifically configured to: save the infrared code value and the power key The second correspondence between them.
在一种可能的设计方法中,终端内安装有遥控类应用,上述显示单元,还用于:响应于用户打开该遥控类应用的操作,显示该遥控类应用的设备选择界面,该设备选择界面中包括至少一种类型的被控设备;响应于用户在该设备选择界面中的选择操作,显示该遥控 类应用的品牌选择界面,该品牌选择界面中包括被控设备的至少一种品牌或型号;响应于用户在该品牌选择界面中的选择操作,提示用户建立与被控设备之间的无线连接。In a possible design method, a remote control application is installed in the terminal, and the display unit is further configured to display a device selection interface of the remote control application in response to a user's operation of opening the remote control application, and the device selection interface Including at least one type of controlled device; in response to a user's selection operation in the device selection interface, displaying a brand selection interface of the remote control application, the brand selection interface including at least one brand or model of the controlled device In response to the user's selection operation in the brand selection interface, the user is prompted to establish a wireless connection with the controlled device.
第三方面,本申请提供一种终端,包括:触摸屏、一个或多个处理器、存储器、以及一个或多个程序;其中,处理器与存储器耦合,上述一个或多个程序被存储在存储器中,当终端运行时,该处理器执行该存储器存储的一个或多个程序,以使终端执行上述任一项虚拟遥控器中电源键的控制方法。In a third aspect, the present application provides a terminal including: a touch screen, one or more processors, a memory, and one or more programs; wherein the processor is coupled to the memory, and the one or more programs are stored in the memory When the terminal is running, the processor executes one or more programs stored in the memory, so that the terminal executes the control method of the power button in any of the virtual remote controllers described above.
第四方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在终端上运行时,使得终端执行如第一方面中任一项所述的虚拟遥控器中电源键的控制方法。In a fourth aspect, the present application provides a computer storage medium including computer instructions that, when the computer instructions are run on a terminal, cause the terminal to execute a method for controlling a power key in a virtual remote control according to any one of the first aspects.
第五方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面中任一项所述的虚拟遥控器中电源键的控制方法。In a fifth aspect, the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to execute the method for controlling a power key in a virtual remote control according to any one of the first aspects.
可以理解地,上述提供的第二方面和第三方面所述的终端、第四方面所述的计算机存储介质,以及第五方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Understandably, the terminals described in the second and third aspects provided above, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect are all used to execute the corresponding ones provided above. Method, therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种终端的结构示意图一;FIG. 1 is a first schematic structural diagram of a terminal according to an embodiment of the present application; FIG.
图2为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图一;FIG. 2 is a first application scenario diagram for creating a power button in a virtual remote control according to an embodiment of the present application; FIG.
图3为本申请实施例提供的一种安卓操作系统的结构示意图;3 is a schematic structural diagram of an Android operating system according to an embodiment of the present application;
图4为本申请实施例提供的一种虚拟遥控器中电源键的控制方法的交互示意图一;FIG. 4 is a first schematic interaction diagram of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application; FIG.
图5为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图二;FIG. 5 is a second application scenario diagram for creating a power button in a virtual remote control according to an embodiment of the present application; FIG.
图6为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图三;FIG. 6 is a third application scenario diagram for creating a power button in a virtual remote controller according to an embodiment of the present application; FIG.
图7为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图四;FIG. 7 is a schematic diagram 4 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application;
图8为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图五;FIG. 8 is a schematic diagram 5 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application; FIG.
图9为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图六;FIG. 9 is a schematic diagram 6 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application;
图10为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图七;FIG. 10 is a schematic diagram VII of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application; FIG.
图11为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图八;FIG. 11 is a schematic diagram 8 of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application;
图12为本申请实施例提供的一种虚拟遥控器中电源键的控制方法的交互示意图二;FIG. 12 is a second schematic interaction diagram of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application; FIG.
图13为本申请实施例提供的一种创建虚拟遥控器中电源键的应用场景示意图九;FIG. 13 is a schematic diagram IX of an application scenario for creating a power button in a virtual remote control according to an embodiment of the present application;
图14为本申请实施例提供的一种终端的结构示意图二;14 is a second schematic structural diagram of a terminal according to an embodiment of the present application;
图15为本申请实施例提供的一种终端的结构示意图三。FIG. 15 is a third schematic structural diagram of a terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例的实施方式进行详细描述。The embodiments of the embodiments of the present application will be described in detail below with reference to the drawings.
需要说明的是,本申请实施例提供的虚拟遥控器中电源键的控制方法可以应用于终端。示例性的,该终端可以为平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、智能手表等设备,也可以是图1所示的手机100,本申请实施例中对终端的具体形式不做特殊限制。It should be noted that the method for controlling a power key in the virtual remote controller provided in the embodiment of the present application may be applied to a terminal. Exemplarily, the terminal may be a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, or a personal digital assistant (PDA). , Wearable electronic devices, smart watches, and other devices may also be the mobile phone 100 shown in FIG. 1, and the specific form of the terminal is not particularly limited in the embodiment of the present application.
如图1所示,本申请实施例中的终端可以为手机100。下面以手机100为例对实施例进行具体说明。应该理解的是,图示手机100仅是终端的一个范例,并且手机100可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不 同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。As shown in FIG. 1, the terminal in the embodiment of the present application may be a mobile phone 100. The embodiment will be specifically described below with the mobile phone 100 as an example. It should be understood that the illustrated mobile phone 100 is only an example of a terminal, and the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have Different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.
如图1所示,手机100具体可以包括:处理器101、射频(radio frequency,RF)电路102、存储器103、触摸屏104、蓝牙装置105、一个或多个传感器106、Wi-Fi装置107、定位装置108、音频电路109、外设接口110以及电源装置111等部件。这些部件可通过一根或多根通信总线或信号线(图1中未示出)进行通信。本领域技术人员可以理解,图1中示出的硬件结构并不构成对手机100的限定,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 1, the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, and a positioning device. The device 108, the audio circuit 109, the peripheral interface 110, and the power supply device 111 and other components. These components can communicate via one or more communication buses or signal lines (not shown in FIG. 1). Those skilled in the art can understand that the hardware structure shown in FIG. 1 does not constitute a limitation on the mobile phone 100. The mobile phone 100 may include more or fewer components than shown in the figure, or some components may be combined, or different components may be arranged. .
下面结合图1对手机100的各个部件进行具体的介绍:Each component of the mobile phone 100 is specifically described below with reference to FIG. 1:
处理器101是手机100的控制中心,利用各种接口和线路连接手机100的各个部分,通过运行或执行存储在存储器103内的应用程序,以及调用存储在存储器103内的数据和指令,执行手机100的各种功能和处理数据。在一些实施例中,处理器101可包括一个或多个处理单元;处理器101还可以集成应用处理器和调制解调处理器;其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器101中。举例来说,处理器101可以是华为技术有限公司制造的麒麟960多核处理器。The processor 101 is the control center of the mobile phone 100. It uses various interfaces and lines to connect various parts of the mobile phone 100, and executes the mobile phone by running or executing applications stored in the memory 103 and calling data and instructions stored in the memory 103. 100 various functions and processing data. In some embodiments, the processor 101 may include one or more processing units; the processor 101 may further integrate an application processor and a modem processor; wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like. The modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 101. For example, the processor 101 may be a Kirin 960 multi-core processor manufactured by Huawei Technologies Co., Ltd.
射频电路102可用于在收发信息或通话过程中,无线信号的接收和发送。具体地,射频电路102可以将基站的下行数据接收后,给处理器101处理;另外,将涉及上行的数据发送给基站。通常,射频电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频电路102还可以通过无线通信和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短信服务等。The radio frequency circuit 102 may be used for receiving and transmitting wireless signals during information transmission or communication. Specifically, the radio frequency circuit 102 may receive the downlink data of the base station and process it to the processor 101; in addition, send the uplink data to the base station. Generally, the radio frequency circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuit 102 can also communicate with other devices through wireless communication. The wireless communication may use any communication standard or protocol, including, but not limited to, a global mobile communication system, a general packet wireless service, code division multiple access, broadband code division multiple access, long-term evolution, email, and short message services.
存储器103用于存储应用程序以及数据,处理器101通过运行存储在存储器103的应用程序以及数据,执行手机100的各种功能以及数据处理。存储器103主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);存储数据区可以存储根据使用手机100时所创建的数据(比如音频数据、电话本等)。此外,存储器103可以包括高速随机存取存储器,还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。存储器103可以存储各种操作系统,例如苹果公司所开发的
Figure PCTCN2018088908-appb-000001
操作系统,谷歌公司所开发的
Figure PCTCN2018088908-appb-000002
操作系统等。
The memory 103 is configured to store application programs and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running the application programs and data stored in the memory 103. The memory 103 mainly includes a storage program area and a storage data area, where the storage program area can store an operating system and at least one application required by a function (such as a sound playback function, an image playback function, etc.); the storage data area can store data according to the use of the mobile phone. Data created at 100 (such as audio data, phone book, etc.). In addition, the memory 103 may include a high-speed random access memory, and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 103 can store various operating systems, such as those developed by Apple Inc.
Figure PCTCN2018088908-appb-000001
Operating system, developed by Google
Figure PCTCN2018088908-appb-000002
Operating system, etc.
触摸屏104可以包括触敏表面104-1和显示器104-2。The touch screen 104 may include a touch-sensitive surface 104-1 and a display 104-2.
其中,触敏表面104-1(例如触控面板)可采集手机100的用户在其上或附近的触摸事件(比如用户使用手指、触控笔等任何适合的物体在触敏表面104-1上或在触敏表面104-1附近的操作),并将采集到的触摸信息发送给其他器件例如处理器101。其中,用户在触敏表面104-1附近的触摸事件可以称之为悬浮触控;悬浮触控可以是指,用户无需为了选择、移动或拖动目标(例如图标等)而直接接触触控板,而只需用户位于终端附近以便执行所想要的功能。在悬浮触控的应用场景下,术语“触摸”、“接触”等不会暗示用于直接接触触摸屏,而是在其附近或接近的接触。能够进行悬浮触控的触敏表面104-1可以采用电容式、红外光感以及超声波等实现。触敏表面104-1可包括触摸检测装置和触摸控 制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再发送给处理器101,触摸控制器还可以接收处理器101发送的指令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型来实现触敏表面104-1。The touch-sensitive surface 104-1 (for example, a touch panel) can capture touch events on or near the user of the mobile phone 100 (such as the user using a finger, a stylus, etc. on any suitable object on the touch-sensitive surface 104-1). Or operations near the touch-sensitive surface 104-1), and send the collected touch information to other devices such as the processor 101. Among them, the user's touch event near the touch-sensitive surface 104-1 can be referred to as hovering touch; hovering touch can mean that the user does not need to directly touch the touchpad in order to select, move, or drag an object (such as an icon). , As long as the user is located near the terminal in order to perform the desired function. In the application scenario of hovering touch, the terms "touch", "contact", and the like do not imply direct contact with the touch screen, but contact near or close to it. The touch-sensitive surface 104-1 capable of floating touch can be implemented using a capacitive type, an infrared light sensor, and an ultrasonic wave. The touch-sensitive surface 104-1 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into contact coordinates, and then When sent to the processor 101, the touch controller may also receive and execute instructions sent by the processor 101. In addition, various types such as resistive, capacitive, infrared, and surface acoustic waves can be used to implement the touch-sensitive surface 104-1.
显示器(也称为显示屏)104-2可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。可以采用液晶显示器、有机发光二极管等形式来配置显示器104-2。触敏表面104-1可以覆盖在显示器104-2之上,当触敏表面104-1检测到在其上或附近的触摸事件后,传送给处理器101以确定触摸事件的类型,随后处理器101可以根据触摸事件的类型在显示器104-2上提供相应的视觉输出。虽然在图1中,触敏表面104-1与显示屏104-2是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触敏表面104-1与显示屏104-2集成而实现手机100的输入和输出功能。可以理解的是,触摸屏104是由多层材料堆叠而成,本申请实施例中只展示出了触敏表面(层)和显示屏(层),其他层在本申请实施例中不予记载。另外,在本申请其他一些实施例中,触敏表面104-1可以覆盖在显示器104-2之上,并且触敏表面104-1的尺寸大于显示屏104-2的尺寸,使得显示屏104-2全部覆盖在触敏表面104-1下面,或者,上述触敏表面104-1可以以全面板的形式配置在手机100的正面,也即用户在手机100正面的触摸均能被手机感知,这样就可以实现手机正面的全触控体验。在其他一些实施例中,触敏表面104-1以全面板的形式配置在手机100的正面,显示屏104-2也可以以全面板的形式配置在手机100的正面,这样在手机的正面就能够实现无边框的结构。在本申请其他一些实施例中,触摸屏104还可以包括一组或多组传感器阵列,用于触摸屏104在感测用户在其上的触摸事件的同时也可以感测到用户在其上施加的压力等。The display (also referred to as a display screen) 104-2 may be used to display information input by the user or information provided to the user and various menus of the mobile phone 100. The display 104-2 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The touch-sensitive surface 104-1 may be overlaid on the display 104-2. When the touch-sensitive surface 104-1 detects a touch event on or near the touch-sensitive surface 104-1, it transmits it to the processor 101 to determine the type of the touch event, and then the processor 101 may provide a corresponding visual output on the display 104-2 according to the type of the touch event. Although in FIG. 1, the touch-sensitive surface 104-1 and the display screen 104-2 are implemented as two independent components to implement the input and output functions of the mobile phone 100, in some embodiments, the touch-sensitive surface 104- 1 Integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100. It can be understood that the touch screen 104 is formed by stacking multiple layers of materials. Only the touch-sensitive surface (layer) and the display screen (layer) are shown in the embodiments of the present application, and other layers are not described in the embodiments of the present application. In addition, in other embodiments of the present application, the touch-sensitive surface 104-1 may cover the display 104-2, and the size of the touch-sensitive surface 104-1 is larger than the size of the display screen 104-2, so that the display screen 104- 2 is all covered under the touch-sensitive surface 104-1, or the touch-sensitive surface 104-1 can be configured on the front of the mobile phone 100 in the form of a comprehensive board, that is, the user's touch on the front of the mobile phone 100 can be perceived by the mobile phone, so You can achieve a full touch experience on the front of the phone. In some other embodiments, the touch-sensitive surface 104-1 is configured on the front of the mobile phone 100 in the form of a full board, and the display screen 104-2 may also be configured on the front of the mobile phone 100 in the form of a full board. Achieve frameless structure. In some other embodiments of the present application, the touch screen 104 may further include one or more sets of sensor arrays. The touch screen 104 may also sense the pressure exerted by the user on the touch screen 104 while sensing a touch event on the user. Wait.
手机100还可以包括蓝牙装置105,用于实现手机100与其他短距离的终端(例如手机、智能手表等)之间的数据交换。本申请实施例中的蓝牙装置可以是集成电路或者蓝牙芯片等。The mobile phone 100 may further include a Bluetooth device 105 for implementing data exchange between the mobile phone 100 and other short-range terminals (such as a mobile phone, a smart watch, etc.). The Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip.
手机100还可以包括至少一种传感器106,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器。其中,环境光传感器可根据环境光线的明暗来调节触摸屏104的显示器的亮度,接近传感器可在手机100移动到耳边时,关闭显示器的电源。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的指纹识别器件、陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不予赘述。The mobile phone 100 may further include at least one sensor 106, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor can turn off the power of the display when the mobile phone 100 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. It can be used to identify the attitude of the mobile phone (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc .; as for the mobile phone 100, fingerprint recognition devices, gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors can also be configured Will not repeat them here.
Wi-Fi装置107,用于为手机100提供遵循Wi-Fi相关标准协议的网络接入,手机100可以通过Wi-Fi装置107接入到Wi-Fi接入点,进而帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。在其他一些实施例中,该Wi-Fi装置107也可以作为Wi-Fi无线接入点,可以为其他终端提供Wi-Fi网络接入。Wi-Fi device 107 is used to provide mobile phone 100 with network access that complies with Wi-Fi related standard protocols. Mobile phone 100 can access Wi-Fi access points through Wi-Fi device 107 to help users send and receive email, Browse the web and access streaming media, etc., it provides users with wireless broadband Internet access. In some other embodiments, the Wi-Fi device 107 can also be used as a Wi-Fi wireless access point, and can provide Wi-Fi network access for other terminals.
定位装置108,用于为手机100提供地理位置。可以理解的是,该定位装置108具体可以是全球定位系统(global positioning system,GPS)、北斗卫星导航系统等定位系统的接收器。定位装置108在接收到上述定位系统发送的地理位置后,将该信息发送给处理器 101进行处理,或者发送给存储器103进行保存。在另外的一些实施例中,该定位装置108可以是辅助全球卫星定位系统(assisted global positioning system,AGPS)的接收器,AGPS是一种在一定辅助配合下进行GPS定位的运行方式,它可以利用基站的信号,配合GPS卫星信号,可以让手机100定位的速度更快;在AGPS系统中,该定位装置108可通过与辅助定位服务器(例如手机定位服务器)的通信而获得定位辅助。AGPS系统通过作为辅助服务器来协助定位装置108完成测距和定位服务,在这种情况下,辅助定位服务器通过无线通信网络与终端例如手机100的定位装置108(即GPS接收器)通信而提供定位协助。The positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 may specifically be a receiver of a positioning system such as a global positioning system (GPS) or a Beidou satellite navigation system. After receiving the geographic position sent by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends the information to the memory 103 for storage. In other embodiments, the positioning device 108 may be an assisted global positioning system (AGPS) receiver. AGPS is an operation mode for GPS positioning with certain assistance and cooperation. It can use The signal of the base station and the GPS satellite signal can make the mobile phone 100 locate faster; in the AGPS system, the positioning device 108 can obtain positioning assistance through communication with an auxiliary positioning server (such as a mobile phone positioning server). The AGPS system assists the positioning device 108 to complete ranging and positioning services by serving as an auxiliary server. In this case, the auxiliary positioning server communicates with the terminal such as the positioning device 108 (ie, the GPS receiver) of the mobile phone 100 through a wireless communication network to provide positioning. assist.
音频电路109、扬声器113、麦克风114可提供用户与手机100之间的音频接口。音频电路109可将接收到的音频数据转换后的电信号,传输到扬声器113,由扬声器113转换为声音信号输出;另一方面,麦克风114将收集的声音信号转换为电信号,由音频电路109接收后转换为音频数据,再将音频数据输出至RF电路102以发送给比如另一手机,或者将音频数据输出至存储器103以便进一步处理。The audio circuit 109, the speaker 113, and the microphone 114 may provide an audio interface between the user and the mobile phone 100. The audio circuit 109 may transmit the received electrical data converted electric signal to the speaker 113, and the speaker 113 converts the sound signal into a sound signal for output. On the other hand, the microphone 114 converts the collected sound signal into an electric signal, and the audio circuit 109 After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for sending to another mobile phone, or the audio data is output to the memory 103 for further processing.
外设接口110,用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线接口与鼠标连接,通过用户识别模块卡卡槽上的金属触点与电信运营商提供的用户识别模块(subscriber identity module,SIM)卡电连接。外设接口110可以被用来将上述外部的输入/输出外围设备耦接到处理器101和存储器103。The peripheral interface 110 is used to provide various interfaces for external input / output devices (such as a keyboard, a mouse, an external display, an external memory, a user identification module card, etc.). For example, it is connected to a mouse through a universal serial bus interface, and is electrically connected to a subscriber identity module (SIM) card provided by a telecommunications operator through a metal contact on a card slot of the subscriber identity module. The peripheral interface 110 may be used to couple the above-mentioned external input / output peripherals to the processor 101 and the memory 103.
手机100还可以包括给各个部件供电的电源装置111(比如电池和电源管理芯片),电池可以通过电源管理芯片与处理器101逻辑相连,从而通过电源装置111实现管理充电、放电、以及功耗管理等功能。The mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) for supplying power to various components. The battery may be logically connected to the processor 101 through the power management chip, so as to manage charging, discharging, and power consumption management through the power supply device 111. And other functions.
尽管图1未示出,手机100还可以包括摄像头、闪光灯、微型投影装置、近场通信(near field communication,NFC)装置等,在此不予赘述。Although not shown in FIG. 1, the mobile phone 100 may further include a camera, a flash, a micro-projection device, a near field communication (NFC) device, and the like, and details are not described herein.
在本申请实施例中,手机100中还可以包括红外装置112,手机100通过红外装置112可将任意二进制编码信息转化为红外信号发射出来。例如,手机100与被控设备(例如电视)可预先存储:二进制编码“0101”(也可称为红外码值)所对应的红外信号用于控制被控设备的电源。那么,当用户希望关闭或打开被控设备的电源时,手机100可通过红外装置112向被控设备发送与红外码值“0101”对应的红外信号。这样,被控设备解析出与该红外信号对应的红外码值后,可执行与该红外码值对应的开机或关机操作。In the embodiment of the present application, the mobile phone 100 may further include an infrared device 112, and the mobile phone 100 may convert any binary coded information into an infrared signal and transmit the infrared signal through the infrared device 112. For example, the mobile phone 100 and the controlled device (such as a television) may store in advance: an infrared signal corresponding to the binary code “0101” (also referred to as an infrared code value) is used to control the power of the controlled device. Then, when the user wishes to turn off or on the power of the controlled device, the mobile phone 100 may send an infrared signal corresponding to the infrared code value “0101” to the controlled device through the infrared device 112. In this way, after the controlled device parses out the infrared code value corresponding to the infrared signal, it can perform a startup or shutdown operation corresponding to the infrared code value.
在本申请实施例中,手机100还可通过蓝牙装置105或Wi-Fi装置107与被控设备(例如电视)建立无线连接。示例性的,手机100与电视200中均设有蓝牙装置,如图2所示,手机100和电视200开启蓝牙功能后,手机100内的处理器101可通过蓝牙装置105与电视200配对和连接,从而在手机100与电视200之间建立蓝牙连接。In the embodiment of the present application, the mobile phone 100 may also establish a wireless connection with a controlled device (such as a TV) through the Bluetooth device 105 or the Wi-Fi device 107. Exemplarily, a Bluetooth device is provided in both the mobile phone 100 and the TV 200. As shown in FIG. 2, after the mobile phone 100 and the TV 200 have the Bluetooth function turned on, the processor 101 in the mobile phone 100 can be paired and connected with the TV 200 through the Bluetooth device 105 To establish a Bluetooth connection between the mobile phone 100 and the TV 200.
进而,手机100内的处理器101可创建一个用于控制电视200的虚拟遥控器201,并将该虚拟遥控器201显示在手机100的触摸屏104中。仍如图2所示,该虚拟遥控器201中可包括音量加减按键、频道切换按键、菜单按键以及电源键202等按键。用户点击虚拟遥控器201中相应的按键后,手机100可将该按键对应的蓝牙码值通过蓝牙连接发送给电视200。电视200对接收到的蓝牙码值解析后,便可确定出用户点击的具体是哪一个按键,进而执行与该按键对应的操作。Further, the processor 101 in the mobile phone 100 may create a virtual remote control 201 for controlling the television 200 and display the virtual remote control 201 on the touch screen 104 of the mobile phone 100. As still shown in FIG. 2, the virtual remote control 201 may include buttons such as volume up and down buttons, channel switching buttons, menu buttons, and power button 202. After the user clicks a corresponding button in the virtual remote control 201, the mobile phone 100 can send the Bluetooth code value corresponding to the button to the TV 200 through a Bluetooth connection. After the TV 200 parses the received Bluetooth code value, it can determine which button the user clicked, and then perform the operation corresponding to the button.
其中,虚拟遥控器201中各个按键所对应的蓝牙码值可以是手机100或电视200预先 存储的。例如,对于支持蓝牙功能的电视,可统一基于HID(Human Interface Device,人机交互设备)协议或HOGP(HID Over GATT Profile)协议预先存储手机100与电视200之间交互时各个按键所对应的蓝牙码值。当手机100与电视200配对或连接成功后,手机100或电视200可将各个按键与蓝牙码值之间的对应关系发送给对方。The Bluetooth code value corresponding to each key in the virtual remote control 201 may be stored in advance by the mobile phone 100 or the television 200. For example, for TVs that support the Bluetooth function, the HID (Human Interface) device protocol or the HOGP (HID Over GATT Profile) protocol can be unified to pre-store the Bluetooth corresponding to each key when the mobile phone 100 and the TV 200 interact. Code value. After the mobile phone 100 and the TV 200 are paired or connected successfully, the mobile phone 100 or the TV 200 may send the corresponding relationship between each key and the Bluetooth code value to the other party.
当用户第一次使用上述电源键202,或手机100第一次创建上述电源键202时,手机100可以向电视200发送蓝牙测试信号,还可以向电视200发送红外测试信号。如果电视200能够响应蓝牙测试信号,说明电视200的电源是由蓝牙信号控制的,则手机100可将该蓝牙测试信号与电源键202之间的第一对应关系保存下来。后续当检测到用户点击电源键202时,手机100可根据该第一对应关系向电视200发送对应的蓝牙测试信号以控制电视200休眠或唤醒。相应的,如果电视200能够响应红外测试信号,说明电视200的电源是由红外信号控制的,则手机100可将该红外测试信号与电源键202之间的第二对应关系保存下来。后续当检测到用户点击电源键202时,手机100可根据该第二对应关系向电视200发送对应的红外测试信号以控制电视200的电源。When the user uses the power button 202 for the first time or the mobile phone 100 creates the power button 202 for the first time, the mobile phone 100 may send a Bluetooth test signal to the TV 200 and may also send an infrared test signal to the TV 200. If the TV 200 can respond to the Bluetooth test signal, indicating that the power of the TV 200 is controlled by the Bluetooth signal, the mobile phone 100 can save the first correspondence between the Bluetooth test signal and the power key 202. Subsequently, when it is detected that the user clicks the power button 202, the mobile phone 100 may send a corresponding Bluetooth test signal to the TV 200 according to the first correspondence relationship to control the TV 200 to sleep or wake up. Correspondingly, if the television 200 is capable of responding to the infrared test signal, indicating that the power of the television 200 is controlled by the infrared signal, the mobile phone 100 may save the second correspondence between the infrared test signal and the power key 202. Subsequently, when it is detected that the user clicks the power button 202, the mobile phone 100 may send a corresponding infrared test signal to the TV 200 according to the second correspondence relationship to control the power of the TV 200.
也就是说,无论是由红外信号控制电源的蓝牙电视,还是由蓝牙信号控制电源的蓝牙电视,手机100均可创建出相应的电源键202控制蓝牙电视的电源,使得手机100生成的虚拟遥控器能够兼容市面上不同电源键种类的蓝牙电视,提高用户的操作体验。In other words, whether it is a Bluetooth TV controlled by an infrared signal or a Bluetooth TV controlled by a Bluetooth signal, the mobile phone 100 can create a corresponding power button 202 to control the power of the Bluetooth TV, so that the virtual remote control generated by the mobile phone 100 It can be compatible with different types of Bluetooth TVs on the market, improving the user's operating experience.
示例性地,可以在手机100的存储器103存储
Figure PCTCN2018088908-appb-000003
操作系统,该操作系统是一个以Linux为基础的移动设备操作系统,并结合手机100中的上述硬件实现各种各样的功能。下面,将详细说明该存储的
Figure PCTCN2018088908-appb-000004
操作系统的软件架构。需要说明的是,本申请实施例仅以
Figure PCTCN2018088908-appb-000005
操作系统为示例来说明终端要实现本实施例的技术方案的所需的软件环境,本领域技术人员可以理解,本申请实施例也可以以其它操作系统来实现,例如IOS操作系统。
Exemplarily, it may be stored in the memory 103 of the mobile phone 100
Figure PCTCN2018088908-appb-000003
An operating system, which is a Linux-based operating system for mobile devices, and implements various functions in combination with the above-mentioned hardware in the mobile phone 100. Below, the details of the storage
Figure PCTCN2018088908-appb-000004
Software architecture of the operating system. It should be noted that the embodiments of this application are only based on
Figure PCTCN2018088908-appb-000005
The operating system is taken as an example to describe the software environment required by the terminal to implement the technical solution of this embodiment. Those skilled in the art can understand that the embodiments of the present application can also be implemented by other operating systems, such as the IOS operating system.
示例性地,图3是一种可以运行在上述终端中的
Figure PCTCN2018088908-appb-000006
操作系统的软件架构示意图。该软件架构可以分为四层,分别为应用程序层,应用程序框架层,函数库层和Linux内核层。
Exemplarily, FIG. 3 is a kind of
Figure PCTCN2018088908-appb-000006
Software architecture diagram of the operating system. The software architecture can be divided into four layers: application layer, application framework layer, function library layer and Linux kernel layer.
1、应用程序层(Applications)1.Applications
应用程序层是操作系统的最上一层,包括操作系统的原生应用程序,例如电子邮件客户端、短信、通话、日历、浏览器、联系人等。当然,对于开发者来说,开发者可以编写应用程序并安装到该层。The application layer is the top layer of the operating system and includes the native applications of the operating system, such as email clients, text messages, calls, calendars, browsers, contacts, and so on. Of course, for developers, developers can write applications and install to this layer.
一般而言,应用程序是使用Java语言开发,通过调用应用程序框架层所提供的应用程序编程接口(application programming interface,API)来完成。Generally speaking, an application program is developed using the Java language and is completed by calling an application programming interface (API) provided by an application framework layer.
2、应用程序框架层(Application Framework)2. Application Framework layer
应用程序框架层主要是为开发者提供了可以访问应用程序所使用的各种API,开发者可以通过应用程序框架来与操作系统的底层(例如函数库、Linux内核等)进行交互,开发自己的应用程序。该应用程序框架主要是Android操作系统的一系列的服务和管理系统。应用程序框架主要包括如下基础服务:The application framework layer mainly provides developers with access to various APIs used by applications. Developers can use the application framework to interact with the bottom layer of the operating system (such as function libraries, Linux kernels, etc.) and develop their own application. The application framework is mainly a series of service and management systems for the Android operating system. The application framework mainly includes the following basic services:
活动管理器(Activity Manager):用来管理应用程序生命周期并提供常用的导航回退功能;Activity Manager (Activity Manager): used to manage the application life cycle and provide common navigation fallback functions;
内容提供器(Content Providers):用来管理不同应用程序间的数据共享和访问;Content providers (Content providers): used to manage data sharing and access between different applications;
通知管理器(Notification Manager):用于控制应用程序在状态栏、锁屏界面等显示提示信息(例如警告(Alerts)、通知(Notifications)等)给用户;Notification Manager: Used to control the application to display prompt information (such as Alerts, Notifications, etc.) to the user in the status bar, lock screen, etc .;
剪贴板管理器(Clipboard Manager):主要提供应用程序内部或者应用程序之间的复制或粘贴功能;Clipboard Manager: mainly provides copy or paste functions within or between applications;
视图(View):具有丰富的、可扩展的视图集合,可用于构建一个应用程序。它具体包括列表(list)、网格(grid)、文本(text)、按钮(button),以及图片(image)等多种类型。View: A rich and extensible collection of views that can be used to build an application. It specifically includes many types such as list, grid, text, button, and image.
位置管理器(Location Manager):主要是让应用程序可以访问到终端所处的地理位置。Location Manager (Location Manager): mainly allows applications to access the geographic location of the terminal.
3、函数库层(Libraries)3.Libraries
函数库层是应用程序框架的支撑,是连接应用程序框架层与Linux内核层的重要纽带。函数库层包括一些由计算机程序C语言或C++语言编译的函数库,这些函数库能被操作系统中的不同的组件使用,它们通过应用程序框架层为开发者提供服务。具体地,函数库可以包括libc函数库,它是专门为基于embedded linux的设备定制的;函数库还可以包括多媒体库(Media Framework),该库支持多种编码格式的音频或视频的回放和录制,同时支持静态图像文件,以及常见的音频或视频编码格式。函数库还包括界面管理库(Surface Manager),主要负责管理针对显示系统的访问,具体用于在执行多个应用程序时候,负责管理显示与存取操作间的互动,另外也负责2D绘图与3D绘图进行显示合成。The function library layer is the support of the application framework and an important link between the application framework layer and the Linux kernel layer. The function library layer includes some function libraries compiled by the computer program C or C ++. These function libraries can be used by different components in the operating system. They provide services to developers through the application framework layer. Specifically, the function library may include a libc function library, which is specially customized for embedded Linux-based devices; the function library may also include a multimedia library (Media Framework), which supports playback and recording of audio or video in multiple encoding formats , While supporting still image files, as well as common audio or video encoding formats. The function library also includes an interface management library (Surface Manager), which is mainly responsible for managing access to the display system. It is specifically used to manage the interaction between display and access operations when executing multiple applications. It is also responsible for 2D drawing and 3D Drawings are composited for display.
函数库层中还可以包括其他的用于实现手机各个功能的函数库,例如:SGL(Scalable Graphics Library):基于XML(Extensible Markup Language)文件的2D图形图像处理引擎;SSL(Secure Sockets Layer):位于TVP/IP协议与各种应用层协议之间,为数据通讯提供支持;OpenGL/ES:3D效果的支持;SQLite:关系型数据库引擎;Webkit:Web浏览器引擎;FreeType:位图及矢量字体支持;等等。The function library layer can also include other function libraries used to implement various functions of the mobile phone, such as: SGL (Scalable Graphics Library): 2D graphic image processing engine based on XML (Extensible Markup Language) files; SSL (Secure Sockets Layer): It is located between the TVP / IP protocol and various application layer protocols to provide data communication support; OpenGL / ES: support for 3D effects; SQLite: relational database engine; Webkit: Web browser engine; FreeType: bitmap and vector font Support; wait.
Android Runtime是一种在
Figure PCTCN2018088908-appb-000007
操作系统上的运行环境,是
Figure PCTCN2018088908-appb-000008
操作系统所使用的一种新的虚拟机。在Android Runtime中,采用AOT(Ahead-Of-Time)技术,应用程序在第一次安装的时候,该应用程序的字节码就会被预先编译成机器码,让应用程序成为真正的本地应用,之后再次运行,就省去了编译这一步骤,启动和执行都会变得更加快速。
Android Runtime is a
Figure PCTCN2018088908-appb-000007
The operating environment on the operating system is
Figure PCTCN2018088908-appb-000008
A new type of virtual machine used by the operating system. In Android Runtime, AOT (Ahead-Of-Time) technology is used. When an application is first installed, the bytecode of the application is pre-compiled into machine code, making the application a real native application. , And then run it again, the compilation step is omitted, and startup and execution will become faster.
在本申请其它一些实施例中,Android Runtime也可以由核心函数库(Core Libraries)和Dalvik虚拟机(Dalvik Virtual Machine)代替。核心函数库提供了Java语言API中的大多数功能,主要通过Java原生界面(Java native interface,JNI)的方式向应用程序框架层提供调用底层程序库的接口。同时也包含了该操作系统的一些核心API,如android.os、android.net、android.media等等。Dalvik虚拟机使用一种JIT(Just-in-Time)的运行时编译的机制,每次启动一个进程都需要虚拟机在后台重新编译字节码,会对启动速度有一定的影响。每一个应用程序都运行在是一个Dalvik虚拟机中的实例中,每一个Dalvik虚拟机实例都是一个独立的进程空间。Dalvik虚拟机设计成在一个设备可以高效地运行多个虚拟机。Dalvik虚拟机可执行文件格式是.dex,dex格式是专为Dalvik设计的一种压缩格式,适合内存和处理器速度有限的系统。需要提出的是Dalvik虚拟机依赖于Linux内核提供基本功能(线程、底层内存管理)。可以理解的是,Android Runtime、Dalvik属于不同类型的虚拟机,本领域技术人员可以在不同情况下选用不同形式的虚拟机。In some other embodiments of the present application, the Android Runtime may also be replaced by a core function library (Core Libraries) and a Dalvik virtual machine (Dalvik Virtual Machine). The core function library provides most of the functions of the Java language API, and mainly provides the interface of the underlying program library to the application framework layer through the Java native interface (JNI). It also includes some core APIs of the operating system, such as android.os, android.net, android.media, and so on. The Dalvik virtual machine uses a JIT (Just-in-Time) runtime compilation mechanism. Each time a process is started, the virtual machine needs to recompile the bytecode in the background, which will have a certain impact on the startup speed. Each application runs in an instance of a Dalvik virtual machine, and each Dalvik virtual machine instance is an independent process space. Dalvik virtual machines are designed to efficiently run multiple virtual machines on one device. Dalvik virtual machine executable file format is .dex, dex format is a compression format designed for Dalvik, suitable for systems with limited memory and processor speed. What needs to be mentioned is that the Dalvik virtual machine relies on the Linux kernel to provide basic functions (threads, underlying memory management). It can be understood that Android Runtime and Dalvik belong to different types of virtual machines, and those skilled in the art can select different forms of virtual machines in different situations.
4、Linux内核层(Linux Kernel)4.Linux Kernel Layer (Linux Kernel)
该层提供操作系统的核心系统服务,如安全性、内存管理、进程管理、网络协议栈和驱动模型等都基于Linux内核。Linux内核同时也作为硬件和软件栈之间的抽象层。该层有许多与移动设备相关的驱动程序,主要的驱动有:显示驱动;基于Linux的帧缓冲驱动;作为输入设备的键盘驱动;基于内存技术设备的Flash驱动;照相机驱动;蓝牙驱动;Wi-Fi驱动;USB驱动等。This layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack, and driver model, etc., all based on the Linux kernel. The Linux kernel also acts as an abstraction layer between the hardware and software stacks. This layer has many drivers related to mobile devices. The main drivers are: display driver; Linux-based frame buffer driver; keyboard driver as input device; Flash driver based on memory technology device; camera driver; Bluetooth driver; Wi- Fi driver; USB driver, etc.
在本申请实施例中,应用程序层中还包括能够模拟实际遥控器的遥控类APP(application),例如,万能遥控APP、智能遥控APP以及遥控精灵APP等。并且,应用程序框架层中还设置有智能遥控服务,该智能遥控服务可向上述遥控类APP开放接口。以万能遥控APP举例,万能遥控APP可通过相应的API调用上述智能遥控服务发送配对广播,例如BLE(bluetooth low energy,蓝牙低功耗)配对广播。蓝牙电视接收到该配对广播后可与安装该万能遥控APP的终端配对并建立蓝牙连接。In the embodiment of the present application, the application layer further includes a remote control APP (application) capable of simulating an actual remote control, for example, a universal remote control APP, a smart remote control APP, and a remote control smart app. In addition, an intelligent remote control service is also provided in the application program framework layer, and the intelligent remote control service can open an interface to the remote control APP described above. Taking the universal remote control APP as an example, the universal remote control APP can call the above-mentioned intelligent remote control service to send a paired broadcast through a corresponding API, such as a BLE (bluetooth low energy) paired broadcast. After receiving the pairing broadcast, the Bluetooth TV can pair with the terminal installed with the universal remote control APP and establish a Bluetooth connection.
进而,万能遥控APP在创建虚拟遥控器中的电源键时,可通过上述智能遥控服务先调用Linux内核层中的蓝牙驱动向蓝牙电视发送蓝牙测试信号,如果蓝牙电视能够响应该蓝牙测试信号,说明蓝牙电视的电源是由蓝牙信号控制的,则万能遥控APP可将该蓝牙测试信号与电源键之间的第一对应关系保存下来。如果蓝牙电视不能响应该蓝牙测试信号,万能遥控APP可通过上述智能遥控服务调用红外驱动向蓝牙电视发送红外测试信号。如果蓝牙电视能够响应该红外测试信号,说明蓝牙电视的电源是由红外信号控制的,则万能遥控APP可将该红外测试信号与电源键之间的第二对应关系保存下来。Furthermore, when the universal remote control APP creates the power button in the virtual remote control, it can first call the Bluetooth driver in the Linux kernel layer to send a Bluetooth test signal to the Bluetooth TV through the intelligent remote control service. If the Bluetooth TV can respond to the Bluetooth test signal, The power of the Bluetooth TV is controlled by the Bluetooth signal, so the universal remote control APP can save the first correspondence between the Bluetooth test signal and the power button. If the Bluetooth TV cannot respond to the Bluetooth test signal, the universal remote control app can call the infrared driver to send an infrared test signal to the Bluetooth TV through the intelligent remote control service. If the Bluetooth TV can respond to the infrared test signal, it indicates that the power of the Bluetooth TV is controlled by the infrared signal, and the universal remote control APP can save the second correspondence between the infrared test signal and the power key.
这样,用户在使用万能遥控APP中的虚拟遥控器时,如果检测到用户点击虚拟遥控器中的电源键,万能遥控APP可以根据已经确定的上述第一对应关系或第二对应关系,向蓝牙电视发送对应的蓝牙测试信号或红外测试信号来控制蓝牙电视的电源,避免出现万能遥控APP无法兼容由红外信号控制电源的蓝牙电视和由蓝牙信号控制电源的蓝牙电视的情况。In this way, when the user uses the virtual remote control in the universal remote control APP, if it is detected that the user clicks the power button in the virtual remote control, the universal remote control app can send the Bluetooth remote control to the Bluetooth TV according to the determined first or second correspondence. Send the corresponding Bluetooth test signal or infrared test signal to control the power of the Bluetooth TV, to avoid the situation that the universal remote control APP cannot be compatible with the Bluetooth TV controlled by the infrared signal and the Bluetooth TV controlled by the Bluetooth signal.
需要说明的是,本申请实施例中均以具有蓝牙功能的蓝牙电视举例说明,可以理解的是,本申请实施例提供的虚拟遥控器中电源键的控制方法可应用于具有无线通信功能的任意被控设备,例如,具有Wi-Fi功能的空调、具有NFC功能的冰箱等,本申请实施例对此不做任何限制。It should be noted that in the embodiments of the present application, a Bluetooth TV with a Bluetooth function is used as an example. It can be understood that the method for controlling a power button in a virtual remote control provided in the embodiments of the present application can be applied to any wireless communication function. The controlled device, for example, an air conditioner with a Wi-Fi function, a refrigerator with an NFC function, etc., is not limited in this embodiment of the present application.
为了便于理解,以下结合附图对本申请实施例提供的一种虚拟遥控器中电源键的控制方法进行具体介绍。以下实施例中均以手机作为终端,以蓝牙电视作为手机的被控设备进行举例说明。In order to facilitate understanding, a method for controlling a power key in a virtual remote controller provided by an embodiment of the present application is described in detail below with reference to the accompanying drawings. In the following embodiments, a mobile phone is used as a terminal, and a Bluetooth TV is used as a controlled device of the mobile phone for example.
图4为本申请实施例提供的一种虚拟遥控器中电源键的控制方法的流程示意图。如图4所示,该虚拟遥控器中电源键的控制方法可以包括:FIG. 4 is a schematic flowchart of a method for controlling a power key in a virtual remote controller according to an embodiment of the present application. As shown in FIG. 4, the method for controlling the power button in the virtual remote control may include:
S401、手机与蓝牙电视建立蓝牙连接。S401. The mobile phone establishes a Bluetooth connection with the Bluetooth TV.
当用户希望在手机上创建能够控制蓝牙电视的虚拟遥控器时,可以打开手机中安装的万能遥控APP或遥控精灵APP等遥控类APP。以万能遥控APP举例,如图5所示,用户首次打开万能遥控APP后,手机会显示万能遥控APP的设备选择界面501。该设备选择界面501中可包括多种类型的被控设备,例如,蓝牙电视502、普通电视(即红外电视)、空调、机顶盒以及投影仪等。用户可以在设备选择界面501中选中希望控制的具体被控设备。When a user wants to create a virtual remote control capable of controlling a Bluetooth TV on a mobile phone, he can open a remote control APP such as a universal remote control app or a remote control smart app installed in the mobile phone. Take the universal remote control app as an example. As shown in FIG. 5, after the user opens the universal remote control app for the first time, the mobile phone will display the device selection interface 501 of the universal remote control app. The device selection interface 501 may include various types of controlled devices, such as a Bluetooth TV 502, an ordinary TV (that is, an infrared TV), an air conditioner, a set-top box, and a projector. The user can select the specific controlled device that he / she wants to control in the device selection interface 501.
例如,如果检测到用户点击设备选择界面501中的蓝牙电视502,说明用户希望在手机上创建能够控制蓝牙电视的虚拟遥控器。此时,如图6所示,手机可跳转至万能遥控APP的品牌选择界面601,该品牌选择界面601中包括蓝牙电视的多种品牌,用户可以在品牌选择界面601中选择希望控制的蓝牙电视的具体品牌。当然,上述品牌选择界面601中还可以包括每种品牌下蓝牙电视的多个型号,这样用户可以在品牌选择界面601中选择某一品牌的某一具体型号的蓝牙电视。For example, if it is detected that the user clicks on the Bluetooth TV 502 in the device selection interface 501, it indicates that the user wishes to create a virtual remote control capable of controlling the Bluetooth TV on the mobile phone. At this time, as shown in FIG. 6, the mobile phone can jump to the brand selection interface 601 of the universal remote control app. The brand selection interface 601 includes multiple brands of Bluetooth TVs. The user can select the Bluetooth that he wishes to control in the brand selection interface 601. The specific brand of TV. Of course, the above-mentioned brand selection interface 601 may also include multiple models of Bluetooth TVs under each brand, so that the user can select a specific model of a Bluetooth TV of a certain brand in the brand selection interface 601.
例如,如果检测到用户点击品牌选择界面601中的“长虹”这一品牌,说明当前用户希望通过手机控制长虹牌的蓝牙电视。此时,万能遥控APP可调用应用程序框架层中的智能遥控服务发送BLE配对广播,同时,如图7中的(a)所示,手机可提示用户在被控设备(即蓝牙电视)中打开蓝牙功能。例如,用户可以使用蓝牙电视的实体遥控器打开蓝牙电视的蓝牙功能,进入发现蓝牙设备的搜索界面。这样,蓝牙电视通过蓝牙功能搜索附近的蓝牙设备时,可接收到手机发送的BLE配对广播,此时蓝牙电视显示的搜索列表中包括手机。进而,用户从蓝牙电视显示的搜索列表中选中手机后,如图7中的(b)所示,蓝牙电视向手机发起配对,并在蓝牙电视上显示配对码。当用户向手机中输入该配对码后开始配对,配对成功后建立手机与蓝牙电视之间的蓝牙连接。For example, if it is detected that the user clicks on the brand "Changhong" in the brand selection interface 601, it means that the current user wants to control the Changhong brand Bluetooth TV through a mobile phone. At this time, the universal remote control APP can call the intelligent remote control service in the application framework layer to send a BLE paired broadcast. At the same time, as shown in (a) of Figure 7, the mobile phone can prompt the user to open in the controlled device (that is, the Bluetooth TV) Bluetooth function. For example, the user can use the physical remote control of the Bluetooth TV to turn on the Bluetooth function of the Bluetooth TV and enter the search interface for discovering Bluetooth devices. In this way, when the Bluetooth TV searches for nearby Bluetooth devices through the Bluetooth function, it can receive the BLE pairing broadcast sent by the mobile phone. At this time, the search list displayed by the Bluetooth TV includes the mobile phone. Further, after the user selects the mobile phone from the search list displayed by the Bluetooth TV, as shown in FIG. 7 (b), the Bluetooth TV initiates pairing to the mobile phone, and displays a pairing code on the Bluetooth TV. When the user enters the pairing code into the mobile phone and starts pairing, the Bluetooth connection between the mobile phone and the Bluetooth TV is established after the pairing is successful.
当蓝牙电视与手机首次配对成功后,手机可以保存成功配对的蓝牙电视的媒体介入控制层(media access control,MAC)地址。这样,后续手机需要再次与蓝牙电视建立蓝牙连接时,可根据该MAC地址与蓝牙电视建立蓝牙连接,此时无需进行配对过程。After the Bluetooth TV and the mobile phone are successfully paired for the first time, the mobile phone can save the media access control (MAC) address of the successfully paired Bluetooth TV. In this way, when a subsequent mobile phone needs to establish a Bluetooth connection with the Bluetooth TV again, a Bluetooth connection can be established with the Bluetooth TV according to the MAC address, and no pairing process is required at this time.
另外,手机内可预先存储有多组虚拟遥控器中各个按键与蓝牙码值之间的对应关系。例如,在空鼠操作模式下虚拟遥控器的各个按键与相应的蓝牙码值之间具有对应关系1,在按键操作模式下虚拟遥控器的各个按键与相应的蓝牙码值之间具有对应关系2,在手势操作模式下虚拟遥控器的各个按键与相应的蓝牙码值之间具有对应关系3。In addition, the correspondence relationship between each key in multiple sets of virtual remote controls and the Bluetooth code value can be stored in the mobile phone in advance. For example, in the air mouse operation mode, there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 1; in the key operation mode, there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 2 , In the gesture operation mode, there is a corresponding relationship between each key of the virtual remote control and the corresponding Bluetooth code value 3.
由于蓝牙电视无法获知用户将使用哪一种操作模式操作虚拟遥控器,因此,手机与蓝牙电视建立蓝牙连接后,手机可在上述多组对应关系中选择一个发送给蓝牙电视。例如,如果手机默认创建按键操作模式的虚拟遥控器,则手机可将上述对应关系2发送给蓝牙电视;又例如,如果检测到用户手动将虚拟遥控器设置为空鼠操作模式,则手机可将上述对应关系1发送给蓝牙电视。这样,蓝牙电视后续如果接收到手机发送的某个蓝牙码值,可根据接收到的对应关系确定出用户触发的具体按键,进而执行与该按键对应的控制指令,例如,开/关电源、切换频道等。Since the Bluetooth TV cannot know which operation mode the user will use to operate the virtual remote control, after the mobile phone establishes a Bluetooth connection with the Bluetooth TV, the mobile phone may select one of the above-mentioned multiple correspondences and send it to the Bluetooth TV. For example, if the mobile phone creates a virtual remote control with a key operation mode by default, the mobile phone can send the above correspondence 2 to a Bluetooth TV; for example, if it is detected that the user manually sets the virtual remote control to an air mouse operation mode, the mobile phone can The above correspondence 1 is sent to the Bluetooth TV. In this way, if the Bluetooth TV subsequently receives a certain Bluetooth code value sent by the mobile phone, it can determine the specific key triggered by the user according to the received correspondence, and then execute the control command corresponding to the key, such as power on / off, switching Channels, etc.
或者,蓝牙电视中也可预先存储上述多组虚拟遥控器中各个按键与蓝牙码值之间的对应关系,并且,每组对应关系都具有唯一的标识。那么,手机与蓝牙电视建立蓝牙连接后,手机可将选择出的某一组对应关系的标识发送给蓝牙电视,使得蓝牙电视后续可按照与该标识对应的对应关系解析手机发送的蓝牙码值。当然,手机与蓝牙电视建立蓝牙连接后,也可蓝牙电视从上述多组对应关系中选择一个,并将选择的对应关系或对应关系的标识发送给手机。进而手机可按照该对应关系创建对应操作模式的虚拟遥控器,本申请实施例对此不做任何限制。Alternatively, the correspondence relationship between each key of the multiple groups of virtual remote controllers described above and the Bluetooth code value may also be stored in the Bluetooth TV, and each group correspondence has a unique identifier. Then, after the mobile phone establishes a Bluetooth connection with the Bluetooth TV, the mobile phone can send a selected group of corresponding identifications to the Bluetooth TV, so that the Bluetooth TV can subsequently analyze the Bluetooth code value sent by the mobile phone according to the corresponding relationship corresponding to the identification. Of course, after the mobile phone establishes a Bluetooth connection with the Bluetooth TV, the Bluetooth TV may also select one of the above-mentioned multiple sets of correspondences, and send the selected correspondence or the identifier of the correspondence to the mobile phone. Furthermore, the mobile phone can create a virtual remote controller corresponding to the operation mode according to the corresponding relationship, and this embodiment of the present application does not place any restrictions on this.
又或者,手机与蓝牙电视也可以预先约定一组默认的虚拟遥控器中各个按键与蓝牙码值之间的对应关系,这样手机与蓝牙电视建立蓝牙连接后,无需再向蓝牙电视发送该对应关系。Alternatively, the correspondence relationship between the keys and the Bluetooth code value in a set of default virtual remote controllers can be agreed in advance between the mobile phone and the Bluetooth TV, so that after establishing a Bluetooth connection between the mobile phone and the Bluetooth TV, there is no need to send the correspondence to the Bluetooth TV .
其中,虚拟遥控器中各个按键的蓝牙码值可以是基于蓝牙协议定义的。由于蓝牙协议中规定的工作频段与红外信号的工作频段没有交叠,因此,如果虚拟遥控器中包括由红外信号控制的按键,则该按键对应的红外码值与该按键对应的蓝牙码值一般是不同的。例如,假设电源键对应的红外码值为“FF00”,电源键对应的蓝牙码值为“00FF”,且蓝牙电视的电源是由红外码值为“FF00”的红外信号控制的,即蓝牙电视接收到“FF00”的红外码值后才会触发蓝牙电视执行开/关电源的操作。此时,如果蓝牙电视接收到“00FF”的蓝牙码值,虽然该蓝牙码值与电源键对应,但蓝牙电视仍然无法执行开/关电源的操作。The Bluetooth code value of each key in the virtual remote control may be defined based on the Bluetooth protocol. Since the working frequency band specified in the Bluetooth protocol does not overlap with the working frequency band of the infrared signal, if the virtual remote control includes a key controlled by the infrared signal, the infrared code value corresponding to the key is generally the same as the Bluetooth code value corresponding to the key Is different. For example, suppose the infrared code value corresponding to the power key is "FF00", the Bluetooth code value corresponding to the power key is "00FF", and the power of the Bluetooth TV is controlled by the infrared signal with the infrared code value "FF00", that is, the Bluetooth TV After receiving the infrared code value of "FF00", the Bluetooth TV will trigger the power on / off operation. At this time, if the Bluetooth TV receives a Bluetooth code value of "00FF", although the Bluetooth code value corresponds to the power button, the Bluetooth TV still cannot perform the operation of turning on / off the power.
S402、手机显示待创建的虚拟遥控器中电源键的测试界面。S402. The mobile phone displays a test interface of a power key in the virtual remote controller to be created.
手机与蓝牙电视建立蓝牙连接后,由于用户已经在上述设备选择界面501中选择了蓝牙电视502这一选项,因此手机可以确定出当前蓝牙连接的对端为蓝牙电视。蓝牙电视的遥控器中大多数按键都是通过发出蓝牙信号控制蓝牙电视的相关功能。但控制蓝牙电视电源的电源键可能发出的是蓝牙信号,也可能发出的是红外信号,这是由蓝牙电视的厂商决定的。After the mobile phone establishes a Bluetooth connection with the Bluetooth TV, since the user has selected the option of the Bluetooth TV 502 in the above device selection interface 501, the mobile phone can determine that the opposite end of the current Bluetooth connection is a Bluetooth TV. Most of the keys on the remote control of a Bluetooth TV control the related functions of the Bluetooth TV by sending out a Bluetooth signal. However, the power button that controls the power of the Bluetooth TV may send out a Bluetooth signal or an infrared signal, which is determined by the manufacturer of the Bluetooth TV.
因此,在手机中创建该蓝牙电视的电源键时,手机可以先测试用于控制蓝牙电视电源的具体信号。示例性的,如图8所示,手机可显示待创建的虚拟遥控器中电源键的测试界面801,测试界面801中包括待测试的电源键802。手机可通过高亮、文字、动画或语音等形式提示用户点击电源键802,如果检测到用户点击电源键802,则手机可继续执行下述步骤S403-S406。Therefore, when the power button of the Bluetooth TV is created in the mobile phone, the mobile phone can first test the specific signal used to control the power of the Bluetooth TV. For example, as shown in FIG. 8, the mobile phone may display a test interface 801 of a power key in the virtual remote controller to be created, and the test interface 801 includes a power key 802 to be tested. The mobile phone may prompt the user to click the power button 802 in the form of highlighting, text, animation or voice. If it is detected that the user clicks the power button 802, the mobile phone may continue to perform the following steps S403-S406.
S403、响应于用户在测试界面中的输入,手机向蓝牙电视发送蓝牙测试信号。S403. In response to a user input in the test interface, the mobile phone sends a Bluetooth test signal to the Bluetooth TV.
其中,上述蓝牙测试信号包括与电源键对应的蓝牙码值。The Bluetooth test signal includes a Bluetooth code value corresponding to a power button.
具体的,如果手机检测到用户点击上述测试界面中的电源键802,则手机可通过上述蓝牙连接将与电源键802对应的蓝牙码值发送给蓝牙电视。这样,手机可以根据蓝牙电视的响应情况确定出蓝牙电视的电源是否是由蓝牙信号控制的。Specifically, if the mobile phone detects that the user clicks the power button 802 in the test interface, the mobile phone may send the Bluetooth code value corresponding to the power button 802 to the Bluetooth TV through the Bluetooth connection. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the Bluetooth signal according to the response of the Bluetooth TV.
仍如图8所示,为了使得手机能够获知蓝牙电视的响应情况,手机可在测试界面801中设置正确响应的按钮803以及没有正确响应的按钮804。如果检测到用户点击按钮803,则手机可确定蓝牙电视能够正确响应上述蓝牙测试信号,说明该蓝牙电视的电源是由蓝牙信号控制的,此时手机可继续执行下述步骤S404以创建虚拟遥控器。如果检测到用户点击按钮804,则手机可确定蓝牙电视无法正确响应上述蓝牙测试信号,说明该蓝牙电视的电源不是由蓝牙信号控制的,此时手机可通过执行下述步骤S405-S406进一步测试控制蓝牙电视电源的具体信号。Still shown in FIG. 8, in order to enable the mobile phone to know the response status of the Bluetooth TV, the mobile phone can set a button 803 that responds correctly and a button 804 that does not respond correctly in the test interface 801. If it is detected that the user clicks the button 803, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, indicating that the power of the Bluetooth TV is controlled by the Bluetooth signal. At this time, the mobile phone can continue to perform the following step S404 to create a virtual remote control. . If it is detected that the user clicks the button 804, the mobile phone can determine that the Bluetooth TV cannot properly respond to the above Bluetooth test signal, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. At this time, the mobile phone can further test and control by performing the steps S405-S406 Specific signal for Bluetooth TV power.
又或者,如图9所示,为上述测试界面801的另一种设计方式,其中,测试界面801中仍包括电源键802。不同的是,手机除了提示用户点击电源键802之外,还可提示用户在蓝牙电视不能正确响应时再次点击电源键802。那么,如果在用户点击电源键802后的预设时间内没有检测到用户点击电源键802,则手机可确定蓝牙电视能够正确响应上述蓝牙测试信号。如果在用户点击电源键802后的预设时间内检测到用户点击了电源键802,则手机可确定蓝牙电视无法正确响应上述蓝牙测试信号。Alternatively, as shown in FIG. 9, it is another design manner of the foregoing test interface 801, wherein the test interface 801 still includes a power key 802. The difference is that in addition to prompting the user to click the power button 802, the mobile phone can also prompt the user to click the power button 802 again when the Bluetooth TV cannot respond properly. Then, if it is not detected that the user clicks the power button 802 within a preset time after the user clicks the power button 802, the mobile phone can determine that the Bluetooth TV can correctly respond to the above-mentioned Bluetooth test signal. If it is detected that the user clicks the power button 802 within a preset time after the user clicks the power button 802, the mobile phone can determine that the Bluetooth TV cannot respond to the above-mentioned Bluetooth test signal correctly.
又或者,在手机向蓝牙电视发送蓝牙测试信号之后,如果蓝牙电视能够根据该蓝牙测试信号中的蓝牙码值执行休眠或唤醒操作,即蓝牙电视能够正确响应上述蓝牙测试信号,则也可由蓝牙电视通过蓝牙连接向手机发送测试成功响应。当然,如果蓝牙电视无法根据 该蓝牙测试信号中的蓝牙码值执行休眠或唤醒操作,则也可由蓝牙电视通过蓝牙连接向手机发送测试失败响应。这样一来,如果手机接收到蓝牙电视发送的测试成功响应,则手机可确定蓝牙电视能够正确响应上述蓝牙测试信号,如果手机接没有收到蓝牙电视发送的测试成功响应或收到蓝牙电视发送的测试失败响应,则手机可确定蓝牙电视无法正确响应上述蓝牙测试信号。Or, after the mobile phone sends a Bluetooth test signal to the Bluetooth TV, if the Bluetooth TV can perform a sleep or wake-up operation according to the Bluetooth code value in the Bluetooth test signal, that is, the Bluetooth TV can correctly respond to the Bluetooth test signal, the Bluetooth TV can also be used. Send a successful test response to the phone via a Bluetooth connection. Of course, if the Bluetooth TV cannot perform the sleep or wake-up operation according to the Bluetooth code value in the Bluetooth test signal, the Bluetooth TV can also send a test failure response to the mobile phone through the Bluetooth connection. In this way, if the mobile phone receives a successful test response from the Bluetooth TV, the mobile phone can determine that the Bluetooth TV can correctly respond to the above Bluetooth test signal. If the mobile phone does not receive a successful test response from the Bluetooth TV or receives a Bluetooth TV If the test fails, the mobile phone can determine that the Bluetooth TV cannot properly respond to the Bluetooth test signal.
以创建按键操作模式下的虚拟遥控器举例,HID协议中已经定义了蓝牙键盘中各个按键的蓝牙码值,例如,电源键的蓝牙码值为0x66,音量“+”键的蓝牙码值为“0x80”,音量“-”键的蓝牙码值为“0x81”。其中,HID协议中还规定了每个蓝牙码值以8个字节(byte)的命令格式进行传输。这8个字节包括report[0]至report[7],每个字节由8个比特(bite)组成。例如,当report[0]=0x01时,用于指示用户按下了蓝牙键盘中的enter按键,当report[2]=0x66时,用于指示用户按下了蓝牙键盘中的电源按键。Taking the example of creating a virtual remote control in the key operation mode, the Bluetooth code value of each key in the Bluetooth keyboard has been defined in the HID protocol, for example, the Bluetooth code value of the power key is 0x66, and the Bluetooth code value of the volume "+" key is " 0x80 ", the Bluetooth code value of the volume"-"key is" 0x81 ". Among them, the HID protocol also stipulates that each Bluetooth code value is transmitted in a command format of 8 bytes. These 8 bytes include report [0] to report [7], and each byte consists of 8 bits (bite). For example, when report [0] = 0x01, it is used to indicate that the user has pressed the enter button in the Bluetooth keyboard, and when report [2] = 0x66, it is used to indicate that the user has pressed the power button in the Bluetooth keyboard.
在本申请实施例中,由于虚拟遥控器中的各个按键是蓝牙键盘中各个按键的子集,因此,手机可继续沿用上述HID协议规定的命令格式向蓝牙电视发送按键的码值。不同的是,由于虚拟遥控器中的按键数量较少,因此,手机只需使用report[0]至report[7]中的部分字节便可表示虚拟遥控器中各个按键的蓝牙码值。例如,手机可使用report[2]中的8个比特向蓝牙电视发送按键的蓝牙码值。In the embodiment of the present application, since each key in the virtual remote control is a subset of each key in the Bluetooth keyboard, the mobile phone can continue to send the code values of the keys to the Bluetooth TV using the command format specified by the HID protocol. The difference is that because the number of keys in the virtual remote control is small, the phone only needs to use some bytes in report [0] to report [7] to represent the Bluetooth code value of each key in the virtual remote control. For example, the mobile phone can use the 8 bits in report [2] to send the Bluetooth code value of the key to the Bluetooth TV.
以手机向蓝牙电视发送上述蓝牙测试信号为例,由于电源键的蓝牙码值0x66,因此,手机可通过蓝牙连接向蓝牙电视发送以下8个字节的命令格式:Take the mobile phone to send the above Bluetooth test signal to the Bluetooth TV as an example. Since the Bluetooth code value of the power button is 0x66, the mobile phone can send the following 8-byte command format to the Bluetooth TV through a Bluetooth connection:
byte[]report=new byte[8];byte [] report = new byte [8];
report[0]=0x00;report [0] = 0x00;
report[1]=0x00;report [1] = 0x00;
report[2]=0x66;report [2] = 0x66;
report[3]=0x00;report [3] = 0x00;
report[4]=0x00;report [4] = 0x00;
report[5]=0x00;report [5] = 0x00;
report[6]=0x00;report [6] = 0x00;
report[7]=0x00;report [7] = 0x00;
其中,report[2]的取值为0x66。这样,蓝牙电视接收到该蓝牙测试信号后,可根据report[2]的取值确定出用户当前触发的按键为电源键。那么,如果蓝牙电视的电源是由蓝牙码值0x66控制的,则可触发蓝牙电视执行休眠或唤醒操作。Among them, the value of report [2] is 0x66. In this way, after receiving the Bluetooth test signal, the Bluetooth TV can determine that the key currently triggered by the user is the power key according to the value of report [2]. Then, if the power of the Bluetooth TV is controlled by the Bluetooth code value 0x66, the Bluetooth TV can be triggered to perform a sleep or wake operation.
S404、若蓝牙电视正确响应上述蓝牙测试信号,则手机创建并显示虚拟遥控器,该虚拟遥控器中的电源键与该蓝牙测试信号具有第一对应关系。S404. If the Bluetooth TV correctly responds to the Bluetooth test signal, the mobile phone creates and displays a virtual remote control, and the power button in the virtual remote control has a first correspondence relationship with the Bluetooth test signal.
在步骤S404中,如果手机确定出蓝牙电视能够正确响应上述蓝牙测试信号,说明该蓝牙电视的电源是由蓝牙信号控制的。那么,手机可以保存上述电源键802与上述蓝牙测试信号中蓝牙码值的对应关系(即第一对应关系)。由于虚拟遥控器中除电源键802之外的其他按键都可以通过输出对应的蓝牙码值控制蓝牙电视,因此,手机确定出与电源键802对应的蓝牙码值后,便能够创建出整个虚拟遥控器。进而,如图10所示,手机可显示创建出的虚拟遥控器1001,虚拟遥控器1001中的各个按键都可以接收用户的输入。In step S404, if the mobile phone determines that the Bluetooth TV can correctly respond to the Bluetooth test signal, it indicates that the power of the Bluetooth TV is controlled by the Bluetooth signal. Then, the mobile phone can save the correspondence between the power key 802 and the Bluetooth code value in the Bluetooth test signal (that is, the first correspondence). Because other keys in the virtual remote control except the power key 802 can control the Bluetooth TV by outputting the corresponding Bluetooth code value, the mobile phone can create the entire virtual remote control after determining the Bluetooth code value corresponding to the power key 802. Device. Further, as shown in FIG. 10, the mobile phone can display the created virtual remote controller 1001, and each key in the virtual remote controller 1001 can receive user input.
后续,手机检测到用户点击虚拟遥控器1001中的电源键802时,可根据上述第一对 应关系确定出与电源键802对应的蓝牙码值,并将该蓝牙码值通过蓝牙连接发送给蓝牙电视。蓝牙电视接收到手机发送的蓝牙码值后,可根据各个按键与蓝牙码值之间的对应关系确定出接收到的蓝牙码值为电源键802对应的蓝牙码值。进而,蓝牙电视可执行与电源键802对应休眠或唤醒操作。Subsequently, when the mobile phone detects that the user clicks the power button 802 in the virtual remote controller 1001, the Bluetooth code value corresponding to the power button 802 can be determined according to the first correspondence, and the Bluetooth code value is sent to the Bluetooth TV through the Bluetooth connection. . After the Bluetooth TV receives the Bluetooth code value sent by the mobile phone, it can determine the received Bluetooth code value as the Bluetooth code value corresponding to the power key 802 according to the correspondence between the keys and the Bluetooth code value. Furthermore, the Bluetooth TV can perform a sleep or wake operation corresponding to the power key 802.
其中,当蓝牙电视的电源是由蓝牙信号控制的时候,为了避免关闭电源时导致手机与蓝牙电视之间的蓝牙连接断开的问题,电源键802的功能一般设置为休眠或唤醒功能。当蓝牙电视执行休眠操作进入休眠状态后,蓝牙电视中的其他功能可以关闭,但蓝牙功能仍在运行,使得手机与蓝牙电视之间的蓝牙连接不会断开。Among them, when the power of the Bluetooth TV is controlled by the Bluetooth signal, in order to avoid the problem that the Bluetooth connection between the mobile phone and the Bluetooth TV is disconnected when the power is turned off, the function of the power button 802 is generally set to the sleep or wake-up function. After the Bluetooth TV enters the sleep state after performing the sleep operation, other functions in the Bluetooth TV can be turned off, but the Bluetooth function is still running, so that the Bluetooth connection between the mobile phone and the Bluetooth TV will not be disconnected.
S405、若蓝牙电视无法正确响应上述蓝牙测试信号,则手机向蓝牙电视发送红外测试信号。S405. If the Bluetooth TV cannot properly respond to the Bluetooth test signal, the mobile phone sends an infrared test signal to the Bluetooth TV.
如果检测到用户点击了图8中测试界面801中的按钮804,或者,如果在用户点击电源键802后的预设时间内又检测到用户点击了电源键802,或者,如果在用户点击电源键802后手机接没有收到蓝牙电视发送的测试成功响应,则手机可以确定出蓝牙电视无法正确响应上述蓝牙测试信号,说明该蓝牙电视的电源不是由蓝牙信号控制的,那么,蓝牙电视的电源很可能是由红外信号控制的。此时,手机可继续显示如图8或图9所示的测试界面801。If it is detected that the user clicks the button 804 in the test interface 801 in FIG. 8, or if it is detected that the user clicks the power button 802 within a preset time after the user clicks the power button 802, or if the user clicks the power button After 802, the mobile phone does not receive a successful test response from the Bluetooth TV. The mobile phone can determine that the Bluetooth TV cannot properly respond to the above Bluetooth test signal, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. May be controlled by infrared signals. At this time, the mobile phone may continue to display the test interface 801 shown in FIG. 8 or FIG. 9.
由于不同品牌或不同型号的蓝牙电视厂商设计出的各个按键的红外码值可能是不同的,因此,在步骤S405中,手机可以从本地存储的红外码库中查询与蓝牙电视的品牌或型号对应的一套或多套红外码值。由于每套红外码值中均包括电源键802的红外码值,因此手机可以将查询到的电源键802的红外码值调制为红外测试信号,并将该红外测试信号发送给蓝牙电视。蓝牙电视接收到该红外测试信号后可对该红外测试信号进行解调,如果解调出的红外码值是蓝牙电视为开/关机功能预先设置的码值,则蓝牙电视可执行相应的开机或关机操作。这样,手机可以根据蓝牙电视的响应情况确定出蓝牙电视的电源是否是由该红外测试信号控制的。Because the infrared code values of the keys designed by different brands or models of Bluetooth TV manufacturers may be different, in step S405, the mobile phone can query the infrared code library stored locally to correspond to the brand or model of the Bluetooth TV. One or more sets of infrared code values. Because each set of infrared code values includes the infrared code value of the power key 802, the mobile phone can modulate the infrared code value of the power key 802 inquired into an infrared test signal, and send the infrared test signal to the Bluetooth TV. After receiving the infrared test signal, the Bluetooth TV can demodulate the infrared test signal. If the demodulated infrared code value is a code value preset by the Bluetooth TV for the on / off function, the Bluetooth TV can perform the corresponding power-on or Shut down operation. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the infrared test signal according to the response of the Bluetooth TV.
当手机查询到的红外码值有多套(例如3套)时,手机可先将第一套红外码值中电源键802的红外码值转换为第一红外测试信号发送至蓝牙电视。如果蓝牙电视能够正确响应第一红外测试信号,则说明蓝牙电视的电源是由该第一红外测试信号控制的。如果蓝牙电视无法正确响应第一红外测试信号,则手机可将第二套红外码值中电源键802的红外码值转换为第二红外测试信号发送至蓝牙电视,直至确定出控制蓝牙电视电源的红外信号。When there are multiple sets (for example, three sets) of infrared code values queried by the mobile phone, the mobile phone may first convert the infrared code value of the power key 802 in the first set of infrared code values into a first infrared test signal and send it to the Bluetooth TV. If the Bluetooth TV can respond to the first infrared test signal correctly, it means that the power of the Bluetooth TV is controlled by the first infrared test signal. If the Bluetooth TV cannot respond to the first infrared test signal correctly, the mobile phone can convert the infrared code value of the power key 802 in the second set of infrared code values to a second infrared test signal and send it to the Bluetooth TV until it is determined that the Bluetooth TV power source is controlled. Infrared signal.
或者,在步骤S405中,手机可以将蓝牙电视的品牌或型号上报给服务器,由服务器根据蓝牙电视的品牌或型号确定出对应的一套或多套红外码值,并将这一套或多套红外码值中电源键802的红外码值发送给手机。使得手机可以根据电源键802的红外码值向蓝牙电视发送红外测试信号。Alternatively, in step S405, the mobile phone may report the brand or model of the Bluetooth TV to the server, and the server determines the corresponding set or sets of infrared code values according to the brand or model of the Bluetooth TV, and reports the set or sets The infrared code value of the power key 802 in the infrared code value is sent to the mobile phone. The mobile phone can send an infrared test signal to the Bluetooth TV according to the infrared code value of the power key 802.
又或者,在步骤S405中,手机可以调用红外供应商提供的SDK接口,向SDK接口中输入电源键的标识、蓝牙电视的品牌或型号等参数。手机调用该SDK接口的返回值是一个列表,该列表中包含了与输入的蓝牙电视的品牌或型号对应的一个或多个电源键802的红外码值。使得手机可以根据电源键802的红外码值向蓝牙电视发送红外测试信号。Or, in step S405, the mobile phone may call the SDK interface provided by the infrared supplier, and input the parameters such as the identification of the power button, the brand or model of the Bluetooth TV into the SDK interface. The return value that the mobile phone calls the SDK interface is a list, and the list contains the infrared code values of one or more power keys 802 corresponding to the brand or model of the entered Bluetooth TV. The mobile phone can send an infrared test signal to the Bluetooth TV according to the infrared code value of the power key 802.
另外,由于红外信号的传输过程是一种点对点的传输方式,要对准方向,且中间不能有障碍物。因此,在手机执行上述步骤S405时,如图11所示,手机还可以在上述测试界 面801中提示用户在一定距离范围内对准蓝牙电视点击电源键802。In addition, since the transmission process of infrared signals is a point-to-point transmission method, the direction must be aligned, and there must be no obstacles in the middle. Therefore, when the mobile phone executes the above step S405, as shown in FIG. 11, the mobile phone can also prompt the user on the test interface 801 to point the Bluetooth TV within a certain distance and click the power button 802.
在本申请的另一些实施例中,如果蓝牙电视无法正确响应上述蓝牙测试信号,可能是因为蓝牙电视不能正确响应该蓝牙测试信号中的蓝牙码值,但蓝牙电视的电源也有可能是其它蓝牙码值控制的。例如,手机基于空鼠操作模式下各个按键与蓝牙码值之间的对应关系2,将电源键的蓝牙码值“0001”发送给蓝牙电视,但蓝牙电视仅支持按键操作模式,不支持空鼠操作模式,因此,蓝牙电视无法正确响应上述蓝牙测试信号中的蓝牙码值“0001”。此时,手机可继续按照步骤S403-404的方法向蓝牙电视发送其他操作模式下与电源键对应的蓝牙测试信号。如果蓝牙电视对所有操作模式下的蓝牙测试信号均无法正确响应,则如步骤S405所述,手机可向蓝牙电视发送红外测试信号,以检测蓝牙电视的电源是否由红外信号控制。In other embodiments of the present application, if the Bluetooth TV fails to respond to the Bluetooth test signal, it may be because the Bluetooth TV cannot respond to the Bluetooth code value in the Bluetooth test signal, but the power of the Bluetooth TV may also be other Bluetooth codes. Value controlled. For example, the mobile phone sends the Bluetooth code value "0001" of the power button to the Bluetooth TV based on the correspondence between the keys and the Bluetooth code value in the air mouse operation mode. However, the Bluetooth TV only supports the key operation mode and does not support air mouse. Operation mode, therefore, the Bluetooth TV cannot respond correctly to the Bluetooth code value "0001" in the Bluetooth test signal described above. At this time, the mobile phone can continue to send the Bluetooth test signal corresponding to the power button in other operation modes to the Bluetooth TV according to the method of steps S403-404. If the Bluetooth TV fails to respond correctly to the Bluetooth test signals in all operation modes, as described in step S405, the mobile phone may send an infrared test signal to the Bluetooth TV to detect whether the power of the Bluetooth TV is controlled by the infrared signal.
S406、若蓝牙电视正确响应上述红外测试信号,则手机创建并显示虚拟遥控器,该虚拟遥控器中的电源键与该红外测试信号具有第二对应关系。S406. If the Bluetooth TV correctly responds to the infrared test signal, the mobile phone creates and displays a virtual remote control, and the power button in the virtual remote control has a second correspondence relationship with the infrared test signal.
在步骤S406中,如果手机确定出蓝牙电视能够正确响应上述红外测试信号,说明该蓝牙电视的电源是由红外信号控制的。那么,手机可以保存上述电源键802与上述红外测试信号中红外码值的对应关系(即第二对应关系)。由于虚拟遥控器中除电源键802之外的其他按键都可以通过输出对应的蓝牙码值控制蓝牙电视,因此,手机确定出与电源键802对应的红外码值后,便能够创建出整个虚拟遥控器。进而,手机可显示图10所示的虚拟遥控器1001,虚拟遥控器1001中的各个按键都可以接收用户的输入。In step S406, if the mobile phone determines that the Bluetooth TV can correctly respond to the infrared test signal, it indicates that the power of the Bluetooth TV is controlled by the infrared signal. Then, the mobile phone can save the correspondence between the power key 802 and the infrared code value in the infrared test signal (that is, the second correspondence). Because other keys in the virtual remote control except the power key 802 can control the Bluetooth TV by outputting the corresponding Bluetooth code value, the mobile phone can create the entire virtual remote control after determining the infrared code value corresponding to the power key 802. Device. Furthermore, the mobile phone can display the virtual remote controller 1001 shown in FIG. 10, and each key in the virtual remote controller 1001 can receive user input.
当然,手机在显示创建出的虚拟遥控器1001之前,除了可以对上述电源键801进行测试外,还可以测试用户点击虚拟遥控器1001中的其他按键后蓝牙电视是否能够正确响应。例如,手机可以在测试出蓝牙电视对虚拟遥控器1001中的三个不同按键均有正确响应后,创建并显示上述虚拟遥控器1001,以提高创建出的虚拟遥控器1001的准确性。Of course, before the mobile phone displays the created virtual remote controller 1001, in addition to testing the power button 801 described above, it can also test whether the Bluetooth TV can respond correctly after the user clicks other buttons in the virtual remote controller 1001. For example, the mobile phone can create and display the above-mentioned virtual remote controller 1001 after testing that the Bluetooth TV responds correctly to three different keys in the virtual remote controller 1001, so as to improve the accuracy of the created virtual remote controller 1001.
后续,手机检测到用户点击虚拟遥控器1001中的电源键802时,可根据上述第二对应关系确定出与电源键802对应的红外码值,进而将该红外码值调制为红外信号发送给蓝牙电视。蓝牙电视接收到手机发送的红外信号后,可解调出与该红外信号对应的红外码值,进而执行与电源键802对应开机或关机操作。Subsequently, when the mobile phone detects that the user clicks on the power key 802 in the virtual remote controller 1001, the infrared code value corresponding to the power key 802 can be determined according to the second corresponding relationship, and then the infrared code value is modulated into an infrared signal and sent to Bluetooth. TV. After receiving the infrared signal sent by the mobile phone, the Bluetooth TV can demodulate the infrared code value corresponding to the infrared signal, and then perform the power-on or power-off operation corresponding to the power key 802.
至此,通过步骤S401-S406,手机可在创建蓝牙电视的虚拟遥控器时,通过测试确定出控制蓝牙电视电源的蓝牙信号或红外信号,使得用户在后续使用虚拟遥控器的过程中,手机可以根据确定出的蓝牙信号或红外信号控制蓝牙电视的电源。这样,无论对于由哪一种信号控制电源的蓝牙电视而言,手机均可创建出与其电源类型对应的电源键。So far, through steps S401-S406, the mobile phone can determine the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV through testing when the virtual remote control of the Bluetooth TV is created, so that in the subsequent process of using the virtual remote control, the mobile phone can The determined Bluetooth signal or infrared signal controls the power of the Bluetooth TV. In this way, no matter what kind of signal the Bluetooth TV controls the power, the mobile phone can create a power button corresponding to its power type.
上述实施例中是以用户感知虚拟遥控器中电源键的测试过程为例说明的。在本申请的另一些实施例中,手机还可以在用户无感知的情况下确定出控制蓝牙电视电源的蓝牙信号或红外信号。此时,如图12所示,该虚拟遥控器中电源键的控制方法可以包括:In the above embodiment, a test process in which a user perceives a power button in a virtual remote control is taken as an example for description. In other embodiments of the present application, the mobile phone may also determine a Bluetooth signal or an infrared signal that controls the power of the Bluetooth TV without the user's perception. At this time, as shown in FIG. 12, the method for controlling the power button in the virtual remote control may include:
S1201、手机与蓝牙电视建立蓝牙连接。S1201. The mobile phone establishes a Bluetooth connection with the Bluetooth TV.
其中,手机与蓝牙电视建立蓝牙连接的具体方法可参见上述实施例中步骤S401的相关描述,故此处不再赘述。For a specific method for establishing a Bluetooth connection between the mobile phone and the Bluetooth TV, refer to the related description of step S401 in the foregoing embodiment, and details are not described herein again.
S1202、手机显示虚拟遥控器,该虚拟遥控器中包括电源键。S1202. The mobile phone displays a virtual remote control, and the virtual remote control includes a power button.
与上述实施例中步骤S401-S406不同的是,手机与蓝牙电视建立蓝牙连接后,虽然手机还不能确定控制蓝牙电视电源的具体信号是什么,但是,当用户打开万能遥控APP后, 手机仍然可以显示图10所示的虚拟遥控器1001,虚拟遥控器1001中包括电源键801,并且,虚拟遥控器1001中的各个按键都可以接收用户的输入。Different from steps S401-S406 in the above embodiment, after the mobile phone establishes a Bluetooth connection with the Bluetooth TV, although the mobile phone cannot determine what the specific signal for controlling the power of the Bluetooth TV is, after the user opens the universal remote control APP, the mobile phone can still A virtual remote controller 1001 shown in FIG. 10 is displayed. The virtual remote controller 1001 includes a power key 801, and each key in the virtual remote controller 1001 can receive a user input.
由于虚拟遥控器1001中除电源键801之外的按键都是通过输出相应的蓝牙码值控制蓝牙电视的,并且,在手机与蓝牙电视建立蓝牙连接时,手机已经将预先存储的虚拟遥控器1001中各个按键与蓝牙码值之间的对应关系发送给了蓝牙电视。因此,如果检测到用户点击除电源键801之外的任一按键,手机可以将该按键对应的蓝牙码值通过已建立的蓝牙连接发送给蓝牙电视,使得蓝牙电视根据接收到的蓝牙码值执行对应按键的按键功能。Because the keys in the virtual remote control 1001 except the power key 801 control the Bluetooth TV by outputting the corresponding Bluetooth code value, and when the mobile phone establishes a Bluetooth connection with the Bluetooth TV, the mobile phone has already stored the virtual remote control 1001 in advance The correspondence between each key in the Bluetooth and the Bluetooth code value is sent to the Bluetooth TV. Therefore, if it is detected that the user clicks any button other than the power button 801, the mobile phone can send the Bluetooth code value corresponding to the button to the Bluetooth TV through the established Bluetooth connection, so that the Bluetooth TV executes according to the received Bluetooth code value. Corresponding key functions.
S1203、响应于用户对虚拟遥控器中电源键的输入,手机向蓝牙电视发送蓝牙测试信号。S1203. In response to the user's input of the power key in the virtual remote control, the mobile phone sends a Bluetooth test signal to the Bluetooth TV.
S1204、若蓝牙电视正确响应上述蓝牙测试信号,则手机保存该电源键与蓝牙测试信号之间的第一对应关系。S1204. If the Bluetooth TV correctly responds to the Bluetooth test signal, the mobile phone saves the first correspondence between the power button and the Bluetooth test signal.
在步骤S1203-S1204中,用户在正常使用上述虚拟遥控器1001的过程中,如果手机检测到用户首次点击虚拟遥控器1001中的电源键801,说明用户希望控制蓝牙电视开机(休眠)/关机(唤醒)。但由于此时手机并不确定控制蓝牙电视电源的具体信号是什么,因此,手机可先尝试通过蓝牙连接向蓝牙电视发送与电源键801对应的蓝牙码值。In steps S1203-S1204, during the normal use of the virtual remote controller 1001, if the mobile phone detects that the user clicks the power button 801 in the virtual remote controller 1001 for the first time, it indicates that the user wishes to control the Bluetooth TV to turn on (sleep) / shut down ( wake). However, at this time, the mobile phone is not sure what the specific signal for controlling the power of the Bluetooth TV is, so the mobile phone may first try to send a Bluetooth code value corresponding to the power button 801 to the Bluetooth TV through a Bluetooth connection.
检测到用户首次点击上述电源键801后,如图13中的(a)所示,手机可以在显示虚拟遥控器1001的界面中弹出选择框1301,提示用户根据蓝牙电视的响应情况进行选择。例如,选择框1301中包括正确响应的按钮1302以及没有正确响应的按钮1303。如果检测到用户点击按钮1302,则手机可确定蓝牙电视能够正确响应上述蓝牙测试信号,说明该蓝牙电视的电源是由蓝牙信号控制的。进而,手机可保存该电源键801与上述蓝牙测试信号(例如上述电源键801的蓝牙码值)之间的第一对应关系,此时虚拟遥控器1001中的电源键801被完全创建。After detecting that the user clicks the power button 801 for the first time, as shown in (a) of FIG. 13, the mobile phone may pop up a selection box 1301 in the interface displaying the virtual remote control 1001 to prompt the user to make a selection based on the response of the Bluetooth TV. For example, the selection box 1301 includes a button 1302 that responds correctly and a button 1303 that does not respond correctly. If it is detected that the user clicks the button 1302, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, indicating that the power of the Bluetooth TV is controlled by the Bluetooth signal. Furthermore, the mobile phone can save the first correspondence between the power key 801 and the Bluetooth test signal (for example, the Bluetooth code value of the power key 801). At this time, the power key 801 in the virtual remote controller 1001 is completely created.
相应的,如果检测到用户点击按钮1303,则手机可确定蓝牙电视无法正确响应上述蓝牙测试信号,说明该蓝牙电视的电源不是由蓝牙信号控制的,此时手机可通过执行下述步骤S1205-S1206进一步测试控制蓝牙电视中电源的具体信号。Correspondingly, if it is detected that the user clicks the button 1303, the mobile phone can determine that the Bluetooth TV cannot respond to the Bluetooth test signal correctly, indicating that the power of the Bluetooth TV is not controlled by the Bluetooth signal. At this time, the mobile phone can perform the following steps S1205-S1206 Further test the specific signals that control the power in the Bluetooth TV.
又或者,检测到用户首次点击上述电源键801后,如图13中的(b)所示,手机可以在显示虚拟遥控器1001的界面中提示用户在蓝牙电视不能正确响应时再次点击电源键802。那么,如果在用户首次点击电源键802后的预设时间内没有检测到用户点击电源键802,则手机可确定蓝牙电视能够正确响应上述蓝牙测试信号,进而保存该电源键801与上述蓝牙测试信号(例如上述电源键801的蓝牙码值)之间的第一对应关系,使得虚拟遥控器1001中的电源键801被完全创建。Or, after detecting that the user clicks the power button 801 for the first time, as shown in FIG. 13 (b), the mobile phone may prompt the user to click the power button 802 again when the Bluetooth TV cannot respond properly as shown in the interface of the virtual remote control 1001. . Then, if it is not detected that the user clicks the power button 802 within a preset time after the user first clicks the power button 802, the mobile phone can determine that the Bluetooth TV can correctly respond to the Bluetooth test signal, and then save the power button 801 and the Bluetooth test signal (Such as the Bluetooth code value of the power key 801 described above), so that the power key 801 in the virtual remote controller 1001 is completely created.
相应的,如果在用户首次点击电源键802后的预设时间内检测到用户点击了电源键802,则手机可确定蓝牙电视无法正确响应上述蓝牙测试信号,此时手机可通过执行下述步骤S1205-S1206进一步测试控制蓝牙电视中电源的具体信号。Correspondingly, if it is detected that the user clicks the power button 802 within a preset time after the user first clicks the power button 802, the mobile phone can determine that the Bluetooth TV cannot respond to the above-mentioned Bluetooth test signal correctly, and the mobile phone can perform the following step S1205 -S1206 further tests the specific signals that control the power in the Bluetooth TV.
S1205、若蓝牙电视无法正确响应上述蓝牙测试信号,则手机向蓝牙电视发送红外测试信号。S1205. If the Bluetooth TV fails to respond to the Bluetooth test signal, the mobile phone sends an infrared test signal to the Bluetooth TV.
S1206、若蓝牙电视正确响应上述红外测试信号,则手机保存该电源键与红外测试信号之间的第二对应关系。S1206. If the Bluetooth TV correctly responds to the infrared test signal, the mobile phone saves a second correspondence between the power button and the infrared test signal.
与上述步骤S405-S406类似的,如果手机确定出蓝牙电视无法正确响应上述蓝牙测试 信号,则手机可获取与该蓝牙电视品牌或型号对应的电源键802的红外码值。进而,手机可将电源键802的红外码值调制为红外测试信号发送给蓝牙电视。蓝牙电视接收到该红外测试信号后可对该红外测试信号进行解调,如果解调出的红外码值是蓝牙电视为开/关机功能预先设置的码值,则蓝牙电视可执行相应的开机或关机操作。这样,手机可以根据蓝牙电视的响应情况确定出蓝牙电视的电源是否是由该红外测试信号控制的。Similar to the above steps S405-S406, if the mobile phone determines that the Bluetooth TV cannot respond to the Bluetooth test signal correctly, the mobile phone can obtain the infrared code value of the power button 802 corresponding to the Bluetooth TV brand or model. Furthermore, the mobile phone can modulate the infrared code value of the power key 802 into an infrared test signal and send it to the Bluetooth TV. After receiving the infrared test signal, the Bluetooth TV can demodulate the infrared test signal. If the demodulated infrared code value is a code value preset by the Bluetooth TV for the on / off function, the Bluetooth TV can perform the corresponding power-on or Shut down operation. In this way, the mobile phone can determine whether the power of the Bluetooth TV is controlled by the infrared test signal according to the response of the Bluetooth TV.
当手机获取到的电源键802的红外码值有多个(例如第一红外码值和第二红外码值)时,手机仍可显示如图13中的(a)或(b)所示的界面。以图13中的(b)所示的界面举例,如果在手机发送与第一红外码值对应的第一红外测试信号后的预设时间内没有检测到用户点击电源键802,则手机可确定蓝牙电视能够正确响应上述第一红外测试信号,进而保存该电源键801与第一红外测试信号(例如上述第一红外码值)之间的第二对应关系,使得虚拟遥控器1001中的电源键801被完全创建。相应的,如果在手机发送与第一红外码值对应的第一红外测试信号后的预设时间内检测到用户点击了电源键802,则手机可确定蓝牙电视无法正确响应上述第一红外测试信号,此时手机可继续生成并发送与第二红外码值对应的第二红外测试信号,直至确定出控制蓝牙电视电源的红外信号。When there are multiple infrared code values of the power button 802 obtained by the mobile phone (for example, the first infrared code value and the second infrared code value), the mobile phone can still display the information shown in (a) or (b) of FIG. 13 interface. Taking the interface shown in (b) in FIG. 13 as an example, if the user does not detect that the user clicks the power button 802 within a preset time after the mobile phone sends the first infrared test signal corresponding to the first infrared code value, the mobile phone may determine The Bluetooth TV can correctly respond to the first infrared test signal, and then save a second correspondence between the power key 801 and the first infrared test signal (for example, the first infrared code value), so that the power key in the virtual remote control 1001 801 was completely created. Correspondingly, if it is detected that the user clicks the power button 802 within a preset time after the mobile phone sends the first infrared test signal corresponding to the first infrared code value, the mobile phone can determine that the Bluetooth TV cannot properly respond to the first infrared test signal At this time, the mobile phone can continue to generate and send a second infrared test signal corresponding to the second infrared code value until the infrared signal that controls the power of the Bluetooth TV is determined.
又或者,在手机向蓝牙电视发送红外测试信号之后,手机可以显示图13中的(a)所示的界面。如果检测到用户点击按钮1302,则手机可确定蓝牙电视能够正确响应上述红外测试信号,说明该蓝牙电视的电源是由红外信号控制的。进而,手机可保存该电源键801与上述红外测试信号(例如上述电源键801的红外码值)之间的第二对应关系,此时虚拟遥控器1001中的电源键801被完全创建。相应的,如果检测到用户点击按钮1303,则手机可确定蓝牙电视无法正确响应上述红外测试信号,此时可提示用户虚拟遥控器1001中的电源键801创建失败。Alternatively, after the mobile phone sends an infrared test signal to the Bluetooth TV, the mobile phone may display the interface shown in (a) of FIG. 13. If it is detected that the user clicks the button 1302, the mobile phone can determine that the Bluetooth TV can correctly respond to the infrared test signal, indicating that the power of the Bluetooth TV is controlled by the infrared signal. Furthermore, the mobile phone can save the second correspondence between the power key 801 and the infrared test signal (for example, the infrared code value of the power key 801). At this time, the power key 801 in the virtual remote controller 1001 is completely created. Correspondingly, if it is detected that the user clicks the button 1303, the mobile phone can determine that the Bluetooth TV cannot properly respond to the infrared test signal, and at this time, the user can be prompted that the power key 801 in the virtual remote controller 1001 has failed to create.
至此,通过步骤S1201-S1206,手机可在用户正常使用虚拟遥控器时,通过测试确定出控制蓝牙电视电源的蓝牙信号或红外信号,从而完成虚拟遥控器中电源键的创建过程,使得手机可以在用户不感知测试过程的同时确定出控制蓝牙电视电源的蓝牙信号或红外信号。So far, through steps S1201-S1206, the mobile phone can determine the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV through testing when the user normally uses the virtual remote control, thereby completing the creation process of the power button in the virtual remote control, so that the mobile phone can be used in The user does not perceive the test process and determines the Bluetooth signal or infrared signal that controls the power of the Bluetooth TV.
需要说明的是,上述步骤S401-S406或步骤S1201-S1206中均以手机先发送蓝牙测试信号测试蓝牙电视电源的控制信号,再发送红外测试信号测试蓝牙电视电源的控制信号这一顺序举例进行说明的,可以理解的是,手机在创建虚拟遥控器中电源键时,也可以先发送红外测试信号,如果蓝牙电视无法正确响应该红外测试信号,则手机可发送蓝牙测试信号确定蓝牙电视是否能够正确响应该蓝牙测试信号,本申请实施例对此不做任何限制。It should be noted that in the above steps S401-S406 or steps S1201-S1206, the mobile phone first sends a Bluetooth test signal to test the control signal of the Bluetooth TV power supply, and then sends an infrared test signal to test the control signal of the Bluetooth TV power supply. It can be understood that when the mobile phone creates the power button in the virtual remote control, it can also send an infrared test signal first. If the Bluetooth TV cannot respond to the infrared test signal correctly, the mobile phone can send a Bluetooth test signal to determine whether the Bluetooth TV is correct. In response to the Bluetooth test signal, the embodiment of the present application does not place any restrictions on this.
在本申请的另一些实施例中,手机或者上述万能遥控APP的服务器还可以创建一个数据库,该数据库中可以存储蓝牙电视的品牌和类型与蓝牙电视中电源的控制信号之间的对应关系。例如,对于品牌A中型号1的蓝牙电视,其电源的控制信号为蓝牙信号,具体的蓝牙码值为“00FF”,对于品牌B中型号1的蓝牙电视,其电源的控制信号为红外信号,具体的红外码值为“FF00”。In other embodiments of the present application, the mobile phone or the server of the universal remote control APP described above may also create a database, and the database may store the correspondence between the brand and type of the Bluetooth TV and the control signal of the power supply in the Bluetooth TV. For example, for a Bluetooth TV of model 1 in brand A, the power supply control signal is a Bluetooth signal, and the specific Bluetooth code value is "00FF". For a Bluetooth TV of model 1 in brand B, the power supply control signal is an infrared signal, The specific infrared code value is "FF00".
这样,手机在为用户创建某个蓝牙电视的虚拟遥控器时,如果能够获取到该蓝牙电视的具体品牌和具体型号(例如,由用户手动输入蓝牙电视的具体品牌和具体型号,或者用户使用手机扫描包含蓝牙电视的具体品牌和具体型号的二维码等),则手机可通过查询上述数据库中的对应关系,确定控制该蓝牙电视电源的具体信号,从而创建虚拟遥控器中的 电源键。In this way, when the mobile phone creates a virtual remote control for a Bluetooth TV for the user, if the specific brand and specific model of the Bluetooth TV can be obtained (for example, the specific brand and specific model of the Bluetooth TV are manually entered by the user, or the user uses the mobile phone Scan the QR code of the specific brand and specific model of the Bluetooth TV, etc.), the mobile phone can determine the specific signal to control the power of the Bluetooth TV by querying the corresponding relationship in the above database, thereby creating the power button in the virtual remote control.
当然,如果手机在上述数据库中没有查询到与蓝牙电视的具体品牌和具体型号对应的具体信号,则手机也可通过上述实施例中的步骤S401-S406或S1201-S1206确定控制该蓝牙电视电源的具体信号,并创建虚拟遥控器中的电源键。另外,手机还可以在上述数据库中建立确定出的具体蓝牙信号(或红外信号)与该蓝牙电视的具体品牌和具体型号之间的对应关系,以提高后续手机使用该数据库确定控制蓝牙电视电源的具体信号时的准确性。Of course, if the mobile phone does not query the specific signal corresponding to the specific brand and specific model of the Bluetooth TV in the above database, the mobile phone may also determine the control of the power of the Bluetooth TV through steps S401-S406 or S1201-S1206 in the above embodiment. Specific signals and create a power button in the virtual remote. In addition, the mobile phone can also establish the corresponding relationship between the specific Bluetooth signal (or infrared signal) determined in the above database and the specific brand and specific model of the Bluetooth TV, so as to improve the use of the database by subsequent mobile phones to determine the power of controlling the Bluetooth TV. Accuracy at specific signals.
在本申请的一些实施例中,本申请实施例公开了一种终端,如图14所示,该终端用于实现以上各个方法实施例中记载的方法,其包括:连接单元1401、显示单元1402、收发单元1403以及创建单元1404。其中,连接单元1401用于支持终端执行图4中的过程S401以及图12中的过程S1201;显示单元1402用于支持终端执行图4中的过程S402,以及图12中的过程S1202;收发单元1403用于支持终端执行图4中的过程S403、S405,以及图12中的过程S1203、S1205;创建单元1404用于支持终端执行图4中的过程S404、S406,以及图12中的过程S1204、S1206。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。In some embodiments of the present application, an embodiment of the present application discloses a terminal. As shown in FIG. 14, the terminal is configured to implement the methods described in the foregoing method embodiments, and includes: a connection unit 1401 and a display unit 1402. , The transceiver unit 1403, and the creation unit 1404. Among them, the connection unit 1401 is used to support the terminal to execute the process S401 in FIG. 4 and the process S1201 in FIG. 12; the display unit 1402 is used to support the terminal to execute the process S402 in FIG. 4 and the process S1202 in FIG. 12; the transceiver unit 1403 It is used to support the terminal to execute the processes S403 and S405 in FIG. 4 and the processes S1203 and S1205 in FIG. 12; the creation unit 1404 is used to support the terminal to execute the processes S404 and S406 in FIG. 4 and the processes S1204 and S1206 in FIG. . Wherein, all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
在本申请的另一些实施例中,本申请实施例公开了一种终端,如图15所示,该终端可以包括:触摸屏1501,其中,所述触摸屏1501包括触敏表面1506和显示屏1507;一个或多个处理器1502;红外装置1508用于发射红外信号;蓝牙装置1509用于与其他蓝牙设备进行蓝牙通信;Wi-Fi装置1510用于与无线局域网内设备的进行通信;存储器1503;一个或多个应用程序(未示出);以及一个或多个计算机程序1504,上述各器件可以通过一个或多个通信总线1505连接。其中该一个或多个计算机程序1504被存储在上述存储器1503中并被配置为被该一个或多个处理器1502执行,该一个或多个计算机程序1504包括指令,上述指令可以用于执行如图4或图12及相应实施例中的各个步骤。In other embodiments of the present application, an embodiment of the present application discloses a terminal. As shown in FIG. 15, the terminal may include: a touch screen 1501, wherein the touch screen 1501 includes a touch-sensitive surface 1506 and a display screen 1507; One or more processors 1502; infrared device 1508 is used to transmit infrared signals; Bluetooth device 1509 is used to perform Bluetooth communication with other Bluetooth devices; Wi-Fi device 1510 is used to perform communication with devices in a wireless local area network; memory 1503; one Or multiple application programs (not shown); and one or more computer programs 1504, each of which may be connected via one or more communication buses 1505. The one or more computer programs 1504 are stored in the memory 1503 and configured to be executed by the one or more processors 1502. The one or more computer programs 1504 include instructions, and the instructions can be used to execute 4 or each step in FIG. 12 and the corresponding embodiment.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For specific working processes of the system, device, and unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。Each functional unit in each of the embodiments of the present application may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product. The computer software product is stored in a storage device. The medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes: various types of media that can store program codes, such as a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的 保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the embodiments of the present application, but the scope of protection of the embodiments of the present application is not limited to this. Any changes or replacements within the technical scope disclosed in the embodiments of the present application shall be covered in the present Within the protection scope of the application examples. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (21)

  1. 一种虚拟遥控器中电源键的控制方法,其特征在于,包括:A method for controlling a power key in a virtual remote control, which is characterized by comprising:
    终端与被控设备建立无线连接,所述无线连接包括蓝牙连接或无线保真Wi-Fi连接;The terminal establishes a wireless connection with the controlled device, where the wireless connection includes a Bluetooth connection or a wireless fidelity Wi-Fi connection;
    所述终端显示虚拟遥控器中待创建的电源键;The terminal displays a power key to be created in the virtual remote controller;
    响应于用户对所述电源键的第一输入,所述终端通过所述无线连接向所述被控设备发送第一测试信号,所述第一测试信号包括与所述蓝牙连接对应的蓝牙测试信号或与所述Wi-Fi连接对应的Wi-Fi测试信号;In response to a user's first input to the power key, the terminal sends a first test signal to the controlled device through the wireless connection, the first test signal including a Bluetooth test signal corresponding to the Bluetooth connection Or a Wi-Fi test signal corresponding to the Wi-Fi connection;
    若所述被控设备正确响应所述第一测试信号,则所述终端创建与所述第一测试信号对应的电源键;If the controlled device responds correctly to the first test signal, the terminal creates a power key corresponding to the first test signal;
    在所述终端创建与所述第一测试信号对应的电源键之后,响应于用户对所述电源键的第二输入,所述终端通过所述无线连接向所述被控设备发送所述第一测试信号,以使得所述被控设备响应于所述第一测试信号执行休眠或唤醒操作。After the terminal creates a power key corresponding to the first test signal, in response to a second input of the power key by a user, the terminal sends the first to the controlled device through the wireless connection. Test the signal so that the controlled device performs a sleep or wake-up operation in response to the first test signal.
  2. 根据权利要求1所述的方法,其特征在于,所述终端显示虚拟遥控器中待创建的电源键,包括:The method according to claim 1, wherein the displaying the power key to be created in the virtual remote controller by the terminal comprises:
    所述终端显示所述虚拟遥控器的测试界面,所述测试界面中包括所述电源键;或者,Displaying, by the terminal, a test interface of the virtual remote controller, the test interface including the power key; or
    所述终端显示所述虚拟遥控器的使用界面,所述使用界面中包括所述电源键。The terminal displays a use interface of the virtual remote controller, and the use interface includes the power key.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,还包括:The method according to claim 1 or 2, wherein after the terminal sends a first test signal to the controlled device, the method further comprises:
    所述终端提示用户输入所述被控设备对所述第一测试信号的响应情况;The terminal prompting the user to input a response of the controlled device to the first test signal;
    若接收到用户指示所述被控设备正确响应的输入,则所述终端确定所述被控设备正确响应所述第一测试信号;若接收到用户指示所述被控设备无法正确响应的输入,则所述终端确定所述被控设备无法正确响应所述第一测试信号。If the user receives an input indicating that the controlled device responds correctly, the terminal determines that the controlled device responds correctly to the first test signal; if the user receives an input indicating that the controlled device cannot respond correctly, Then the terminal determines that the controlled device cannot properly respond to the first test signal.
  4. 根据权利要求1或2所述的方法,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,还包括:The method according to claim 1 or 2, wherein after the terminal sends a first test signal to the controlled device, the method further comprises:
    所述终端提示用户在所述被控设备对所述第一测试信号没有响应时点击所述电源键;The terminal prompting the user to click the power button when the controlled device does not respond to the first test signal;
    若在预设时间内没有检测到用户点击所述电源键,则所述终端确定所述被控设备正确响应所述第一测试信号;否则,所述终端确定所述被控设备无法正确响应所述第一测试信号。If it is not detected that the user clicks the power button within a preset time, the terminal determines that the controlled device correctly responds to the first test signal; otherwise, the terminal determines that the controlled device cannot respond correctly to the first test signal. The first test signal is described.
  5. 根据权利要求1或2所述的方法,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,还包括:The method according to claim 1 or 2, wherein after the terminal sends a first test signal to the controlled device, the method further comprises:
    若所述终端接收到所述被控设备发送的测试成功响应,则所述终端确定所述被控设备正确响应所述第一测试信号;或者,If the terminal receives a test success response sent by the controlled device, the terminal determines that the controlled device responds correctly to the first test signal; or
    若所述终端接收到所述被控设备发送的测试失败响应,则所述终端确定所述被控设备无法正确响应所述第一测试信号。If the terminal receives a test failure response sent by the controlled device, the terminal determines that the controlled device cannot correctly respond to the first test signal.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述无线连接为蓝牙连接,所述第一测试信号为蓝牙测试信号,所述蓝牙测试信号包括与所述电源键对应的蓝牙码值;The method according to any one of claims 1-5, wherein the wireless connection is a Bluetooth connection, the first test signal is a Bluetooth test signal, and the Bluetooth test signal includes a correspondence with the power key Bluetooth code value;
    其中,所述终端创建与所述第一测试信号对应的电源键,包括:Wherein, the terminal creating a power key corresponding to the first test signal includes:
    所述终端保存所述蓝牙码值与所述电源键之间的第一对应关系。The terminal saves a first correspondence between the Bluetooth code value and the power key.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,若所述被控设备无法正确响 应所述第一测试信号,则所述方法还包括:The method according to any one of claims 1-6, wherein if the controlled device cannot respond to the first test signal correctly, the method further comprises:
    所述终端向所述被控设备发送第二测试信号,所述第二测试信号包括蓝牙测试信号、Wi-Fi测试信号或红外测试信号,所述第二测试信号与所述第一测试信号不同;The terminal sends a second test signal to the controlled device. The second test signal includes a Bluetooth test signal, a Wi-Fi test signal, or an infrared test signal. The second test signal is different from the first test signal. ;
    若所述被控设备正确响应所述第二测试信号,则所述终端创建与所述第二测试信号对应的电源键。If the controlled device responds correctly to the second test signal, the terminal creates a power key corresponding to the second test signal.
  8. 根据权利要求7所述的方法,其特征在于,所述第二测试信号为红外测试信号;所述红外测试信号包括与所述电源键对应的红外码值;The method according to claim 7, wherein the second test signal is an infrared test signal; the infrared test signal includes an infrared code value corresponding to the power key;
    其中,所述终端创建与所述第二测试信号对应的电源键,包括:Wherein, the terminal creating a power key corresponding to the second test signal includes:
    所述终端保存所述红外码值与所述电源键之间的第二对应关系。The terminal saves a second correspondence between the infrared code value and the power key.
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述终端内安装有遥控类应用,所述方法还包括:The method according to any one of claims 1 to 8, wherein a remote control application is installed in the terminal, and the method further comprises:
    响应于用户打开所述遥控类应用的操作,所述终端显示所述遥控类应用的设备选择界面,所述设备选择界面中包括至少一种类型的被控设备;In response to a user opening the remote control application, the terminal displays a device selection interface of the remote control application, and the device selection interface includes at least one type of controlled device;
    响应于用户在所述设备选择界面中的选择操作,所述终端显示所述遥控类应用的品牌选择界面,所述品牌选择界面中包括被控设备的至少一种品牌或型号;In response to a user's selection operation in the device selection interface, the terminal displays a brand selection interface of the remote control application, where the brand selection interface includes at least one brand or model of the controlled device;
    响应于用户在所述品牌选择界面中的选择操作,所述终端提示用户建立与所述被控设备之间的无线连接。In response to a user's selection operation in the brand selection interface, the terminal prompts the user to establish a wireless connection with the controlled device.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述终端为手机,所述被控设备为蓝牙电视,所述无线连接为蓝牙连接,所述第一测试信号为蓝牙测试信号,所述第二测试信号为红外测试信号。The method according to any one of claims 1-9, wherein the terminal is a mobile phone, the controlled device is a Bluetooth TV, the wireless connection is a Bluetooth connection, and the first test signal is Bluetooth A test signal, and the second test signal is an infrared test signal.
  11. 一种终端,其特征在于,包括:A terminal, comprising:
    触摸屏,其中,所述触摸屏包括触敏表面和显示器;A touch screen, wherein the touch screen includes a touch-sensitive surface and a display;
    一个或多个处理器;One or more processors;
    一个或多个存储器;One or more memories;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述一个或多个存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端执行时,使得所述终端执行以下步骤:And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs include instructions when the instructions are executed by the terminal So that the terminal performs the following steps:
    与被控设备建立无线连接,所述无线连接包括蓝牙连接或Wi-Fi连接;Establishing a wireless connection with the controlled device, the wireless connection including a Bluetooth connection or a Wi-Fi connection;
    显示虚拟遥控器中待创建的电源键;Display the power button to be created in the virtual remote control;
    响应于用户对所述电源键的第一输入,通过所述无线连接向所述被控设备发送第一测试信号,所述第一测试信号包括与所述蓝牙连接对应的蓝牙测试信号或与所述Wi-Fi连接对应的Wi-Fi测试信号;In response to a user's first input to the power key, a first test signal is sent to the controlled device through the wireless connection, the first test signal includes a Bluetooth test signal corresponding to the Bluetooth connection or a The Wi-Fi test signal corresponding to the Wi-Fi connection;
    若所述被控设备正确响应所述第一测试信号,则创建与所述第一测试信号对应的电源键;If the controlled device responds correctly to the first test signal, creating a power key corresponding to the first test signal;
    在创建与所述第一测试信号对应的电源键之后,响应于用户对所述电源键的第二输入,通过所述无线连接向所述被控设备发送所述第一测试信号,以使得所述被控设备响应于所述第一测试信号执行休眠或唤醒操作。After the power key corresponding to the first test signal is created, in response to a second input of the power key by a user, the first test signal is sent to the controlled device through the wireless connection, so that all the The controlled device performs a sleep or wake-up operation in response to the first test signal.
  12. 根据权利要求11所述的终端,其特征在于,所述终端显示虚拟遥控器中待创建的电源键,具体包括:The terminal according to claim 11, wherein the terminal displaying a power key to be created in the virtual remote controller specifically comprises:
    显示所述虚拟遥控器的测试界面,所述测试界面中包括所述电源键;或者,Displaying a test interface of the virtual remote control, the test interface including the power key; or
    显示所述虚拟遥控器的使用界面,所述使用界面中包括所述电源键。Displaying a use interface of the virtual remote control, the use interface including the power key.
  13. 根据权利要求11或12所述的终端,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,所述终端还用于执行:The terminal according to claim 11 or 12, wherein after the terminal sends a first test signal to the controlled device, the terminal is further configured to perform:
    提示用户输入所述被控设备对所述第一测试信号的响应情况;Prompting a user to input a response of the controlled device to the first test signal;
    若接收到指示所述被控设备正确响应的输入,则确定所述被控设备正确响应所述第一测试信号;若接收到指示所述被控设备无法正确响应的输入,则确定所述被控设备无法正确响应所述第一测试信号。If an input indicating that the controlled device responds correctly is received, it is determined that the controlled device responds correctly to the first test signal; if an input indicating that the controlled device cannot respond correctly is determined, the controlled device is determined The control device cannot respond to the first test signal correctly.
  14. 根据权利要求11或12所述的终端,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,所述终端还用于执行:The terminal according to claim 11 or 12, wherein after the terminal sends a first test signal to the controlled device, the terminal is further configured to perform:
    提示用户在所述被控设备对所述第一测试信号没有响应时点击所述电源键;Prompt the user to click the power button when the controlled device does not respond to the first test signal;
    若在预设时间内没有检测到用户点击所述电源键,则确定所述被控设备正确响应所述第一测试信号;否则,确定所述被控设备无法正确响应所述第一测试信号。If it is not detected that the user clicks the power key within a preset time, it is determined that the controlled device correctly responds to the first test signal; otherwise, it is determined that the controlled device cannot correctly respond to the first test signal.
  15. 根据权利要求11或12所述的终端,其特征在于,在所述终端向所述被控设备发送第一测试信号之后,所述终端还用于执行:The terminal according to claim 11 or 12, wherein after the terminal sends a first test signal to the controlled device, the terminal is further configured to perform:
    若所述终端接收到所述被控设备发送的测试成功响应,则确定所述被控设备正确响应所述第一测试信号;或者,If the terminal receives the test success response sent by the controlled device, determining that the controlled device responds to the first test signal correctly; or
    若所述终端接收到所述被控设备发送的测试失败响应,则确定所述被控设备无法正确响应所述第一测试信号。If the terminal receives a test failure response sent by the controlled device, it is determined that the controlled device cannot correctly respond to the first test signal.
  16. 根据权利要求11-15中任一项所述的终端,其特征在于,所述无线连接为蓝牙连接,所述第一测试信号为蓝牙测试信号,所述蓝牙测试信号包括与所述电源键对应的蓝牙码值;其中,所述终端创建与所述第一测试信号对应的电源键,具体包括:The terminal according to any one of claims 11-15, wherein the wireless connection is a Bluetooth connection, the first test signal is a Bluetooth test signal, and the Bluetooth test signal includes a signal corresponding to the power key A Bluetooth code value; wherein, the terminal creating a power key corresponding to the first test signal specifically includes:
    保存所述蓝牙码值与所述电源键之间的第一对应关系。A first correspondence relationship between the Bluetooth code value and the power key is saved.
  17. 根据权利要求11-16中任一项所述的终端,其特征在于,若所述被控设备无法正确响应所述第一测试信号,则所述终端还用于执行:The terminal according to any one of claims 11-16, wherein if the controlled device cannot respond to the first test signal correctly, the terminal is further configured to execute:
    向所述被控设备发送第二测试信号,所述第二测试信号包括蓝牙测试信号、Wi-Fi测试信号或红外测试信号,所述第二测试信号与所述第一测试信号不同;Sending a second test signal to the controlled device, where the second test signal includes a Bluetooth test signal, a Wi-Fi test signal, or an infrared test signal, and the second test signal is different from the first test signal;
    若所述被控设备正确响应所述第二测试信号,则创建与所述第二测试信号对应的电源键。If the controlled device responds correctly to the second test signal, a power key corresponding to the second test signal is created.
  18. 根据权利要求17所述的终端,其特征在于,所述第二测试信号为红外测试信号;所述红外测试信号包括与所述电源键对应的红外码值;其中,所述终端创建与所述第二测试信号对应的电源键,具体包括:The terminal according to claim 17, wherein the second test signal is an infrared test signal; the infrared test signal includes an infrared code value corresponding to the power key; and wherein the terminal creates a connection with the The power button corresponding to the second test signal specifically includes:
    保存所述红外码值与所述电源键之间的第二对应关系。A second correspondence relationship between the infrared code value and the power key is saved.
  19. 根据权利要求11-18中任一项所述的终端,其特征在于,所述终端内安装有遥控类应用,所述终端还用于执行:The terminal according to any one of claims 11 to 18, wherein a remote control application is installed in the terminal, and the terminal is further configured to execute:
    响应于用户打开所述遥控类应用的操作,显示所述遥控类应用的设备选择界面,所述设备选择界面中包括至少一种类型的被控设备;In response to a user opening the remote control application, displaying a device selection interface of the remote control application, the device selection interface including at least one type of controlled device;
    响应于用户在所述设备选择界面中的选择操作,显示所述遥控类应用的品牌选择界面,所述品牌选择界面中包括被控设备的至少一种品牌或型号;In response to a user's selection operation in the device selection interface, displaying a brand selection interface of the remote control application, the brand selection interface including at least one brand or model of the controlled device;
    响应于用户在所述品牌选择界面中的选择操作,提示用户建立与所述被控设备之间的无线连接。In response to a user's selection operation in the brand selection interface, the user is prompted to establish a wireless connection with the controlled device.
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在终端上运行时,使得所述终端执行如权利要求1-10中任一项所述的虚拟遥控器中电源键的控制方法。A computer-readable storage medium having instructions stored in the computer-readable storage medium, characterized in that when the instructions are run on a terminal, the terminal is caused to execute the device according to any one of claims 1-10. The control method of the power button in the virtual remote controller described above.
  21. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求1-10中任一项所述的虚拟遥控器中电源键的控制方法。A computer program product containing instructions, wherein when the computer program product is run on a terminal, the terminal is caused to execute the power key in the virtual remote control according to any one of claims 1-10. Control Method.
PCT/CN2018/088908 2018-05-29 2018-05-29 Control method for power key in virtual remote controller and terminal WO2019227317A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880085334.XA CN111557097B (en) 2018-05-29 2018-05-29 Control method of power key in virtual remote controller and terminal
PCT/CN2018/088908 WO2019227317A1 (en) 2018-05-29 2018-05-29 Control method for power key in virtual remote controller and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/088908 WO2019227317A1 (en) 2018-05-29 2018-05-29 Control method for power key in virtual remote controller and terminal

Publications (1)

Publication Number Publication Date
WO2019227317A1 true WO2019227317A1 (en) 2019-12-05

Family

ID=68697730

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088908 WO2019227317A1 (en) 2018-05-29 2018-05-29 Control method for power key in virtual remote controller and terminal

Country Status (2)

Country Link
CN (1) CN111557097B (en)
WO (1) WO2019227317A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770369A (en) * 2020-05-25 2020-10-13 广州视源电子科技股份有限公司 Remote control method, device, storage medium and terminal
CN112529557A (en) * 2020-11-03 2021-03-19 华为技术有限公司 Payment cooperation method, shooting cooperation method and related equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785914A (en) * 2022-03-15 2022-07-22 海信视像科技股份有限公司 Display device, control apparatus, and device configuration method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581251A (en) * 2012-08-01 2014-02-12 鸿富锦精密工业(深圳)有限公司 Remote control device and control method thereof
CN103596028A (en) * 2013-11-25 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for controlling smart television
US20150189363A1 (en) * 2013-12-27 2015-07-02 Amtran Technology Co., Ltd Method for controlling television device and television control system
CN104881981A (en) * 2015-05-04 2015-09-02 小米科技有限责任公司 Methods and devices for transmitting and receiving key instructions
CN104967888A (en) * 2015-06-30 2015-10-07 小米科技有限责任公司 Remote control method and device and remote control equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930712B (en) * 2012-11-14 2014-04-09 Tcl通力电子(惠州)有限公司 Method and system for controlling infrared controlled equipment
CN103489303B (en) * 2013-09-02 2016-08-17 小米科技有限责任公司 A kind of remote control thereof and device
WO2016117992A1 (en) * 2015-01-21 2016-07-28 Castro Baldenebro Brayan Gamaniel Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581251A (en) * 2012-08-01 2014-02-12 鸿富锦精密工业(深圳)有限公司 Remote control device and control method thereof
CN103596028A (en) * 2013-11-25 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for controlling smart television
US20150189363A1 (en) * 2013-12-27 2015-07-02 Amtran Technology Co., Ltd Method for controlling television device and television control system
CN104881981A (en) * 2015-05-04 2015-09-02 小米科技有限责任公司 Methods and devices for transmitting and receiving key instructions
CN104967888A (en) * 2015-06-30 2015-10-07 小米科技有限责任公司 Remote control method and device and remote control equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770369A (en) * 2020-05-25 2020-10-13 广州视源电子科技股份有限公司 Remote control method, device, storage medium and terminal
CN112529557A (en) * 2020-11-03 2021-03-19 华为技术有限公司 Payment cooperation method, shooting cooperation method and related equipment

Also Published As

Publication number Publication date
CN111557097A (en) 2020-08-18
CN111557097B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN110622123B (en) Display method and device
CN111602344B (en) Bluetooth communication method and dual-mode Bluetooth terminal
AU2022211850B2 (en) Application function implementation method and electronic device
US11144195B2 (en) Fast data copying method and electronic device
US20170244574A1 (en) Electronic device and method for registering smart home device in smart home system
WO2019178869A1 (en) Method for opening esim card account, and terminal
WO2015096747A1 (en) Operation response method, client, browser and system
WO2019227317A1 (en) Control method for power key in virtual remote controller and terminal
CN113613064B (en) Video processing method, device, storage medium and terminal
CN111713176B (en) Data transmission method and terminal
WO2024037032A1 (en) Account login method and electronic device
CN108780400B (en) Data processing method and electronic equipment
CN113784200A (en) Communication terminal, display device and screen projection connection method
CN108432161A (en) A kind of interference control method and terminal of audio service
JP7319431B2 (en) Application function implementation method and electronic device
CN108141697B (en) Electronic device, corollary device and method for operating electronic device
US20210223920A1 (en) Shortcut Key Control Method and Terminal
CN107728839B (en) Screen freezing monitoring solution method, mobile terminal and computer readable storage medium
CN117407273A (en) Sensor debugging method, device, medium and equipment based on hub architecture
CN115470778A (en) Method for adjusting language type of vehicle interaction system, vehicle and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18920391

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18920391

Country of ref document: EP

Kind code of ref document: A1