WO2018068413A1 - Method and apparatus for controlling remote controller based on android system - Google Patents

Method and apparatus for controlling remote controller based on android system Download PDF

Info

Publication number
WO2018068413A1
WO2018068413A1 PCT/CN2016/113020 CN2016113020W WO2018068413A1 WO 2018068413 A1 WO2018068413 A1 WO 2018068413A1 CN 2016113020 W CN2016113020 W CN 2016113020W WO 2018068413 A1 WO2018068413 A1 WO 2018068413A1
Authority
WO
WIPO (PCT)
Prior art keywords
remote control
touch
bluetooth
android system
time value
Prior art date
Application number
PCT/CN2016/113020
Other languages
French (fr)
Chinese (zh)
Inventor
杨斌
Original Assignee
深圳Tcl新技术有限公司
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 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2018068413A1 publication Critical patent/WO2018068413A1/en

Links

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]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • H04N21/42206User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
    • H04N21/42221Transmission circuitry, e.g. infrared [IR] or radio frequency [RF]
    • 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]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • H04N21/42206User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
    • H04N21/42224Touch pad or touch panel provided on the remote control
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C2201/00Transmission systems of control signals via wireless link
    • G08C2201/30User interface
    • G08C2201/32Remote control based on movements, attitude of remote control device

