WO2019019818A1 - Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal - Google Patents

Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal Download PDF

Info

Publication number
WO2019019818A1
WO2019019818A1 PCT/CN2018/090506 CN2018090506W WO2019019818A1 WO 2019019818 A1 WO2019019818 A1 WO 2019019818A1 CN 2018090506 W CN2018090506 W CN 2018090506W WO 2019019818 A1 WO2019019818 A1 WO 2019019818A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
black screen
complexity
screen
preset
Prior art date
Application number
PCT/CN2018/090506
Other languages
French (fr)
Chinese (zh)
Inventor
韩通
郭明强
石仁栋
张强
汪昊
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019019818A1 publication Critical patent/WO2019019818A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Abstract

Method and apparatus for accelerating black screen gesture processing, a storage medium, and a mobile terminal. The method comprises: acquiring a gesture type corresponding to a black screen gesture when a black screen gesture event is detected; obtaining gesture complexity corresponding to the black screen gesture by means of matching according to the gesture type; determining a data sampling strategy according to the gesture complexity, and acquiring gesture coordinates of the black screen gesture according to the data sampling strategy; and drawing a gesture trajectory corresponding to the black screen gesture by means of at least one drawing thread according to the acquired gesture coordinates, and enabling a touch display screen to display the gesture trajectory according to a set screen refreshing rate.

Description

