[go: up one dir, main page]

CN116027940B - Screen capturing method, device and storage medium - Google Patents

Screen capturing method, device and storage medium Download PDF

Info

Publication number
CN116027940B
CN116027940B CN202210606734.9A CN202210606734A CN116027940B CN 116027940 B CN116027940 B CN 116027940B CN 202210606734 A CN202210606734 A CN 202210606734A CN 116027940 B CN116027940 B CN 116027940B
Authority
CN
China
Prior art keywords
screen
knocking
determining
acceleration sensor
gradient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210606734.9A
Other languages
Chinese (zh)
Other versions
CN116027940A (en
Inventor
汤建波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210606734.9A priority Critical patent/CN116027940B/en
Priority to CN202311633488.7A priority patent/CN117827054B/en
Publication of CN116027940A publication Critical patent/CN116027940A/en
Application granted granted Critical
Publication of CN116027940B publication Critical patent/CN116027940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供了一种截屏方法、设备及存储介质。通过将触摸屏划分成多个面积相对较小的屏幕分块,并通过确定敲击位置所在的屏幕分块对应的常量参数、加速度传感器所在的屏幕分块的梯度门限阈值,以及这两个屏幕分块之间的相对距离和该相对距离对应的距离系数来确定敲击位置所在的屏幕分块对应的梯度门限阈值,从而使得不同的敲击位置能够对应不同的梯度门限阈值,进而能够更加准确的识别本次敲击是否为触发截屏操作,大大提升了截屏操作的识别率。

This application provides a screenshot method, device and storage medium. By dividing the touch screen into multiple screen segments with relatively small areas, and by determining the constant parameters corresponding to the screen segment where the tapping position is located, the gradient threshold of the screen segment where the acceleration sensor is located, and the two screen segments. The relative distance between the blocks and the distance coefficient corresponding to the relative distance are used to determine the gradient threshold corresponding to the screen block where the tapping position is located, so that different tapping positions can correspond to different gradient thresholds, and thus more accurate Identifying whether this tap triggers a screenshot operation greatly improves the recognition rate of the screenshot operation.

Description

截屏方法、设备及存储介质Screenshot methods, equipment and storage media

技术领域Technical field

本申请涉及终端设备技术领域,尤其涉及一种截屏方法、设备及存储介质。The present application relates to the technical field of terminal equipment, and in particular to a screen capture method, equipment and storage medium.

背景技术Background technique

随着终端设备技术的不断发展,终端设备支持的功能也越来越丰富,例如现有的终端设备通常支持截屏功能,从而使得用户在使用终端设备的过程中,能够通过截屏功能随时截取自己需要的内容。With the continuous development of terminal device technology, the functions supported by terminal devices are becoming more and more abundant. For example, existing terminal devices usually support the screen capture function, so that users can capture what they need at any time through the screen capture function while using the terminal device. Content.

目前,为了方便用户单手截屏,很多终端设备具备支持指关节截屏的特性,这样用户可以单指关节连续敲击屏幕就可以实现截屏操作。Currently, in order to facilitate users to take screenshots with one hand, many terminal devices have the feature of supporting screenshots with knuckles, so that users can continuously tap the screen with one knuckle to take screenshots.

然而,现有指关节截屏功能通常是适用于手机等屏幕相对较小的终端设备,对于平板电脑等屏幕较大的终端设备,指关节截屏成功率较低。However, the existing knuckle screenshot function is usually suitable for terminal devices with relatively small screens such as mobile phones. For terminal devices with larger screens such as tablet computers, the success rate of knuckle screenshots is low.

发明内容Contents of the invention

为了解决上述技术问题,本申请提供一种截屏方法、设备及存储介质,旨在提高大屏设备,如平板电脑设备的指关节截屏成功率。In order to solve the above technical problems, this application provides a screen capture method, device and storage medium, aiming to improve the success rate of knuckle screen capture of large screen devices, such as tablet computer devices.

第一方面,本申请提供一种截屏方法,应用于终端设备。其中,终端设备的触摸屏被划分为多个屏幕分块,该方法包括:响应于用户对触摸屏的敲击操作,确定敲击位置所在的屏幕分块和敲击操作对应的梯度值,梯度值用于指示多帧加速度数据间的数据变化量;确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离;根据加速度传感器所在的屏幕分块的梯度门限阈值、相对距离、相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值;在敲击操作对应的梯度值大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏。由此,通过将触摸屏划分成多个面积相对较小的屏幕分块,并通过确定敲击位置所在的屏幕分块对应的常量参数、加速度传感器所在的屏幕分块的梯度门限阈值,以及这两个屏幕分块之间的相对距离和该相对距离对应的距离系数来确定敲击位置所在的屏幕分块对应的梯度门限阈值,从而使得不同的敲击位置能够对应不同的梯度门限阈值,进而能够更加准确的识别本次敲击是否为触发截屏操作,大大提升了截屏操作的识别率。In the first aspect, this application provides a screenshot method, which is applied to terminal equipment. Wherein, the touch screen of the terminal device is divided into multiple screen segments, and the method includes: in response to the user's tapping operation on the touch screen, determining the screen segment where the tapping position is located and the gradient value corresponding to the tapping operation, where the gradient value is Used to indicate the amount of data change between multiple frames of acceleration data; determine the relative distance between the screen block where the tapping position is located and the screen block where the acceleration sensor is located; based on the gradient threshold and relative distance of the screen block where the acceleration sensor is located , the distance coefficient corresponding to the relative distance and the constant parameter corresponding to the screen block where the tapping position is located determine the gradient threshold of the screen block where the tapping position is located; when the gradient value corresponding to the tapping operation is greater than the screen where the tapping position is located When the gradient threshold of the block is exceeded, a screenshot is triggered. Therefore, by dividing the touch screen into multiple screen blocks with relatively small areas, and by determining the constant parameters corresponding to the screen block where the tapping position is located, the gradient threshold of the screen block where the acceleration sensor is located, and these two The relative distance between the screen blocks and the distance coefficient corresponding to the relative distance are used to determine the gradient threshold corresponding to the screen block where the tapping position is located, so that different tapping positions can correspond to different gradient thresholds, and thus It can more accurately identify whether this tap triggers a screenshot operation, which greatly improves the recognition rate of the screenshot operation.

根据第一方面,确定敲击位置所在的屏幕分块,包括:确定敲击位置相对触摸屏的坐标;根据敲击位置相对触摸屏的坐标确定敲击位置所在的屏幕分块。这样,通过定位敲击位置的坐标,进而能够根据具体的坐标精准的确定敲击位置所在的屏幕分块,从而保证基于敲击位置所在的屏幕分块和加速度传感器所在屏幕分块确定的相对距离更加精准,进而保证计算出的梯度门限阈值更加精准,从而进一步提升了截屏操作的识别率。According to the first aspect, determining the screen segment where the tapping position is located includes: determining the coordinates of the tapping position relative to the touch screen; determining the screen segment where the tapping position is located based on the coordinates of the tapping position relative to the touch screen. In this way, by locating the coordinates of the knocking position, the screen block where the knocking position is located can be accurately determined based on the specific coordinates, thereby ensuring the relative distance determined based on the screen block where the knocking position is located and the screen block where the acceleration sensor is located. It is more accurate, thereby ensuring that the calculated gradient threshold is more accurate, thus further improving the recognition rate of screenshot operations.

根据第一方面,或者以上第一方面的任意一种实现方式,确定敲击位置相对触摸屏的坐标,包括:通过触摸屏中的触摸传感器采集用户敲击敲击位置时的报点数据;构建相对于触摸屏的坐标系;根据报点数据,确定敲击位置在坐标系中的坐标。According to the first aspect, or any implementation of the above first aspect, determining the coordinates of the tapping position relative to the touch screen includes: collecting reporting point data when the user taps the tapping position through a touch sensor in the touch screen; constructing a coordinate relative to the tapping position; The coordinate system of the touch screen; determine the coordinates of the tapping position in the coordinate system based on the reported point data.

根据第一方面,或者以上第一方面的任意一种实现方式,确定敲击位置在坐标系中的坐标,包括:根据报点数据中触摸传感器采集到的敲击位置在敲击前第一时间阈值内的第一电容值、敲击时刻的第二电容值,以及敲击后第二时间阈值内的第三电容值,确定电容值的变化趋势;根据电容值的变化趋势,确定敲击位置在坐标系中的坐标。由于手指,或者指关节与触摸屏接触时,会引起电容值的变化,为了保证识别率,尽可能降低误判情况,通过获取敲击时刻,以及敲击时刻前后一定时间内的电容值,从而能够精准的获知电容值的变化,由此通过电容值的变化趋势便可以精准的确定是否发生了敲击操作,以及具体的敲击位置。According to the first aspect, or any implementation of the above first aspect, determining the coordinates of the tapping position in the coordinate system includes: based on the tapping position collected by the touch sensor in the reporting point data at the first time before tapping. The first capacitance value within the threshold, the second capacitance value at the moment of tapping, and the third capacitance value within the second time threshold after tapping determine the changing trend of the capacitance value; according to the changing trend of the capacitance value, the tapping position is determined Coordinates in a coordinate system. Since the capacitance value changes when the finger or knuckle comes into contact with the touch screen, in order to ensure the recognition rate and reduce misjudgments as much as possible, the tapping moment and the capacitance value within a certain period of time before and after the tapping moment can be obtained. The change in capacitance value can be accurately known, so that through the changing trend of capacitance value, it can be accurately determined whether a tapping operation has occurred and the specific tapping position.

根据第一方面,或者以上第一方面的任意一种实现方式,在得到报点数据之后,方法还包括:通过加速度传感器采集用户敲击敲击位置时的加速度数据;根据报点数据和加速度数据,预测敲击操作触发截屏的置信度值;在置信度值大于设定的置信度阈值时,执行构建相对于触摸屏的坐标系的操作。这样,在置信度值大于设定的置信度阈值时,才执行本申请提供的截屏方法的流程,从而进一步提升了截屏操作的识别率。According to the first aspect, or any implementation of the above first aspect, after obtaining the point reporting data, the method further includes: collecting acceleration data when the user taps the tapping position through an acceleration sensor; according to the point reporting data and the acceleration data , predict the confidence value of a screenshot triggered by a tapping operation; when the confidence value is greater than the set confidence threshold, perform the operation of constructing a coordinate system relative to the touch screen. In this way, the process of the screenshot method provided by this application is only executed when the confidence value is greater than the set confidence threshold, thereby further improving the recognition rate of the screenshot operation.

根据第一方面,或者以上第一方面的任意一种实现方式,构建相对于触摸屏的坐标系,包括:以触摸屏的左下角为坐标原点;设置X轴水平指向右侧,Y轴垂直指向顶部,Z轴指向触摸屏前方,得到相对于触摸屏的坐标系。According to the first aspect, or any implementation of the first aspect above, constructing a coordinate system relative to the touch screen includes: taking the lower left corner of the touch screen as the coordinate origin; setting the X-axis to point horizontally to the right, and the Y-axis to point vertically to the top, The Z-axis points to the front of the touch screen, obtaining the coordinate system relative to the touch screen.

根据第一方面,或者以上第一方面的任意一种实现方式,确定所述敲击操作对应的梯度值,包括:通过加速度传感器采集用户敲击所述敲击位置时的加速度数据;根据加速度数据,确定敲击操作对应的梯度值。According to the first aspect, or any implementation of the above first aspect, determining the gradient value corresponding to the tapping operation includes: collecting acceleration data when the user taps the tapping position through an acceleration sensor; according to the acceleration data , determine the gradient value corresponding to the tapping operation.

根据第一方面,或者以上第一方面的任意一种实现方式,基于下述公式,根据加速度传感器所在的屏幕分块的梯度门限阈值、相对距离、相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值:According to the first aspect, or any implementation of the above first aspect, based on the following formula, according to the gradient threshold of the screen block where the acceleration sensor is located, the relative distance, the distance coefficient corresponding to the relative distance, and the tapping position. The constant parameter corresponding to the screen block determines the gradient threshold of the screen block where the tapping position is located:

Current_Grandient=Threshold_Grandient*distance*Coeff+KCurrent_Grandient=Threshold_Grandient*distance*Coeff+K

其中,Current_Grandient为敲击位置所在的屏幕分块的梯度门限阈值,Threshold_Grandient为加速度传感器所在的屏幕分块的梯度门限阈值;distance为敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离,Coeff为相对距离对应的距离系数,K为敲击位置所在的屏幕分块对应的常量参数。Among them, Current_Grandient is the gradient threshold of the screen block where the knocking position is located, Threshold_Grandient is the gradient threshold of the screen block where the acceleration sensor is located; distance is the difference between the screen block where the knocking position is located and the screen block where the acceleration sensor is located. Coeff is the distance coefficient corresponding to the relative distance, and K is the constant parameter corresponding to the screen block where the tapping position is located.

根据第一方面,或者以上第一方面的任意一种实现方式,加速度传感器的数量大于1;确定敲击操作对应的梯度值包括:获取每一个加速度传感器采集用户敲击敲击位置时的加速度数据;根据每一个加速度传感器采集用户敲击敲击位置时的加速度数据,确定敲击操作作用于敲击位置时,每一个加速度传感器对应的梯度值。According to the first aspect, or any implementation of the above first aspect, the number of acceleration sensors is greater than 1; determining the gradient value corresponding to the tapping operation includes: obtaining acceleration data collected by each acceleration sensor when the user taps the tapping position. ;According to each acceleration sensor, collect the acceleration data when the user taps the tapping position, and determine the gradient value corresponding to each acceleration sensor when the tapping operation acts on the tapping position.

根据第一方面,或者以上第一方面的任意一种实现方式,确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离,包括:确定敲击位置所在的屏幕分块与每一个加速度传感器所在的屏幕分块之间的相对距离。According to the first aspect, or any implementation of the above first aspect, determining the relative distance between the screen segment where the knocking position is located and the screen segment where the acceleration sensor is located includes: determining the screen segment where the knocking position is located. The relative distance between the block and the screen block where each acceleration sensor is located.

根据第一方面,或者以上第一方面的任意一种实现方式,根据加速度传感器所在的屏幕分块的梯度门限阈值、相对距离、相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值,包括:从确定的多个相对距离中选取最短的相对距离;根据最短的相对距离对应的加速度传感器所在的屏幕分块的梯度门限阈值、最短的相对距离、最短的相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值。这样,在终端设备中有多个加速度传感器时,优先考虑最短的相对距离,以及最短的相对距离对应的距离系数和加速度传感器所在屏幕分块的梯度门限阈值来计算敲击位置所在屏幕分块的梯度门限阈值,进而保证计算出的梯度门限阈值更加精准,从而进一步提升了截屏操作的识别率。According to the first aspect, or any implementation of the above first aspect, according to the gradient threshold value of the screen block where the acceleration sensor is located, the relative distance, the distance coefficient corresponding to the relative distance, and the corresponding distance coefficient of the screen block where the tapping position is located. Constant parameter to determine the gradient threshold of the screen block where the tapping position is located, including: selecting the shortest relative distance from multiple determined relative distances; the gradient threshold of the screen block where the acceleration sensor is located based on the shortest relative distance. The threshold, the shortest relative distance, the distance coefficient corresponding to the shortest relative distance, and the constant parameter corresponding to the screen block where the knocking position is located determine the gradient threshold of the screen block where the knocking position is located. In this way, when there are multiple acceleration sensors in the terminal device, the shortest relative distance is given priority, as well as the distance coefficient corresponding to the shortest relative distance and the gradient threshold of the screen block where the acceleration sensor is located to calculate the screen block where the tapping position is located. Gradient threshold, thereby ensuring that the calculated gradient threshold is more accurate, thereby further improving the recognition rate of screenshot operations.

根据第一方面,或者以上第一方面的任意一种实现方式,在敲击操作对应的梯度值大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏,包括:在最短的相对距离对应的加速度传感器对应的梯度值,大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏。这样,保证了所有的判断都是基于最短的相对距离对应的相关参数,进而保证了结果的准确性。According to the first aspect, or any implementation of the above first aspect, when the gradient value corresponding to the tapping operation is greater than the gradient threshold of the screen block where the tapping position is located, a screenshot is triggered, including: at the shortest relative distance When the gradient value corresponding to the corresponding acceleration sensor is greater than the gradient threshold of the screen block where the tapping position is located, a screenshot is triggered. In this way, it is ensured that all judgments are based on the relevant parameters corresponding to the shortest relative distance, thus ensuring the accuracy of the results.

根据第一方面,或者以上第一方面的任意一种实现方式,在确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离之前,方法还包括:确定每一个屏幕分块与加速度传感器所在的屏幕分块之间的相对距离;以加速度传感器为中心,基于距离关系函数向外映射,为每一个相对距离设置对应的距离系数。这样,以加速度传感器为中心向外映射,设置不同相对距离对应的距离系数,从而使得计算梯度门限阈值时所需的距离系数能够更精准的贴合本次敲击操作,进而保证计算出的梯度门限阈值更加精准,从而进一步提升了截屏操作的识别率。According to the first aspect, or any implementation of the above first aspect, before determining the relative distance between the screen block where the knocking position is located and the screen block where the acceleration sensor is located, the method further includes: determining each screen The relative distance between the block and the screen block where the acceleration sensor is located; with the acceleration sensor as the center, map outward based on the distance relationship function, and set a corresponding distance coefficient for each relative distance. In this way, the acceleration sensor is used as the center to map outward, and distance coefficients corresponding to different relative distances are set, so that the distance coefficient required when calculating the gradient threshold can more accurately fit the tapping operation, thereby ensuring the calculated gradient The threshold value is more accurate, further improving the recognition rate of screenshot operations.

根据第一方面,或者以上第一方面的任意一种实现方式,在确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离之前,方法还包括:确定摄像头相对触摸屏的坐标;根据摄像头相对触摸屏的坐标,确定触摸屏的对折线,摄像头相对触摸屏的坐标位于对折线上,对折线贯穿了触摸屏的部分屏幕分块;根据摄像头相对触摸屏的坐标和对折线,为每一个屏幕分块设置对应的常量参数。由于摄像头的凸起会导致终端设备水平放置时,部分区域与水平面无法平行,即存在一定夹角,这样用户在点击终端设备的触摸屏时,报点数据和加速度数据差异就会很大,因此通过考虑摄像头相对触摸屏的坐标,为摄像头所在位置的屏幕分块,以及摄像头所在对折线上的屏幕分块设置特殊的常量参数,能够保证计算出的梯度门限阈值更加精准,从而进一步提升了截屏操作的识别率。According to the first aspect, or any implementation of the above first aspect, before determining the relative distance between the screen segment where the tapping position is located and the screen segment where the acceleration sensor is located, the method further includes: determining the relative distance between the camera and the touch screen coordinates; determine the folding line of the touch screen based on the coordinates of the camera relative to the touch screen, the coordinates of the camera relative to the touch screen are located on the folding line, and the folding line runs through part of the screen segments of the touch screen; according to the coordinates of the camera relative to the touch screen and the folding line, for each The constant parameters corresponding to the screen block settings. Due to the protrusion of the camera, when the terminal device is placed horizontally, some areas cannot be parallel to the horizontal plane, that is, there is a certain angle. In this way, when the user clicks on the touch screen of the terminal device, the difference between the reported point data and the acceleration data will be very large. Therefore, by Considering the coordinates of the camera relative to the touch screen, setting special constant parameters for the screen segment where the camera is located and the screen segment on the diagonal line where the camera is located can ensure that the calculated gradient threshold is more accurate, thereby further improving the efficiency of the screenshot operation. Recognition rate.

根据第一方面,或者以上第一方面的任意一种实现方式,响应于用户对触摸屏的敲击操作,确定敲击位置所在的屏幕分块和敲击操作对应的梯度值,包括:在设定的时间阈值内接收到用户对触摸屏的任意同一区域的N次敲击操作时,确定敲击位置所在的屏幕分块和敲击操作对应的梯度值,N为大于1的整数。这样,在特定时间内,监测到对触摸屏同一区域的多次敲击时触发本申请提供的截屏流程,从而降低了误触率,进可能避免了用户误触导致截屏的情况发生。According to the first aspect, or any implementation of the above first aspect, in response to the user's tapping operation on the touch screen, determining the screen segment where the tapping position is located and the gradient value corresponding to the tapping operation include: setting When receiving N tap operations from the user on any same area of the touch screen within the time threshold, determine the screen block where the tap position is located and the gradient value corresponding to the tap operation, where N is an integer greater than 1. In this way, within a specific period of time, when multiple taps on the same area of the touch screen are detected, the screenshot process provided by this application is triggered, thereby reducing the accidental touch rate and possibly avoiding the situation where the user accidentally touches the screen and takes a screenshot.

第二方面,本申请提供了一种终端设备。该终端设备包括:存储器和处理器,存储器和处理器耦合;存储器存储有程序指令,程序指令由处理器执行时,使得所述终端设备执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a second aspect, this application provides a terminal device. The terminal device includes: a memory and a processor, and the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device executes the first aspect or any possible implementation of the first aspect. method instructions.

示例性的,第二方面中的终端设备例如可以为平板电脑等屏幕尺寸相对较大的终端设备。For example, the terminal device in the second aspect may be a terminal device with a relatively large screen size such as a tablet computer.

第三方面,本申请提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a third aspect, the present application provides a computer-readable medium for storing a computer program, the computer program comprising instructions for performing a method in the first aspect or any possible implementation of the first aspect.

第四方面,本申请提供了一种计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a fourth aspect, the present application provides a computer program, the computer program comprising instructions for performing a method in the first aspect or any possible implementation of the first aspect.

第五方面,本申请提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第一方面或第一方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In a fifth aspect, this application provides a chip, which includes a processing circuit and transceiver pins. Wherein, the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive the signal, so as to Control the sending pin to send signals.

附图说明Description of the drawings

图1为示例性示出的一种终端设备的硬件结构示意图;Figure 1 is a schematic diagram of the hardware structure of a terminal device;

图2为示例性示出的一种终端设备的软件结构示意图;Figure 2 is a schematic diagram of the software structure of a terminal device;

图3为示例性示出的一种手机的用于界面操作示意图;Figure 3 is an exemplary schematic diagram of an interface operation of a mobile phone;

图4为示例性示出的敲击手机的屏幕后加速度数据的振荡特征示意图;Figure 4 is a schematic diagram illustrating the oscillation characteristics of acceleration data after tapping the screen of a mobile phone;

图5为示例性示出的一种平板的用于界面操作示意图;Figure 5 is an exemplary schematic diagram of a tablet used for interface operation;

图6为示例性示出的又一种平板的用于界面操作示意图;Figure 6 is a schematic diagram of another tablet for interface operation;

图7为示例性示出的敲击图6所示屏幕区域后加速度数据的振荡特征示意图;Figure 7 is a schematic diagram illustrating the oscillation characteristics of acceleration data after tapping the screen area shown in Figure 6;

图8为示例性示出的一种截屏方法的流程示意图;Figure 8 is a schematic flow chart of an exemplary screenshot method;

图9为示例性示出的一种平板的触摸屏划分格式示意图;Figure 9 is a schematic diagram illustrating the division format of a tablet touch screen;

图10为示例性示出的敲击平板的示意图;Figure 10 is a schematic diagram of an exemplary knocking plate;

图11为示例性示出的又一种截屏方法的流程示意图;Figure 11 is a schematic flow chart of yet another screenshot method;

图12为示例性示出的又一种截屏方法的流程示意图;Figure 12 is a schematic flow chart of yet another screenshot method;

图13为示例性示出的平板中设置有两个加速度传感器的示意图。FIG. 13 is a schematic diagram illustrating two acceleration sensors provided in a flat panel.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.

本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms “first” and “second” in the description and claims of the embodiments of this application are used to distinguish different objects, rather than to describe a specific order of objects. For example, the first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.

在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.

在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of this application, unless otherwise specified, the meaning of “plurality” refers to two or more. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

为了更好的理解本申请实施例提供的技术方案,在对本申请实施例的技术方案说明之前,首先结合附图对本申请实施例的适用于的终端设备(例如手机、平板电脑、可触控PC机等)的硬件结构进行说明。In order to better understand the technical solutions provided by the embodiments of the present application, before describing the technical solutions of the embodiments of the present application, first, in conjunction with the accompanying drawings, the terminal devices (such as mobile phones, tablet computers, touch-enabled PCs) to which the embodiments of the present application are applicable will be described. Machine, etc.) hardware structure is explained.