Definitions

  • the invention relates to the field of remote control touch, and in particular to a remote control control method and device based on an Android system.
  • Android's wireless input devices are also increasing, such as Bluetooth remote control, Bluetooth keyboard and so on.
  • the touch function of the Bluetooth touch control on the market can only use the HID keyboard protocol, and the CPU of the remote controller must be required to spend a lot of time to perform touch gesture recognition, and then convert the recognized gesture into a standard one.
  • the HID keyboard value is sent to the Android system, so that the existing Bluetooth touch remote controller cannot handle complicated gestures and the processing speed is slow.
  • the main object of the present invention is to provide a remote control control method and device based on an Android system, which aims to solve the technical problem that the existing Bluetooth touch remote controller cannot handle complicated gestures and has a slow processing speed.
  • the remote control control method based on the Android system provided by the present invention includes the following steps:
  • the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the sample data includes Bluetooth HID proprietary protocol coding, touch action coding, touch action horizontal coordinate coding, and touch action vertical coordinate coding.
  • the sampling data and the time value are encapsulated into a Bluetooth HID private protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the steps include:
  • the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer;
  • the Bluetooth module sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the Android system-based remote controller control method further includes:
  • the timer is a 32-bit timer with a clock period of 1 millisecond.
  • the present invention further provides a remote controller control apparatus based on an Android system, including:
  • the initialization module is configured to initialize the touch panel and the bluetooth module of the remote controller, and control the remote control to connect the controlled device to the Bluetooth;
  • a monitoring module for monitoring the sampling data of the remote control touch panel and the time value of the timer in real time
  • a sending module configured to encapsulate the sampling data and the time value into a Bluetooth HID private protocol data packet, and send the data to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the sample data includes Bluetooth HID proprietary protocol coding, touch action coding, touch action horizontal coordinate coding, and touch action vertical coordinate coding.
  • the sending module includes:
  • a determining unit configured to determine, according to the touch action code, whether the touch operation is completed
  • a storage unit configured to encapsulate the sampled data and the time value into a Bluetooth HID private protocol data packet and store the data into the Bluetooth module FIFO buffer when it is determined that the touch operation is completed;
  • a sending unit configured to send, by the Bluetooth module, the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
  • the Android system-based remote control device further includes:
  • the shutdown module is used to obtain the touch information of the remote control opening key, and when the remote control opening key is judged to be long pressed, the remote control is controlled to be turned off.
  • the timer is a 32-bit timer with a clock period of 1 millisecond.
  • the technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value.
  • the Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making
  • the Bluetooth remote control can also handle complex gestures, increasing processing speed.
  • FIG. 1 is a schematic flow chart of a first embodiment of a remote control control method based on an Android system according to the present invention
  • FIG. 2 is a schematic flowchart of a step of transmitting a Bluetooth HID private protocol data packet in a second embodiment of a remote control control method based on an Android system according to the present invention
  • FIG. 3 is a schematic flow chart of a third embodiment of a remote control control method based on an Android system according to the present invention.
  • FIG. 4 is a schematic diagram of functional modules of a first embodiment of a remote control device based on an Android system according to the present invention
  • FIG. 5 is a schematic diagram of a refinement function module of a transmitting module in a second embodiment of a remote control device based on an Android system according to the present invention
  • FIG. 6 is a schematic diagram of functional modules of a third embodiment of a remote control device based on an Android system according to the present invention.
  • the present invention provides a remote control control method based on the Android system.
  • the Android remote control control method includes:
  • the touch panel and the bluetooth module of the remote controller are initialized, that is, the touch panel and the bluetooth module of the remote controller are restored to an initial state, and the Bluetooth module is used to control the remote controller to establish a Bluetooth connection with the Bluetooth system of the controlled device. .
  • the timer is a 32-bit timer
  • the clock period is 1 millisecond, that is, the timing unit of the 32-bit timer is 1 millisecond. That is to say, when the current time data of the remote controller is 100, that is, the remote controller is powered on until the current time interval is 100 milliseconds, thereby enabling the remote controller to accurately record the time under the current touch operation and the touch operation.
  • the time interval between the two ensures the accurate collection of the touch information of the remote control touch panel and the realization of the subsequent remote control function.
  • the sampling data includes a touch trajectory and/or a touch distance, and combined with the collected time value of the touch panel timer, the touch speed can be calculated and analyzed.
  • the sampled data and the time value are encapsulated into a Bluetooth HID private protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the sampling data and the time value of the remote control touch panel are encapsulated into a Bluetooth HID proprietary protocol data packet, and the data packet is sent to the controlled by the Bluetooth module of the remote controller.
  • the Bluetooth system of the device is configured to enable the controlled device to analyze and calculate the sampled data and the time value according to the received data packet, thereby identifying the touch information of the user.
  • the data packet includes sampling data and a time value, where the sampling data includes a Bluetooth HID private protocol encoding, a touch action encoding, a touch action horizontal coordinate encoding, and a touch action vertical coordinate encoding.
  • the data packet is a 10-byte data packet, including one byte of Bluetooth HID proprietary protocol data encoding, one byte of touch action encoding, two bytes of touch action horizontal coordinate encoding, two bytes of Touch action vertical coordinate coding, and four bytes of timer time value data; thereby enabling the data packet to successfully bypass the Bluetooth HID standard protocol, and packaging the sampling data and time value of the Bluetooth touch remote controller into HID private
  • the protocol data packet is sent to the controlled device, and the sampled data and the time value are analyzed and operated by the controlled device.
  • the Bluetooth touch remote controller is only responsible for acquiring, encapsulating and transmitting the touch information, and does not need to analyze and calculate the touch information, thereby greatly reducing the processing load of the Bluetooth touch remote controller CPU, and simplifying the Bluetooth touch remote control.
  • the processing steps of the device further enable the Bluetooth touch remote control to acquire and process complex gestures, and also improve the processing speed of the Bluetooth touch remote controller.
  • the above-mentioned touch action code can be defined as 1 for pressing, 2 for sliding, and 3 for lifting.
  • the Android-based controlled device in this embodiment includes a BlueDroid process including a BlueDroid, an EventThread, and a touch point ring buffer, and an Input process including an EventHub and an InputReader.
  • the BlueDroid receives the data packet, and stores the data packet into a touch point ring buffer, and at the same time, the EventThread Reading the data packet, and reducing the read points into a finger sliding curve in chronological order, analyzing and calculating a touch trajectory from a vector speed and a motion trajectory, identifying a touch gesture, and then converting the touch gesture into an Android system Standard Input Key value, the Input Key value is written to the Input device node, then the Input process will immediately read and broadcast to the corresponding APP for processing.
  • the technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value.
  • the Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making
  • the Bluetooth remote control can also handle complex gestures, increasing processing speed.
  • the foregoing step S30 further includes:
  • the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer;
  • the Bluetooth module sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
  • the touch operation is completed according to the touch action code in the monitored sample data, that is, whether the touch action is raised by the touch action code; if yes, determining that the touch operation is completed, the acquired sample data and time will be monitored.
  • the value is encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer.
  • the touch action is performed within a preset time period, that is, whether a raised touch action is determined within a preset time period of the timer, and a single time is acquired within the preset time period. The touch action is lifted twice or the touch action is lifted twice, and then it can be judged whether it is a click operation or a double click operation to realize different operation functions.
  • the FIFO buffer is a first-in first-out buffer, that is, data is sequentially written, and data is sequentially read. For example, the first written data is first read.
  • the FIFO buffer can buffer continuous data to prevent data loss during storage operations, avoid frequent bus operations, reduce the processing load of the remote controller CPU, and allow the remote controller system to perform DMA. Operation greatly improves the data transmission speed.
  • the Bluetooth module of the remote controller sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device decodes the data packet, and analyzes the user input operation according to the received sampling data and time value. instruction.
  • the touchless operation is determined according to the sampling data of the touch panel, that is, the corresponding touch motion code is not acquired, the sampled data and the time value that have been acquired are discarded, and the sampling data of the touchpad of the remote controller is re-monitored.
  • the time value of the timer until the touch operation is determined according to the reacquired touch action code, and the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer to ensure subsequent operation functions. achieve.
  • a specific implementation step of determining whether there is a touch operation according to the touch action code in the sample data is further proposed, that is, the remote control control method based on the Android system acquires the remote control touch pad by one or more times. Sampling data and time value of the timer until it is determined that there is a touch operation, and the sampled data and the time value are encapsulated into HID private protocol data packets and sent to the controlled device for causing the controlled device of the Android system to receive the data according to the received data. The packet analyzes and calculates the sampled data and the time value, thereby identifying the touch information and ensuring effective operation of the user's finger touch.
  • the remote control method based on the Android system further includes:
  • the Bluetooth touch remote controller completes the sending of the data packet, it is determined whether the remote control open key is long pressed, and when it is determined that the remote control open key is long pressed, the remote control is controlled to be turned off.
  • the remote control is controlled to be turned off in time, it is possible to avoid erroneous operation caused by accidental touch of the remote controller, and also save operating power consumption of the remote controller.
  • the open key of the remote controller can be a physical button or a touch button, and the switch key is electrically connected to the battery of the remote controller.
  • the remote control can be controlled to be turned off by acquiring the long press information of the remote control opening key; it should be noted that the opening key of the remote control can be, but is not limited to, only turning off the remote control, and obtaining the key of the remote control. Different touch information can control the remote control to achieve different functions. For example, the double-click information of the open key is used to control the remote controller to enter a sleep state or release the sleep state.
  • the controlled device can be controlled by the remote controller to implement different functions. For example, in an embodiment, by acquiring the click information of the key, the controlled device can be controlled by the remote controller to implement the pause function or the unsuspend function; in another embodiment, by acquiring the double-click information of the key open, The controlled device can be controlled by the remote controller to implement the function of determining the current operation.
  • the process returns to the real-time monitoring of the sampling data of the remote control touch panel and the time value of the timer, and the sampled data and the time value are encapsulated into the Bluetooth HID private protocol data.
  • the package is sent to the controlled device through the Bluetooth module, and it is judged again whether the remote control opening key is long pressed; until it is judged that the remote control opening key is long pressed, the remote control is controlled to be turned off.
  • the remote controller is controlled to be shut down by judging whether the remote control key is pressed long or not; the user's operation intention is determined by acquiring the key touch information of the remote controller, and then different actions are performed to implement different functions.
  • the long push key is defined as controlling the remote control to be turned off, that is, only when the touch operation of the user long presses the key is collected, the remote controller is turned off, and when the touch operation of the long press key is not collected, It can be considered that the user does not intend to turn off the remote controller, and then continues to acquire the sampling data of the remote control touch panel and the time value of the timer, and performs corresponding implementation steps to ensure that the user's gesture touch operation can be recognized in time, and the gesture touch operation recognition is improved. Accuracy makes the Android-based remote control control method more intelligent.
  • the present invention also provides a remote control device based on the Android system.
  • the Android device-based remote control device provided by the present invention includes:
  • the initialization module 10 is configured to initialize a touch panel and a bluetooth module of the remote controller, and control the remote control to connect the controlled device to the Bluetooth device;
  • the touch panel and the bluetooth module of the remote controller are initialized, that is, the touch panel and the bluetooth module of the remote controller are restored to an initial state, and the Bluetooth module is used to control the remote controller to establish a Bluetooth connection with the Bluetooth system of the controlled device. .
  • the monitoring module 20 is configured to monitor the sampling data of the remote control touch panel and the time value of the timer in real time;
  • the timer is a 32-bit timer
  • the clock period is 1 millisecond, that is, the timing unit of the 32-bit timer is 1 millisecond. That is to say, when the current time data of the remote controller is 100, that is, the remote controller is powered on until the current time interval is 100 milliseconds, thereby enabling the remote controller to accurately record the time under the current touch operation and the touch operation.
  • the time interval between the two ensures the accurate collection of the touch information of the remote control touch panel and the realization of the subsequent remote control function.
  • the sampling data includes a touch trajectory and/or a touch distance, and combined with the collected time value of the touch panel timer, the touch speed can be calculated and analyzed.
  • the sending module 30 is configured to encapsulate the sampling data and the time value into a Bluetooth HID private protocol data packet and send the data to the controlled device through the Bluetooth module, so that the controlled device analyzes the user input operation according to the sampled data and the time value. instruction.
  • the sampling data and the time value of the remote control touch panel are encapsulated into a Bluetooth HID proprietary protocol data packet, and the data packet is sent to the controlled by the Bluetooth module of the remote controller.
  • the Bluetooth system of the device is configured to enable the controlled device to analyze and calculate the sampled data and the time value according to the received data packet, thereby identifying the touch information of the user.
  • the data packet includes sampling data and a time value, where the sampling data includes a Bluetooth HID private protocol encoding, a touch action encoding, a touch action horizontal coordinate encoding, and a touch action vertical coordinate encoding.
  • the data packet is a 10-byte data packet, including one byte of Bluetooth HID proprietary protocol data encoding, one byte of touch action encoding, two bytes of touch action horizontal coordinate encoding, two bytes of Touch action vertical coordinate coding, and four bytes of timer time value data; thereby enabling the data packet to successfully bypass the Bluetooth HID standard protocol, and packaging the sampling data and time value of the Bluetooth touch remote controller into HID private
  • the protocol data packet is sent to the controlled device, and the sampled data and the time value are analyzed and operated by the controlled device.
  • the Bluetooth touch remote controller is only responsible for acquiring, encapsulating and transmitting the touch information, and does not need to analyze and calculate the touch information, thereby greatly reducing the processing load of the Bluetooth touch remote controller CPU, and simplifying the Bluetooth touch remote control.
  • the processing steps of the device further enable the Bluetooth touch remote control to acquire and process complex gestures, and also improve the processing speed of the Bluetooth touch remote controller.
  • the above-mentioned touch action code can be defined as 1 for pressing, 2 for sliding, and 3 for lifting.
  • the Android-based controlled device in this embodiment includes a BlueDroid process including a BlueDroid, an EventThread, and a touch point ring buffer, and an Input process including an EventHub and an InputReader.
  • the BlueDroid receives the data packet, and stores the data packet into a touch point ring buffer, and at the same time, the EventThread Reading the data packet, and reducing the read points into a finger sliding curve in chronological order, analyzing and calculating a touch trajectory from a vector speed and a motion trajectory, identifying a touch gesture, and then converting the touch gesture into an Android system Standard Input Key value, the Input Key value is written to the Input device node, then the Input process will immediately read and broadcast to the corresponding APP for processing.
  • the technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value.
  • the Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  • the obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making
  • the Bluetooth remote control can also handle complex gestures, increasing processing speed.
  • the sending module 30 includes:
  • the determining unit 31 is configured to determine, according to the touch action code, whether there is a touch operation
  • the storage unit 32 is configured to package the sampled data and the time value into a Bluetooth HID private protocol data packet and store the data into the Bluetooth module FIFO buffer when determining that there is a touch operation;
  • the sending unit 33 is configured to send, by the Bluetooth module, the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
  • the touch operation is completed according to the touch action code in the monitored sample data, that is, whether the touch action is raised by the touch action code; if yes, determining that the touch operation is completed, the acquired sample data and time will be monitored.
  • the value is encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer.
  • the touch action is performed within a preset time period, that is, whether a raised touch action is determined within a preset time period of the timer, and a single time is acquired within the preset time period. The touch action is lifted twice or the touch action is lifted twice, and then it can be judged whether it is a click operation or a double click operation to realize different operation functions.
  • the FIFO buffer is a first-in first-out buffer, that is, data is sequentially written, and data is sequentially read. For example, the first written data is first read.
  • the FIFO buffer can buffer continuous data to prevent data loss during storage operations, avoid frequent bus operations, reduce the processing load of the remote controller CPU, and allow the remote controller system to perform DMA. Operation greatly improves the data transmission speed.
  • the Bluetooth module of the remote controller sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device decodes the data packet, and analyzes the user input operation according to the received sampling data and time value. instruction.
  • the determining unit 31 determines that there is no touch operation according to the sampling data of the touch panel, that is, the corresponding touch action code is not acquired, the sampled data and the time value that have been acquired are discarded, and the remote control based on the Android system is used.
  • the device control device re-executes the function of the monitoring module 20 until the touch operation is determined according to the re-acquired touch action code, and the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer to Ensure the implementation of subsequent operational functions.
  • a specific implementation step of determining whether there is a touch operation according to the touch action code in the sample data is further proposed, that is, the remote control device based on the Android system acquires the remote control touch panel by one or more times. Sampling data and time value of the timer until it is determined that there is a touch operation, and the sampled data and the time value are encapsulated into HID private protocol data packets and sent to the controlled device for causing the controlled device of the Android system to receive the data according to the received data. The packet analyzes and calculates the sampled data and the time value, thereby identifying the touch information and ensuring effective operation of the user's finger touch.
  • the remote control device based on the Android system further includes:
  • the shutdown module 40 is configured to acquire touch information of the remote control opening key, and control the remote control to be turned off when it is determined that the remote control opening key is long pressed.
  • the Bluetooth touch remote controller completes the sending of the data packet, it is determined whether the remote control open key is long pressed, and when it is determined that the remote control open key is long pressed, the remote control is controlled to be turned off.
  • the remote control is controlled to be turned off in time, it is possible to avoid erroneous operation caused by accidental touch of the remote controller, and also save operating power consumption of the remote controller.
  • the open key of the remote controller can be a physical button or a touch button, and the switch key is electrically connected to the battery of the remote controller.
  • the remote control can be controlled to be turned off by acquiring the long press information of the remote control opening key; it should be noted that the opening key of the remote control can be, but is not limited to, only turning off the remote control, and obtaining the key of the remote control. Different touch information can control the remote control to achieve different functions. For example, the double-click information of the open key is used to control the remote controller to enter a sleep state or release the sleep state.
  • the controlled device can be controlled by the remote controller to implement different functions. For example, in an embodiment, by acquiring the click information of the key, the controlled device can be controlled by the remote controller to implement the pause function or the unsuspend function; in another embodiment, by acquiring the double-click information of the key open, The controlled device can be controlled by the remote controller to implement the function of determining the current operation.
  • the process returns to the real-time monitoring of the sampling data of the remote control touch panel and the time value of the timer, and the sampled data and the time value are encapsulated into the Bluetooth HID private protocol data.
  • the package is sent to the controlled device through the Bluetooth module, and it is judged again whether the remote control opening key is long pressed; until it is judged that the remote control opening key is long pressed, the remote control is controlled to be turned off.
  • the remote controller is controlled to be shut down by judging whether the remote control key is pressed long or not; the user's operation intention is determined by acquiring the key touch information of the remote controller, and then different actions are performed to implement different functions.
  • the long push key is defined as controlling the remote control to be turned off, that is, only when the touch operation of the user long presses the key is collected, the remote controller is turned off, and when the touch operation of the long press key is not collected, It can be considered that the user does not intend to turn off the remote controller, and then continues to acquire the sampling data of the remote control touch panel and the time value of the timer, and performs corresponding implementation steps to ensure that the user's gesture touch operation can be recognized in time, and the gesture touch operation recognition is improved. Accuracy makes the Android-based remote control device more intelligent.