加快黑屏手势处理的方法、装置、存储介质及移动终端Method, device, storage medium and mobile terminal for speeding up black screen gesture processing 技术领域Technical field
本申请实施例涉及移动终端技术,例如涉及一种加快黑屏手势处理的方法、装置、存储介质及移动终端。The embodiments of the present application relate to a mobile terminal technology, for example, to a method, an apparatus, a storage medium, and a mobile terminal for speeding up black screen gesture processing.
背景技术Background technique
随着科技的发展,具有触控显示屏的不同种类电子设备被人们广泛使用,例如智能手机、平板电脑或掌上游戏机等。这些设备采用的触摸技术为人们提供了便捷的输入方式,带来了很大的便利。With the development of technology, different types of electronic devices with touch screens are widely used, such as smart phones, tablets or handheld game consoles. The touch technology used in these devices provides a convenient input method and brings great convenience.
以触控显示屏为基础开发的功能也在不断增加,黑屏手势就是其中具有代表性和科技未来感的一个。所谓黑屏手势可以是用户在不需要亮屏的情况下,在触控显示屏上绘制出一些特定的图案以实现快捷开启某个应用程序的功能。但是,黑屏手势的数据处理量较大,处理速度较慢,也一定程度上提高了系统的功耗,对移动终端的正常使用造成了一定程度的影响。The functions developed on the basis of touch screen display are also increasing, and the black screen gesture is one of the representative and technological future. The so-called black screen gesture can be a function of the user to draw some specific patterns on the touch screen display to enable a certain application to be quickly opened without requiring a bright screen. However, the black screen gesture has a large amount of data processing and a slow processing speed, which also improves the power consumption of the system to a certain extent, and has a certain degree of influence on the normal use of the mobile terminal.
黑屏手势功能存在上述技术问题,亟待提出相应的解决方案。The black screen gesture function has the above technical problems, and a corresponding solution is urgently needed.
发明内容Summary of the invention
本申请实施例提供一种加快黑屏手势处理的方法、装置、存储介质及移动终端,可以实现减少处理的数据量,提高黑屏手势的处理速度。The embodiment of the present invention provides a method, an apparatus, a storage medium, and a mobile terminal for speeding up black screen gesture processing, which can reduce the amount of processed data and improve the processing speed of the black screen gesture.
第一方面,本申请实施例提供了一种加快黑屏手势处理的方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for speeding up black screen gesture processing, where the method includes:
在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;When a black screen gesture event is detected, the gesture type corresponding to the black screen gesture is acquired;
根据所述手势类型匹配所述黑屏手势对应的手势复杂度;Matching the gesture complexity corresponding to the black screen gesture according to the gesture type;
根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标;Determining a data sampling policy according to the gesture complexity, and collecting gesture coordinates of the black screen gesture according to the data sampling policy;
通过至少一个绘制线程,根据已采集的所述手势坐标绘制所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。And drawing, by the at least one drawing thread, a gesture track corresponding to the black screen gesture according to the captured gesture coordinates, so that the touch display screen displays the gesture track according to the set screen refresh rate.
第二方面,本申请实施例还提供了一种加快黑屏手势处理的装置,该装置包括:In a second aspect, the embodiment of the present application further provides an apparatus for speeding up black screen gesture processing, and the apparatus includes:
手势事件检测模块,设置为在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;The gesture event detection module is configured to acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected;
复杂度匹配模块,设置为根据所述手势类型匹配所述黑屏手势对应的手势复杂度;The complexity matching module is configured to match the gesture complexity corresponding to the black screen gesture according to the gesture type;
采样策略确定模块,设置为根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标;a sampling policy determining module, configured to determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy;
手势轨迹绘制模块,设置为通过至少一个绘制线程,根据已采集的所述手势坐标确定所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。The gesture track drawing module is configured to determine, by the at least one drawing thread, the gesture track corresponding to the black screen gesture according to the captured gesture coordinates, so that the touch display screen displays the gesture track according to the set screen refresh rate.
第三方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,该程序被处理器执行时实现如本申请实施例中任一所述的加快黑屏手势处理的方法。In a third aspect, the embodiment of the present application further provides a computer readable storage medium, where the storage medium stores a computer program, and when the program is executed by the processor, the black screen gesture is implemented as described in any one of the embodiments of the present application. The method of processing.
第四方面,本申请实施例还提供了一种移动终端,包括触控显示屏、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例中任一所述的加快黑屏手势处理的方法。In a fourth aspect, the embodiment of the present application further provides a mobile terminal, including a touch display screen, a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor executes the computer The method for speeding up the black screen gesture processing as described in any of the embodiments of the present application is implemented in the program.
本申请实施例的加快黑屏手势处理的方法、装置、存储介质及移动终端,按照不同的手势类型确定不同的数据采样策略,以实现多种手势坐标读取方式,减少了应用层的读取数据量以及在绘制手势轨迹时采用的数据量,提高了黑屏手势处理的速度,减少了系统响应时间,降低了系统功耗。The method, device, storage medium and mobile terminal for speeding up black screen gesture processing in the embodiments of the present application determine different data sampling strategies according to different gesture types, so as to implement multiple gesture coordinate reading modes and reduce read data of the application layer. The amount and amount of data used in drawing gesture trajectories improves the processing speed of black screen gestures, reduces system response time, and reduces system power consumption.
附图说明DRAWINGS
图1为本申请一实施例提供的一种加快黑屏手势处理的方法的流程图。FIG. 1 is a flowchart of a method for speeding up black screen gesture processing according to an embodiment of the present application.
图2是本申请一实施例提供的一种安卓系统框架示意图。FIG. 2 is a schematic diagram of an Android system framework according to an embodiment of the present application.
图3是本申请一实施例提供的一种黑屏手势轨迹的显示示意图。FIG. 3 is a schematic diagram of display of a black screen gesture track according to an embodiment of the present application.
图4为本申请一实施例提供的另一种加快黑屏手势处理的方法的流程图。FIG. 4 is a flowchart of another method for speeding up black screen gesture processing according to an embodiment of the present disclosure.
图5为本申请一实施例提供的另一种加快黑屏手势处理的方法的流程图。FIG. 5 is a flowchart of another method for speeding up black screen gesture processing according to an embodiment of the present disclosure.
图6是本申请一实施例提供的一种加快黑屏手势处理的装置结构框图。FIG. 6 is a structural block diagram of an apparatus for speeding up black screen gesture processing according to an embodiment of the present application.
图7为本申请一实施例提供的一种移动终端的结构示意图。FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. In addition, it should be noted that, for the convenience of description, only some but not all of the structures related to the present application are shown in the drawings.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将多个步骤描述成顺序的处 理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,多个步骤之间的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as a process or method depicted as a flowchart. Although the flowchart depicts multiple steps as a sequential process, many of the steps can be implemented in parallel, concurrently or concurrently. In addition, the order between multiple steps can be rearranged. The process may be terminated when its operation is completed, but may also have additional steps not included in the figures. The processing may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
黑屏手势功能可以是在移动终端(例如智能手机)处于熄屏休眠的情况下,触控显示屏以低功耗状态运行,以检测熄屏下的作用于触控显示屏的黑屏手势,并根据该黑屏手势来唤醒智能手机的某项功能或开启预先设置的与黑屏手势类型对应的应用程序的功能。为了便于理解黑屏手势功能,下面对由熄屏状态下检测到黑屏手势至应用层开启该黑屏手势对应的应用程序的流程进行说明,该流程包括:将黑屏手势对应的手势数据存入驱动层的预设节点内,其中,手势数据包括手势坐标和手势类型;由驱动层执行黑屏手势数据有效性判断;若有效,则由框架层执行黑屏手势事件派发;在应用层接收到黑屏手势事件后,由应用层从驱动层内预设节点读取手势坐标,根据该手势坐标和手势类型计算黑屏手势的动画轨迹,将动画轨迹数据发送至帧缓存(FrameBuffer),以按照设定的屏幕刷新率将该动画轨迹刷新至触控显示屏,进行显示;随后,由应用层执行开启该黑屏手势对应的应用程序的操作。The black screen gesture function may be that when the mobile terminal (for example, a smart phone) is in a sleep-out state, the touch display screen operates in a low power consumption state to detect a black screen gesture acting on the touch display screen under the screen-off, and according to The black screen gesture wakes up a certain function of the smartphone or turns on a preset function corresponding to the application of the black screen gesture type. In order to facilitate the understanding of the black screen gesture function, the following describes the flow of the application corresponding to the black screen gesture detected by the blank screen gesture to the application layer, and the process includes: storing the gesture data corresponding to the black screen gesture into the driver layer. Within the preset node, wherein the gesture data includes gesture coordinates and gesture type; the drive layer performs black screen gesture data validity determination; if valid, the frame layer performs black screen gesture event dispatch; after the application layer receives the black screen gesture event The application layer reads the gesture coordinates from the preset node in the driver layer, calculates the animation track of the black screen gesture according to the gesture coordinates and the gesture type, and sends the animation track data to the frame buffer (FrameBuffer) to follow the set screen refresh rate. The animation track is refreshed to the touch display screen for display; then, the application layer performs an operation of opening the application corresponding to the black screen gesture.
在上述黑屏手势识别过程中,当用户输入一个黑屏手势,手势数据会被驱动层所读取并识别,应用层在收到驱动层上报的黑屏手势事件时,应用层在读取数据以及绘制手势轨迹时,会按照统一的采样策略进行数据的读取及轨迹的绘制,但是由于不同黑屏手势的轨迹的复杂程度不同,对于简单的手势(如手势轨迹“|”),只需要读取少量的采样点,就可以将手势轨迹绘制完成。对于复杂一些的手势(如手势轨迹“M”),则需要特征点(如拐点)以及部分采样点才可以将手势轨迹绘制完成。本申请实施例提供的加快黑屏手势处理的方法,可以很好地根据黑屏手势类型确定不同的数据采样策略及绘制方式,可以很好地减少数据处理量,减少数据所占的内存,降低系统功耗。In the above black screen gesture recognition process, when the user inputs a black screen gesture, the gesture data is read and recognized by the driver layer, and the application layer reads the data and draws the gesture when receiving the black screen gesture event reported by the driver layer. When the trajectory is used, the data is read and the trajectory is drawn according to the unified sampling strategy. However, due to the complexity of the trajectory of different black screen gestures, for simple gestures (such as the gesture trajectory “|”), only a small amount of reading is needed. At the sampling point, the gesture trajectory can be drawn. For more complex gestures (such as gesture track "M"), feature points (such as inflection points) and partial sample points are required to draw the gesture track. The method for speeding up the black screen gesture processing provided by the embodiment of the present invention can determine different data sampling strategies and drawing modes according to the black screen gesture type, which can reduce the data processing amount, reduce the memory occupied by the data, and reduce the system function. Consumption.
图1为本申请实施例提供的一种加快黑屏手势处理的方法的流程图,本实施例可适用于提高黑屏手势处理速度的情况,该方法可以由加快黑屏手势处理的装置来执行,其中,该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图1所示,该方法包括:FIG. 1 is a flowchart of a method for speeding up a black screen gesture process according to an embodiment of the present disclosure. The method may be applied to a device for speeding up a black screen gesture process, where the method may be performed by a device that speeds up black screen gesture processing, where The device can be implemented in software and/or hardware and can be integrated into a mobile terminal. As shown in Figure 1, the method includes:
步骤110、在检测到黑屏手势事件时,获取黑屏手势对应的手势类型。Step 110: Acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected.
其中,黑屏手势事件可以是驱动层与应用层预先协商好的用于代表有黑屏手势输入的事件。The black screen gesture event may be an event that is pre-negotiated by the driver layer and the application layer for representing a black screen gesture input.
黑屏手势可以是用户在黑屏手势功能开启后,在处于熄屏状态的移动终端 的触控显示屏上输入的触摸手势。可以理解的是黑屏手势并不限于在触控显示屏上输入的触摸手势,还可以是由移动终端的传感器检测到的操作等。例如,左右摇晃智能手机的手势,从智能手机的触控显示屏上空拂过的手势及按压智能手机边框的手势等等。The black screen gesture may be a touch gesture input by the user on the touch display screen of the mobile terminal that is in the off state after the black screen gesture function is turned on. It can be understood that the black screen gesture is not limited to the touch gesture input on the touch display screen, but may also be an operation detected by the sensor of the mobile terminal or the like. For example, shaking the gesture of the smartphone from side to side, gestures from the touch screen of the smartphone, gestures pressing the border of the smartphone, and the like.
图2是本申请实施例提供的一种安卓系统框架示意图。以图2所示的操作系统为安卓(Android)系统的移动终端为例,介绍本申请实施例提供的黑屏手势功能的执行流程。如图2所示,安卓系统框架由下至上包括内核层210、核心类库层220、框架层230及应用层240。其中,内核层210提供核心系统服务,包括安全、内存管理、进程管理、网络协议栈及硬件驱动等。其中,将内核层210中的硬件驱动记为驱动层211,该驱动层211包括触控显示屏驱动、摄像头驱动等。核心类库层220包括安卓运行环境(Android Runtime)和类库(Libraries)。其中,Android Runtime提供大部分在Java编程语言核心类库中可用的功能,包括核心库(Core Libraries)和Dalvik虚拟机(Dalvik VM)。每一个安卓应用程序是Dalvik虚拟机中的实例,运行在它们自己的进程中。类库供安卓系统的各个组件使用,包括如下功能:媒体库(Media Framework)、界面管理(Surface Manager)、关系数据库引擎(SQLite)及位图和矢量字体渲染(FreeType)等,其中每个功能通过安卓系统的框架层230暴露给开发者使用。框架层230提供开发安卓应用程序所需的一系列类库,使开发人员可以进行快速的应用程序开发,方便重用组件,也可以通过继承实现个性化的扩展,其提供的服务包括组件管理服务、窗口管理服务、系统数据源组件、空间框架、资源管理服务及安装包管理服务等。应用层240上包括多类与用户直接交互的应用程序,或由Java语言编写的运行于后台的服务程序,包括桌面应用、联系人应用、通话应用、相机应用、图片浏览器、游戏、地图、网络web浏览器等程序,以及开发人员开发的其他应用程序。2 is a schematic diagram of an Android system framework provided by an embodiment of the present application. The execution flow of the black screen gesture function provided by the embodiment of the present application is described by taking the mobile terminal shown in FIG. 2 as an example of the mobile terminal of the Android system. As shown in FIG. 2, the Android system framework includes a kernel layer 210, a core class library layer 220, a framework layer 230, and an application layer 240 from bottom to top. The kernel layer 210 provides core system services, including security, memory management, process management, network protocol stack, and hardware drivers. The hardware driver in the kernel layer 210 is referred to as a driving layer 211, and the driving layer 211 includes a touch screen display driver, a camera driver, and the like. The core class library layer 220 includes an Android runtime environment (Android Runtime) and a class library (Libraries). Among them, Android Runtime provides most of the functions available in the Java programming language core class library, including the core library (Core Libraries) and the Dalvik virtual machine (Dalvik VM). Each Android application is an instance of the Dalvik virtual machine running in their own process. The class library is used by various components of the Android system, including the following functions: Media Framework, Surface Manager, Relational Database Engine (SQLite), Bitmap and Vector Font Rendering (FreeType), etc. It is exposed to developers through the framework layer 230 of Android. The framework layer 230 provides a series of class libraries needed to develop Android applications, enabling developers to develop applications quickly, to reuse components, and to extend personalization through inheritance. The services provided include component management services. Window management services, system data source components, space frameworks, resource management services, and installation package management services. The application layer 240 includes a plurality of applications that directly interact with the user, or a service program written in the Java language and running in the background, including a desktop application, a contact application, a call application, a camera application, a picture browser, a game, a map, Programs such as web browsers, and other applications developed by developers.
示例性的,在黑屏手势功能开启后,触摸芯片在检测到黑屏手势时,生成一唤醒信号,并发送该唤醒信号至内核层210。通过该唤醒信号触发内核层210执行系统唤醒操作。在系统唤醒后,内核层210调用驱动层211中断函数执行读取触摸芯片中手势数据的操作,并将读取的手势数据存储在驱动层211的预设节点内。其中,触摸芯片用于输出触摸感测控制信号至触控显示屏,以检测触摸操作,识别作用于触控显示屏上的黑屏手势的手势坐标,将该手势坐标作为手势数据存储在自身的寄存器中。预设节点可以为文件节点,例如可以是proc-D目录下的虚拟文件节点。在数据读取完成后,驱动层判定该手势数据的有效性,有效性判定的方式有很多种,本实施例不作具体限定。例如,驱动层 211根据该手势数据包含的手势坐标确定手势类型,并将所确定的手势类型作为手势数据存储在该预设节点内。若该手势类型不是预设的黑屏手势,则判定手势数据无效。又如,驱动层统计该手势数据的数目,判定该数目是否满足绘制预设的黑屏手势的要求,若不满足绘制预设的黑屏手势的要求,则判定手势数据无效。在数据有效时,驱动层211上报黑屏手势事件。该黑屏手势事件通过核心类库层220传输至框架层230,并通过框架层230派发,达到应用层240。应用层240在获取到黑屏手势事件时,由驱动层211的预设节点读取手势数据。在手势数据准备完成后,根据该手势数据包含的手势坐标计算出黑屏手势轨迹,将该黑屏手势轨迹绘制在触控显示屏上进行显示。然后,应用层240基于所读取的手势数据中的手势类型,打开与该手势类型对应的应用程序。其中,手势类型可以是预先设置于移动终端中的用于实现某一功能的手势,还可以是用户自定义的手势。例如,手势类型可以是0,代表打开相机。又如,手势类型可以是V,代表打开手电筒等等。Exemplarily, after the black screen gesture function is turned on, the touch chip generates a wake-up signal when the black screen gesture is detected, and sends the wake-up signal to the kernel layer 210. The wake-up signal triggers the kernel layer 210 to perform a system wake-up operation. After the system wakes up, the kernel layer 210 invokes the driver layer 211 interrupt function to perform an operation of reading the gesture data in the touch chip, and stores the read gesture data in the preset node of the driver layer 211. The touch chip is configured to output a touch sensing control signal to the touch display screen to detect a touch operation, identify a gesture coordinate of a black screen gesture acting on the touch display screen, and store the gesture coordinate as a gesture data in its own register. in. The preset node can be a file node, for example, a virtual file node in the proc-D directory. After the data is read, the driver layer determines the validity of the gesture data. There are many ways to determine the validity, which is not specifically limited in this embodiment. For example, the driver layer 211 determines the gesture type according to the gesture coordinates included in the gesture data, and stores the determined gesture type as gesture data in the preset node. If the gesture type is not a preset black screen gesture, it is determined that the gesture data is invalid. For another example, the driving layer collects the number of the gesture data, determines whether the number satisfies the requirement of drawing a preset black screen gesture, and if the requirement of drawing the preset black screen gesture is not satisfied, determining that the gesture data is invalid. When the data is valid, the driver layer 211 reports a black screen gesture event. The black screen gesture event is transmitted to the framework layer 230 through the core class library layer 220 and distributed through the framework layer 230 to the application layer 240. When the application layer 240 acquires a black screen gesture event, the gesture data is read by the preset node of the driver layer 211. After the gesture data is prepared, the black screen gesture track is calculated according to the gesture coordinates included in the gesture data, and the black screen gesture track is drawn on the touch display screen for display. The application layer 240 then opens an application corresponding to the gesture type based on the type of gesture in the read gesture data. The gesture type may be a gesture for implementing a certain function preset in the mobile terminal, or may be a user-defined gesture. For example, the gesture type can be 0, which means that the camera is turned on. As another example, the gesture type can be V, which means turning on the flashlight and the like.
黑屏手势功能的执行流程并不限于本实施例中列举的方式。例如,还可以是在系统唤醒时即上报黑屏手势事件,内核层210调用驱动层211中断函数执行读取触摸芯片中手势数据的操作,并将该手势数据存储在驱动层211的预设节点内;在黑屏手势事件上报时,并行执行驱动层211读取手势数据,根据手势数据确定手势类型的操作。例如,驱动层211获取该预设节点内的手势数据,对该手势数据作曲线拟合得到该黑屏手势最接近的手势类型,将该手势类型也作为手势数据存储在该预设节点内。在应用层240接收到黑屏手势事件时,按照设定周期检测该预设节点内的手势数据是否准备完成。在准备完成时,应用层240由该预设节点内读取该手势数据。在该手势数据读取成功且有效时,根据该手势数据包含的手势坐标计算出黑屏手势轨迹,将该黑屏手势轨迹绘制在触控显示屏上进行显示。然后,应用层240基于所读取的手势数据中的手势类型,打开与该手势类型对应的应用程序。The execution flow of the black screen gesture function is not limited to the manner enumerated in this embodiment. For example, the black screen gesture event may be reported when the system wakes up, and the kernel layer 210 calls the driver layer 211 interrupt function to perform the operation of reading the gesture data in the touch chip, and stores the gesture data in the preset node of the driver layer 211. When the black screen gesture event is reported, the parallel execution driving layer 211 reads the gesture data, and determines the operation of the gesture type according to the gesture data. For example, the driving layer 211 acquires gesture data in the preset node, and performs curve fitting on the gesture data to obtain a gesture type that is closest to the black screen gesture, and stores the gesture type as gesture data in the preset node. When the application layer 240 receives the black screen gesture event, it is detected whether the gesture data in the preset node is ready to be completed according to the set period. When the preparation is completed, the application layer 240 reads the gesture data from the preset node. When the gesture data is successfully read and valid, the black screen gesture track is calculated according to the gesture coordinates included in the gesture data, and the black screen gesture track is drawn on the touch display screen for display. The application layer 240 then opens an application corresponding to the gesture type based on the type of gesture in the read gesture data.
步骤120、根据所述手势类型匹配所述黑屏手势对应的手势复杂度。Step 120: Match the gesture complexity corresponding to the black screen gesture according to the gesture type.
其中,对于每个手势类型,均可以对应一个手势复杂度,手势复杂度用于衡量黑屏手势轨迹的复杂程度,属于黑屏手势自身的属性,例如可以是手势轨迹中包含的拐点数目,或者包含的线段段数等。当应用层240获取到手势类型后,根据手势类型匹配对应的手势复杂度。For each gesture type, a gesture complexity can be correspondingly used. The gesture complexity is used to measure the complexity of the black screen gesture track, and belongs to the attribute of the black screen gesture itself, for example, the number of inflection points included in the gesture track, or the included The number of segments and so on. After the application layer 240 obtains the gesture type, the corresponding gesture complexity is matched according to the gesture type.
步骤130、根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标。Step 130: Determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy.
其中,由于手势复杂度影响着手势轨迹确定及绘制的难度水平,当手势复 杂度较大时,则可以采集较多的坐标点,当手势复杂度较小时,则可以采集较少的坐标点。例如手势类型为“|”的手势只需采集起点和终点就可以完成手势轨迹的确定及绘制。因此,针对不同手势复杂度,确定读取手势坐标时的采样读取方式,数据采样策略可以是每隔设定数目的坐标点采集一个坐标点作为采样点,或者采集特征点(如起点、中点或终点等)作为采样点等。The complexity of the gesture affects the difficulty level of the gesture trajectory determination and drawing. When the gesture complexity is large, more coordinate points can be collected. When the gesture complexity is small, fewer coordinate points can be collected. For example, a gesture type of "|" can complete the determination and drawing of the gesture track by simply collecting the start point and the end point. Therefore, for different gesture complexity, the sampling reading mode when reading the gesture coordinates is determined, and the data sampling strategy may be to collect a coordinate point as a sampling point every set number of coordinate points, or collect feature points (such as starting point, middle Point or end point, etc. as a sampling point, etc.
步骤140、通过至少一个绘制线程,根据已采集的所述手势坐标绘制所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。Step 140: Draw a gesture track corresponding to the black screen gesture according to the captured gesture coordinates by using at least one drawing thread, so that the touch display screen displays the gesture track according to the set screen refresh rate.
其中,可以根据已读取的坐标点,采用曲线拟合的方式确定黑屏手势对应的手势轨迹。通过至少一个绘制线程绘制手势轨迹的方式有很多种,例如,为了更真实地重现用户输入的黑屏手势,绘制线程可以获取读取的多个采样点,顺序连接上述多个采样点得到该手势类型对应的手势轨迹,并将包含采样点和采样点之间连线的画面帧发送至帧缓存(FrameBuffer),以动画的形式将该手势轨迹展示,按照设定的屏幕刷新率将黑屏手势轨迹刷新到触控显示屏,以模拟该黑屏手势的绘制过程。需要说明的是,上述过程可以由一个绘制线程单独完成,还可以是由至少两个绘制线程分别绘制手势轨迹片段。在每个绘制线程完成自己负责绘制的手势轨迹片段后,将已绘制完成的手势轨迹片段拼接为完整的手势轨迹,从而,可以有效地提高手势轨迹的绘制效率。The gesture track corresponding to the black screen gesture may be determined by curve fitting according to the read coordinate points. There are many ways to draw gesture trajectories through at least one drawing thread. For example, in order to more realistically reproduce the black screen gesture input by the user, the drawing thread can acquire the read multiple sampling points, and sequentially connect the plurality of sampling points to obtain the gesture. The gesture track corresponding to the type, and the frame frame including the connection between the sampling point and the sampling point is sent to the frame buffer (FrameBuffer), the gesture track is displayed in an animated manner, and the black screen gesture track is displayed according to the set screen refresh rate. Refresh to the touch display to simulate the drawing process of the black screen gesture. It should be noted that the foregoing process may be separately performed by one drawing thread, or may be separately drawn by at least two drawing threads. After each drawing thread completes the gesture track segment that is responsible for drawing, the completed gesture track segment is spliced into a complete gesture track, thereby effectively improving the drawing efficiency of the gesture track.
本申请实施例的技术方案,通过在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;根据所述手势类型匹配所述黑屏手势对应的手势复杂度;根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略读取手势坐标;通过至少一个绘制线程,根据已读取的所述手势坐标绘制所述黑屏手势对应的手势轨迹,按照设定的屏幕刷新率显示所述手势轨迹。按照不同的手势类型确定不同的数据采样策略,以实现多种手势坐标读取方式,减少了应用层的读取数据量以及在绘制手势轨迹时采用的数据量,提高了黑屏手势处理的速度,减少了系统响应时间,降低了系统功耗。The technical solution of the embodiment of the present application is to obtain a gesture type corresponding to the black screen gesture when the black screen gesture event is detected, and to match the gesture complexity corresponding to the black screen gesture according to the gesture type; and determine the data sampling according to the gesture complexity. a strategy, and reading a gesture coordinate according to the data sampling policy; drawing, by the at least one drawing thread, a gesture track corresponding to the black screen gesture according to the read gesture coordinate, and displaying the gesture according to the set screen refresh rate Track. Different data sampling strategies are determined according to different gesture types to implement multiple gesture coordinate reading modes, which reduces the amount of data read by the application layer and the amount of data used when drawing the gesture track, thereby improving the processing speed of the black screen gesture. Reduce system response time and reduce system power consumption.
在一实施例中,所述手势复杂度可以为所述手势类型对应的标准图形中拐点的数量;In an embodiment, the gesture complexity may be the number of inflection points in the standard graphic corresponding to the gesture type;
其中,手势类型对应的标准图形也就是该手势类型对应的模板轨迹,例如,手势类型为“M”,则可以根据移动终端中存储的标准图形“M”的拐点数量确定手势复杂度,“M”中包含的拐点数量为3,则可以确定该手势类型的手势复杂度为3。对应其他手势类型的手势复杂度确定方式与此过程相同。The standard graphic corresponding to the gesture type is the template track corresponding to the gesture type. For example, if the gesture type is “M”, the gesture complexity may be determined according to the number of inflection points of the standard graphic “M” stored in the mobile terminal, “M. The number of inflection points included in the figure is 3, and it can be determined that the gesture complexity of the gesture type is 3. The gesture complexity corresponding to other gesture types is determined in the same way as this process.
所述数据采样策略可以为:按照所述黑屏手势的手势坐标写入操作系统的 驱动层内预设节点的时间顺序,读取位于起点、终点以及拐点的手势坐标作为参考点,在任意两个参考点之间按照预设间隔数目读取手势坐标。The data sampling strategy may be: writing the time sequence of the preset nodes in the driving layer of the operating system according to the gesture coordinates of the black screen gesture, and reading the gesture coordinates at the starting point, the ending point, and the inflection point as reference points, in any two The gesture coordinates are read between the reference points by a preset number of intervals.
其中,在用户输入黑屏手势时,驱动层会顺序读取黑屏手势数据,例如可以是每隔一定时间间隔读取一个坐标点等。因此,每个手势坐标写入驱动层内预设节点是有时间的先后顺序的。对于一种手势类型,应用层可以根据不同的数据采样策略进行数据的读取,一般来讲,起点、终点以及拐点的读取是有必要的,对于其他坐标点,可以根据实际需求设定预设间隔数目进行读取。示例性地,如手势类型为“|”,拐点的数量为0,可以仅选取起点以及终点即可完成手势轨迹的确定,或者仅选取起点、中点以及终点进行手势轨迹的确定。又如,手势类型为“M”,拐点的数量为3,则可以根据拐点的数量确定,读取起点、拐点以及终点作为特征点,以及在任意两个特征点之间按照预设间隔数目读取手势坐标。例如可以是两个特征点之间均读取3个点等。图3是本申请实施例提供的一种黑屏手势轨迹的显示示意图,其中,以手势类型“W”的起点301、第一拐点302、第二拐点303、第三拐点304以及终点305作为特征点,在两个特征点之间选取三个手势坐标,利用读取的所有手势坐标绘制手势轨迹,具体可以是采用曲线拟合的方式确定手势轨迹。这种数据读取的方式以及手势轨迹的绘制方式,可以减少数据处理量,在能够保证手势轨迹准确度的前提下,简化了手势轨迹的确定过程,提高了系统处理效率,减少了系统响应时间,降低了系统功耗。When the user inputs a black screen gesture, the driver layer sequentially reads the black screen gesture data, for example, may read a coordinate point at regular intervals. Therefore, each gesture coordinate is written to the preset nodes in the driver layer in a chronological order. For a type of gesture, the application layer can read data according to different data sampling strategies. Generally speaking, the reading of the starting point, the ending point and the inflection point is necessary. For other coordinate points, the preset can be set according to actual needs. Set the number of intervals to read. For example, if the gesture type is “|” and the number of inflection points is 0, the determination of the gesture track may be completed by only selecting the start point and the end point, or only the start point, the middle point, and the end point may be selected for the determination of the gesture track. For another example, if the gesture type is “M” and the number of inflection points is 3, it can be determined according to the number of inflection points, reading the starting point, the inflection point, and the ending point as feature points, and reading between any two feature points according to the preset interval number. Take the gesture coordinates. For example, it is possible to read 3 points and the like between two feature points. 3 is a schematic diagram of display of a black screen gesture track provided by an embodiment of the present application, in which a start point 301, a first inflection point 302, a second inflection point 303, a third inflection point 304, and an end point 305 of the gesture type “W” are used as feature points. Three gesture coordinates are selected between the two feature points, and the gesture trajectory is drawn by using all the gesture coordinates read. Specifically, the gesture trajectory can be determined by curve fitting. The method of reading data and the way of drawing the gesture track can reduce the amount of data processing, simplify the determination process of the gesture track under the premise of ensuring the accuracy of the gesture track, improve the system processing efficiency, and reduce the system response time. , reducing system power consumption.
图4为本申请实施例提供的另一种加快黑屏手势处理的方法的流程图,本实施例可适用于提高黑屏手势处理速度的情况,该方法可以由加快黑屏手势处理的装置来执行,其中,该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图4所示,该方法包括:FIG. 4 is a flowchart of another method for speeding up black screen gesture processing according to an embodiment of the present disclosure. The present embodiment is applicable to improving a black screen gesture processing speed, and the method may be performed by a device for speeding up black screen gesture processing, where The device can be implemented by software and/or hardware and can generally be integrated in a mobile terminal. As shown in FIG. 4, the method includes:
步骤410、对于至少一个预设的手势类型,确定每个预设的手势类型对应的预设黑屏手势的拐点数量,并按照所述拐点数量确定所述手势类型对应的手势复杂度。Step 410: Determine, for the at least one preset gesture type, the number of inflection points of the preset black screen gesture corresponding to each preset gesture type, and determine the gesture complexity corresponding to the gesture type according to the number of the inflection points.
其中,预设黑屏手势可以是系统自带的手势,也可以是用户自定义的手势。可以根据手势类型对应的标准图形确定拐点的数量,也可以预先根据用户历史输入的手势数据确定黑屏手势轨迹,并确定拐点的数量。示例性地,如手势轨迹“M”或“W”对应的拐点数量为3个,手势轨迹“V”对应的拐点数量为1个。根据不同的拐点数量可以确定对应的手势复杂度,例如,可以是拐点数量越多,手势复杂度的值越大。The preset black screen gesture may be a gesture that is provided by the system, or may be a user-defined gesture. The number of inflection points may be determined according to a standard pattern corresponding to the gesture type, or the black screen gesture track may be determined in advance according to the gesture data input by the user history, and the number of inflection points is determined. For example, the number of inflection points corresponding to the gesture track “M” or “W” is three, and the number of inflection points corresponding to the gesture track “V” is one. The corresponding gesture complexity can be determined according to the number of different inflection points. For example, the more the number of inflection points, the larger the value of the gesture complexity.
步骤420、将每个所述预设的手势类型与对应的手势复杂度相关联地存储。Step 420: Store each of the preset gesture types in association with a corresponding gesture complexity.
其中,将手势类型与对应的手势复杂度相关联地存储,以便在使用的时候可以随时调取,根据存储的结果,匹配每种手势类型对应的手势复杂度。The gesture type is stored in association with the corresponding gesture complexity, so that it can be retrieved at any time during use, and the gesture complexity corresponding to each gesture type is matched according to the stored result.
步骤430、在检测到黑屏手势事件时,获取黑屏手势对应的手势类型。Step 430: Acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected.
步骤440、根据所述手势类型匹配所述黑屏手势对应的手势复杂度。Step 440: Match the gesture complexity corresponding to the black screen gesture according to the gesture type.
例如,在已存储的预设手势类型中查找到与该黑屏手势的手势类型相同的手势类型后,根据该手势类型可以得到与该黑屏手势对应的手势复杂度。For example, after the gesture type of the same gesture type as the black screen gesture is found in the stored preset gesture type, the gesture complexity corresponding to the black screen gesture can be obtained according to the gesture type.
步骤450、根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标。Step 450: Determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy.
步骤460、通过至少一个绘制线程,根据已采集的所述手势坐标绘制所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。Step 460: Draw a gesture track corresponding to the black screen gesture according to the captured gesture coordinates by using at least one drawing thread, so that the touch display screen displays the gesture track according to the set screen refresh rate.
本申请实施例的技术方案,根据拐点数量确定手势类型的手势复杂度,将手势类型与手势复杂度关联存储,以便可以在获取黑屏手势的手势类型后直接查询匹配得到手势复杂度,再根据手势复杂度确定数据采样策略,使手势复杂度的确定过程更加便利,减少了系统的数据处理量,降低了系统的功耗。The technical solution of the embodiment of the present application determines the gesture complexity of the gesture type according to the number of inflection points, and stores the gesture type and the gesture complexity in association, so that the gesture complexity can be directly obtained after the gesture type of the black screen gesture is acquired, and then the gesture is based on the gesture. The complexity determines the data sampling strategy, which makes the process of determining the complexity of the gesture more convenient, reduces the data processing capacity of the system, and reduces the power consumption of the system.
在一实施例中,在确定黑屏手势的拐点数量之后,还可以包括:In an embodiment, after determining the number of inflection points of the black screen gesture, the method may further include:
将所述预设的手势类型对应的手势复杂度按照拐点数量划分为至少两个复杂度等级,分别为每个所述复杂度等级匹配针对所述手势坐标的数据采样策略。The gesture complexity corresponding to the preset gesture type is divided into at least two complexity levels according to the number of inflection points, and each of the complexity levels matches a data sampling strategy for the gesture coordinates.
其中,由于具有相同数量的拐点的手势轨迹之间存在一些共性,因此可以针对具有相同数量的拐点的手势轨迹,采用相同的数据采样策略。可以按照拐点的数量将手势复杂度分级。示例性地,可以将拐点数量为3的手势划分至同一复杂度等级,如手势类型“M”和“W”等。将拐点数量为2的手势划分至另外一个复杂度等级,如手势类型“N”和“Z”等。将拐点数量为1的手势划分至另一个复杂度等级,如手势类型“V”和“>”等。将拐点数量为0的手势再划分至另一个复杂度等级,如手势类型“—”和“|”等。再以复杂度等级为单位,匹配数据采样策略。Among them, since there are some commonalities between gesture trajectories with the same number of inflection points, the same data sampling strategy can be adopted for gesture trajectories with the same number of inflection points. The gesture complexity can be ranked by the number of inflection points. Illustratively, a gesture with a number of inflection points of 3 can be divided into the same complexity level, such as gesture types "M" and "W". The gesture of the number of inflection points is divided into another complexity level, such as gesture types "N" and "Z". The gesture of the number of inflection points is divided into another complexity level, such as gesture types "V" and ">". The gesture of zero inflection point is subdivided into another complexity level, such as gesture types "-" and "|". Then match the data sampling strategy in units of complexity levels.
上述技术方案根据拐点数量为手势复杂度划分等级,再根据复杂度等级匹配数据采样策略,简化了数据采样策略的确定过程,减少了系统的数据处理量,提高了黑屏手势处理的速度,降低了系统功耗。The above technical solution divides the degree of gesture complexity according to the number of inflection points, and then matches the data sampling strategy according to the complexity level, which simplifies the process of determining the data sampling strategy, reduces the data processing amount of the system, improves the processing speed of the black screen gesture, and reduces the speed. System power consumption.
在一实施例中,在将所述手势复杂度按照拐点数量划分为至少两个复杂度等级之后,还可以包括:In an embodiment, after the gesture complexity is divided into at least two complexity levels according to the number of inflection points, the method may further include:
分别针对每个所述复杂度等级,匹配显示所述手势轨迹时的屏幕刷新率。The screen refresh rate when the gesture track is displayed is matched for each of the complexity levels.
其中,屏幕刷新率可以为移动终端触控显示屏画面刷新的帧率。一般,触 控显示屏会以60Hz的刷新率刷新。然而,本申请实施例的技术方案并不是以固定的屏幕刷新率显示手势轨迹。可以预先为目标手势轨迹设置对应的屏幕刷新率,以采用目标手势轨迹对应的屏幕刷新率将该待显示内容刷新至触控显示屏上进行显示。例如,可以是复杂度等级越高,匹配的屏幕刷新率越高。The screen refresh rate may be a frame rate of the refresh screen of the touch screen of the mobile terminal. Typically, the touch screen will be refreshed at a 60Hz refresh rate. However, the technical solution of the embodiment of the present application does not display the gesture track at a fixed screen refresh rate. The corresponding screen refresh rate may be set in advance for the target gesture track, and the content to be displayed is refreshed to the touch display screen for display by using the screen refresh rate corresponding to the target gesture track. For example, it can be that the higher the complexity level, the higher the matching screen refresh rate.
本申请实施例的技术方案,根据不同的复杂度等级有针对性地设置显示手势轨迹时的屏幕刷新率,在能够保障手势轨迹正常显示的情况下,降低了触控显示屏的功耗,延长了终端的续航时间。In the technical solution of the embodiment of the present application, the screen refresh rate when the gesture track is displayed is set according to different complexity levels, and the power consumption of the touch display screen is reduced and the power consumption of the touch display screen is reduced. The terminal's battery life.
图5为本申请实施例提供的另一种加快黑屏手势处理的方法的流程图,本实施例可适用于提高黑屏手势处理速度的情况,该方法可以由加快黑屏手势处理的装置来执行,其中,该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图5所示,该方法包括:FIG. 5 is a flowchart of another method for speeding up black screen gesture processing according to an embodiment of the present disclosure. This embodiment may be applied to improve a black screen gesture processing speed. The method may be performed by a device that speeds up black screen gesture processing, where The device can be implemented by software and/or hardware and can generally be integrated in a mobile terminal. As shown in FIG. 5, the method includes:
步骤510、在检测到黑屏手势事件时,获取黑屏手势对应的手势类型。Step 510: Acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected.
步骤520、根据所述手势类型匹配所述黑屏手势对应的手势复杂度。Step 520: Match the gesture complexity corresponding to the black screen gesture according to the gesture type.
步骤530、根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标。Step 530: Determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy.
步骤540、通过至少一个绘制线程,根据已采集的所述手势坐标绘制所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。Step 540: Draw a gesture track corresponding to the black screen gesture according to the captured gesture coordinates by using at least one drawing thread, so that the touch display screen displays the gesture track according to the set screen refresh rate.
步骤550、通过至少一个开启线程,执行在后台开启所述黑屏手势的手势类型对应的应用程序的操作。Step 550: Perform, by using at least one open thread, an operation of an application corresponding to a gesture type in which the black screen gesture is turned on in the background.
其中,所述开启线程与所述绘制线程可以并行执行。开启线程可以用于执行在后台打开手势类型对应的应用程序的操作。在安卓系统中,应用程序是由Activity组成的,因此,应用程序的启动过程实际上就是应用程序中的默认Activity的启动过程,包括Activity类的调用及对象的实例化等。在后台开启该手势类型对应的应用程序后,缓存应用程序界面对应的画面帧,暂不绘制应用程序界面至触控显示屏。The open thread and the drawing thread can be executed in parallel. The open thread can be used to perform an operation of opening an application corresponding to the gesture type in the background. In the Android system, the application is composed of Activity. Therefore, the startup process of the application is actually the startup process of the default Activity in the application, including the call of the Activity class and the instantiation of the object. After the application corresponding to the gesture type is enabled in the background, the corresponding frame of the application interface is cached, and the application interface is not drawn to the touch display.
预先建立手势类型与应用程序或手机功能的关联关系,可以以设定白名单的方式存储手势类型与应用程序(如进程号或安装包名)或手机功能(如手机唤醒、会议模式或标准模式等工作模式切换)的关联关系。可以理解的是建立手势类型与应用程序的关联关系的方式有很多种,本申请实施例不作限定。例如,可以在移动终端出厂前为移动终端的设定功能或设定应用设置快捷启动功能,通过输入设定手势可以在熄屏状态下直接执行该设定功能或打开该设定应用。以手电筒为例,在移动终端出厂前预先设置手电筒具有快捷启动功能,通 过输入黑屏手势“0”可以在熄屏状态下打开手电筒。又如,移动终端提供黑屏手势配置功能,在用户开启黑屏手势功能时,提示用户选择需要设置快捷启动功能的应用程序,并输入或选择该应用程序对应的黑屏手势,从而建立手势类型与应用程序的关联关系。Pre-establish the relationship between the gesture type and the application or mobile phone function, and store the gesture type and application (such as process number or installation package name) or mobile phone function (such as mobile phone wake-up, conference mode or standard mode) by setting a white list. The relationship of the work mode switching. It can be understood that there are many ways to establish a relationship between a gesture type and an application, which is not limited in the embodiment of the present application. For example, the shortcut function can be set for the setting function or the setting application of the mobile terminal before the mobile terminal leaves the factory, and the setting function can be directly executed in the screen-out state or the setting application can be opened by inputting the setting gesture. Taking the flashlight as an example, the flashlight has a quick start function before the mobile terminal leaves the factory. By inputting the black screen gesture “0”, the flashlight can be turned on in the off state. For another example, the mobile terminal provides a black screen gesture configuration function, and when the user turns on the black screen gesture function, prompts the user to select an application that needs to set a quick start function, and inputs or selects a black screen gesture corresponding to the application, thereby establishing a gesture type and an application. Relationship.
应用层在接收到黑屏手势事件时,通过开启线程查询预先设定的白名单,确定与该黑屏手势的手势类型对应的应用程序,在后台开启该应用程序。When receiving the black screen gesture event, the application layer queries the preset white list by opening the thread, determines an application corresponding to the gesture type of the black screen gesture, and starts the application in the background.
步骤560、判断是否满足预设显示条件。若满足预设显示条件,则执行步骤570。Step 560: Determine whether the preset display condition is met. If the preset display condition is met, step 570 is performed.
其中,该显示条件可以根据实际需要设置,本发明实施例并不作具体限定。例如,可以规定触控显示屏上手势轨迹的显示时间阈值。又如,可以规定触控显示屏上显示了绘制至触控显示屏上的手势轨迹的结束点为显示条件,即在手势轨迹绘制出结束点。The display condition can be set according to actual needs, which is not specifically limited in the embodiment of the present invention. For example, a display time threshold of a gesture track on the touch display screen can be specified. For another example, it may be specified that the end point of the gesture track drawn on the touch display screen is displayed as a display condition, that is, the end point of the gesture track is drawn.
步骤570、判断是否检测到用户输入的针对应用程序的放弃开启指令,当检测到用户输入的针对应用程序的放弃开启指令时,则执行步骤580,当没有检测到用户输入的针对应用程序的放弃开启指令时,执行步骤590。Step 570: Determine whether the user's input of the abandonment open command for the application is detected. When the user's input of the abandonment open command for the application is detected, step 580 is performed, when the user input is not detected for the application. When the instruction is turned on, step 590 is performed.
其中,一些情况下,用户可能输入了错误的黑屏手势,并在显示手势轨迹时及时发现了该错误,此时,用户往往不希望该错误的黑屏手势对应的应用程序被打开并在触控显示屏上显示。可以通过在终端绘制该应用程序对应的界面至触控显示屏之前,增加后台关闭应用程序的功能。例如,在终端绘制该应用程序对应的界面至触控显示屏之前,判断是否检测到用户输入的针对应用程序的放弃开启指令;当检测到用户输入的针对应用程序的放弃开启指令时,则在后台关闭该应用程序,并控制移动终端恢复黑屏手势模式,可以实现在显示黑屏手势的应用程序之前,及时拦截错误的黑屏手势对应的应用程序,避免浪费图像处理器的处理资源。同时,可以避免显示错误的黑屏手势对应的应用程序后,用户再关闭该应用程序,可以有效地缩短重新进入黑屏手势模式的时间。In some cases, the user may input an incorrect black screen gesture and find the error in time when the gesture track is displayed. At this time, the user often does not want the application corresponding to the wrong black screen gesture to be turned on and displayed in the touch. Displayed on the screen. The function of closing the application in the background can be added before the terminal corresponding to the touch screen is drawn on the terminal. For example, before the terminal draws the interface corresponding to the application to the touch display screen, it is determined whether the user-input abandonment opening instruction for the application is detected; when the user-entered abandonment opening instruction for the application is detected, then The application is closed in the background, and the mobile terminal is restored to the black screen gesture mode, so that the application corresponding to the wrong black screen gesture can be intercepted in time before the application displaying the black screen gesture is displayed, thereby avoiding wasting the processing resources of the image processor. At the same time, after the application corresponding to the wrong black screen gesture is displayed, the user can close the application again, which can effectively shorten the time of re-entering the black screen gesture mode.
步骤580、在后台关闭所述应用程序。Step 580: Close the application in the background.
步骤590、绘制所述应用程序对应的界面至所述触控显示屏,以在所述触控显示屏上显示所述应用程序界面。Step 590: Draw an interface corresponding to the application to the touch display screen to display the application program interface on the touch display screen.
其中,绘制应用程序对应的界面至触控显示屏的过程可以是从缓存有应用程序界面对应的画面帧的预设存储区域读取数据,并传输至帧缓存(FrameBuffer),以按照设定的屏幕刷新率将该应用程序界面刷新至触控显示屏,将显示画面由手势轨迹直接切换至应用程序界面。The process of drawing an interface corresponding to the application to the touch display screen may be: reading data from a preset storage area of a picture frame corresponding to the application interface, and transmitting the data to a frame buffer (FrameBuffer) according to the set. The screen refresh rate refreshes the application interface to the touch display and switches the display directly from the gesture track to the application interface.
本实施例的技术方案,可以有效地提升黑屏手势的响应速度,缩短由检测 到黑屏手势至打开该黑屏手势对应的应用程序所需的时间。The technical solution of the embodiment can effectively improve the response speed of the black screen gesture and shorten the time required for detecting the black screen gesture to open the application corresponding to the black screen gesture.
图6是本申请实施例提供的一种加快黑屏手势处理的装置结构框图。该装置可有软件和/或硬件实现,一般集成在移动终端中。如图6所示,该装置可以包括:FIG. 6 is a structural block diagram of an apparatus for speeding up black screen gesture processing according to an embodiment of the present application. The device can be implemented in software and/or hardware and is typically integrated in a mobile terminal. As shown in FIG. 6, the apparatus may include:
手势事件检测模块610,设置为在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;The gesture event detection module 610 is configured to acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected;
复杂度匹配模块620,设置为根据所述手势类型匹配所述黑屏手势对应的手势复杂度;The complexity matching module 620 is configured to match the gesture complexity corresponding to the black screen gesture according to the gesture type;
采样策略确定模块630,设置为根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标;The sampling policy determining module 630 is configured to determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy;
手势轨迹绘制模块640,设置为通过至少一个绘制线程,根据已采集的所述手势坐标确定所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。The gesture track drawing module 640 is configured to determine, by the at least one drawing thread, the gesture track corresponding to the black screen gesture according to the captured gesture coordinates, so that the touch display screen displays the gesture track according to the set screen refresh rate. .
本申请实施例的技术方案,通过在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;根据所述手势类型匹配所述黑屏手势对应的手势复杂度;根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略读取手势坐标;通过至少一个绘制线程,根据已读取的所述手势坐标绘制所述黑屏手势对应的手势轨迹,按照设定的屏幕刷新率显示所述手势轨迹。按照不同的手势类型确定不同的数据采样策略,以实现多种手势坐标读取方式,减少了应用层的读取数据量以及在绘制手势轨迹时采用的数据量,提高了黑屏手势处理的速度,减少了系统响应时间,降低了系统功耗。The technical solution of the embodiment of the present application is to obtain a gesture type corresponding to the black screen gesture when the black screen gesture event is detected, and to match the gesture complexity corresponding to the black screen gesture according to the gesture type; and determine the data sampling according to the gesture complexity. a strategy, and reading a gesture coordinate according to the data sampling policy; drawing, by the at least one drawing thread, a gesture track corresponding to the black screen gesture according to the read gesture coordinate, and displaying the gesture according to the set screen refresh rate Track. Different data sampling strategies are determined according to different gesture types to implement multiple gesture coordinate reading modes, which reduces the amount of data read by the application layer and the amount of data used when drawing the gesture track, thereby improving the processing speed of the black screen gesture. Reduce system response time and reduce system power consumption.
在一实施例中,还可以包括手势复杂度确定模块,设置为:In an embodiment, the gesture complexity determining module may further be configured to:
在检测到黑屏手势事件之前,对于至少一个预设的手势类型,确定每个预设的手势类型对应的预设黑屏手势的拐点数量,并按照所述拐点数量确定所述手势类型对应的手势复杂度;Before detecting a black screen gesture event, determining, for at least one preset gesture type, determining a number of inflection points of the preset black screen gesture corresponding to each preset gesture type, and determining, according to the number of inflection points, a gesture corresponding to the gesture type is complex degree;
将每个所述预设的手势类型与对应的手势复杂度相关联地存储。Each of the preset gesture types is stored in association with a corresponding gesture complexity.
在一实施例中,还可以包括复杂度分级模块,设置为:In an embodiment, a complexity grading module may also be included, which is set to:
在确定黑屏手势的拐点数量之后,将所述预设的手势类型对应的手势复杂度按照拐点数量划分为至少两个复杂度等级,分别为每个所述复杂度等级匹配针对所述手势坐标的数据采样策略。After determining the number of inflection points of the black screen gesture, the gesture complexity corresponding to the preset gesture type is divided into at least two complexity levels according to the number of inflection points, and each of the complexity levels is matched for the gesture coordinates. Data sampling strategy.
在一实施例中,还可以包括刷新率匹配模块,设置为:In an embodiment, a refresh rate matching module may also be included, which is set to:
在将所述预设的手势类型对应的手势复杂度按照拐点数量划分为至少两个复杂度等级之后,分别针对每个所述复杂度等级,匹配显示所述手势轨迹时的 屏幕刷新率。After the gesture complexity corresponding to the preset gesture type is divided into at least two complexity levels according to the number of inflection points, the screen refresh rate when the gesture track is displayed is matched for each of the complexity levels.
在一实施例中,所述手势复杂度为所述手势类型对应的标准图形中拐点的数量;In an embodiment, the gesture complexity is the number of inflection points in the standard graphic corresponding to the gesture type;
所述数据采样策略为:按照所述黑屏手势的手势坐标写入操作系统的驱动层内预设节点的时间顺序,读取位于起点、终点以及拐点的手势坐标作为参考点,在任意两个参考点之间按照预设间隔数目读取手势坐标。The data sampling strategy is: writing the time sequence of the preset nodes in the driving layer of the operating system according to the gesture coordinates of the black screen gesture, and reading the gesture coordinates at the starting point, the ending point, and the inflection point as reference points, in any two references. The gesture coordinates are read between the points according to the preset number of intervals.
在一实施例中,还可以包括应用程序打开模块,设置为:In an embodiment, the application opening module may also be included, and is set to:
通过至少一个开启线程,执行在后台开启所述黑屏手势的手势类型对应的应用程序的操作,其中,所述开启线程与所述绘制线程并行执行;Executing, by the at least one open thread, an operation of an application corresponding to the gesture type of the black screen gesture in the background, wherein the open thread is executed in parallel with the drawing thread;
在满足预设显示条件时,绘制所述应用程序对应的界面至所述触控显示屏,以在所述触控显示屏上显示所述应用程序界面。When the preset display condition is met, the interface corresponding to the application is drawn to the touch display screen to display the application program interface on the touch display screen.
在一实施例中,还可以包括应用程序关闭模块,设置为:In an embodiment, an application shutdown module may also be included, which is set to:
在绘制所述应用程序对应的界面至所述触控显示屏之前,判断是否检测到用户输入的针对应用程序的放弃开启指令;Before drawing the interface corresponding to the application to the touch display screen, determining whether a user's input abandonment open command for the application is detected;
当检测到用户输入的针对应用程序的放弃开启指令时,在后台关闭所述应用程序。The application is closed in the background when a user-input abandonment open command for the application is detected.
存储介质——任何的不同类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器(random access memory,RAM),诸如动态随机存取存储器(dynamic random access memory,DRAM)、显示数据随机存储器(display data random access memory,DDR RAM)、静态随机存取存储器(static random access memory,SRAM)、扩展数据输出随机存取存储器(extended data output random access memory,EDO RAM),兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的至少两个存储介质。存储介质可以存储可由至少一个处理器执行的程序指令(例如实现为计算机程序)。Storage media - any different type of storage device or storage device. The term "storage medium" is intended to include: a mounting medium such as a CD-ROM, a floppy disk or a tape device; a computer system memory or a random access memory (RAM) such as a dynamic random access memory (dynamic random access memory). DRAM), display data random access memory (DDR RAM), static random access memory (SRAM), extended data output random access memory (EDO RAM) , Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory components, and the like. The storage medium may also include other types of memory or a combination thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet. The second computer system can provide program instructions to the first computer for execution. The term "storage medium" can include at least two storage mediums that can reside in different locations (eg, in different computer systems connected through a network). The storage medium may store program instructions (eg, implemented as a computer program) executable by the at least one processor.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的加快黑屏手势处理的操作,还可以执行本 申请任意实施例所提供的加快黑屏手势处理方法中的相关操作。Certainly, a storage medium containing computer executable instructions provided by the embodiments of the present application, the computer executable instructions are not limited to the operation of speeding up the black screen gesture processing as described above, and may also perform the acceleration provided by any embodiment of the present application. Related operations in the black screen gesture processing method.
本申请实施例提供了一种移动终端,该移动终端中可集成本申请实施例提供的加快黑屏手势处理的装置。图7为本申请实施例提供的一种移动终端的结构示意图。如图7所示,该移动终端可以包括:壳体(图中未示出)、存储器701、中央处理器(Central Processing Unit,CPU)702(又称处理器,以下简称CPU)、电路板(图中未示出)、触控显示屏712和电源电路(图中未示出)。所述触控显示屏712,包括触控芯片,设置为将用户操作转换成电信号输入至所述处理器,并显示可视输出信号;所述电路板安置在所述触控显示屏712与所述壳体围成的空间内部;所述CPU802和所述存储器701设置在所述电路板上;所述电源电路,设置为为所述移动终端的各个电路或器件供电;所述存储器701,设置为存储计算机程序;所述CPU702读取并执行所述存储器701中存储的计算机程序。所述CPU702在执行所述计算机程序时实现以下步骤:在检测到黑屏手势事件时,获取所述黑屏手势事件对应的手势类型;根据所述手势类型匹配所述黑屏手势对应的手势复杂度;根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略读取手势坐标;通过至少一个绘制线程,根据已读取的所述手势坐标绘制所述黑屏手势对应的手势轨迹,按照设定的屏幕刷新率显示所述手势轨迹。The embodiment of the present application provides a mobile terminal, where the device for speeding up black screen gesture processing provided by the embodiment of the present application can be integrated. FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. As shown in FIG. 7, the mobile terminal may include: a casing (not shown), a memory 701, a central processing unit (CPU) 702 (also referred to as a processor, hereinafter referred to as a CPU), and a circuit board ( Not shown in the drawing), touch display 712 and power supply circuit (not shown). The touch display screen 712 includes a touch chip configured to convert a user operation into an electrical signal input to the processor and display a visual output signal; the circuit board is disposed on the touch display screen 712 and a space enclosed by the casing; the CPU 802 and the memory 701 are disposed on the circuit board; the power circuit is configured to supply power to each circuit or device of the mobile terminal; the memory 701, It is arranged to store a computer program; the CPU 702 reads and executes a computer program stored in the memory 701. The CPU 702, when executing the computer program, the following steps: when detecting a black screen gesture event, acquiring a gesture type corresponding to the black screen gesture event; and matching the gesture complexity corresponding to the black screen gesture according to the gesture type; The gesture complexity determines a data sampling strategy, and reads gesture coordinates according to the data sampling strategy; and at least one drawing thread, draws a gesture track corresponding to the black screen gesture according to the read gesture coordinates, according to the setting The screen refresh rate shows the gesture track.
所述移动终端还包括:外设接口703、射频(Radio Frequency,RF)电路705、音频电路706、扬声器711、电源管理芯片708、输入/输出(I/O)子系统709、其他输入/控制设备710以及外部端口704,这些部件通过一个或多个通信总线或信号线707来通信。The mobile terminal further includes: a peripheral interface 703, a radio frequency (RF) circuit 705, an audio circuit 706, a speaker 711, a power management chip 708, an input/output (I/O) subsystem 709, and other inputs/controls. Device 710 and external port 704, these components communicate via one or more communication buses or signal lines 707.
应该理解的是,图示移动终端700仅仅是移动终端的一个范例,并且移动终端700可以具有比图中所示出的更多的或者更少的部件,可以组合至少两个部件,或者可以具有不同的部件配置。图中所示出的多种部件可以在包括至少一个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 700 is merely one example of a mobile terminal, and that the mobile terminal 700 may have more or fewer components than those shown in the figures, may combine at least two components, or may have Different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including at least one signal processing and/or application specific integrated circuit.
下面就本实施例提供的集成有加快黑屏手势处理的装置的移动终端进行详细的描述,该移动终端以手机为例。The mobile terminal integrated with the device for speeding up the black screen gesture processing provided by the embodiment is described in detail below. The mobile terminal takes a mobile phone as an example.
存储器701,所述存储器701可以被CPU702、外设接口703等访问,所述存储器701可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 701 can be accessed by the CPU 702, the peripheral interface 703, etc., and the memory 701 can include a high speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or Other volatile solid-state storage devices.
外设接口703,所述外设接口703可以将设备的输入和输出外设连接到CPU702和存储器701。 Peripheral interface 703, which can connect the input and output peripherals of the device to CPU 702 and memory 701.
I/O子系统709,所述I/O子系统709可以将设备上的输入输出外设,例如 触控显示屏712和其他输入/控制设备710,连接到外设接口703。I/O子系统709可以包括显示控制器7091和设置为控制其他输入/控制设备710的一个或多个输入控制器7092。其中,一个或多个输入控制器7092从其他输入/控制设备710接收电信号或者向其他输入/控制设备710发送电信号,其他输入/控制设备710可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器7092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 709, which can connect input and output peripherals on the device, such as touch display 712 and other input/control devices 710, to peripheral interface 703. The I/O subsystem 709 can include a display controller 7091 and one or more input controllers 7092 that are configured to control other input/control devices 710. Wherein, one or more input controllers 7092 receive electrical signals from other input/control devices 710 or transmit electrical signals to other input/control devices 710, and other input/control devices 710 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, click wheel. It is worth noting that the input controller 7092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触控显示屏712,所述触控显示屏712是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The touch display screen 712 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user. The visual output may include graphics, text, icons, videos, and the like.
I/O子系统709中的显示控制器7091从触控显示屏712接收电信号或者向触控显示屏712发送电信号。触控显示屏712检测触控显示屏上的接触,显示控制器7091将检测到的接触转换为与显示在触控显示屏712上的用户界面对象的交互,即实现人机交互,显示在触控显示屏712上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触控显示屏形成的触摸敏感表面的延伸。The display controller 7091 in the I/O subsystem 709 receives an electrical signal from the touch display 712 or transmits an electrical signal to the touch display 712. The touch display 712 detects the contact on the touch display screen, and the display controller 7091 converts the detected contact into an interaction with the user interface object displayed on the touch display screen 712, that is, realizes human-computer interaction, and displays the touch. The user interface objects on the control display 712 can be icons that run the game, icons that are networked to the respective network, and the like. It is worth noting that the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by a touch display.
RF电路705,设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路705接收并发送RF信号,RF信号也称为电磁信号,RF电路705将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路705可以包括设置为执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 705 is configured to establish communication between the mobile phone and the wireless network (ie, the network side) to implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like. Specifically, the RF circuit 705 receives and transmits an RF signal, which is also referred to as an electromagnetic signal, and the RF circuit 705 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate. RF circuitry 705 may include known circuitry configured to perform these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a codec CODER-DECoder (CODEC) chipset, Subscriber Identity Module (SIM), etc.
音频电路706,设置为从外设接口703接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器711。The audio circuit 706 is arranged to receive audio data from the peripheral interface 703, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 711.
扬声器711,设置为将手机通过RF电路705从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 711 is arranged to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 705 to sound and play the sound to the user.
电源管理芯片708,设置为为CPU702、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 708 is configured to provide power and power management for the hardware connected to the CPU 702, the I/O subsystem, and the peripheral interface.
本申请实施例提供的移动终端,按照不同的手势类型确定不同的数据采样策略,以实现多种手势坐标读取方式,减少了应用层的读取数据量以及在绘制 手势轨迹时采用的数据量,提高了黑屏手势处理的速度,减少了系统响应时间,降低了系统功耗。The mobile terminal provided by the embodiment of the present application determines different data sampling strategies according to different gesture types, so as to implement multiple gesture coordinate reading modes, and reduces the amount of data read by the application layer and the amount of data used when drawing the gesture track. Improves the processing speed of black screen gestures, reduces system response time, and reduces system power consumption.
上述加快黑屏手势处理的装置、存储介质及移动终端可执行本申请前述所有实施例所提供的加快黑屏手势处理的方法,具备执行上述加快黑屏手势处理的方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请前述所有实施例所提供的加快黑屏手势处理的方法。The device for accelerating the black-screen gesture processing, the storage medium, and the mobile terminal can perform the method for speeding up the black-screen gesture processing provided by all the foregoing embodiments of the present application, and have the corresponding functional modules and beneficial effects of performing the above-described method for speeding up the black-screen gesture processing. For the technical details that are not described in detail in this embodiment, refer to the method for speeding up the black screen gesture processing provided by all the foregoing embodiments of the present application.
工业实用性Industrial applicability
本申请实施例的加快黑屏手势处理的方法、装置、存储介质及移动终端,按照不同的手势类型确定不同的数据采样策略,以实现多种手势坐标读取方式,减少了应用层的读取数据量以及在绘制手势轨迹时采用的数据量,提高了黑屏手势处理的速度,减少了系统响应时间,降低了系统功耗。The method, device, storage medium and mobile terminal for speeding up black screen gesture processing in the embodiments of the present application determine different data sampling strategies according to different gesture types, so as to implement multiple gesture coordinate reading modes and reduce read data of the application layer. The amount and amount of data used in drawing gesture trajectories improves the processing speed of black screen gestures, reduces system response time, and reduces system power consumption.