需要说明的是,本申请实施例提供的技术方案尤其适用于屏幕相对较大的终端设备,例如平板电脑、可触控PC机、智慧屏等,为了便于说明,图1以平板电脑为例进行说明。It should be noted that the technical solutions provided by the embodiments of the present application are particularly suitable for terminal devices with relatively large screens, such as tablet computers, touch-enabled PCs, smart screens, etc. For ease of explanation, Figure 1 takes a tablet computer as an example. illustrate.

参见图1,终端设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。Referring to Figure 1, the terminal device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142. Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, Display 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.

示例性的,在一些实现方式中,传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等,此处不再一一例举,本申请对此不作限制。Exemplarily, in some implementations, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, and an ambient light sensor. , bone conduction sensors, etc., will not be listed one by one here, and this application does not limit this.

为了更好的理解上述各个传感器的工作原理,以下进行具体说明:In order to better understand the working principles of each of the above sensors, detailed descriptions are given below:

压力传感器用于感受压力信号,可以将压力信号转换成电信号。在一些实现方式中,压力传感器可以设置于显示屏194。压力传感器的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器检测所述触摸操作强度。终端设备100也可以根据压力传感器的检测信号计算触摸的位置。在一些实现方式中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。Pressure sensors are used to sense pressure signals and convert pressure signals into electrical signals. In some implementations, the pressure sensor may be disposed on the display screen 194 . There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force acts on a pressure sensor, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is performed on the display screen 194, the terminal device 100 detects the strength of the touch operation according to the pressure sensor. The terminal device 100 may also calculate the touched position based on the detection signal of the pressure sensor. In some implementations, touch operations acting on the same touch location but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

陀螺仪传感器可以用于确定终端设备100的运动姿态。在一些实现方式中,可以通过陀螺仪传感器确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器还可以用于导航,体感游戏场景。The gyro sensor can be used to determine the movement posture of the terminal device 100 . In some implementations, the angular velocity of the terminal device 100 about three axes (ie, x, y, and z axes) may be determined by a gyroscope sensor. The gyro sensor can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor detects the angle at which the terminal device 100 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the terminal device 100 through reverse movement to achieve anti-shake. Gyroscope sensors can also be used for navigation and somatosensory gaming scenarios.

气压传感器用于测量气压。在一些实现方式中,终端设备100通过气压传感器测得的气压值计算海拔高度,辅助定位和导航。Air pressure sensors measure air pressure. In some implementations, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor to assist positioning and navigation.

磁传感器包括霍尔传感器。终端设备100可以利用磁传感器检测翻盖皮套的开合。在一些实现方式中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。Magnetic sensors include Hall sensors. The terminal device 100 may detect opening and closing of the flip holster using a magnetic sensor. In some implementations, when the terminal device 100 is a flip machine, the terminal device 100 may detect opening and closing of the flip cover based on a magnetic sensor. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.

加速度传感器可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor can detect the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.

距离传感器,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实现方式中,拍摄场景,终端设备100可以利用距离传感器测距以实现快速对焦。Distance sensor for measuring distance. The terminal device 100 can measure distance through infrared or laser. In some implementations, when shooting a scene, the terminal device 100 can use a distance sensor to measure distance to achieve fast focusing.

接近光传感器可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensors may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light through a light emitting diode. The terminal device 100 detects infrared reflected light from nearby objects using photodiodes. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 . The terminal device 100 can use the proximity light sensor to detect when the user holds the terminal device 100 close to the ear for talking, so as to automatically turn off the screen to save power. The proximity light sensor can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.

环境光传感器用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器也可用于拍照时自动调节白平衡。环境光传感器还可以与接近光传感器配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor is used to sense ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor can also be used to automatically adjust white balance when taking photos. The ambient light sensor can also cooperate with the proximity light sensor to detect whether the terminal device 100 is in the pocket to prevent accidental touching.

指纹传感器用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photography, fingerprint answering incoming calls, etc.

温度传感器用于检测温度。在一些实现方式中,终端设备100利用温度传感器检测的温度,执行温度处理策略。例如,当温度传感器上报的温度超过阈值,终端设备100执行降低位于温度传感器附近的处理器的性能,以便降低功耗实施热保护。在另一些实现方式中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实现方式中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。Temperature sensor is used to detect temperature. In some implementations, the terminal device 100 uses the temperature detected by the temperature sensor to execute the temperature processing policy. For example, when the temperature reported by the temperature sensor exceeds a threshold, the terminal device 100 reduces the performance of a processor located near the temperature sensor in order to reduce power consumption and implement thermal protection. In other implementations, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid the low temperature causing the terminal device 100 to shut down abnormally. In some other implementations, when the temperature is lower than another threshold, the terminal device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