Abstract

A method for controlling a remote controller based on an android system. The method for controlling a remote controller based on an android system comprises the following steps: initializing a touch panel and a Bluetooth module of a remote controller and controlling the remote controller such that same is in a Bluetooth connection with a controlled device; monitoring sampling data of the touch panel of the remote controller and a time value of a timer in real time; and encapsulating the sampling data and the time value into a Bluetooth HID private protocol data packet and sending same to the controlled device by means of the Bluetooth module, so that the controlled device analyzes an operation instruction input by a user according to the sampling data and the time value. Also disclosed is an apparatus for controlling a remote controller based on an android system. The technical solution is aimed at solving the technical problems that an existing Bluetooth touch-control remote controller cannot process a complicated gesture and is slow in processing speed.

Description

基于安卓系统的遥控器控制方法和装置  Remote control control method and device based on Android system
技术领域Technical field
本发明涉及遥控器触控领域,尤其涉及一种基于安卓系统的遥控器控制方法和装置。The invention relates to the field of remote control touch, and in particular to a remote control control method and device based on an Android system.
背景技术Background technique
随着安卓系统的普及和应用,安卓的无线输入设备也不断增多,比如蓝牙遥控器、蓝牙键盘等。但是,目前市场上的蓝牙触控遥控器的触摸功能只能使用HID的键盘协议,也就必须要求遥控器的CPU耗费大量的时间来进行触摸手势识别,然后将识别出的手势转换成标准的HID键盘值再发送给安卓系统,使得现有的蓝牙触控遥控器不能处理复杂的手势且处理速度慢。With the popularity and application of Android, Android's wireless input devices are also increasing, such as Bluetooth remote control, Bluetooth keyboard and so on. However, the touch function of the Bluetooth touch control on the market can only use the HID keyboard protocol, and the CPU of the remote controller must be required to spend a lot of time to perform touch gesture recognition, and then convert the recognized gesture into a standard one. The HID keyboard value is sent to the Android system, so that the existing Bluetooth touch remote controller cannot handle complicated gestures and the processing speed is slow.
发明内容Summary of the invention
本发明的主要目的在于提供一种基于安卓系统的遥控器控制方法和装置,旨在解决现有的蓝牙触控遥控器不能处理复杂的手势且处理速度慢的技术问题。The main object of the present invention is to provide a remote control control method and device based on an Android system, which aims to solve the technical problem that the existing Bluetooth touch remote controller cannot handle complicated gestures and has a slow processing speed.
为实现上述目的,本发明提供的一种基于安卓系统的遥控器控制方法包括以下步骤:To achieve the above objective, the remote control control method based on the Android system provided by the present invention includes the following steps:
初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;Initializing the remote control's touchpad and Bluetooth module, and controlling the remote control to connect to the controlled device;
实时监测遥控器触摸板的采样数据和计时器的时间值;Real-time monitoring of the sample data of the remote control touch panel and the time value of the timer;
将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
优选地,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。Preferably, the sample data includes Bluetooth HID proprietary protocol coding, touch action coding, touch action horizontal coordinate coding, and touch action vertical coordinate coding.
优选地,所述将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令的步骤包括:Preferably, the sampling data and the time value are encapsulated into a Bluetooth HID private protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. The steps include:
根据所述触摸动作编码判断触摸操作是否完成;Determining whether the touch operation is completed according to the touch action code;
若是,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;If yes, the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer;
所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The Bluetooth module sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
优选地,所述基于安卓系统的遥控器控制方法还包括:Preferably, the Android system-based remote controller control method further includes:
获取遥控器开关键的触摸信息,并判断遥控器开关键是否被长按,若是,则控制遥控器关机。Get the touch information of the remote control open key and judge whether the remote control open key is pressed long, and if so, control the remote control to shut down.
优选地,所述计时器为32位计时器,时钟周期为1毫秒。Preferably, the timer is a 32-bit timer with a clock period of 1 millisecond.
此外,为实现上述目的,本发明还提供一种基于安卓系统的遥控器控制装置包括:In addition, in order to achieve the above object, the present invention further provides a remote controller control apparatus based on an Android system, including:
初始化模块,用于初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;The initialization module is configured to initialize the touch panel and the bluetooth module of the remote controller, and control the remote control to connect the controlled device to the Bluetooth;
监测模块,用于实时监测遥控器触摸板的采样数据和计时器的时间值;a monitoring module for monitoring the sampling data of the remote control touch panel and the time value of the timer in real time;
发送模块,用于将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。a sending module, configured to encapsulate the sampling data and the time value into a Bluetooth HID private protocol data packet, and send the data to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. .
优选地,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。Preferably, the sample data includes Bluetooth HID proprietary protocol coding, touch action coding, touch action horizontal coordinate coding, and touch action vertical coordinate coding.
优选地,所述发送模块包括:Preferably, the sending module includes:
判断单元,用于根据所述触摸动作编码判断触摸操作是否完成;a determining unit, configured to determine, according to the touch action code, whether the touch operation is completed;
存储单元,用于当判断有触摸操作完成时,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;a storage unit, configured to encapsulate the sampled data and the time value into a Bluetooth HID private protocol data packet and store the data into the Bluetooth module FIFO buffer when it is determined that the touch operation is completed;
发送单元,用于所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。And a sending unit, configured to send, by the Bluetooth module, the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
优选地,所述基于安卓系统的遥控器控制装置还包括:Preferably, the Android system-based remote control device further includes:
关机模块,用于获取遥控器开关键的触摸信息,并当判断遥控器开关键被长按时,控制遥控器关机。The shutdown module is used to obtain the touch information of the remote control opening key, and when the remote control opening key is judged to be long pressed, the remote control is controlled to be turned off.
优选地,所述计时器为32位计时器,时钟周期为1毫秒。Preferably, the timer is a 32-bit timer with a clock period of 1 millisecond.
本发明提供的技术方案通过初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;实时监测遥控器触摸板的采样数据和计时器的时间值;将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。将获取的遥控器触摸手势数据打包发送至被控设备,使得遥控器不需对触摸数据进行识别再发送,利用被控设备来对触摸手势进行识别,进而减轻了蓝牙遥控器的系统负担,使得蓝牙遥控器对复杂手势也能处理,提高了处理速度。The technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value. The Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. The obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making The Bluetooth remote control can also handle complex gestures, increasing processing speed.
附图说明DRAWINGS
图1为本发明基于安卓系统的遥控器控制方法第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a remote control control method based on an Android system according to the present invention;
图2为本发明基于安卓系统的遥控器控制方法第二实施例中发送蓝牙HID私有协议数据包步骤的细化流程示意图;2 is a schematic flowchart of a step of transmitting a Bluetooth HID private protocol data packet in a second embodiment of a remote control control method based on an Android system according to the present invention;
图3为本发明基于安卓系统的遥控器控制方法第三实施例的流程示意图;3 is a schematic flow chart of a third embodiment of a remote control control method based on an Android system according to the present invention;
图4为本发明基于安卓系统的遥控器控制装置第一实施例的功能模块示意图;4 is a schematic diagram of functional modules of a first embodiment of a remote control device based on an Android system according to the present invention;
图5为本发明基于安卓系统的遥控器控制装置第二实施例中发送模块的细化功能模块示意图;5 is a schematic diagram of a refinement function module of a transmitting module in a second embodiment of a remote control device based on an Android system according to the present invention;
图6为本发明基于安卓系统的遥控器控制装置第三实施例的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of a third embodiment of a remote control device based on an Android system according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用于解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种基于安卓系统的遥控器控制方法,参照图1,在一实施例中,该基于安卓系统的遥控器控制方法包括:The present invention provides a remote control control method based on the Android system. Referring to FIG. 1 , in an embodiment, the Android remote control control method includes:
S10,初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;S10, initializing the remote control's touchpad and Bluetooth module, and controlling the remote control to connect to the controlled device;
本实施例中,所述初始化遥控器的触摸板和蓝牙模块,即为将遥控器的触摸板和蓝牙模块还原至初始状态,并通过蓝牙模块控制遥控器与被控设备的蓝牙系统建立蓝牙连接。In this embodiment, the touch panel and the bluetooth module of the remote controller are initialized, that is, the touch panel and the bluetooth module of the remote controller are restored to an initial state, and the Bluetooth module is used to control the remote controller to establish a Bluetooth connection with the Bluetooth system of the controlled device. .
S20,实时监测遥控器触摸板的采样数据和计时器的时间值;S20, real-time monitoring the sampling data of the remote control touch panel and the time value of the timer;
优选地,所述计时器为32位计时器,时钟周期为1毫秒,即所述32位计时器的计时单位为1毫秒。也就是说,当所述遥控器的当前时间数据为100时,即为遥控器开机至当前的时间间隔为100毫秒,进而使得所述遥控器能准确记录当前触摸操作下的时间,及触摸操作之间的时间间隔,确保所述遥控器触摸板的触摸信息的准确采集及后续遥控器功能的实现。Preferably, the timer is a 32-bit timer, and the clock period is 1 millisecond, that is, the timing unit of the 32-bit timer is 1 millisecond. That is to say, when the current time data of the remote controller is 100, that is, the remote controller is powered on until the current time interval is 100 milliseconds, thereby enabling the remote controller to accurately record the time under the current touch operation and the touch operation. The time interval between the two ensures the accurate collection of the touch information of the remote control touch panel and the realization of the subsequent remote control function.
本实施例中,所述采样数据包括触摸轨迹和/或触摸距离,结合采集的所述触摸板计时器的时间值,后续即可计算得出触摸速度并对其进行分析。In this embodiment, the sampling data includes a touch trajectory and/or a touch distance, and combined with the collected time value of the touch panel timer, the touch speed can be calculated and analyzed.
S30,将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。S30. The sampled data and the time value are encapsulated into a Bluetooth HID private protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
具体地,当判断所述遥控器有触摸操作时,则将遥控器触摸板的采样数据和时间值封装成蓝牙HID私有协议数据包,并通过遥控器的蓝牙模块将上述数据包发送至被控设备的蓝牙系统,用于使得所述被控设备根据接收的数据包对采样数据及时间值进行分析及运算,进而对用户的触摸信息进行识别。Specifically, when it is determined that the remote controller has a touch operation, the sampling data and the time value of the remote control touch panel are encapsulated into a Bluetooth HID proprietary protocol data packet, and the data packet is sent to the controlled by the Bluetooth module of the remote controller. The Bluetooth system of the device is configured to enable the controlled device to analyze and calculate the sampled data and the time value according to the received data packet, thereby identifying the touch information of the user.
需要说明的是,所述数据包包括采样数据和时间值,其中,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。所述数据包为一个10个字节的数据包,包括一个字节的蓝牙HID私有协议数据编码,一个字节的触摸动作编码,两个字节的触摸动作水平坐标编码,两个字节的触摸动作垂直坐标编码,以及四个字节的计时器时间值数据;进而使得所述数据包能成功绕开蓝牙HID的标准协议,将蓝牙触控遥控器的采样数据及时间值封装成HID私有协议数据包发送给被控设备,通过被控设备来对采样数据和时间值进行分析运算。也就是说,所述蓝牙触控遥控器只负责对触摸信息进行获取、封装和发送,无需对触摸信息进行分析运算,大大减轻了蓝牙触控遥控器CPU的处理负担,简化了蓝牙触控遥控器的处理步骤,进而也就使得所述蓝牙触控遥控器对复杂的手势也能进行获取和处理,也提高了蓝牙触控遥控器的处理速度。It should be noted that the data packet includes sampling data and a time value, where the sampling data includes a Bluetooth HID private protocol encoding, a touch action encoding, a touch action horizontal coordinate encoding, and a touch action vertical coordinate encoding. The data packet is a 10-byte data packet, including one byte of Bluetooth HID proprietary protocol data encoding, one byte of touch action encoding, two bytes of touch action horizontal coordinate encoding, two bytes of Touch action vertical coordinate coding, and four bytes of timer time value data; thereby enabling the data packet to successfully bypass the Bluetooth HID standard protocol, and packaging the sampling data and time value of the Bluetooth touch remote controller into HID private The protocol data packet is sent to the controlled device, and the sampled data and the time value are analyzed and operated by the controlled device. That is to say, the Bluetooth touch remote controller is only responsible for acquiring, encapsulating and transmitting the touch information, and does not need to analyze and calculate the touch information, thereby greatly reducing the processing load of the Bluetooth touch remote controller CPU, and simplifying the Bluetooth touch remote control. The processing steps of the device further enable the Bluetooth touch remote control to acquire and process complex gestures, and also improve the processing speed of the Bluetooth touch remote controller.
其中,上述触摸动作编码,可以定义为,1表示按下,2表示滑动,3表示抬起。The above-mentioned touch action code can be defined as 1 for pressing, 2 for sliding, and 3 for lifting.
需要说明的是,本实施例中所述基于安卓系统的被控设备包括BlueDroid进程和Input进程,所述BlueDroid进程包括BlueDroid、EventThread和触摸点环形缓冲区,所述Input进程包括EventHub和InputReader。当所述蓝牙触控遥控器发送所述数据包至被控设备,所述BlueDroid接收所述数据包,并把所述数据包存入触摸点环形缓冲区内,与此同时,所述、EventThread读取所述数据包,并将读取的点按照时间先后顺序还原成手指滑动曲线,从矢量速度和运动轨迹的角度分析并计算出触摸轨迹,识别触摸手势,然后将触摸手势转换成安卓系统标准的Input Key值,把Input Key值写入Input设备节点,则Input进程会立即读取,并广播发送给对应的APP进行处理。It should be noted that the Android-based controlled device in this embodiment includes a BlueDroid process including a BlueDroid, an EventThread, and a touch point ring buffer, and an Input process including an EventHub and an InputReader. When the Bluetooth touch remote controller sends the data packet to the controlled device, the BlueDroid receives the data packet, and stores the data packet into a touch point ring buffer, and at the same time, the EventThread Reading the data packet, and reducing the read points into a finger sliding curve in chronological order, analyzing and calculating a touch trajectory from a vector speed and a motion trajectory, identifying a touch gesture, and then converting the touch gesture into an Android system Standard Input Key value, the Input Key value is written to the Input device node, then the Input process will immediately read and broadcast to the corresponding APP for processing.
本发明提供的技术方案通过初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;实时监测遥控器触摸板的采样数据和计时器的时间值;将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。将获取的遥控器触摸手势数据打包发送至被控设备,使得遥控器不需对触摸数据进行识别再发送,利用被控设备来对触摸手势进行识别,进而减轻了蓝牙遥控器的系统负担,使得蓝牙遥控器对复杂手势也能处理,提高了处理速度。The technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value. The Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. The obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making The Bluetooth remote control can also handle complex gestures, increasing processing speed.
进一步地,参照图2,基于上述实施例,在本实施例中,上述步骤S30还包括:Further, referring to FIG. 2, based on the foregoing embodiment, in the embodiment, the foregoing step S30 further includes:
S31,根据所述触摸动作编码判断触摸操作是否完成;S31. Determine, according to the touch action code, whether the touch operation is completed.
S32,若是,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;S32. If yes, the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer;
S33,所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。S33. The Bluetooth module sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
具体地,根据监测的采样数据中的触摸动作编码判断触摸操作是否完成,也即通过触摸动作编码判断是否有抬起的触摸动作;若是,则判断触摸操作完成,将监测获取的采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内。需要进一步说明的是,所述触摸动作是在预设的时间内进行判断,也即在计时器预设的计时时长内判断是否有抬起的触摸动作,在该预设时长内获取的是单次抬起触摸动作还是两次抬起触摸动作,进而可以判断是单击操作还是双击操作,用以实现不同的操作功能。Specifically, it is determined whether the touch operation is completed according to the touch action code in the monitored sample data, that is, whether the touch action is raised by the touch action code; if yes, determining that the touch operation is completed, the acquired sample data and time will be monitored. The value is encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer. It should be further noted that the touch action is performed within a preset time period, that is, whether a raised touch action is determined within a preset time period of the timer, and a single time is acquired within the preset time period. The touch action is lifted twice or the touch action is lifted twice, and then it can be judged whether it is a click operation or a double click operation to realize different operation functions.
所述FIFO缓存器是一种先进先出的缓存器,也即按顺序写入数据,按顺序读出数据,例如,第一个写入的数据第一个被读出。本实施例中,所述FIFO缓存器能对连续的数据进行缓存,防止在进行存储操作时丢失数据,同时可避免频繁的总线操作,减轻了遥控器CPU处理负担,并且允许遥控器系统进行DMA操作,大大提高了数据的传输速度。The FIFO buffer is a first-in first-out buffer, that is, data is sequentially written, and data is sequentially read. For example, the first written data is first read. In this embodiment, the FIFO buffer can buffer continuous data to prevent data loss during storage operations, avoid frequent bus operations, reduce the processing load of the remote controller CPU, and allow the remote controller system to perform DMA. Operation greatly improves the data transmission speed.
所述遥控器的蓝牙模块将存储的蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备对数据包进行解码,根据接收的所述采样数据和时间值分析用户输入的操作指令。The Bluetooth module of the remote controller sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device decodes the data packet, and analyzes the user input operation according to the received sampling data and time value. instruction.
需要说明的是,当根据触控板的采样数据判定无触摸操作时,也即未获取相应的触摸动作编码,则丢弃已经获取的采样数据和时间值,重新监测遥控器触摸板的采样数据和计时器的时间值,直至根据重新获取的触摸动作编码判断有触摸操作,则将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内,以确保后续操作功能的实现。It should be noted that when the touchless operation is determined according to the sampling data of the touch panel, that is, the corresponding touch motion code is not acquired, the sampled data and the time value that have been acquired are discarded, and the sampling data of the touchpad of the remote controller is re-monitored. The time value of the timer until the touch operation is determined according to the reacquired touch action code, and the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer to ensure subsequent operation functions. achieve.
本实施例中,进一步提出了根据采样数据中触摸动作编码判断是否有触摸操作时的具体实施步骤,也就是说,所述基于安卓系统的遥控器控制方法通过一次或者多次获取遥控器触摸板的采样数据和计时器的时间值,直至判断有触摸操作,将采样数据和时间值封装成HID私有协议数据包发送至被控设备,用于使得所述安卓系统的被控设备根据接收的数据包对采样数据及时间值进行分析及运算,进而对触摸信息进行识别,保证用户手指触摸的有效操作。In this embodiment, a specific implementation step of determining whether there is a touch operation according to the touch action code in the sample data is further proposed, that is, the remote control control method based on the Android system acquires the remote control touch pad by one or more times. Sampling data and time value of the timer until it is determined that there is a touch operation, and the sampled data and the time value are encapsulated into HID private protocol data packets and sent to the controlled device for causing the controlled device of the Android system to receive the data according to the received data. The packet analyzes and calculates the sampled data and the time value, thereby identifying the touch information and ensuring effective operation of the user's finger touch.
进一步地,参照图3,基于上述实施例,在本实施例中,所述基于安卓系统的遥控器控制方法还包括:Further, referring to FIG. 3, based on the foregoing embodiment, in the embodiment, the remote control method based on the Android system further includes:
S40,获取遥控器开关键的触摸信息,并判断遥控器开关键是否被长按,若是,则控制遥控器关机。S40, obtaining the touch information of the remote control opening key, and determining whether the remote control opening key is long pressed, and if so, controlling the remote control to be turned off.
具体地,当所述蓝牙触控遥控器完成数据包的发送,则判断遥控器开关键是否被长按,当判定所述遥控器开关键被长按时,则控制遥控器关机。通过控制遥控器及时关机,能避免误触遥控器而发生的误操作,也能节省所述遥控器的运行功耗。Specifically, when the Bluetooth touch remote controller completes the sending of the data packet, it is determined whether the remote control open key is long pressed, and when it is determined that the remote control open key is long pressed, the remote control is controlled to be turned off. By controlling the remote control to turn off in time, it is possible to avoid erroneous operation caused by accidental touch of the remote controller, and also save operating power consumption of the remote controller.
可以理解的是,所述遥控器的开关键可为物理按键或是触摸键,且所述开关键与遥控器的电池电连接。It can be understood that the open key of the remote controller can be a physical button or a touch button, and the switch key is electrically connected to the battery of the remote controller.
本实施例中,通过获取遥控器开关键的长按信息,可以控制遥控器关机;应当说明的是,所述遥控器的开关键可以但不限于只实现遥控器的关机,通过获取开关键的不同触摸信息,可以控制遥控器实现不同的功能。例如,获取开关键的双击信息,用于控制遥控器进入睡眠状态或是解除睡眠状态。In this embodiment, the remote control can be controlled to be turned off by acquiring the long press information of the remote control opening key; it should be noted that the opening key of the remote control can be, but is not limited to, only turning off the remote control, and obtaining the key of the remote control. Different touch information can control the remote control to achieve different functions. For example, the double-click information of the open key is used to control the remote controller to enter a sleep state or release the sleep state.
或者,通过获取开关键的不同触摸信息,可以通过遥控器控制被控设备实现不同的功能。例如,在一种实施方式中,通过获取开关键的单击信息,可以通过遥控器控制被控设备实现暂停功能或解除暂停功能;在另一种实施方式中,通过获取开关键的双击信息,可以通过遥控器控制被控设备实现确定当前操作的功能。Alternatively, by acquiring different key touch information, the controlled device can be controlled by the remote controller to implement different functions. For example, in an embodiment, by acquiring the click information of the key, the controlled device can be controlled by the remote controller to implement the pause function or the unsuspend function; in another embodiment, by acquiring the double-click information of the key open, The controlled device can be controlled by the remote controller to implement the function of determining the current operation.
需要说明的是,当判断遥控器开关键未被长按时,则回到实时监测遥控器触摸板的采样数据和计时器的时间值的步骤,将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,再次判断遥控器开关键是否被长按;直至判断遥控器开关键被长按时,则控制遥控器关机。It should be noted that when it is judged that the remote control switch key is not long pressed, the process returns to the real-time monitoring of the sampling data of the remote control touch panel and the time value of the timer, and the sampled data and the time value are encapsulated into the Bluetooth HID private protocol data. The package is sent to the controlled device through the Bluetooth module, and it is judged again whether the remote control opening key is long pressed; until it is judged that the remote control opening key is long pressed, the remote control is controlled to be turned off.
可以理解的是,通过判断遥控器开关键是否被长按,来控制遥控器是否关机;通过获取遥控器开关键的触摸信息,来判断用户的操作意图,进而执行不同的动作,实现不同功能。本实施例中,长按开关键定义为控制遥控器关机,也即只有当采集到用户长按开关键的触摸操作,遥控器才会关机,当未采集到长按开关键的触摸操作,即可认为用户没有关闭遥控器的意图,进而继续获取遥控器触摸板的采样数据和计时器的时间值,执行相应的实施步骤,确保用户的手势触摸操作能被及时识别,提高手势触摸操作识别的准确性,使得所述基于安卓系统的遥控器控制方法更加智能化。It can be understood that the remote controller is controlled to be shut down by judging whether the remote control key is pressed long or not; the user's operation intention is determined by acquiring the key touch information of the remote controller, and then different actions are performed to implement different functions. In this embodiment, the long push key is defined as controlling the remote control to be turned off, that is, only when the touch operation of the user long presses the key is collected, the remote controller is turned off, and when the touch operation of the long press key is not collected, It can be considered that the user does not intend to turn off the remote controller, and then continues to acquire the sampling data of the remote control touch panel and the time value of the timer, and performs corresponding implementation steps to ensure that the user's gesture touch operation can be recognized in time, and the gesture touch operation recognition is improved. Accuracy makes the Android-based remote control control method more intelligent.
本发明还提供一种基于安卓系统的遥控器控制装置,参照图4,在一实施例中,本发明提供的基于安卓系统的遥控器控制装置包括:The present invention also provides a remote control device based on the Android system. Referring to FIG. 4, in an embodiment, the Android device-based remote control device provided by the present invention includes:
初始化模块10,用于初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;The initialization module 10 is configured to initialize a touch panel and a bluetooth module of the remote controller, and control the remote control to connect the controlled device to the Bluetooth device;
本实施例中,所述初始化遥控器的触摸板和蓝牙模块,即为将遥控器的触摸板和蓝牙模块还原至初始状态,并通过蓝牙模块控制遥控器与被控设备的蓝牙系统建立蓝牙连接。In this embodiment, the touch panel and the bluetooth module of the remote controller are initialized, that is, the touch panel and the bluetooth module of the remote controller are restored to an initial state, and the Bluetooth module is used to control the remote controller to establish a Bluetooth connection with the Bluetooth system of the controlled device. .
监测模块20,用于实时监测遥控器触摸板的采样数据和计时器的时间值;The monitoring module 20 is configured to monitor the sampling data of the remote control touch panel and the time value of the timer in real time;
优选地,所述计时器为32位计时器,时钟周期为1毫秒,即所述32位计时器的计时单位为1毫秒。也就是说,当所述遥控器的当前时间数据为100时,即为遥控器开机至当前的时间间隔为100毫秒,进而使得所述遥控器能准确记录当前触摸操作下的时间,及触摸操作之间的时间间隔,确保所述遥控器触摸板的触摸信息的准确采集及后续遥控器功能的实现。Preferably, the timer is a 32-bit timer, and the clock period is 1 millisecond, that is, the timing unit of the 32-bit timer is 1 millisecond. That is to say, when the current time data of the remote controller is 100, that is, the remote controller is powered on until the current time interval is 100 milliseconds, thereby enabling the remote controller to accurately record the time under the current touch operation and the touch operation. The time interval between the two ensures the accurate collection of the touch information of the remote control touch panel and the realization of the subsequent remote control function.
本实施例中,所述采样数据包括触摸轨迹和/或触摸距离,结合采集的所述触摸板计时器的时间值,后续即可计算得出触摸速度并对其进行分析。In this embodiment, the sampling data includes a touch trajectory and/or a touch distance, and combined with the collected time value of the touch panel timer, the touch speed can be calculated and analyzed.
发送模块30,用于将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The sending module 30 is configured to encapsulate the sampling data and the time value into a Bluetooth HID private protocol data packet and send the data to the controlled device through the Bluetooth module, so that the controlled device analyzes the user input operation according to the sampled data and the time value. instruction.
具体地,当判断所述遥控器有触摸操作时,则将遥控器触摸板的采样数据和时间值封装成蓝牙HID私有协议数据包,并通过遥控器的蓝牙模块将上述数据包发送至被控设备的蓝牙系统,用于使得所述被控设备根据接收的数据包对采样数据及时间值进行分析及运算,进而对用户的触摸信息进行识别。Specifically, when it is determined that the remote controller has a touch operation, the sampling data and the time value of the remote control touch panel are encapsulated into a Bluetooth HID proprietary protocol data packet, and the data packet is sent to the controlled by the Bluetooth module of the remote controller. The Bluetooth system of the device is configured to enable the controlled device to analyze and calculate the sampled data and the time value according to the received data packet, thereby identifying the touch information of the user.
需要说明的是,所述数据包包括采样数据和时间值,其中,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。所述数据包为一个10个字节的数据包,包括一个字节的蓝牙HID私有协议数据编码,一个字节的触摸动作编码,两个字节的触摸动作水平坐标编码,两个字节的触摸动作垂直坐标编码,以及四个字节的计时器时间值数据;进而使得所述数据包能成功绕开蓝牙HID的标准协议,将蓝牙触控遥控器的采样数据及时间值封装成HID私有协议数据包发送给被控设备,通过被控设备来对采样数据和时间值进行分析运算。也就是说,所述蓝牙触控遥控器只负责对触摸信息进行获取、封装和发送,无需对触摸信息进行分析运算,大大减轻了蓝牙触控遥控器CPU的处理负担,简化了蓝牙触控遥控器的处理步骤,进而也就使得所述蓝牙触控遥控器对复杂的手势也能进行获取和处理,也提高了蓝牙触控遥控器的处理速度。It should be noted that the data packet includes sampling data and a time value, where the sampling data includes a Bluetooth HID private protocol encoding, a touch action encoding, a touch action horizontal coordinate encoding, and a touch action vertical coordinate encoding. The data packet is a 10-byte data packet, including one byte of Bluetooth HID proprietary protocol data encoding, one byte of touch action encoding, two bytes of touch action horizontal coordinate encoding, two bytes of Touch action vertical coordinate coding, and four bytes of timer time value data; thereby enabling the data packet to successfully bypass the Bluetooth HID standard protocol, and packaging the sampling data and time value of the Bluetooth touch remote controller into HID private The protocol data packet is sent to the controlled device, and the sampled data and the time value are analyzed and operated by the controlled device. That is to say, the Bluetooth touch remote controller is only responsible for acquiring, encapsulating and transmitting the touch information, and does not need to analyze and calculate the touch information, thereby greatly reducing the processing load of the Bluetooth touch remote controller CPU, and simplifying the Bluetooth touch remote control. The processing steps of the device further enable the Bluetooth touch remote control to acquire and process complex gestures, and also improve the processing speed of the Bluetooth touch remote controller.
其中,上述触摸动作编码,可以定义为,1表示按下,2表示滑动,3表示抬起。The above-mentioned touch action code can be defined as 1 for pressing, 2 for sliding, and 3 for lifting.
需要说明的是,本实施例中所述基于安卓系统的被控设备包括BlueDroid进程和Input进程,所述BlueDroid进程包括BlueDroid、EventThread和触摸点环形缓冲区,所述Input进程包括EventHub和InputReader。当所述蓝牙触控遥控器发送所述数据包至被控设备,所述BlueDroid接收所述数据包,并把所述数据包存入触摸点环形缓冲区内,与此同时,所述、EventThread读取所述数据包,并将读取的点按照时间先后顺序还原成手指滑动曲线,从矢量速度和运动轨迹的角度分析并计算出触摸轨迹,识别触摸手势,然后将触摸手势转换成安卓系统标准的Input Key值,把Input Key值写入Input设备节点,则Input进程会立即读取,并广播发送给对应的APP进行处理。It should be noted that the Android-based controlled device in this embodiment includes a BlueDroid process including a BlueDroid, an EventThread, and a touch point ring buffer, and an Input process including an EventHub and an InputReader. When the Bluetooth touch remote controller sends the data packet to the controlled device, the BlueDroid receives the data packet, and stores the data packet into a touch point ring buffer, and at the same time, the EventThread Reading the data packet, and reducing the read points into a finger sliding curve in chronological order, analyzing and calculating a touch trajectory from a vector speed and a motion trajectory, identifying a touch gesture, and then converting the touch gesture into an Android system Standard Input Key value, the Input Key value is written to the Input device node, then the Input process will immediately read and broadcast to the corresponding APP for processing.
本发明提供的技术方案通过初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;实时监测遥控器触摸板的采样数据和计时器的时间值;将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。将获取的遥控器触摸手势数据打包发送至被控设备,使得遥控器不需对触摸数据进行识别再发送,利用被控设备来对触摸手势进行识别,进而减轻了蓝牙遥控器的系统负担,使得蓝牙遥控器对复杂手势也能处理,提高了处理速度。The technical solution provided by the invention initializes the touchpad and the bluetooth module of the remote controller, and controls the remote control to connect the controlled device to the Bluetooth device; monitors the sampling data of the touchpad of the remote controller and the time value of the timer in real time; and packages the sampled data and the time value. The Bluetooth HID private protocol data packet is sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. The obtained remote control touch gesture data is packaged and sent to the controlled device, so that the remote controller does not need to identify and retransmit the touch data, and the controlled device is used to identify the touch gesture, thereby reducing the system burden of the Bluetooth remote controller, thereby making The Bluetooth remote control can also handle complex gestures, increasing processing speed.
进一步地,请参照图5,基于上述实施例,在本实施例中,所述发送模块30包括:Further, referring to FIG. 5, based on the foregoing embodiment, in the embodiment, the sending module 30 includes:
判断单元31,用于根据所述触摸动作编码判断是否有触摸操作;The determining unit 31 is configured to determine, according to the touch action code, whether there is a touch operation;
存储单元32,用于当判断有触摸操作时,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;The storage unit 32 is configured to package the sampled data and the time value into a Bluetooth HID private protocol data packet and store the data into the Bluetooth module FIFO buffer when determining that there is a touch operation;
发送单元33,用于所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The sending unit 33 is configured to send, by the Bluetooth module, the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
具体地,根据监测的采样数据中的触摸动作编码判断触摸操作是否完成,也即通过触摸动作编码判断是否有抬起的触摸动作;若是,则判断触摸操作完成,将监测获取的采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内。需要进一步说明的是,所述触摸动作是在预设的时间内进行判断,也即在计时器预设的计时时长内判断是否有抬起的触摸动作,在该预设时长内获取的是单次抬起触摸动作还是两次抬起触摸动作,进而可以判断是单击操作还是双击操作,用以实现不同的操作功能。Specifically, it is determined whether the touch operation is completed according to the touch action code in the monitored sample data, that is, whether the touch action is raised by the touch action code; if yes, determining that the touch operation is completed, the acquired sample data and time will be monitored. The value is encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer. It should be further noted that the touch action is performed within a preset time period, that is, whether a raised touch action is determined within a preset time period of the timer, and a single time is acquired within the preset time period. The touch action is lifted twice or the touch action is lifted twice, and then it can be judged whether it is a click operation or a double click operation to realize different operation functions.
所述FIFO缓存器是一种先进先出的缓存器,也即按顺序写入数据,按顺序读出数据,例如,第一个写入的数据第一个被读出。本实施例中,所述FIFO缓存器能对连续的数据进行缓存,防止在进行存储操作时丢失数据,同时可避免频繁的总线操作,减轻了遥控器CPU处理负担,并且允许遥控器系统进行DMA操作,大大提高了数据的传输速度。The FIFO buffer is a first-in first-out buffer, that is, data is sequentially written, and data is sequentially read. For example, the first written data is first read. In this embodiment, the FIFO buffer can buffer continuous data to prevent data loss during storage operations, avoid frequent bus operations, reduce the processing load of the remote controller CPU, and allow the remote controller system to perform DMA. Operation greatly improves the data transmission speed.
所述遥控器的蓝牙模块将存储的蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备对数据包进行解码,根据接收的所述采样数据和时间值分析用户输入的操作指令。The Bluetooth module of the remote controller sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device decodes the data packet, and analyzes the user input operation according to the received sampling data and time value. instruction.
需要说明的是,当判断单元31根据触控板的采样数据判定无触摸操作时,也即未获取相应的触摸动作编码,则丢弃已经获取的采样数据和时间值,所述基于安卓系统的遥控器控制装置重新执行监测模块20的功能,直至根据重新获取的触摸动作编码判断有触摸操作,则将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内,以确保后续操作功能的实现。It should be noted that, when the determining unit 31 determines that there is no touch operation according to the sampling data of the touch panel, that is, the corresponding touch action code is not acquired, the sampled data and the time value that have been acquired are discarded, and the remote control based on the Android system is used. The device control device re-executes the function of the monitoring module 20 until the touch operation is determined according to the re-acquired touch action code, and the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and stored in the Bluetooth module FIFO buffer to Ensure the implementation of subsequent operational functions.
本实施例中,进一步提出了根据采样数据中触摸动作编码判断是否有触摸操作时的具体实施步骤,也就是说,所述基于安卓系统的遥控器控制装置通过一次或者多次获取遥控器触摸板的采样数据和计时器的时间值,直至判断有触摸操作,将采样数据和时间值封装成HID私有协议数据包发送至被控设备,用于使得所述安卓系统的被控设备根据接收的数据包对采样数据及时间值进行分析及运算,进而对触摸信息进行识别,保证用户手指触摸的有效操作。In this embodiment, a specific implementation step of determining whether there is a touch operation according to the touch action code in the sample data is further proposed, that is, the remote control device based on the Android system acquires the remote control touch panel by one or more times. Sampling data and time value of the timer until it is determined that there is a touch operation, and the sampled data and the time value are encapsulated into HID private protocol data packets and sent to the controlled device for causing the controlled device of the Android system to receive the data according to the received data. The packet analyzes and calculates the sampled data and the time value, thereby identifying the touch information and ensuring effective operation of the user's finger touch.
进一步地,进一步地,请参照图6,基于上述实施例,在本实施例中,所述基于安卓系统的遥控器控制装置还包括:Further, referring to FIG. 6 , based on the foregoing embodiment, in the embodiment, the remote control device based on the Android system further includes:
关机模块40,用于获取遥控器开关键的触摸信息,并当判断遥控器开关键被长按时,控制遥控器关机。The shutdown module 40 is configured to acquire touch information of the remote control opening key, and control the remote control to be turned off when it is determined that the remote control opening key is long pressed.
具体地,当所述蓝牙触控遥控器完成数据包的发送,则判断遥控器开关键是否被长按,当判定所述遥控器开关键被长按时,则控制遥控器关机。通过控制遥控器及时关机,能避免误触遥控器而发生的误操作,也能节省所述遥控器的运行功耗。Specifically, when the Bluetooth touch remote controller completes the sending of the data packet, it is determined whether the remote control open key is long pressed, and when it is determined that the remote control open key is long pressed, the remote control is controlled to be turned off. By controlling the remote control to turn off in time, it is possible to avoid erroneous operation caused by accidental touch of the remote controller, and also save operating power consumption of the remote controller.
可以理解的是,所述遥控器的开关键可为物理按键或是触摸键,且所述开关键与遥控器的电池电连接。It can be understood that the open key of the remote controller can be a physical button or a touch button, and the switch key is electrically connected to the battery of the remote controller.
本实施例中,通过获取遥控器开关键的长按信息,可以控制遥控器关机;应当说明的是,所述遥控器的开关键可以但不限于只实现遥控器的关机,通过获取开关键的不同触摸信息,可以控制遥控器实现不同的功能。例如,获取开关键的双击信息,用于控制遥控器进入睡眠状态或是解除睡眠状态。In this embodiment, the remote control can be controlled to be turned off by acquiring the long press information of the remote control opening key; it should be noted that the opening key of the remote control can be, but is not limited to, only turning off the remote control, and obtaining the key of the remote control. Different touch information can control the remote control to achieve different functions. For example, the double-click information of the open key is used to control the remote controller to enter a sleep state or release the sleep state.
或者,通过获取开关键的不同触摸信息,可以通过遥控器控制被控设备实现不同的功能。例如,在一种实施方式中,通过获取开关键的单击信息,可以通过遥控器控制被控设备实现暂停功能或解除暂停功能;在另一种实施方式中,通过获取开关键的双击信息,可以通过遥控器控制被控设备实现确定当前操作的功能。Alternatively, by acquiring different key touch information, the controlled device can be controlled by the remote controller to implement different functions. For example, in an embodiment, by acquiring the click information of the key, the controlled device can be controlled by the remote controller to implement the pause function or the unsuspend function; in another embodiment, by acquiring the double-click information of the key open, The controlled device can be controlled by the remote controller to implement the function of determining the current operation.
需要说明的是,当判断遥控器开关键未被长按时,则回到实时监测遥控器触摸板的采样数据和计时器的时间值的步骤,将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,再次判断遥控器开关键是否被长按;直至判断遥控器开关键被长按时,则控制遥控器关机。It should be noted that when it is judged that the remote control switch key is not long pressed, the process returns to the real-time monitoring of the sampling data of the remote control touch panel and the time value of the timer, and the sampled data and the time value are encapsulated into the Bluetooth HID private protocol data. The package is sent to the controlled device through the Bluetooth module, and it is judged again whether the remote control opening key is long pressed; until it is judged that the remote control opening key is long pressed, the remote control is controlled to be turned off.
可以理解的是,通过判断遥控器开关键是否被长按,来控制遥控器是否关机;通过获取遥控器开关键的触摸信息,来判断用户的操作意图,进而执行不同的动作,实现不同功能。本实施例中,长按开关键定义为控制遥控器关机,也即只有当采集到用户长按开关键的触摸操作,遥控器才会关机,当未采集到长按开关键的触摸操作,即可认为用户没有关闭遥控器的意图,进而继续获取遥控器触摸板的采样数据和计时器的时间值,执行相应的实施步骤,确保用户的手势触摸操作能被及时识别,提高手势触摸操作识别的准确性,使得所述基于安卓系统的遥控器控制装置更加智能化。It can be understood that the remote controller is controlled to be shut down by judging whether the remote control key is pressed long or not; the user's operation intention is determined by acquiring the key touch information of the remote controller, and then different actions are performed to implement different functions. In this embodiment, the long push key is defined as controlling the remote control to be turned off, that is, only when the touch operation of the user long presses the key is collected, the remote controller is turned off, and when the touch operation of the long press key is not collected, It can be considered that the user does not intend to turn off the remote controller, and then continues to acquire the sampling data of the remote control touch panel and the time value of the timer, and performs corresponding implementation steps to ensure that the user's gesture touch operation can be recognized in time, and the gesture touch operation recognition is improved. Accuracy makes the Android-based remote control device more intelligent.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (16)

  1. 一种基于安卓系统的遥控器控制方法,其特征在于,包括以下步骤: A remote control control method based on Android system, comprising the following steps:
    初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;Initializing the remote control's touchpad and Bluetooth module, and controlling the remote control to connect to the controlled device;
    实时监测遥控器触摸板的采样数据和计时器的时间值;Real-time monitoring of the sample data of the remote control touch panel and the time value of the timer;
    将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol data packet and sent to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  2. 如权利要求1所述的基于安卓系统的遥控器控制方法,其特征在于,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。The Android system-based remote controller control method according to claim 1, wherein the sample data comprises a Bluetooth HID proprietary protocol code, a touch action code, a touch action horizontal coordinate code, and a touch action vertical coordinate code.
  3. 如权利要求2所述的基于安卓系统的遥控器控制方法,其特征在于,所述将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令的步骤包括:The remote control method of the Android system according to claim 2, wherein the sampling data and the time value are encapsulated into a Bluetooth HID private protocol data packet and sent to the controlled device through the Bluetooth module for the The step of the controlled device analyzing the operation instruction input by the user according to the sampled data and the time value includes:
    根据所述触摸动作编码判断触摸操作是否完成;Determining whether the touch operation is completed according to the touch action code;
    若是,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;If yes, the sampled data and the time value are encapsulated into a Bluetooth HID proprietary protocol packet and stored in the Bluetooth module FIFO buffer;
    所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。The Bluetooth module sends the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value.
  4. 如权利要求3所述的基于安卓系统的遥控器控制方法,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The Android system-based remote controller control method according to claim 3, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  5. 如权利要求3所述的基于安卓系统的遥控器控制方法,其特征在于,所述基于安卓系统的遥控器控制方法还包括:The remote control method of the Android system according to claim 3, wherein the remote control method based on the Android system further comprises:
    获取遥控器开关键的触摸信息,并判断遥控器开关键是否被长按,若是,则控制遥控器关机。Get the touch information of the remote control open key and judge whether the remote control open key is pressed long, and if so, control the remote control to shut down.
  6. 如权利要求5所述的基于安卓系统的遥控器控制方法,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The Android system-based remote controller control method according to claim 5, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  7. 如权利要求2所述的基于安卓系统的遥控器控制方法,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The Android system-based remote controller control method according to claim 2, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  8. 如权利要求1所述的基于安卓系统的遥控器控制方法,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The Android system-based remote controller control method according to claim 1, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  9. 一种基于安卓系统的遥控器控制装置,其特征在于,包括:A remote control device based on an Android system, comprising:
    初始化模块,用于初始化遥控器的触摸板和蓝牙模块,并控制遥控器蓝牙连接被控设备;The initialization module is configured to initialize the touch panel and the bluetooth module of the remote controller, and control the remote control to connect the controlled device to the Bluetooth;
    监测模块,用于实时监测遥控器触摸板的采样数据和计时器的时间值;a monitoring module for monitoring the sampling data of the remote control touch panel and the time value of the timer in real time;
    发送模块,用于将采样数据和时间值封装成蓝牙HID私有协议数据包并通过蓝牙模块发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。a sending module, configured to encapsulate the sampling data and the time value into a Bluetooth HID private protocol data packet, and send the data to the controlled device through the Bluetooth module, so that the controlled device analyzes the operation instruction input by the user according to the sampled data and the time value. .
  10. 如权利要求9所述的基于安卓系统的遥控器控制装置,其特征在于,所述采样数据包括蓝牙HID私有协议编码、触摸动作编码、触摸动作水平坐标编码和触摸动作垂直坐标编码。The remote control device for an Android system according to claim 9, wherein the sampling data comprises Bluetooth HID proprietary protocol encoding, touch motion encoding, touch motion horizontal coordinate encoding, and touch motion vertical coordinate encoding.
  11. 如权利要求10所述的基于安卓系统的遥控器控制装置,其特征在于,所述发送模块包括:The remote control device for an Android system according to claim 10, wherein the sending module comprises:
    判断单元,用于根据所述触摸动作编码判断触摸操作是否完成;a determining unit, configured to determine, according to the touch action code, whether the touch operation is completed;
    存储单元,用于当判断有触摸操作完成时,将采样数据和时间值封装成蓝牙HID私有协议数据包并存储至蓝牙模块FIFO缓存器内;a storage unit, configured to encapsulate the sampled data and the time value into a Bluetooth HID private protocol data packet and store the data into the Bluetooth module FIFO buffer when it is determined that the touch operation is completed;
    发送单元,用于所述蓝牙模块将存储的所述蓝牙HID私有协议数据包发送至被控设备,以供所述被控设备根据所述采样数据和时间值分析用户输入的操作指令。And a sending unit, configured to send, by the Bluetooth module, the stored Bluetooth HID private protocol data packet to the controlled device, so that the controlled device analyzes an operation instruction input by the user according to the sampled data and the time value.
  12. 如权利要求11所述的基于安卓系统的遥控器控制装置,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The remote control device for an Android system according to claim 11, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  13. 如权利要求11所述的基于安卓系统的遥控器控制装置,其特征在于,所述基于安卓系统的遥控器控制装置还包括:The remote control device for an Android system according to claim 11, wherein the remote control device based on the Android system further comprises:
    关机模块,用于获取遥控器开关键的触摸信息,并当判断遥控器开关键被长按时,控制遥控器关机。The shutdown module is used to obtain the touch information of the remote control opening key, and when the remote control opening key is judged to be long pressed, the remote control is controlled to be turned off.
  14. 如权利要求13所述的基于安卓系统的遥控器控制装置,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The remote control device for an Android system according to claim 13, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  15. 如权利要求10所述的基于安卓系统的遥控器控制装置,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The remote control device for an Android system according to claim 10, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
  16. 如权利要求9所述的基于安卓系统的遥控器控制装置,其特征在于,所述计时器为32位计时器,时钟周期为1毫秒。The remote control device for an Android system according to claim 9, wherein the timer is a 32-bit timer and the clock period is 1 millisecond.