Claims (10)

  1. 一种加快黑屏手势处理的方法,包括:A method for accelerating black screen gesture processing, including:
    在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;When a black screen gesture event is detected, the gesture type corresponding to the black screen gesture is acquired;
    根据所述手势类型匹配所述黑屏手势对应的手势复杂度;Matching the gesture complexity corresponding to the black screen gesture according to the gesture type;
    根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标;Determining a data sampling policy according to the gesture complexity, and collecting gesture coordinates of the black screen gesture according to the data sampling policy;
    通过至少一个绘制线程,根据已采集的所述手势坐标绘制所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。And drawing, by the at least one drawing thread, a gesture track corresponding to the black screen gesture according to the captured gesture coordinates, so that the touch display screen displays the gesture track according to the set screen refresh rate.
  2. 根据权利要求1所述的方法,其中,在检测到黑屏手势事件之前,还包括:The method of claim 1, wherein before detecting the blackout gesture event, the method further comprises:
    对于至少一个预设的手势类型,确定每个预设的手势类型对应的预设黑屏手势的拐点数量,并按照所述拐点数量确定每个所述预设的手势类型对应的手势复杂度;Determining, by the preset number of gestures, a number of inflection points of the preset black screen gesture corresponding to each preset gesture type, and determining, according to the number of inflection points, a gesture complexity corresponding to each of the preset gesture types;
    将每个所述预设的手势类型与对应的手势复杂度相关联地存储。Each of the preset gesture types is stored in association with a corresponding gesture complexity.
  3. 根据权利要求2所述的方法,其中,在确定每个预设的手势类型对应的黑屏手势的拐点数量之后,还包括:The method of claim 2, after determining the number of inflection points of the black screen gesture corresponding to each preset gesture type, further comprising:
    将所述预设的手势类型对应的手势复杂度按照拐点数量划分为至少两个复杂度等级,分别为每个所述复杂度等级匹配针对所述手势坐标的数据采样策略。The gesture complexity corresponding to the preset gesture type is divided into at least two complexity levels according to the number of inflection points, and each of the complexity levels matches a data sampling strategy for the gesture coordinates.
  4. 根据权利要求3所述的方法,其中,在将所述预设的手势类型对应的手势复杂度按照拐点数量划分为至少两个复杂度等级之后,还包括:The method according to claim 3, further comprising: after dividing the gesture complexity corresponding to the preset gesture type into at least two complexity levels according to the number of inflection points, further comprising:
    分别针对每个所述复杂度等级,匹配显示所述手势轨迹时的屏幕刷新率。The screen refresh rate when the gesture track is displayed is matched for each of the complexity levels.
  5. 根据权利要求1所述的方法,其中,所述手势复杂度为所述手势类型对应的标准图形中拐点的数量;The method according to claim 1, wherein the gesture complexity is a number of inflection points in a standard graphic corresponding to the gesture type;
    所述数据采样策略为:按照所述黑屏手势的手势坐标写入操作系统的驱动层内预设节点的时间顺序,读取位于起点、终点以及拐点的手势坐标作为参考点,在任意两个参考点之间按照预设间隔数目读取手势坐标。The data sampling strategy is: writing the time sequence of the preset nodes in the driving layer of the operating system according to the gesture coordinates of the black screen gesture, and reading the gesture coordinates at the starting point, the ending point, and the inflection point as reference points, in any two references. The gesture coordinates are read between the points according to the preset number of intervals.
  6. 根据权利要求1至5中任一所述的方法,其中,还包括:The method according to any one of claims 1 to 5, further comprising:
    通过至少一个开启线程,执行在后台开启所述黑屏手势的手势类型对应的应用程序的操作,其中,所述开启线程与所述绘制线程并行执行;Executing, by the at least one open thread, an operation of an application corresponding to the gesture type of the black screen gesture in the background, wherein the open thread is executed in parallel with the drawing thread;
    在满足预设显示条件时,绘制所述应用程序对应的界面至所述触控显示屏,以在所述触控显示屏上显示所述应用程序界面。When the preset display condition is met, the interface corresponding to the application is drawn to the touch display screen to display the application program interface on the touch display screen.
  7. 根据权利要求6所述的方法,其中,在绘制所述应用程序对应的界面至所述触控显示屏之前,还包括:The method of claim 6, wherein before the mapping of the interface corresponding to the application to the touch display screen, the method further comprises:
    判断是否检测到用户输入的针对所述应用程序的放弃开启指令;Determining whether a user's input of a discarding open command for the application is detected;
    当检测到用户输入的针对所述应用程序的放弃开启指令时,在后台关闭所述应用程序。The application is closed in the background when a user-input abandonment open command for the application is detected.
  8. 一种加快黑屏手势处理的装置,包括:A device for accelerating black screen gesture processing, comprising:
    手势事件检测模块,设置为在检测到黑屏手势事件时,获取黑屏手势对应的手势类型;The gesture event detection module is configured to acquire a gesture type corresponding to the black screen gesture when the black screen gesture event is detected;
    复杂度匹配模块,设置为根据所述手势类型匹配所述黑屏手势对应的手势复杂度;The complexity matching module is configured to match the gesture complexity corresponding to the black screen gesture according to the gesture type;
    采样策略确定模块,设置为根据所述手势复杂度确定数据采样策略,并根据所述数据采样策略采集所述黑屏手势的手势坐标;a sampling policy determining module, configured to determine a data sampling policy according to the gesture complexity, and collect gesture coordinates of the black screen gesture according to the data sampling policy;
    手势轨迹绘制模块,设置为通过至少一个绘制线程,根据已采集的所述手势坐标确定所述黑屏手势对应的手势轨迹,以使触控显示屏按照设定的屏幕刷新率显示所述手势轨迹。The gesture track drawing module is configured to determine, by the at least one drawing thread, the gesture track corresponding to the black screen gesture according to the captured gesture coordinates, so that the touch display screen displays the gesture track according to the set screen refresh rate.
  9. 一种计算机可读存储介质,所述存储介质存储有计算机程序,该程序被处理器执行时实现如权利要求1至7中任一所述的加快黑屏手势处理的方法。A computer readable storage medium storing a computer program that, when executed by a processor, implements the method of speeding up black screen gesture processing as claimed in any one of claims 1 to 7.
  10. 一种移动终端,包括触控显示屏、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7中任一所述的加快黑屏手势处理的方法。A mobile terminal comprising a touch display screen, a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the computer program as claimed in any one of claims 1 to 7 A method of speeding up black screen gesture processing as described.