触摸传感器,也称“触控面板”。触摸传感器可以设置于显示屏194,由触摸传感器与显示屏194组成触摸屏,也称“触控屏”。触摸传感器用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型,例如,可以包括滑动、点击、长按等触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实现方式中,触摸传感器也可以设置于终端设备100的表面,与显示屏194所处的位置不同。具体到本申请实施例提供的技术方案中,当用户触摸或敲击触摸屏时,触摸传感器就会监测到用户的操作行为,终端设备100接收到来自触摸屏中触摸传感器采集到的数据,就会响应于该操作行为,例如执行本申请实施例提供的技术方案中的确定敲击位置所在的屏幕分块的操作。Touch sensor, also called "touch panel". The touch sensor can be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, which is also called a "touch screen". Touch sensors are used to detect touches on or near them. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type, which may include, for example, sliding, clicking, long pressing and other touch event types. Visual output related to the touch operation may be provided through display screen 194 . In other implementations, the touch sensor may also be disposed on the surface of the terminal device 100 in a position different from that of the display screen 194 . Specifically, in the technical solutions provided by the embodiments of this application, when the user touches or taps the touch screen, the touch sensor will detect the user's operating behavior, and the terminal device 100 will respond after receiving the data collected by the touch sensor in the touch screen. For this operation behavior, for example, the operation of determining the screen segment where the tapping position is located in the technical solution provided by the embodiment of the present application is performed.

骨传导传感器可以获取振动信号。在一些实现方式中,骨传导传感器可以获取人体声部振动骨块的振动信号。骨传导传感器也可以接触人体脉搏,接收血压跳动信号。在一些实现方式中,骨传导传感器也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器获取的血压跳动信号解析心率信息,实现心率检测功能。Bone conduction sensors can pick up vibration signals. In some implementations, the bone conduction sensor can acquire the vibration signal of the vibrating bone mass of the human body. Bone conduction sensors can also contact the human body's pulse and receive blood pressure beat signals. In some implementations, bone conduction sensors can also be provided in earphones and combined into bone conduction earphones. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor to implement the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor to implement the heart rate detection function.

具体到本申请实施例提供的技术方案中,传感器模块180至少需要包括触摸传感器和加速度传感器。这样,通过触摸传感器采集的数据就可以确定用户是否敲击了触摸屏,并确定用户敲击位置的具体坐标,通过加速度传感器采集的数据就可以确定多帧加速度数据之间的数据变化情况,并确定加速度传感器的具体坐标。进而根据敲击位置的坐标确定敲击位置在触控屏的具体屏幕分块,根据加速度传感器的坐标确定加速度传感器在触控屏的具体屏幕分块,进而根据确定的两个屏幕分块获取计算敲击位置所在屏幕分块的梯度门限阈值,从而能够精准的确定本次敲击是否需要触发截屏操作。Specifically, in the technical solutions provided by the embodiments of this application, the sensor module 180 needs to include at least a touch sensor and an acceleration sensor. In this way, the data collected by the touch sensor can be used to determine whether the user tapped the touch screen, and the specific coordinates of the user's tapping location can be determined. The data collected by the acceleration sensor can be used to determine the data changes between multiple frames of acceleration data, and determine The specific coordinates of the acceleration sensor. Then determine the specific screen segment of the touch screen where the tap position is based on the coordinates of the tapping position, determine the specific screen segment of the acceleration sensor on the touch screen based on the coordinates of the acceleration sensor, and then obtain calculations based on the two determined screen segments. The gradient threshold of the screen block where the tapping position is located can accurately determine whether this tapping needs to trigger a screenshot operation.

此外,需要说明的是,处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。In addition, it should be noted that the processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit, GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural network processor (neural network processor) -network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.

可理解的,控制器可以是终端设备100的神经中枢和指挥中心。在实际应用中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。It can be understood that the controller may be the nerve center and command center of the terminal device 100 . In practical applications, the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.

此外,还需要说明的是,处理器110中还可以设置存储器,用于存储指令和数据。在一些实现方式中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。In addition, it should be noted that the processor 110 may also be provided with a memory for storing instructions and data. In some implementations, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

示例性的,在一些实现方式中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identitymodule,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。By way of example, in some implementations, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/ Or universal serial bus (USB) interface, etc.

继续参见图1,示例性的,充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实现方式中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实现方式中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。Continuing to refer to FIG. 1 , the charging management module 140 is illustratively configured to receive charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some implementations of wireless charging, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.

继续参见图1,示例性的,电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实现方式中,电源管理模块141也可以设置于处理器110中。在另一些实现方式中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。Continuing to refer to FIG. 1 , for example, the power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, etc. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other implementations, the power management module 141 may also be provided in the processor 110 . In other implementations, the power management module 141 and the charging management module 140 can also be provided in the same device.

继续参见图1,示例性的,终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。Continuing to refer to FIG. 1 , for example, the wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

需要说明的是,天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实现方式中,天线可以和调谐开关结合使用。It should be noted that antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other implementations, the antenna can be used in conjunction with a tuning switch.

继续参见图1,示例性的,移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实现方式中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实现方式中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。Continuing to refer to FIG. 1 , as an example, the mobile communication module 150 can provide a solution for wireless communication including 2G/3G/4G/5G applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some implementations, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some implementations, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.

此外,需要说明的是,调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实现方式中,调制解调处理器可以是独立的器件。在另一些实现方式中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。In addition, it should be noted that the modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194. In some implementations, the modem processor may be a stand-alone device. In other implementations, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.

继续参见图1,示例性的,无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellitesystem,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near fieldcommunication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。Continuing to refer to FIG. 1 , by way of example, the wireless communication module 160 can provide a network that is applied on the terminal device 100 , including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions plan. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.

具体到本申请实施例提供的技术方案中,终端设备100可通过移动通信模块150或无线通信模块160与云端服务器或者其他服务器进行通信。例如,终端设备100可以通过移动通信模块150向云端服务器发送相应延迟时间。示例性的,云端可以是多个服务器组成的服务器集群。Specifically, in the technical solutions provided by the embodiments of this application, the terminal device 100 can communicate with the cloud server or other servers through the mobile communication module 150 or the wireless communication module 160 . For example, the terminal device 100 can send the corresponding delay time to the cloud server through the mobile communication module 150 . For example, the cloud can be a server cluster composed of multiple servers.

此外,还需要说明的是,终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。In addition, it should be noted that the terminal device 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.

继续参见图1,示例性的,显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实现方式中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。Continuing to refer to FIG. 1 , illustratively, the display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light). emitting diode (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some implementations, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

此外,还需要说明的是,终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。In addition, it should be noted that the terminal device 100 can implement the shooting function through an ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.

此外,还需要说明的是,ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实现方式中,ISP可以设置在摄像头193中。In addition, it should be noted that the ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some implementations, the ISP may be located in the camera 193 .

此外,还需要说明的是,摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实现方式中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。In addition, it should be noted that the camera 193 is used to capture still images or videos. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some implementations, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

具体到本申请实施例提供的技术方案中,考虑到后置摄像头的凸起会影响终端设备100水平放置,故而为每个屏幕分块设置的常量参数考虑了摄像头所在位置对各个屏幕分块的影响。Specific to the technical solutions provided by the embodiments of this application, considering that the protrusion of the rear camera will affect the horizontal placement of the terminal device 100, the constant parameters set for each screen segment take into account the impact of the location of the camera on each screen segment. Influence.

此外,还需要说明的是,数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。In addition, it should be noted that the digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

此外,还需要说明的是,视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Additionally, it should be noted that video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

继续参见图1,示例性的,外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。Continuing to refer to FIG. 1 , for example, the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.

继续参见图1,示例性的,内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flashstorage,UFS)等。Continuing with reference to FIG. 1 , by way of example, internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the terminal device 100 . The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the terminal device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

具体到本申请实施例提供的技术方案中,每一个屏幕分块对应的常量参数、任意一个屏幕分块与加速度传感器所在的屏幕分块之间的相对距离对应的距离系数,以及加速度传感器所在的屏幕分块的梯度门限阈值,可以预先确定存储在终端设备的内部存储器121中,从而便于快速读取。Specifically, in the technical solutions provided by the embodiments of this application, there are constant parameters corresponding to each screen block, distance coefficients corresponding to the relative distance between any screen block and the screen block where the acceleration sensor is located, and the distance coefficient where the acceleration sensor is located. The gradient threshold value of the screen block can be predetermined and stored in the internal memory 121 of the terminal device, so as to facilitate quick reading.

此外,还需要说明的是,终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。In addition, it should be noted that the terminal device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.

此外,还需要说明的是,音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实现方式中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。In addition, it should be noted that the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some implementations, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .

继续参见图1,示例性的,按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。Continuing to refer to FIG. 1 , by way of example, the keys 190 include a power key, a volume key, etc. Key 190 may be a mechanical key. It can also be a touch button. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .

继续参见图1,示例性的,马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Continuing to refer to FIG. 1 , for example, the motor 191 may generate a vibration prompt. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 . Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

继续参见图1,示例性的,指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Continuing to refer to FIG. 1 , for example, the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.

关于终端设备100的硬件结构就介绍到此,应当理解的是,图1所示终端设备100仅是一个范例,在具体实现中,终端设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图1中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。This concludes the introduction to the hardware structure of the terminal device 100. It should be understood that the terminal device 100 shown in Figure 1 is only an example. In a specific implementation, the terminal device 100 may have more or more hardware than what is shown in the figure. With fewer parts, two or more parts may be combined, or may have different part configurations. The various components shown in Figure 1 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

为了更好的理解图1所示终端设备100的软件结构,以下对终端设备100的软件结构进行说明。在对终端设备100的软件结构进行说明之前,首先对终端设备100的软件系统可以采用的架构进行说明。In order to better understand the software structure of the terminal device 100 shown in Figure 1, the software structure of the terminal device 100 is described below. Before describing the software structure of the terminal device 100, the architecture that can be adopted by the software system of the terminal device 100 is first described.

具体的,在实际应用中,终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。Specifically, in actual applications, the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.

此外,可理解的,目前主流的终端设备使用的软件系统包括但不限于Windows系统、Android系统和iOS系统。为了便于说明,本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。In addition, it is understandable that the software systems currently used by mainstream terminal devices include but are not limited to Windows systems, Android systems, and iOS systems. For ease of explanation, this embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100 .

此外,后续关于本申请实施例提供的截屏方案在具体实现中,本申请实施例提供的截屏方案同样适用于其他系统。In addition, in the specific implementation of the subsequent screenshot solutions provided by the embodiments of the present application, the screenshot solutions provided by the embodiments of the present application are also applicable to other systems.

参见图2,为本申请实施例的终端设备100的软件结构框图。Refer to Figure 2, which is a software structure block diagram of the terminal device 100 according to the embodiment of the present application.

如图2所示,终端设备100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实现方式中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。As shown in Figure 2, the layered architecture of the terminal device 100 divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some implementations, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.

其中,应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括应用市场,视频,购物,权限管理,蓝牙,Wi-Fi,设置等应用程序,此处不再一一列举,本申请对此不作限制。Among them, the application layer can include a series of application packages. As shown in Figure 2, the application package can include applications such as application market, video, shopping, rights management, Bluetooth, Wi-Fi, settings, etc., which will not be listed one by one here, and this application does not limit this.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.