PCT/CN2016/113020 2016-10-12 2016-12-29 Method and apparatus for controlling remote controller based on android system WO2018068413A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610893236.1 2016-10-12
CN201610893236.1A CN106412654A (en) 2016-10-12 2016-10-12 Remote controller control method and device based on android system

Publications (1)

Publication Number Publication Date
WO2018068413A1 true WO2018068413A1 (en) 2018-04-19

Family

ID=59229380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113020 WO2018068413A1 (en) 2016-10-12 2016-12-29 Method and apparatus for controlling remote controller based on android system

Country Status (2)

Country Link
CN (1) CN106412654A (en)
WO (1) WO2018068413A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368252B (en) * 2017-07-04 2021-01-08 Tcl移动通信科技(宁波)有限公司 Mobile terminal, multi-application touch screen data processing method thereof and storage medium
CN107465950A (en) * 2017-07-07 2017-12-12 广州视源电子科技股份有限公司 Data forwarding method and system
CN109199354B (en) * 2018-09-17 2021-06-25 山东思迈教育科技有限公司 Heart rate data acquisition method and heart rate measuring equipment
CN109710313B (en) * 2018-12-19 2021-03-09 珠海格力电器股份有限公司 Communication instruction processing method and system
CN110136419A (en) * 2019-05-31 2019-08-16 盘友圈(广州)科技有限公司 A method of passing through Bluetooth remote control Android device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202433864U (en) * 2012-02-17 2012-09-12 许晓聪 Wireless touch control device
CN102713822A (en) * 2010-06-16 2012-10-03 松下电器产业株式会社 Information input device, information input method and programme
US20140204042A1 (en) * 2013-01-18 2014-07-24 Yomore Technology Co., Ltd Display control system and control method thereof
US8847909B2 (en) * 2012-11-11 2014-09-30 Nomovok Co., Ltd. Touchable mobile remote control without display
CN104954843A (en) * 2015-06-18 2015-09-30 Tcl集团股份有限公司 Remote control method and system of smart television

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517111A (en) * 2012-06-29 2014-01-15 上海广电电子科技有限公司 Television remote control method based on touch remote control device and television system
CN203120084U (en) * 2012-12-12 2013-08-07 康佳集团股份有限公司 Remote control system based on touch pad
CN103209351A (en) * 2013-03-27 2013-07-17 四川长虹电器股份有限公司 Method for controlling terminal device by using multi-touch remote control
CN104811779A (en) * 2015-04-23 2015-07-29 冠捷显示科技(厦门)有限公司 Handwriting input control method and system for smart television set on basis of touch panel and remote controller
CN105898479A (en) * 2015-11-17 2016-08-24 乐视致新电子科技(天津)有限公司 Intelligent television controlling method, device and system
CN105430468A (en) * 2015-11-30 2016-03-23 北京奇艺世纪科技有限公司 Remote control method and device for television set-top box
CN105979319A (en) * 2016-03-25 2016-09-28 钟林 Method and device for controlling card flow of smart television using direction gestures

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102713822A (en) * 2010-06-16 2012-10-03 松下电器产业株式会社 Information input device, information input method and programme
CN202433864U (en) * 2012-02-17 2012-09-12 许晓聪 Wireless touch control device
US8847909B2 (en) * 2012-11-11 2014-09-30 Nomovok Co., Ltd. Touchable mobile remote control without display
US20140204042A1 (en) * 2013-01-18 2014-07-24 Yomore Technology Co., Ltd Display control system and control method thereof
CN104954843A (en) * 2015-06-18 2015-09-30 Tcl集团股份有限公司 Remote control method and system of smart television

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MEI, FANG: "Research and Application of HID Standard in the Intelligent Remote Control System", 28 May 2012 (2012-05-28), pages 19 - 34, 35 *