PCT/CN2018/090506 2017-07-28 2018-06-08 Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal WO2019019818A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710632258.7A CN107402713B (en) 2017-07-28 2017-07-28 Accelerate method, apparatus, storage medium and the mobile terminal of the processing of blank screen gesture
CN201710632258.7 2017-07-28

Publications (1)

Publication Number Publication Date
WO2019019818A1 true WO2019019818A1 (en) 2019-01-31

Family

ID=60400981

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090506 WO2019019818A1 (en) 2017-07-28 2018-06-08 Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal

Country Status (2)

Country Link
CN (1) CN107402713B (en)
WO (1) WO2019019818A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402713B (en) * 2017-07-28 2019-08-27 Oppo广东移动通信有限公司 Accelerate method, apparatus, storage medium and the mobile terminal of the processing of blank screen gesture
CN108710464A (en) * 2018-06-04 2018-10-26 Oppo(重庆)智能科技有限公司 Mobile terminal, control method and its storage medium
CN112181171A (en) * 2020-08-25 2021-01-05 深圳市椰壳信息科技有限公司 Input method and device of intelligent pen on intelligent display terminal and intelligent pen
CN115113792B (en) * 2022-06-10 2024-02-13 上海啄一智能科技有限公司 Method and device for determining touch screen operation complexity of target task
CN115202495B (en) * 2022-09-08 2022-12-16 深圳市湘凡科技有限公司 Mouse hardware simulation movement method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100050134A1 (en) * 2008-07-24 2010-02-25 Gesturetek, Inc. Enhanced detection of circular engagement gesture
CN103092498A (en) * 2011-11-07 2013-05-08 联想(北京)有限公司 Method and device for determining response mode and electronic device
CN104636065A (en) * 2014-12-31 2015-05-20 小米科技有限责任公司 Method and device for awakening terminal
CN105426107A (en) * 2015-11-30 2016-03-23 北京拉酷网络科技有限公司 Gesture recognition method based on touchpad
CN107402713A (en) * 2017-07-28 2017-11-28 广东欧珀移动通信有限公司 Accelerate method, apparatus, storage medium and the mobile terminal of blank screen gesture processing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824537B (en) * 2016-03-30 2019-03-01 努比亚技术有限公司 Screenshot method and device
CN106095104A (en) * 2016-06-20 2016-11-09 电子科技大学 Continuous gesture path dividing method based on target model information and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100050134A1 (en) * 2008-07-24 2010-02-25 Gesturetek, Inc. Enhanced detection of circular engagement gesture
CN103092498A (en) * 2011-11-07 2013-05-08 联想(北京)有限公司 Method and device for determining response mode and electronic device
CN104636065A (en) * 2014-12-31 2015-05-20 小米科技有限责任公司 Method and device for awakening terminal
CN105426107A (en) * 2015-11-30 2016-03-23 北京拉酷网络科技有限公司 Gesture recognition method based on touchpad
CN107402713A (en) * 2017-07-28 2017-11-28 广东欧珀移动通信有限公司 Accelerate method, apparatus, storage medium and the mobile terminal of blank screen gesture processing