其中,应用程序框架层包括一些预先定义的函数。如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等,此处不再一一列举,本申请对此不作限制。Among them, the application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which will not be listed one by one here. This application does not limit this. .

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。具体到本申请实施例提供的技术翻案中,截屏操作就需要用到窗口管理器。A window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc. Specifically, in the technical review provided by the embodiments of this application, the screenshot operation requires the use of a window manager.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等,此处不再一一列举,本申请对此不作限制。Content providers are used to store and retrieve data and make this data accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc., which will not be listed one by one here, and this application does not limit this.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, call status management (including connected, hung up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等,此处不再一一列举,本申请对此不作限制。The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc., which are not listed here one by one. This application does not limit this.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.

Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.

可理解的,上述所说的2D图形引擎是2D绘图的绘图引擎。It is understandable that the above-mentioned 2D graphics engine is a drawing engine for 2D drawing.

此外,可理解的,Android系统中的内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动等。示例性的,传感器驱动可用于将传感器(例如触摸传感器)的检测信号输出至视图系统,以使得视图系统响应于检测信号,显示对应的应用界面。In addition, it is understandable that the kernel layer in the Android system is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, etc. For example, the sensor driver can be used to output the detection signal of the sensor (such as a touch sensor) to the viewing system, so that the viewing system displays the corresponding application interface in response to the detection signal.

关于终端设备100的软件结构就介绍到此,可以理解的是,图2示出的软件结构中的层以及各层中包含的部件,并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。This concludes the introduction to the software structure of the terminal device 100. It can be understood that the layers in the software structure shown in FIG. 2 and the components included in each layer do not constitute specific limitations on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited by this application.

为了更好的理解本申请提供的技术方案,以下结合图3至图7,分别以终端设备为屏幕相对较小的手机和屏幕相对较大的平板为例,对截屏方案的使用场景进行说明。In order to better understand the technical solution provided by this application, the usage scenarios of the screenshot solution will be described below with reference to Figures 3 to 7, taking the terminal device as a mobile phone with a relatively small screen and a tablet with a relatively large screen as examples respectively.

参见图3,示例性的,手机10当前的显示界面10a中可以包括一个或多个控件。控件包括但不限于:网络控件、电量控件、应用图标控件等。Referring to FIG. 3 , by way of example, the current display interface 10a of the mobile phone 10 may include one or more controls. Controls include but are not limited to: network controls, power controls, application icon controls, etc.

继续参见图3,示例性的,应用图标控件包括但不限于:时钟应用图标控件、日历应用图标控件、图库应用图标控件、备忘录应用图标控件、文件管理应用图标控件、电子邮件应用图标控件、音乐应用图标控件、计算器应用图标控件、视频应用图标控件、设置应用图标控件、天气应用图标控件、浏览器应用图标控件302等,此处不再一一列举,本申请对此不作限制。Continuing to refer to Figure 3, exemplary application icon controls include but are not limited to: clock application icon control, calendar application icon control, gallery application icon control, memo application icon control, file management application icon control, email application icon control, music Application icon control, calculator application icon control, video application icon control, setting application icon control, weather application icon control, browser application icon control 302, etc. are not listed here one by one, and this application does not limit them.

继续参见图3,示例性的,以用户在显示页面10a触发指关节截屏功能为例,当用户通过手指/指关节(图3为使用指关节)对显示页面10a的10a-1区域,在一定的时间,例如1s内连续敲击2次,手机10便会响应于用户的敲击操作。可理解的,由于手机10的屏幕相对较小,因此即便用户敲击的10a-1区域距离手机10中的加速度传感器相对较远,加速度传感器采集到的加速度数据(后续简称为:ACC数据)的振荡特征也很明显,因此手机10可以确定本次敲击操作是触发指关节截屏功能的,因此会生成截屏指令,触发截屏操作,进而截取到显示页面10a对应的画面。Continuing to refer to Figure 3, for example, taking the user triggering the knuckle screenshot function on the display page 10a, when the user uses his fingers/knuckles (Figure 3 shows using knuckles) to capture the area 10a-1 of the display page 10a, at a certain time, for example, two consecutive taps within 1 second, the mobile phone 10 will respond to the user's tapping operation. It is understandable that since the screen of the mobile phone 10 is relatively small, even if the area 10a-1 that the user taps is relatively far from the acceleration sensor in the mobile phone 10, the acceleration data collected by the acceleration sensor (hereinafter referred to as: ACC data) The oscillation characteristics are also obvious, so the mobile phone 10 can determine that this tapping operation triggers the knuckle screenshot function, so it will generate a screenshot instruction, trigger the screenshot operation, and then capture the screen corresponding to the display page 10a.

示例性的,在一些实现方式中,可以设置加速度传感器采集到的ACC数据包括敲击时刻对应的采样点,以及敲击时刻前后的部分采样点对应的ACC数据,例如敲击时刻前后总共126个采样点的ACC数据。For example, in some implementations, the ACC data collected by the acceleration sensor can be configured to include sampling points corresponding to the tapping moment, and ACC data corresponding to some sampling points before and after the tapping moment, for example, a total of 126 before and after the tapping moment. ACC data of sampling points.

示例性的,在另一些实现方式中,可以设置加速度传感器采集到的ACC数据包括敲击时刻、敲击时刻前一定时间内,以及敲击时刻后一定时间内的ACC数据。For example, in other implementations, the ACC data collected by the acceleration sensor can be set to include the tapping moment, the ACC data within a certain period before the tapping moment, and the ACC data within a certain period after the tapping moment.

此外,需要说明的是,为了使得振荡特征更加明显,可以为加速度传感器采集到的ACC数据乘以固定的倍数,从而能够更加清楚、直观的确定本次敲击操作对应的ACC数据的振荡特征。如图4所示,则为用户敲击10a-1区域时,手机10内的加速度传感器采集到的敲击前后126个采集点的ACC数据乘以固定倍数后的振荡特性示意图。In addition, it should be noted that in order to make the oscillation characteristics more obvious, the ACC data collected by the acceleration sensor can be multiplied by a fixed multiple, so that the oscillation characteristics of the ACC data corresponding to this tapping operation can be determined more clearly and intuitively. As shown in Figure 4, when the user taps the area 10a-1, the ACC data of 126 collection points collected by the acceleration sensor in the mobile phone 10 before and after the tap is multiplied by a fixed multiple.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

通过上述描述可知,在实际应用中,对于手机10等屏幕相对较小的终端设备,由于其屏幕相对较小,因此敲击屏幕任意位置时,内部的加速度传感器采集到的ACC数据的振荡特性都比较明显,因此对于不同的敲击区域即便采用相同的梯度门限阈值(用来指示多帧/多个采样点ACC数据件的数据变量),也能准确的识别出当前敲击操作是否需要触发指关节截屏功能。然而对于屏幕相对较大的终端设备,例如图5和图6所示的平板20,假设平板20内设置的加速度传感器位于20a附近,当用户敲击20a时,加速度传感器采集到的ACC数据的振荡特征会比较明显,其振荡特征图例如可以如图4所示,即采用现有不同的敲击区域对应相同的梯度门限阈值的方式,依旧可以准确的识别出当前敲击操作需要触发指关节截屏功能。但是,当用户敲击的位置位于图6所示的区域20b内时,由于区域20b距离位于区域20a附件的加速度传感器较远,加之平板20的屏幕较大,因此加速度传感器采集到的ACC数据的振荡特征就不够明显,例如图7所示,即便ACC数据乘以了固定的倍数,最大的振荡幅度也就在3000~5000之间,而图4所示的则在-3000~18000直接。对于平板20等屏幕相对较大的终端设备,在敲击位置距离加速度传感器较远时,敲击操作对应的梯度值(用于指示多帧加速度数据间的数据变化量)往往不会大于预先设置的固定的梯度门限阈值,因此敲击操作经常不能被识别为触发截屏操作,识别率和误判率都很低,用户体验较差。From the above description, it can be seen that in practical applications, for terminal devices with relatively small screens such as mobile phones 10, because their screens are relatively small, when tapping any position on the screen, the oscillation characteristics of the ACC data collected by the internal acceleration sensor are It is relatively obvious, so even if the same gradient threshold is used for different tapping areas (data variables used to indicate multi-frame/multi-sampling point ACC data files), it can be accurately identified whether the current tapping operation requires triggering instructions. Joint screenshot function. However, for terminal devices with relatively large screens, such as the tablet 20 shown in Figures 5 and 6, assuming that the acceleration sensor provided in the tablet 20 is located near 20a, when the user taps 20a, the ACC data collected by the acceleration sensor oscillates The characteristics will be more obvious. The oscillation characteristic map can be shown in Figure 4, for example. That is, by using the existing method of using different tapping areas to correspond to the same gradient threshold, it can still be accurately identified that the current tapping operation needs to trigger a knuckle screenshot. Function. However, when the user taps in the area 20b shown in Figure 6, because the area 20b is far from the acceleration sensor located near the area 20a, and the screen of the tablet 20 is large, the ACC data collected by the acceleration sensor is The oscillation characteristics are not obvious enough. For example, as shown in Figure 7, even if the ACC data is multiplied by a fixed multiple, the maximum oscillation amplitude is between 3000 and 5000, while the one shown in Figure 4 is directly between -3000 and 18000. For terminal devices with relatively large screens such as the tablet 20, when the tapping position is far from the acceleration sensor, the gradient value corresponding to the tapping operation (used to indicate the data change between multiple frames of acceleration data) is often not greater than the preset There is a fixed gradient threshold, so the tapping operation is often not recognized as triggering a screenshot operation. The recognition rate and misjudgment rate are both very low, and the user experience is poor.

由此,为了解决现有指关节截屏功能应用到大屏设备时存在的不足,本申请提供了一种截屏方案,通过将触摸屏划分成多个面积相对较小的屏幕分块,并通过确定敲击位置所在的屏幕分块对应的常量参数、加速度传感器所在的屏幕分块的梯度门限阈值,以及这两个屏幕分块之间的相对距离和该相对距离对应的距离系数来确定敲击位置所在的屏幕分块对应的梯度门限阈值,从而使得不同的敲击位置能够对应不同的梯度门限阈值,这样只需将敲击操作对应的梯度值与敲击位置所在屏幕分块的梯度门限阈值进行比较,就能准确的识别本次敲击是否为触发截屏操作,使得判断时所采用的梯度门限阈值更加合理,从而大大提升了截屏操作的识别率。Therefore, in order to solve the shortcomings of the existing knuckle screenshot function when it is applied to large-screen devices, this application provides a screenshot solution by dividing the touch screen into multiple screen segments with relatively small areas, and by determining the keystrokes. The constant parameters corresponding to the screen block where the click position is located, the gradient threshold of the screen block where the acceleration sensor is located, as well as the relative distance between the two screen blocks and the distance coefficient corresponding to the relative distance are used to determine the click position. The gradient threshold corresponding to the screen block, so that different tapping positions can correspond to different gradient thresholds, so that only the gradient value corresponding to the tapping operation is compared with the gradient threshold of the screen block where the tapping position is located , it can accurately identify whether this tap triggers a screenshot operation, making the gradient threshold used in the judgment more reasonable, thus greatly improving the recognition rate of the screenshot operation.

结合图3至图7所示的截屏场景,下面以终端设备为屏幕相对较大的平板设备为例,用几个具体的实施例,对本申请提供的技术方案的实现细节进行说明,以下内容仅为方便理解而提供的实现细节,并非实施本方案的必须。Combined with the screenshot scenarios shown in Figures 3 to 7, the following takes the terminal device as a tablet device with a relatively large screen as an example, and uses several specific embodiments to illustrate the implementation details of the technical solution provided by this application. The following content is only Implementation details are provided for ease of understanding and are not necessary to implement this solution.

示例性的,参见图8,在一些实施例中,本申请提供的截屏方案的具体实现步骤包括:For example, referring to Figure 8, in some embodiments, the specific implementation steps of the screenshot solution provided by this application include:

S101,在设定的时间阈值内接收到用户对触摸屏的任意同一区域的N次敲击操作时,确定敲击位置所在的屏幕分块和敲击操作对应的梯度值。S101: When receiving N tap operations by the user on any same area of the touch screen within a set time threshold, determine the screen segment where the tap position is located and the gradient value corresponding to the tap operation.

可理解的,目前指关节截屏功能的触发通常是在一定的时间,例如1s内,对触摸屏的同一位置进行多次敲击,例如2次。因此,上述N为大于1的整数。换句话说,平板设备在设定的时间阈值内接收到用户对触摸屏的任意同一区域的N次敲击操作时,会响应于用户对触摸屏的敲击操作,进而确定敲击位置所在的屏幕分块。It is understandable that the current knuckle screenshot function is usually triggered by tapping the same position of the touch screen multiple times, such as twice, within a certain period of time, such as 1 second. Therefore, the above N is an integer greater than 1. In other words, when the tablet device receives N tap operations on any same area of the touch screen by the user within a set time threshold, it will respond to the user's tap operation on the touch screen and then determine the screen segment where the tap location is located. piece.

需要说明的是,上述所说的屏幕分块可以是根据业务需求对触摸屏划分得到的,也可以是根据产品型号对触摸屏划分得到的,本申请对此不作限制。It should be noted that the above-mentioned screen segmentation can be obtained by dividing the touch screen according to business requirements, or can be obtained by dividing the touch screen according to product models. This application does not limit this.

此外,还需要说明的是,在一些实现方式中,对触摸屏划分的多个屏幕分块,可以是均匀的分块,也可以是不均匀的分块,本申请对此不作限制。In addition, it should be noted that in some implementations, the multiple screen blocks divided by the touch screen may be uniform blocks or uneven blocks, and this application does not limit this.

关于监测到用户对触摸屏的敲击操作后,平板设备响应于用户的敲击操作,确定敲击位置所在的屏幕分块的方式,在一些实现方式中可以通过先确定敲击位置相对触摸屏的坐标,然后根据确定的敲击位置相对触摸屏的坐标确定敲击位置所在的屏幕分块的方式实现。After detecting the user's tapping operation on the touch screen, the tablet device responds to the user's tapping operation and determines the screen segment where the tapping position is located. In some implementations, the coordinates of the tapping position relative to the touch screen can be determined first. , and then determine the screen blocks where the tapping position is located based on the determined coordinates of the tapping position relative to the touch screen.

可理解的,触摸事件/敲击事件通常是通过触摸屏中的触摸传感器(或者电容传感器)感知的,因此在确定敲击位置相对触摸屏的坐标时,可以通过触摸传感器采集到的用户敲击上述敲击位置时的报点数据来确定。It is understandable that touch events/knock events are usually sensed through the touch sensor (or capacitive sensor) in the touch screen. Therefore, when determining the coordinates of the tap position relative to the touch screen, the user taps the above-mentioned taps collected by the touch sensor can be used. Determine the point report data when clicking the position.

所谓报点(Touch report),是指触摸屏的集成电路(Touch Panel IntegratedCircuit,TP IC)通过集成电路总线(Inter Integrated Circuit,I2C)或串行外设接口(Serial Peripheral Interface,SPI),向平板设备中的应用处理器(ApplicationProcessor,AP)上报的敲击位置处获取的坐标。由于敲击操作对应到触摸屏上的敲击位置可能不止一个坐标,因此触摸传感器会采集到多个坐标,本实施例将采集到的多个报点称为报点数据。The so-called report (Touch report) refers to the integrated circuit (Touch Panel Integrated Circuit, TP IC) of the touch screen reporting to the tablet device through the integrated circuit bus (Inter Integrated Circuit, I2C) or the serial peripheral interface (Serial Peripheral Interface, SPI). The coordinates obtained at the tapping position reported by the application processor (ApplicationProcessor, AP). Since the tapping operation may correspond to more than one coordinate of the tapping position on the touch screen, the touch sensor will collect multiple coordinates. In this embodiment, the multiple collected reported points are called reported point data.

相应地,在得到报点数据后,便可以根据现有依据触摸传感器采集的报点数据确定敲击位置的具体坐标的标准,确定本次敲击操作对应的敲击位置相对触摸屏的坐标。例如,根据报点数据中触摸传感器采集到的敲击位置在敲击前第一时间阈值内的第一电容值、敲击时刻的第二电容值,以及敲击后第二时间阈值内的第三电容值,确定电容值的变化趋势;根据电容值的变化趋势,确定敲击位置在坐标系中的坐标。Correspondingly, after obtaining the point reporting data, the coordinates of the tapping position corresponding to this tapping operation relative to the touch screen can be determined based on the existing standards for determining the specific coordinates of the tapping position based on the reporting point data collected by the touch sensor. For example, according to the tapping position collected by the touch sensor in the report point data, the first capacitance value within the first time threshold before tapping, the second capacitance value at the tapping moment, and the third capacitance value within the second time threshold after tapping are Three capacitance values determine the changing trend of the capacitance value; determine the coordinates of the tapping position in the coordinate system based on the changing trend of the capacitance value.

可理解的,在一些实现方式中,也可以设置电容值的变化趋势是根据多个采样点采集到的电容值确定,例如敲击时刻、敲击时刻前、敲击时刻后总共126个采样点采集到的电容值。It is understandable that in some implementations, the changing trend of the capacitance value can also be set to be determined based on the capacitance values collected at multiple sampling points, such as a total of 126 sampling points at the tapping moment, before the tapping moment, and after the tapping moment. Capacitance value collected.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

此外,需要说明的是,为了使得连续两次敲击位置的坐标是针对同一坐标系而言的,以便后续计算的可行性。因此,本实施例选择以触摸屏为参考标准构建的坐标系为例来确定敲击位置的坐标,即根据报点数据确定的敲击位置相对触摸屏的坐标,实质就是确定敲击位置在构建的坐标系中的坐标。In addition, it should be noted that in order to ensure that the coordinates of two consecutive tapping positions are for the same coordinate system, subsequent calculations are feasible. Therefore, this embodiment chooses to use the coordinate system constructed with the touch screen as the reference standard as an example to determine the coordinates of the tapping position, that is, the coordinates of the tapping position relative to the touch screen determined based on the reported point data. In essence, it is to determine the coordinates of the tapping position in the constructed coordinates in the system.

示例性的,关于以触摸屏为参考标准构建的坐标系,例如可以约定坐标原点位于触摸屏的左下角,X轴水平指向右侧,Y轴垂直指向顶部,Z轴指向触摸屏前方,触摸屏后方的坐标为具有负值的Z轴。即,以触摸屏的左下角为坐标原点,设置X轴水平指向右侧,Y轴垂直指向顶部,Z轴指向触摸屏前方,这样就可以得到一个相对于触摸屏的坐标系。For example, regarding the coordinate system constructed with the touch screen as the reference standard, it can be agreed that the coordinate origin is located at the lower left corner of the touch screen, the X-axis points horizontally to the right, the Y-axis points vertically to the top, the Z-axis points in front of the touch screen, and the coordinates behind the touch screen are Z-axis with negative values. That is, take the lower left corner of the touch screen as the coordinate origin, set the X-axis to point horizontally to the right, the Y-axis to point vertically to the top, and the Z-axis to point in front of the touch screen, so that a coordinate system relative to the touch screen can be obtained.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

此外,关于本实施例中所确定的敲击操作对应的梯度值,具体是用于指示多帧加速度数据(ACC数据)间的数据变化量,或者说振荡特征的。因此,敲击操作对应的梯度值,具体是根据加速度传感器采集到的用户敲击敲击位置时的加速度数据确定的。In addition, the gradient value corresponding to the tapping operation determined in this embodiment is specifically used to indicate the amount of data change between multiple frames of acceleration data (ACC data), or the oscillation characteristics. Therefore, the gradient value corresponding to the tapping operation is specifically determined based on the acceleration data collected by the acceleration sensor when the user taps the tapping position.

可理解的,由于梯度值是用于指示多帧加速度数据(ACC数据)间的数据变化量,或者说振荡特征的,因此在一些实现方式中可以计算加速度传感器,例如三轴加速度传感器X轴、Y轴和Z轴上信号的最大值和最小值,根据三个轴上信号的最大值和最小值来计算信号振荡幅度矢量,进而得到敲击操作对应的梯度值。It is understandable that since the gradient value is used to indicate the data change between multiple frames of acceleration data (ACC data), or the oscillation characteristics, acceleration sensors can be calculated in some implementations, such as the X-axis, The maximum and minimum values of the signals on the Y-axis and Z-axis are used to calculate the signal oscillation amplitude vector based on the maximum and minimum values of the signals on the three axes, and then the gradient value corresponding to the tapping operation is obtained.

示例性的,在另一些实现方式中,敲击操作对应的梯度值也可以根据目前的触控技术和软件算法来确定。具体的实现方式可以参见相关标准,此处不再赘述。For example, in other implementations, the gradient value corresponding to the tapping operation can also be determined based on current touch technology and software algorithms. For specific implementation methods, please refer to relevant standards and will not be repeated here.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S102,确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离。S102: Determine the relative distance between the screen segment where the tapping position is located and the screen segment where the acceleration sensor is located.

基于上述对触摸屏划分的描述可知,不论是按照那种划分方式,在划分方式和需要划分的数量确定后,终端设备中的加速度传感器所在的屏幕分块就是已知的了,因此在响应于用户对触摸屏的敲击操作时,直接获取加速度传感器所在的屏幕分块的信息即可。Based on the above description of touch screen division, it can be seen that no matter which division method is used, after the division method and the number of divisions required are determined, the screen blocks where the acceleration sensor in the terminal device is located is known, so in response to the user When tapping the touch screen, you can directly obtain the information of the screen block where the acceleration sensor is located.

示例性的,在一些实现方式中,加速度传感器所在的屏幕分块的信息例如可以预先记录在内部存储器中,这样在需要的时候直接访问内部存储器读取即可。For example, in some implementations, the information of the screen block where the acceleration sensor is located can be pre-recorded in the internal memory, so that the internal memory can be directly accessed and read when needed.

示例性的,在一些实现方式中,可以根据两个屏幕分块的中心点的坐标,确定这两个屏幕分块之间的相对距离。以触摸屏被划分的多个屏幕分块为均匀的矩形分块为例,在确定敲击位置所在的屏幕分块后,先根据该屏幕分块四个顶点的坐标确定该屏幕分块的中心点的坐标。同理在获取加速度传感器所在的屏幕分块后,先根据该屏幕分块四个顶点的坐标确定该屏幕分块的中心点的坐标。接着,基于两点之间的距离公式,根据确定的两个中心点的坐标,确定这两个屏幕分块之间的相对距离。For example, in some implementations, the relative distance between the two screen segments may be determined based on the coordinates of the center points of the two screen segments. Taking the touch screen divided into multiple screen blocks into uniform rectangular blocks as an example, after determining the screen block where the tapping position is located, first determine the center point of the screen block based on the coordinates of the four vertices of the screen block. coordinate of. Similarly, after obtaining the screen block where the acceleration sensor is located, first determine the coordinates of the center point of the screen block based on the coordinates of the four vertices of the screen block. Then, based on the distance formula between the two points and the determined coordinates of the two center points, the relative distance between the two screen segments is determined.

示例性的,在另一些实现方式中,敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离,也可以是根据敲击位置的坐标和加速度传感器的坐标确定的。For example, in other implementations, the relative distance between the screen segment where the tapping position is located and the screen segment where the acceleration sensor is located may also be determined based on the coordinates of the tapping position and the coordinates of the acceleration sensor.

此外,需要说明的是,不论根据哪两个位置的坐标信息来确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离,由于敲击操作不会有Z轴上的位置变化,因而在根据两点之间的距离公式确定这两个屏幕分块之间的相对距离时,不需要考虑Z轴的坐标信息,只需根据X轴和Y轴的坐标信息即可。In addition, it should be noted that no matter which two position coordinate information is used to determine the relative distance between the screen block where the tapping position is located and the screen block where the acceleration sensor is located, since the tapping operation will not have any The position changes, so when determining the relative distance between the two screen blocks based on the distance formula between two points, there is no need to consider the coordinate information of the Z axis, only the coordinate information of the X axis and the Y axis can be used .

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S103,根据加速度传感器所在的屏幕分块的梯度门限阈值、相对距离、相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值。S103. Determine the gradient threshold of the screen block where the tapping position is located based on the gradient threshold of the screen block where the acceleration sensor is located, the relative distance, the distance coefficient corresponding to the relative distance, and the constant parameters corresponding to the screen block where the tapping position is located. threshold.

示例性的,在一些实现方式中,加速度传感器所在的屏幕分块的梯度门限阈值(后续表示为:Threshold_Grandient)例如可以根据设备型号、加速度传感器型号、设备采用的芯片型号等因素预先设置,例如设置为300。相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数则可以通过算法跑库,或者对不同设备测试获得的数据构建的距离系数表和常量参数表中查找出。For example, in some implementations, the gradient threshold of the screen block where the acceleration sensor is located (subsequently expressed as: Threshold_Grandient) can be preset based on factors such as the device model, the acceleration sensor model, the chip model used by the device, etc., for example, setting for 300. The distance coefficient corresponding to the relative distance and the constant parameters corresponding to the screen block where the tapping position is located can be found through algorithm running, or from the distance coefficient table and constant parameter table constructed from data obtained from different device tests.

示例性的,关于记录了不同距离对应的距离系数的距离系数表的构建,例如可以是在确定每一个屏幕分块与加速度传感器所在的屏幕分块之间的相对距离后,以加速度传感器为中心,基于距离关系函数向外映射,为每个相对距离设置的。For example, regarding the construction of a distance coefficient table that records distance coefficients corresponding to different distances, for example, after determining the relative distance between each screen segment and the screen segment where the acceleration sensor is located, centering on the acceleration sensor , based on the distance relationship function and outward mapping, set for each relative distance.

示例性的,关于记录了不同敲击位置所在的屏幕分块对应的常量参数的常量参数表的构建,例如可以是考虑摄像头,特别是凸出的后置摄像头这一因素后为每个屏幕分块设置的。For example, regarding the construction of a constant parameter table that records the constant parameters corresponding to the screen segments where different tapping positions are located, for example, the camera, especially the protruding rear camera, can be considered for each screen segment. block settings.

示例性的,在考虑摄像头这一因素时,每个屏幕分块对应的常量参数的设置,例如可以通过以下方式:For example, when considering the camera factor, the constant parameters corresponding to each screen segment can be set in the following ways:

首先,确定摄像头相对触摸屏的坐标。First, determine the coordinates of the camera relative to the touch screen.

然后,根据摄像头相对触摸屏的坐标,确定触摸屏的对折线。Then, according to the coordinates of the camera relative to the touch screen, the folding line of the touch screen is determined.

需要说明的是,上述所说的对折线贯穿了触摸屏的部分屏幕分块,并且摄像头相对触摸屏的坐标位于对折线上。It should be noted that the above-mentioned folding line runs through some screen blocks of the touch screen, and the coordinates of the camera relative to the touch screen are located on the folding line.

最后,根据摄像头相对触摸屏的坐标和对折线,为每一个屏幕分块设置对应的常量参数。Finally, according to the coordinates and fold line of the camera relative to the touch screen, the corresponding constant parameters are set for each screen block.

示例性的,在一些实现方式中,可以为对折线贯穿的每一个屏幕分块设置不同的常量参数,例如可以考虑距离摄像头的远近设置不同的常量参数。For example, in some implementations, different constant parameters can be set for each screen block that the polyline runs through. For example, different constant parameters can be set taking into account the distance from the camera.

示例性的,在另一些实现方式中,可以为摄像头所在的屏幕分块,以及包含触摸屏四个顶角的屏幕分块设置不同的常量参数。For example, in other implementations, different constant parameters can be set for the screen segment where the camera is located and the screen segment including the four top corners of the touch screen.

示例性的,在另一些实现方式中,可以为对折线上侧的屏幕分块和对折线下侧的屏幕分块设置不同的常量参数。For example, in other implementations, different constant parameters may be set for the screen segments above the fold line and the screen segments below the fold line.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S104,在敲击操作对应的梯度值大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏。S104: When the gradient value corresponding to the tapping operation is greater than the gradient threshold of the screen block where the tapping position is located, a screenshot is triggered.

可理解的,在敲击操作对应的梯度值大于敲击位置所在的屏幕分块的梯度门限阈值时,平板设备响应于该操作,会生成截屏指令,进而根据截屏指令调用对应的进程,由该进程对平板设备当前显示的画面的进行抓取,并将抓取的内容保存为图片即可完成截图操作。It is understandable that when the gradient value corresponding to the tapping operation is greater than the gradient threshold of the screen block where the tapping position is located, the tablet device will generate a screenshot instruction in response to the operation, and then call the corresponding process according to the screenshot instruction. The process captures the screen currently displayed on the tablet device and saves the captured content as a picture to complete the screenshot operation.

为了更好的理解本实施例的技术细节,以将平板设备的触摸屏划分为均匀的16个屏幕分块为例,结合图9和图10进行具体说明。In order to better understand the technical details of this embodiment, taking the touch screen of a tablet device divided into 16 uniform screen blocks as an example, detailed description will be given with reference to FIG. 9 and FIG. 10 .

参见图9,示例性的,平板20的触摸屏20a为2000*1200的分辨率,触摸屏20a被划分为了16(4*4)个屏幕分块,这16个屏幕分块在上述以左下角为原点,X轴指向右侧,Y轴垂直向上,Z轴指向屏幕上方(图中未示出)的坐标系中的位置,如图9所示,顺序编号分别表示为屏幕分块0~屏幕分块15。Referring to Figure 9, for example, the touch screen 20a of the tablet 20 has a resolution of 2000*1200, and the touch screen 20a is divided into 16 (4*4) screen blocks. The lower left corner of these 16 screen blocks is the origin as mentioned above. , the X-axis points to the right, the Y-axis points vertically upward, and the Z-axis points to the position in the coordinate system above the screen (not shown in the figure), as shown in Figure 9. The sequence numbers are respectively represented as screen block 0 ~ screen block 15.

为了能够实现不同的屏幕分块对应不同的梯度门限阈值,可以按照上述给出的设置任意一个屏幕分块与加速度传感器所在屏幕分块之间的相对距离对应的距离系数的方式构建距离系数表,同时考虑摄像头这一因素为每一个屏幕分块设置不同的常量参数,即构建常量参数表。In order to realize that different screen blocks correspond to different gradient thresholds, the distance coefficient table can be constructed according to the method given above to set the distance coefficient corresponding to the relative distance between any screen block and the screen block where the acceleration sensor is located. At the same time, considering the factor of camera, different constant parameters are set for each screen block, that is, a constant parameter table is constructed.

为了便于说明,以摄像头(在平板20背面凸出的后置摄像头)20a-1位于图9所示的位置,加速度传感器20a-2为图9所示的位置(位于屏幕分块8)为例,给出一种距离系数表和常量参数表。For ease of explanation, take the camera (the rear camera protruding on the back of the tablet 20) 20a-1 as shown in Figure 9 and the acceleration sensor 20a-2 as shown in Figure 9 (located in the screen segment 8) as an example. , giving a distance coefficient table and constant parameter table.

表1距离系数表Table 1 Distance coefficient table

相对距离relative distance 相对距离对应的距离系数The distance coefficient corresponding to the relative distance 相对距离relative distance 相对距离对应的距离系数The distance coefficient corresponding to the relative distance D8-0 D 8-0 Coeff8-0 Coeff 8-0 D8-1 D 8-1 Coeff8-1 Coeff 8-1 D8-2 D 8-2 Coeff8-2 Coeff 8-2 D8-3 D 8-3 Coeff8-3 Coeff 8-3 D8-4 D 8-4 Coeff8-4 Coeff 8-4 D8-5 D 8-5 Coeff8-5 Coeff 8-5 D8-6 D 8-6 Coeff8-6 Coeff 8-6 D8-7 D 8-7 Coeff8-7 Coeff 8-7 D8-8 D 8-8 Coeff8-8 Coeff 8-8 D8-9 D 8-9 Coeff8-9 Coeff 8-9 D8-10 D 8-10 Coeff8-10 Coeff 8-10 D8-11 D 8-11 Coeff8-11 Coeff 8-11 D8-12 D 8-12 Coeff8-12 Coeff 8-12 D8-13 D 8-13 Coeff8-13 Coeff 8-13 D8-14 D 8-14 Coeff8-14 Coeff 8-14 D8-15 D 8-15 Coeff8-15 Coeff 8-15

表2常量参数表Table 2 Constant parameter table

示例性的,根据业务需求,表1中任意两个相对距离对应的距离系数可以相同,也可以不相同。For example, according to business requirements, the distance coefficients corresponding to any two relative distances in Table 1 may be the same or different.

相应地,表2中任意两个屏幕分块对应的常量参数可以相同,也可以不相同。Correspondingly, the constant parameters corresponding to any two screen blocks in Table 2 may be the same or different.

示例性的,在实际应用中,表1中记录的距离系数和表2中记录的常量参数也可以以队列的形式记录,例如用Coeff_list表示记录距离系数的队列,用K_list表示记录常量参数的队列。则,表1中的内容转换到Coeff_list中可以表示为Coeff_list{Coeff8-0,Coeff8-1,Coeff8-2,Coeff8-3,Coeff8-4,Coeff8-5,Coeff8-6,Coeff8-7,Coeff8-8,Coeff8-9,Coeff8-10,Coeff8-11,Coeff8-12,Coeff8-13,Coeff8-14,Coeff8-15};表2中的内容转换到K_list中可以表示为K_list{K0,K1,K2,K3,K4,K5,K6,K7,K8,K9,K`10,K11,K12,K13,K14,K15}。For example, in practical applications, the distance coefficients recorded in Table 1 and the constant parameters recorded in Table 2 can also be recorded in the form of a queue. For example, Coeff_list is used to represent the queue for recording distance coefficients, and K_list is used to represent the queue for recording constant parameters. . Then, the content in Table 1 is converted into Coeff_list and can be expressed as Coeff_list{Coeff 8-0 , Coeff 8-1 , Coeff 8-2 , Coeff 8-3 , Coeff 8-4 , Coeff 8-5 , Coeff 8-6 , Coeff 8-7 , Coeff 8-8 , Coeff 8-9 , Coeff 8-10 , Coeff 8-11 , Coeff 8-12, Coeff 8-13 , Coeff 8-14 , Coeff 8-15 }; in Table 2 The content converted into K_list can be expressed as K_list{K 0 , K 1 , K 2 , K 3 , K 4 , K 5 , K 6 , K 7 , K 8 , K 9 , K `10 , K 11 , K 12 , K 13 , K 14 , K 15 }.

示例性的,在根据触摸屏20a构建的坐标系如图9所示时用户敲击触摸屏20a触发截屏操作时,敲击位置位于对折线I的左侧的概率较大,因此可以将对折线I的左侧的屏幕分块,如屏幕分块0、屏幕分块1、屏幕分块2、屏幕分块4、屏幕分块5和屏幕分块8对应常量参数大于对折线I右侧的屏幕分块,如屏幕分块7、屏幕分块10、屏幕分块11、屏幕分块13、屏幕分块14和屏幕分块15。For example, when the coordinate system constructed based on the touch screen 20a is as shown in Figure 9, when the user taps the touch screen 20a to trigger the screenshot operation, the probability that the tapping position is located on the left side of the fold line I is relatively high, so the fold line I can be The screen blocks on the left, such as screen block 0, screen block 1, screen block 2, screen block 4, screen block 5 and screen block 8 correspond to constant parameters greater than the screen blocks on the right side of the diagonal line I , such as screen block 7, screen block 10, screen block 11, screen block 13, screen block 14 and screen block 15.

此外,还可以为对折线I贯穿的屏幕分块3、屏幕分块6、屏幕分块9和屏幕分块12设置不同的常量参数。In addition, different constant parameters can also be set for screen block 3, screen block 6, screen block 9 and screen block 12 that the fold line I penetrates.

关于为不同屏幕分块设置的常量参数的取值,例如可以是K_list{475,300,260,115,300,260,200,115,350,130,165,230,150,125,245,340}。Regarding the values of constant parameters set for different screen blocks, for example, it can be K_list{475, 300, 260, 115, 300, 260, 200, 115, 350, 130, 165, 230, 150, 125, 245, 340 }.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

在完成上述距离系数和常量参数的设置后,如果用户在1s内对图10中的位置20a-3连续敲击了2次,平板20响应于该敲击操作,根据触摸屏20a中的触摸传感器采集的报点数据确定敲击位置20a-3在图10所示的坐标系中的坐标,进而根据敲击位置20a-3的坐标和每一个屏幕分块包括的坐标信息,确定敲击位置20a-3位于屏幕分块2中,根据上述表2可以确定屏幕分块2对应的常量参数为K2After completing the settings of the above distance coefficient and constant parameters, if the user taps the position 20a-3 in Figure 10 twice continuously within 1 second, the tablet 20 responds to the tapping operation and collects data from the touch sensor in the touch screen 20a The reported point data determines the coordinates of the tapping position 20a-3 in the coordinate system shown in Figure 10, and then determines the tapping position 20a-3 based on the coordinates of the tapping position 20a-3 and the coordinate information included in each screen segment. 3 is located in screen block 2. According to the above table 2, it can be determined that the constant parameter corresponding to screen block 2 is K 2 .

继续参见图10,示例性的,由于加速度传感器位于屏幕分块8中,因此按照上述根据屏幕分块的中心点的坐标确定两个屏幕分块之间的相对距离的方式,可以确定屏幕分块2和屏幕分块之间的相对距离为D8-2,根据上述标1可以确定相对距离D8-2对应的距离系数为Coeff8-2Continuing to refer to Figure 10, for example, since the acceleration sensor is located in the screen block 8, the screen block can be determined according to the above-mentioned method of determining the relative distance between the two screen blocks according to the coordinates of the center point of the screen block. The relative distance between 2 and the screen block is D 8-2 . According to the above mark 1, it can be determined that the distance coefficient corresponding to the relative distance D 8-2 is Coeff 8-2 .

在确定相对距离为D8-2,相对距离D8-2对应的距离系数为Coeff8-2,敲击位置20a-3所在的屏幕分块2对应的常量参数为K2后,根据确定的这3个参数和为加速度传感器所在屏幕分块设定的梯度门限阈值(Threshold_Grandient),便可以确定敲击位置20a-3所在的屏幕分块2对应的梯度门限阈值(后续表示为:Current_Grandient)。After determining that the relative distance is D 8-2 , the distance coefficient corresponding to the relative distance D 8-2 is Coeff 8-2 , and the constant parameter corresponding to the screen block 2 where the tapping position 20a-3 is located is K 2 , according to the determined These three parameters and the gradient threshold (Threshold_Grandient) set for the screen block where the acceleration sensor is located can determine the gradient threshold corresponding to screen block 2 where the tapping position 20a-3 is located (subsequently expressed as: Current_Grandient).

关于根据上述参数确定Current_Grandient的方式,可以用如下公式表示:Regarding the way to determine Current_Grandient based on the above parameters, it can be expressed by the following formula:

Current_Grandient=Threshold_Grandient*distance*Coeff+KCurrent_Grandient=Threshold_Grandient*distance*Coeff+K

其中,Current_Grandient,即每次敲击操作对应的敲击位置所在屏幕分块的梯度门限阈值,例如上述示例中的屏幕分块2的梯度门限阈值;Threshold_Grandient为加速度传感器所在屏幕分块设定的梯度门限阈值;distance为确定的敲击位置所在屏幕分块和加速度传感器所在屏幕分块之间的相对距离,例如上述示例中的相对距离D8-2;Coeff为确定的相对距离对应的距离系数,例如上述示例中相对距离D8-2对应的距离系数为Coeff8-2;K为敲击位置所在的屏幕分块对应的常量参数,例如上述示例中敲击位置20a-3所在的屏幕分块2对应的常量参数为K2Among them, Current_Grandient is the gradient threshold of the screen block where the tapping position corresponding to each tapping operation is, such as the gradient threshold of screen block 2 in the above example; Threshold_Grandient is the gradient set for the screen block where the acceleration sensor is located. Threshold value; distance is the relative distance between the screen block where the determined tapping position is located and the screen block where the acceleration sensor is located, such as the relative distance D 8-2 in the above example; Coeff is the distance coefficient corresponding to the determined relative distance, For example, in the above example, the distance coefficient corresponding to the relative distance D 8-2 is Coeff 8-2 ; K is the constant parameter corresponding to the screen block where the tapping position is located, such as the screen block where the tapping position 20a-3 is located in the above example. The constant parameter corresponding to 2 is K 2 .

接着,在按照上述公式计算出敲击位置所在的屏幕分块,例如敲击位置20a-3所在的屏幕分块2对应的梯度门限阈值Current_Grandien后,将Current_Grandien与本次敲击操作对应的梯度值进行比较,如果本次敲击操作对应的梯度值大于Current_Grandien,则确定当前识别到的敲击操作是触发截屏功能的,这种情况下会生成截屏指令,从而根据截屏指令调用对应的进程进行截屏。Next, after calculating the gradient threshold value Current_Grandien corresponding to the screen segment where the tapping position is located, for example, the screen segment 2 where the tapping position 20a-3 is located according to the above formula, the Current_Grandien is calculated with the gradient value corresponding to this tapping operation. Compare, if the gradient value corresponding to this tapping operation is greater than Current_Grandien, it is determined that the currently recognized tapping operation triggers the screenshot function. In this case, a screenshot instruction will be generated, and the corresponding process will be called according to the screenshot instruction to take a screenshot. .

相应地,如果本次敲击操作对应的梯度值不大于Current_Grandien,则确定当前识别到的敲击操作不是触发截屏功能的,可能是用户的误触,这种情况下不会生成截屏指令,即不触发截屏功能。Correspondingly, if the gradient value corresponding to this tapping operation is not greater than Current_Grandien, it is determined that the currently recognized tapping operation does not trigger the screenshot function, and may be an accidental touch by the user. In this case, no screenshot instruction will be generated, that is, Screen capture function is not triggered.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。在实际应用中,也可以规定在本次敲击操作对应的梯度值不小于Current_Grandien,即大于、等于Current_Grandien的情况都认为当前识别到的敲击操作是触发截屏功能的。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment. In practical applications, it can also be stipulated that the gradient value corresponding to this tapping operation is not less than Current_Grandien, that is, if it is greater than or equal to Current_Grandien, it is considered that the currently recognized tapping operation triggers the screenshot function.

由此,本实施例提供的截屏方法,通过将触摸屏划分成多个面积相对较小的屏幕分块,并通过确定敲击位置所在的屏幕分块对应的常量参数、加速度传感器所在的屏幕分块的梯度门限阈值,以及这两个屏幕分块之间的相对距离和该相对距离对应的距离系数来确定敲击位置所在的屏幕分块对应的梯度门限阈值,从而使得不同的敲击位置能够对应不同的梯度门限阈值,进而能够更加准确的识别本次敲击是否为触发截屏操作,大大提升了截屏操作的识别率。Therefore, the screenshot method provided by this embodiment divides the touch screen into multiple screen blocks with relatively small areas, and determines the constant parameters corresponding to the screen block where the tapping position is located, and the screen block where the acceleration sensor is located. The gradient threshold value, as well as the relative distance between the two screen blocks and the distance coefficient corresponding to the relative distance are used to determine the gradient threshold value corresponding to the screen block where the knocking position is located, so that different knocking positions can correspond Different gradient thresholds can more accurately identify whether this tap triggers a screenshot operation, which greatly improves the recognition rate of the screenshot operation.

示例性的,参见图11,在另一些实施例中,本申请提供的截屏方案的具体实现步骤包括:For example, referring to Figure 11, in other embodiments, the specific implementation steps of the screenshot solution provided by this application include:

S201,在设定的时间阈值内接收到用户对触摸屏的任意同一区域的N次敲击操作时,通过触摸屏中的触摸传感器采集用户敲击敲击位置时的报点数据,通过加速度传感器采集用户敲击敲击位置时的加速度数据。S201: When receiving N tapping operations of the user on any same area of the touch screen within the set time threshold, collect the point report data when the user taps the tapping position through the touch sensor in the touch screen, and collect the user's point report data through the acceleration sensor. Acceleration data when striking the strike location.

关于步骤S201的具体实现细节,可以参见图8所示实施例的文字描述部分,此处不再赘述。For the specific implementation details of step S201, please refer to the text description part of the embodiment shown in Figure 8, and will not be described again here.

S202,根据报点数据和加速度数据,预测敲击操作触发截屏的置信度值。S202: Predict the confidence value of a screenshot triggered by a tapping operation based on the point report data and acceleration data.

示例性的,在一些实现方式中,可以将报点数据和加速度数据作为输入参数,输入预先训练后的神经网络模型,由神经网络模型进行识别处理,进而预测本次敲击操作触发截屏的置信度值。For example, in some implementations, point reporting data and acceleration data can be used as input parameters, input into a pre-trained neural network model, and the neural network model performs recognition processing, and then predicts the confidence of the screenshot triggered by this tapping operation. degree value.

相应地,如果置信度值大于设定的置信度阈值,比如80,则执行步骤S203;反之,则认为本次敲击操作不是触发截屏功能的,即无需进行后续步骤S203至步骤S209的操作,直接退出本实施例提供的截屏方法的处理流程。Correspondingly, if the confidence value is greater than the set confidence threshold, such as 80, step S203 is executed; otherwise, it is considered that this tapping operation does not trigger the screenshot function, that is, there is no need to perform subsequent steps S203 to S209. Directly exit the processing flow of the screenshot method provided in this embodiment.

可理解的,关于上述所说的神经网络模型,例如可以是根据目前市面上流行的各种大屏设备(平板电脑、智慧屏、可触控PC等)触发指关节截屏功能的数据训练获得的。关于训练神经网络模型的具体方式,可以参见现有标准,此处不再赘述。It is understandable that the above-mentioned neural network model can be obtained by training based on data that triggers the knuckle screenshot function of various large-screen devices currently on the market (tablets, smart screens, touch PCs, etc.) . For specific methods of training neural network models, please refer to existing standards and will not be described again here.

此外,为了进一步降低误判率,进而提高识别率,在一些实现方式中,可以设置在进行置信度预测之前,先执行判断报点数据和加速度数据是否有效的操作。In addition, in order to further reduce the misjudgment rate and thereby improve the recognition rate, in some implementations, it is possible to determine whether the reported point data and acceleration data are valid before making confidence predictions.

示例性的,在另一些实现方式中,判断报点数据和加速度数据是否有效的操作也可以在进行置信度预测之后,具体为在预测出的置信度值大于设定的置信度阈值前。For example, in other implementations, the operation of determining whether the reported point data and acceleration data are valid can also be performed after confidence prediction is performed, specifically before the predicted confidence value is greater than the set confidence threshold.

关于判断报点数据和加速度数据是否有效的方式,例如可以是在监测到用户对触控屏的某一区域的第一次敲击后,判断加速度传感器是否感应到了超过预设值的加速度矢量变化事件,且同期触摸传感器是否感应到了有效触摸事件。Regarding the way to determine whether the report point data and acceleration data are valid, for example, after detecting the user's first tap on a certain area of the touch screen, it can be determined whether the acceleration sensor senses a change in the acceleration vector that exceeds the preset value. event, and whether the touch sensor senses a valid touch event in the same period.

相应地,如果加速度传感器感应到了超过预设值的加速度矢量变化事件,且同期触摸传感器感应到了有效触摸事件,则启动定时器计时。如果在一定的时间内,例如1s内再次监测到了用户对触控屏的同一区域的第二次敲击,则继续判断加速度传感器是否感应到了超过预设值的加速度矢量变化事件,且同期触摸传感器是否感应到了有效触摸事件。Correspondingly, if the acceleration sensor senses an acceleration vector change event that exceeds the preset value, and the touch sensor senses a valid touch event in the same period, the timer is started. If the user's second tap on the same area of the touch screen is detected within a certain period of time, such as 1 second, continue to determine whether the acceleration sensor senses an acceleration vector change event exceeding the preset value, and touch the sensor at the same time. Whether a valid touch event is sensed.

相应地,如果加速度传感器感应到了超过预设值的加速度矢量变化事件,且同期触摸传感器感应到了有效触摸事件,则判断前后两次的敲击操作,触摸传感器感知到的触摸事件在触摸屏中位置的有效距离是否小于预设值。Correspondingly, if the acceleration sensor senses an acceleration vector change event that exceeds the preset value, and the touch sensor senses a valid touch event at the same time, then the two tap operations before and after are judged, and the position of the touch event sensed by the touch sensor on the touch screen is determined. Whether the effective distance is less than the preset value.

相应地,如果小于,则确定报点数据和加速度数据有效。Correspondingly, if it is less than, it is determined that the reported point data and acceleration data are valid.

反之,如果上述任意一次判断出现异常,则可以认为本次敲击为误触,无需触发截屏功能。On the contrary, if any of the above judgments are abnormal, the tap can be considered as an accidental touch and there is no need to trigger the screenshot function.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S203,在置信度值大于设定的置信度阈值时,构建相对于触摸屏的坐标系。S203: When the confidence value is greater than the set confidence threshold, construct a coordinate system relative to the touch screen.

S204,根据报点数据,确定敲击位置在坐标系中的坐标。S204: Determine the coordinates of the tapping position in the coordinate system based on the reported point data.

S205,根据敲击位置相对触摸屏的坐标确定敲击位置所在的屏幕分块。S205: Determine the screen block where the tapping position is located based on the coordinates of the tapping position relative to the touch screen.

S206,根据加速度数据,确定所述敲击操作对应的梯度值。S206: Determine the gradient value corresponding to the tapping operation based on the acceleration data.

S207,确定敲击位置所在的屏幕分块与加速度传感器所在的屏幕分块之间的相对距离。S207: Determine the relative distance between the screen segment where the tapping position is located and the screen segment where the acceleration sensor is located.

S208,根据加速度传感器所在的屏幕分块的梯度门限阈值、相对距离、相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值。S208: Determine the gradient threshold of the screen block where the tapping position is located based on the gradient threshold of the screen block where the acceleration sensor is located, the relative distance, the distance coefficient corresponding to the relative distance, and the constant parameters corresponding to the screen block where the tapping position is located. threshold.

S209,在敲击操作对应的梯度值大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏。S209: When the gradient value corresponding to the tapping operation is greater than the gradient threshold of the screen block where the tapping position is located, a screenshot is triggered.

关于步骤S203至步骤S209的具体实现细节,可以参见图8所示实施例的文字描述部分,此处不再赘述。For the specific implementation details of steps S203 to S209, please refer to the text description part of the embodiment shown in Figure 8, and will not be described again here.

由此,本实施例提供的截屏方法,在置信度值大于设定的置信度阈值时,才执行本申请提供的截屏方法的流程,从而进一步提升了截屏操作的识别率。Therefore, the screenshot method provided by this embodiment only executes the process of the screenshot method provided by this application when the confidence value is greater than the set confidence threshold, thereby further improving the recognition rate of the screenshot operation.

示例性的,参见图12,在另一些实施例中,本申请提供的截屏方案的具体实现步骤包括:For example, referring to Figure 12, in other embodiments, the specific implementation steps of the screenshot solution provided by this application include:

S301,在设定的时间阈值内接收到用户对触摸屏的任意同一区域的N次敲击操作时,确定敲击位置所在的屏幕分块和敲击操作作用于敲击位置时每一个加速度传感器对应的梯度值。S301: When receiving N tap operations on any same area of the touch screen by the user within the set time threshold, determine the screen segment where the tap position is located and the corresponding acceleration sensor of each acceleration sensor when the tap operation acts on the tap position. gradient value.

S302,确定敲击位置所在的屏幕分块与每一个加速度传感器所在的屏幕分块之间的相对距离。S302: Determine the relative distance between the screen segment where the tapping position is located and the screen segment where each acceleration sensor is located.

不难发现,本实施例与图8所示实施例的区别在于,本实施例中终端设备中加速度传感器的数量大于1,因此需要获取每一个加速度传感器所在的屏幕分块,以及敲击位置所在的屏幕分块与每一个加速度传感器所在的屏幕分块之间的相对距离。关于获取每一个加速度传感器所在的屏幕分块,以及敲击位置所在的屏幕分块与每一个加速度传感器所在的屏幕分块之间的相对距离的具体实现细节可以参见图8所示实施例的文字部分,此处不再赘述。It is not difficult to find that the difference between this embodiment and the embodiment shown in Figure 8 is that in this embodiment, the number of acceleration sensors in the terminal device is greater than 1, so it is necessary to obtain the screen block where each acceleration sensor is located, as well as the tapping position. The relative distance between the screen segment and the screen segment where each acceleration sensor is located. For specific implementation details about obtaining the screen segment where each acceleration sensor is located, and the relative distance between the screen segment where the tapping position is located and the screen segment where each acceleration sensor is located, please refer to the text of the embodiment shown in Figure 8 part, which will not be repeated here.

S303,从确定的多个相对距离中选取最短的相对距离。S303: Select the shortest relative distance from the determined multiple relative distances.

为了更好的理解,以平板设备中设置了两个加速度传感器为例,结合图13进行具体说明。For a better understanding, taking two acceleration sensors installed in a tablet device as an example, detailed description will be given in conjunction with Figure 13.

参见图13,示例性的,平板20例如可以是以中轴线20a-5为轴线的可折叠设备,其触控屏20a被划分为16个均匀的矩形屏幕分块。在图13所示的20a-1的位置设置有后置摄像头,20a-2的位置设置有一个加速度传感器,在中轴线20a-4的位置设置有另一个加速度传感器。每一个屏幕分块对应的常量参数可以如上述实施例中的表2所示,20a-2位置处的加速度传感器所在的屏幕分块8与任意一个屏幕分块之间的相对距离对应的距离系数可以如上述实施例中的表1所示。Referring to Fig. 13, for example, the tablet 20 may be a foldable device with the central axis 20a-5 as the axis, and the touch screen 20a thereof is divided into 16 uniform rectangular screen blocks. A rear camera is provided at the position 20a-1 shown in Figure 13, an acceleration sensor is provided at the position 20a-2, and another acceleration sensor is provided at the position of the central axis 20a-4. The constant parameters corresponding to each screen segment can be as shown in Table 2 in the above embodiment. The distance coefficient corresponds to the relative distance between the screen segment 8 where the acceleration sensor is located at the position 20a-2 and any screen segment. It can be as shown in Table 1 in the above embodiment.

示例性的,基于同样的方式,20a-4位置处的加速度传感器所在地屏幕分块11与任意一个屏幕分块之间的相对距离对应的距离系数可以如下表3所示。For example, based on the same method, the distance coefficient corresponding to the relative distance between the screen block 11 where the acceleration sensor is located at position 20a-4 and any screen block can be as shown in Table 3 below.

表3距离系数表Table 3 Distance coefficient table

相对距离relative distance 相对距离对应的距离系数The distance coefficient corresponding to the relative distance 相对距离relative distance 相对距离对应的距离系数The distance coefficient corresponding to the relative distance D11-0 D 11-0 Coeff11-0 Coeff 11-0 D11-1 D 11-1 Coeff11-1 Coeff 11-1 D11-2 D 11-2 Coeff11-2 Coeff 11-2 D11-3 D 11-3 Coeff11-3 Coeff 11-3 D11-4 D 11-4 Coeff11-4 Coeff 11-4 D11-5 D 11-5 Coeff11-5 Coeff 11-5 D11-6 D 11-6 Coeff11-6 Coeff 11-6 D11-7 D 11-7 Coeff11-7 Coeff 11-7 D11-8 D 11-8 Coeff11-8 Coeff 11-8 D11-9 D 11-9 Coeff11-9 Coeff 11-9 D11-10 D 11-10 Coeff11-10 Coeff 11-10 D11-11 D 11-11 Coeff11-11 Coeff 11-11 D11-12 D 11-12 Coeff11-12 Coeff 11-12 D11-13 D 11-13 Coeff11-13 Coeff 11-13 D11-14 D 11-14 Coeff11-14 Coeff 11-14 D11-15 D 11-15 Coeff11-15 Coeff 11-15

继续参见图13,示例性的,当用户敲击了图13中的位置20a-3后,通过触摸传感器采集到的报点数据确定敲击位置20a-3所在的屏幕分块为屏幕分块2,通过20a-2位置处的加速度传感器采集到的加速度数据确定20a-2位置处的加速度传感器位于屏幕分块2,通过20a-4位置处的加速度传感器采集到的加速度数据确定20a-4位置处的加速度传感器位于屏幕分块11。接着,根据屏幕分块2中心点的坐标和屏幕分块8中心点的坐标确定屏幕分块2和屏幕分块8之间的相对距离为D1(表1中的D8-2),根据屏幕分块2中心点的坐标和屏幕分块11中心点的坐标确定屏幕分块2和屏幕分块11之间的相对距离为D2(表3中的D11-2)。接着,通过比较D1和D2的大小,当D2小于D1时,将D2确定为最终用来计算敲击位置20a-3所在的屏幕分块2的梯度门限阈值的相对距离,与D2对应的距离系数即为表3中的Coeff11-2;反之,如果D1小于D2,将D1确定为最终用来计算敲击位置20a-3所在的屏幕分块2的梯度门限阈值的相对距离,与D1对应的距离系数即为表1中的Coeff8-2。这样,就可以更加精准的识别本次敲击操作是否需要触发指关节截屏功能。Continuing to refer to Figure 13, for example, when the user taps position 20a-3 in Figure 13, the screen segment where the tap position 20a-3 is located is determined to be screen segment 2 through the point report data collected by the touch sensor. , the acceleration data collected by the acceleration sensor at position 20a-2 determines that the acceleration sensor at position 20a-2 is located in screen block 2, and the acceleration data collected by the acceleration sensor at position 20a-4 determines that position 20a-4 is The acceleration sensor is located on screen segment 11. Next, according to the coordinates of the center point of screen block 2 and the coordinates of the center point of screen block 8, the relative distance between screen block 2 and screen block 8 is determined to be D1 (D 8-2 in Table 1). According to the screen The coordinates of the center point of block 2 and the coordinates of the center point of screen block 11 determine that the relative distance between screen block 2 and screen block 11 is D2 (D 11-2 in Table 3). Next, by comparing the sizes of D1 and D2, when D2 is smaller than D1, D2 is determined as the relative distance that is ultimately used to calculate the gradient threshold of screen block 2 where the tapping position 20a-3 is located, and the distance coefficient corresponding to D2 That is Coeff 11-2 in Table 3; conversely, if D1 is less than D2, determine D1 as the relative distance that is ultimately used to calculate the gradient threshold of screen block 2 where the tapping position 20a-3 is located, corresponding to D1 The distance coefficient is Coeff 8-2 in Table 1. In this way, it can be more accurately identified whether this tapping operation needs to trigger the knuckle screenshot function.

应当理解的是,上述说明仅是为了更好的理解本实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。It should be understood that the above description is only an example for a better understanding of the technical solution of this embodiment, and is not the only limitation on this embodiment.

S304,根据最短的相对距离对应的加速度传感器所在的屏幕分块的梯度门限阈值、最短的相对距离、最短的相对距离对应的距离系数和敲击位置所在的屏幕分块对应的常量参数,确定敲击位置所在的屏幕分块的梯度门限阈值。S304: Determine the keystroke based on the gradient threshold of the screen block where the acceleration sensor is located corresponding to the shortest relative distance, the shortest relative distance, the distance coefficient corresponding to the shortest relative distance, and the constant parameters corresponding to the screen block where the knocking position is located. The gradient threshold of the screen block where the click position is located.

S305,在最短的相对距离对应的加速度传感器对应的梯度值,大于敲击位置所在的屏幕分块的梯度门限阈值时,触发截屏。S305: When the gradient value corresponding to the acceleration sensor corresponding to the shortest relative distance is greater than the gradient threshold of the screen block where the tapping position is located, a screenshot is triggered.

这样,保证了所有的判断都是基于最短的相对距离对应的相关参数,进而保证了结果的准确性。In this way, it is ensured that all judgments are based on the relevant parameters corresponding to the shortest relative distance, thus ensuring the accuracy of the results.

关于步骤S304、步骤S305的具体实现细节,可以参见图8所示实施例的文字描述部分,此处不再赘述。For specific implementation details of steps S304 and S305, please refer to the text description part of the embodiment shown in FIG. 8, and will not be described again here.

此外,应当理解的是,在实际应用中,本实施例也可以在图11所示实施例的基础上进行改进,本申请对此不作限制。In addition, it should be understood that in practical applications, this embodiment can also be improved on the basis of the embodiment shown in FIG. 11 , and this application does not limit this.

由此,本实施例提供的截屏方法,在终端设备中有多个加速度传感器时,优先考虑最短的相对距离,以及最短的相对距离对应的距离系数和加速度传感器所在屏幕分块的梯度门限阈值来计算敲击位置所在屏幕分块的梯度门限阈值,进而保证计算出的梯度门限阈值更加精准,从而进一步提升了截屏操作的识别率。Therefore, the screenshot method provided by this embodiment, when there are multiple acceleration sensors in the terminal device, gives priority to the shortest relative distance, as well as the distance coefficient corresponding to the shortest relative distance and the gradient threshold of the screen block where the acceleration sensor is located. Calculate the gradient threshold of the screen block where the tapping position is located, thereby ensuring that the calculated gradient threshold is more accurate, thereby further improving the recognition rate of the screenshot operation.

应当理解的是,上述几种实施例仅是为了更好的理解本申请提供的截屏方案而列举具体实现方式,不作为对本申请技术方案的唯一限制。It should be understood that the above-mentioned embodiments are only to enumerate specific implementation methods for a better understanding of the screenshot solution provided by this application, and are not intended to be the only limitation on the technical solution of this application.

此外,可以理解的是,终端设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。In addition, it can be understood that in order to implement the above functions, the terminal device includes corresponding hardware and/or software modules that perform each function. In conjunction with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.

此外,需要说明的是,在实际的应用场景中由终端设备实现的上述各实施例提供的截屏方法,也可以由终端设备中包括的一种芯片系统来执行,其中,该芯片系统可以包括处理器。该芯片系统可以与存储器耦合,使得该芯片系统运行时调用该存储器中存储的计算机程序,实现上述终端设备执行的步骤。其中,该芯片系统中的处理器可以是应用处理器也可以是非应用处理器的处理器。In addition, it should be noted that in actual application scenarios, the screenshot methods provided by the above embodiments implemented by a terminal device can also be executed by a chip system included in the terminal device, where the chip system can include processing device. The chip system can be coupled with a memory, so that when the chip system is running, it calls the computer program stored in the memory to implement the steps executed by the terminal device. The processor in the chip system may be an application processor or a non-application processor.

另外,本申请实施例还提供一种计算机可读存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在终端设备上运行时,使得终端设备执行上述相关方法步骤实现上述实施例中的截屏方法。In addition, embodiments of the present application also provide a computer-readable storage medium. Computer instructions are stored in the computer storage medium. When the computer instructions are run on a terminal device, the terminal device causes the terminal device to execute the above-mentioned related method steps to implement the above-mentioned embodiments. How to take a screenshot.

另外,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在终端设备上运行时,使得终端设备执行上述相关步骤,以实现上述实施例中的截屏方法。In addition, embodiments of the present application also provide a computer program product. When the computer program product is run on a terminal device, the terminal device performs the above related steps to implement the screenshot method in the above embodiment.

另外,本申请的实施例还提供一种芯片(也可以是组件或模块),该芯片可包括一个或多个处理电路和一个或多个收发管脚;其中,所述收发管脚和所述处理电路通过内部连接通路互相通信,所述处理电路执行上述相关方法步骤实现上述实施例中的截屏方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In addition, embodiments of the present application also provide a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the The processing circuits communicate with each other through internal connection paths. The processing circuits execute the above-mentioned relevant method steps to implement the screenshot method in the above-mentioned embodiments to control the receiving pin to receive signals and to control the sending pin to send signals.

此外,通过上述描述可知,本申请实施例提供的终端设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。In addition, it can be seen from the above description that the terminal equipment, computer-readable storage media, computer program products or chips provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be Refer to the beneficial effects of the corresponding methods provided above, which will not be described again here.

以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still make the foregoing technical solutions. The technical solutions described in each embodiment may be modified, or some of the technical features may be equivalently replaced; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions in each embodiment of the present application.

Claims (16)

1. A screen capturing method applied to a terminal device, a touch screen of the terminal device being divided into a plurality of screen segments, the method comprising:
responding to the knocking operation of a user on the touch screen, determining a screen block where a knocking position is located and a gradient value corresponding to the knocking operation, wherein the gradient value is used for indicating the data change amount among multiple frames of acceleration data;
Determining the relative distance between the screen block where the knocking position is located and the screen block where the acceleration sensor is located;
determining a gradient threshold value of the screen block where the knocking position is located according to the gradient threshold value of the screen block where the acceleration sensor is located, the relative distance, a distance coefficient corresponding to the relative distance and a constant parameter corresponding to the screen block where the knocking position is located;
triggering screen capturing when the gradient value corresponding to the knocking operation is larger than the gradient threshold value of the screen block where the knocking position is located;
wherein, before determining the relative distance between the screen segment where the knocking position is located and the screen segment where the acceleration sensor is located, the method further includes:
determining the relative distance between each screen block and the screen block where the acceleration sensor is located;
and setting a corresponding distance coefficient for each relative distance based on the outward mapping of the distance relation function by taking the acceleration sensor as a center.
2. The method of claim 1, wherein determining the screen tile in which the tap location is located comprises:
Determining coordinates of the knocking position relative to the touch screen;
and determining the screen block where the knocking position is located according to the coordinate of the knocking position relative to the touch screen.
3. The method of claim 2, wherein the determining coordinates of the tap location relative to the touch screen comprises:
collecting point report data when a user knocks the knocking position through a touch sensor in the touch screen;
constructing a coordinate system relative to the touch screen;
and determining the coordinates of the knocking position in the coordinate system according to the point data.
4. A method according to claim 3, wherein said determining coordinates of said tap location in said coordinate system based on said point data comprises:
determining a change trend of the capacitance value according to a first capacitance value of the knocking position, which is acquired by the touch sensor in the point data, in a first time threshold before knocking, a second capacitance value at the knocking moment and a third capacitance value in a second time threshold after knocking;
and determining the coordinates of the knocking position in the coordinate system according to the change trend of the capacitance value.
5. A method according to claim 3, wherein after obtaining the report data, the method further comprises:
collecting acceleration data when a user knocks the knocking position through the acceleration sensor;
predicting a confidence value of the screen capturing triggered by the knocking operation according to the point data and the acceleration data;
and when the confidence value is larger than a set confidence threshold value, constructing a coordinate system relative to the touch screen.
6. A method according to claim 3, wherein said constructing a coordinate system relative to said touch screen comprises:
taking the lower left corner of the touch screen as an origin of coordinates;
setting an X axis to horizontally point to the right, setting a Y axis to vertically point to the top, and setting a Z axis to point to the front of the touch screen to obtain a coordinate system relative to the touch screen.
7. The method of claim 1, wherein the determining a gradient value for the tapping operation comprises:
collecting acceleration data when a user knocks the knocking position through the acceleration sensor;
and determining a gradient value corresponding to the knocking operation according to the acceleration data.
8. The method of claim 1, wherein the gradient threshold value of the screen segment in which the tap position is located is determined based on the following formula according to the gradient threshold value of the screen segment in which the acceleration sensor is located, the relative distance, a distance coefficient corresponding to the relative distance, and constant parameters corresponding to the screen segment in which the tap position is located:
Current_Grandient=Threshold_Grandient*distance*Coeff+K
The current_gradient is a gradient Threshold value of the screen block where the knocking position is located, and the threshold_gradient is a gradient Threshold value of the screen block where the acceleration sensor is located; distance is the relative distance between the screen block where the knocking position is located and the screen block where the acceleration sensor is located, coeff is the distance coefficient corresponding to the relative distance, and K is the constant parameter corresponding to the screen block where the knocking position is located.
9. The method of claim 1, wherein the number of acceleration sensors is greater than 1;
the determining the gradient value corresponding to the knocking operation comprises the following steps:
acquiring acceleration data of each acceleration sensor when a user knocks the knocking position;
and acquiring acceleration data of a user when the user knocks the knocking position according to each acceleration sensor, and determining a gradient value corresponding to each acceleration sensor when the knocking operation acts on the knocking position.
10. The method of claim 9, wherein determining the relative distance between the screen segment where the tap location is located and the screen segment where the acceleration sensor is located comprises:
And determining the relative distance between the screen block where the knocking position is located and the screen block where each acceleration sensor is located.
11. The method of claim 10, wherein determining the gradient threshold value of the screen segment in which the tapping position is located according to the gradient threshold value of the screen segment in which the acceleration sensor is located, the relative distance, the distance coefficient corresponding to the relative distance, and the constant parameter corresponding to the screen segment in which the tapping position is located comprises:
selecting the shortest relative distance from the determined plurality of relative distances;
and determining the gradient threshold value of the screen block where the knocking position is located according to the gradient threshold value of the screen block where the acceleration sensor corresponding to the shortest relative distance is located, the shortest relative distance, the distance coefficient corresponding to the shortest relative distance and the constant parameter corresponding to the screen block where the knocking position is located.
12. The method of claim 11, wherein triggering a screen capture when a gradient value corresponding to the tap operation is greater than a gradient threshold value for a screen segment in which the tap location is located comprises:
And triggering screen capturing when the gradient value corresponding to the acceleration sensor corresponding to the shortest relative distance is larger than the gradient threshold value of the screen block where the knocking position is located.
13. The method according to any one of claims 1 to 12, wherein prior to said determining the relative distance between the screen segment where the tap position is located and the screen segment where the acceleration sensor is located, the method further comprises:
determining the coordinates of the camera relative to the touch screen;
determining a doubling line of the touch screen according to the coordinates of the camera relative to the touch screen, wherein the coordinates of the camera relative to the touch screen are positioned on the doubling line, and the doubling line penetrates through partial screen blocks of the touch screen;
and setting corresponding constant parameters for each screen block according to the coordinates of the camera relative to the touch screen and the doubling line.
14. The method according to any one of claims 1 to 12, wherein the determining, in response to a user's tapping operation on the touch screen, a screen block where a tapping position is located and a gradient value corresponding to the tapping operation includes:
and when N times of knocking operation of a user on any same area of the touch screen are received in the set time threshold, determining a screen block where the knocking position is located and a gradient value corresponding to the knocking operation, wherein N is an integer larger than 1.
15. A terminal device, characterized in that the terminal device comprises: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the terminal device to perform the screen capture method of any of claims 1 to 14.
16. A computer readable storage medium comprising a computer program which, when run on a terminal device, causes the terminal device to perform the screen capture method of any of claims 1 to 14.
CN202210606734.9A 2022-05-31 2022-05-31 Screen capturing method, device and storage medium Active CN116027940B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210606734.9A CN116027940B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium
CN202311633488.7A CN117827054B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210606734.9A CN116027940B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311633488.7A Division CN117827054B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN116027940A CN116027940A (en) 2023-04-28
CN116027940B true CN116027940B (en) 2023-12-08

Family

ID=86069537

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311633488.7A Active CN117827054B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium
CN202210606734.9A Active CN116027940B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311633488.7A Active CN117827054B (en) 2022-05-31 2022-05-31 Screen capturing method, device and storage medium

Country Status (1)

Country Link
CN (2) CN117827054B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2214093A1 (en) * 2009-01-30 2010-08-04 Research In Motion Limited Method for tap detection and for interacting with a handheld electronic device, and a handheld electronic device configured therefor
CN105320436A (en) * 2015-07-07 2016-02-10 崔景城 Method for triggering screen capturing by tapping screen with finger joint
CN106569686A (en) * 2016-10-12 2017-04-19 上海斐讯数据通信技术有限公司 Method for controlling screen capture with rolling ball, and related intelligent equipment
CN108874280A (en) * 2018-05-11 2018-11-23 努比亚技术有限公司 Screen division methods, terminal and computer readable storage medium
CN113867562A (en) * 2021-08-18 2021-12-31 荣耀终端有限公司 Touch screen point reporting correction method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003282584A1 (en) * 2002-10-09 2004-05-04 Pierre Bonnat A method of controlling an electronic or computer system
CN108920007B (en) * 2018-07-20 2021-03-12 京东方科技集团股份有限公司 Touch reporting threshold setting method and system
CN110737386B (en) * 2019-09-06 2024-10-18 华为技术有限公司 Screen capturing method and related equipment
CN110806831A (en) * 2019-09-30 2020-02-18 华为技术有限公司 A touch screen response method and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2214093A1 (en) * 2009-01-30 2010-08-04 Research In Motion Limited Method for tap detection and for interacting with a handheld electronic device, and a handheld electronic device configured therefor
CN105320436A (en) * 2015-07-07 2016-02-10 崔景城 Method for triggering screen capturing by tapping screen with finger joint
CN106569686A (en) * 2016-10-12 2017-04-19 上海斐讯数据通信技术有限公司 Method for controlling screen capture with rolling ball, and related intelligent equipment
CN108874280A (en) * 2018-05-11 2018-11-23 努比亚技术有限公司 Screen division methods, terminal and computer readable storage medium
CN113867562A (en) * 2021-08-18 2021-12-31 荣耀终端有限公司 Touch screen point reporting correction method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多媒体教学中的屏幕分块算法的改进;尹成瑞;;微型电脑应用;32(04);60-62 *

Also Published As

Publication number Publication date
CN117827054A (en) 2024-04-05
CN116027940A (en) 2023-04-28
CN117827054B (en) 2025-03-11

Similar Documents

Publication Publication Date Title
JP7391102B2 (en) Gesture processing methods and devices
CN113325941B (en) Under-screen fingerprint display method and electronic device
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
CN111669459B (en) Keyboard display method, electronic device and computer readable storage medium
EP4027628A1 (en) Control method for electronic device, and electronic device
CN113994317A (en) User interface layout method and electronic equipment
CN112751954B (en) Operation prompting method and electronic equipment
US20230012245A1 (en) Touch Region Adjustment Method and Apparatus
US12216899B2 (en) Display element display method and electronic device
US20230195309A1 (en) Method and apparatus for adjusting memory configuration parameter
CN113688019B (en) Response time duration detection method and device
CN110780929B (en) Method for calling hardware interface and electronic device
JP2022501739A (en) Stylus pen detection method, system and related equipment
CN111524528B (en) Voice wake-up method and device for anti-recording detection
WO2021000943A1 (en) Method and apparatus for managing fingerprint switch
CN110111101A (en) A kind of electric paying method and electronic equipment
CN114371985A (en) Automated testing method, electronic device, and storage medium
CN110058729B (en) Method and electronic device for adjusting the sensitivity of touch detection
EP4228233B1 (en) Method for adding operation sequence and electronic device
CN115437601B (en) Image sorting method, electronic device, program product and medium
CN114205457A (en) Method for moving user interface element and electronic equipment
CN116027940B (en) Screen capturing method, device and storage medium
US12204741B2 (en) Screenshot method and related device
CN116991274A (en) A method for handling exceptions in scrolling effects and electronic equipment
CN118069262A (en) Window adjusting method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address