Also Published As

Publication number Publication date
CN106412654A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
WO2018068413A1 (en) Method and apparatus for controlling remote controller based on android system
WO2016192438A1 (en) Motion sensing interaction system activation method, and motion sensing interaction method and system
WO2018129977A1 (en) Charging control method and apparatus, storage medium, and computer device
WO2018076866A1 (en) Data processing method, device, storage medium, electronic device and server
WO2013044776A1 (en) Interaction method and device in touch terminal, and interaction method, server and computer storage medium in network application
EP3139252B1 (en) Wearable touch control device and wearable touch control method
WO2018032681A1 (en) Bluetooth pairing method and bluetooth device
JP2008191791A (en) Coordinate input device, coordinate input method, control program and computer-readable recording medium
WO2016188285A1 (en) Process management method and device of terminal application
WO2020133764A1 (en) Speech remote control method and system, and controlled apparatus and computer-readable storage medium
WO2018068411A1 (en) Remote debugging method for smart television and remote debugging system for smart television
WO2016182361A1 (en) Gesture recognition method, computing device, and control device
WO2017016262A1 (en) Method for controlling smart watch, and smart watch
WO2017173841A1 (en) Touch screen-based method for controlling automatic scrolling of electronic book, and mobile terminal
WO2017032060A1 (en) Interface operation method and apparatus, and smart watch
WO2017032061A1 (en) Application starting method, smart watch, and storage medium
WO2018205534A1 (en) Method for controlling somatosensory remote controller, smart terminal, and computer readable storage medium
WO2018024012A1 (en) Remote controller, and projection method
WO2015058508A1 (en) Control method based on bluetooth communication technology, controlled device and controlling device
WO2019039707A1 (en) Method for configuring action of external device and electronic device for supporting the same
WO2017088428A1 (en) Sound wave-based remote control method and system
WO2019080401A1 (en) Method and apparatus for converting script statement, and computer-readable storage medium
WO2017206873A1 (en) Application program shutdown method and apparatus, storage medium, and electronic device
WO2019114255A1 (en) Voice acquisition method, remote control and computer readable storage medium
WO2017206874A1 (en) Application program shutdown method and apparatus, storage medium, and electronic device

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: 16918497

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: 16918497

Country of ref document: EP

Kind code of ref document: A1