Also Published As

Publication number Publication date
CN107402713A (en) 2017-11-28
CN107402713B (en) 2019-08-27

Similar Documents

Publication Publication Date Title
US11086663B2 (en) Preloading application using active window stack
WO2019228156A1 (en) Method and device for preloading application, storage medium and intelligent terminal
US11604660B2 (en) Method for launching application, storage medium, and terminal
WO2019019818A1 (en) Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal
US20200201536A1 (en) Black screen gesture detection method and device, storage medium, and mobile terminal
EP3627809A1 (en) Method and device for reducing power consumption of mobile terminal, storage medium and mobile terminal
US10901608B2 (en) Method for recognizing a screen-off gesture, and storage medium and terminal thereof
CN107450838B (en) Response method and device of black screen gesture, storage medium and mobile terminal
WO2019218886A1 (en) Application pre-loading management method, device, storage medium and smart terminal
US11061558B2 (en) Touch operation response method and device
WO2019019835A1 (en) Method and device for responding to blank screen gesture, and storage medium and mobile terminal
US11455075B2 (en) Display method when application is exited and terminal
CN110442267B (en) Touch operation response method and device, mobile terminal and storage medium
US20230027523A1 (en) Display control method and terminal device
WO2019214476A1 (en) Screen direction setting method and device, storage medium and terminal
CN107479700B (en) Black screen gesture control method and device, storage medium and mobile terminal
WO2019019899A1 (en) Method and device for improving response to black screen gesture, storage medium, and mobile terminal
KR102618480B1 (en) Electronic device and method for operating thereof
US10466894B2 (en) Method, device, storage medium and mobile terminal for recognizing an off-screen gesture
WO2019047226A1 (en) Touch operation response method and device
CN110795172B (en) Foreground process control method and device, electronic equipment and storage medium
KR20180014614A (en) Electronic device and method for processing touch event thereof
US20230359283A1 (en) Method for gesture control and related devices
CN117435457A (en) Platform performance automatic test method, device, medium and equipment

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

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

Country of ref document: EP

Kind code of ref document: A1