CN110471808B - Pressure key detection method and device and mobile terminal - Google Patents
- ️Fri Dec 29 2023
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
实施例一Embodiment 1
参照图1,示出了本发明实施例提供的一种压力按键检测方法的步骤流程图,该压力按键检测方法可以应用于移动终端,具体可以包括如下步骤:Referring to Figure 1, a flow chart of steps of a pressure key detection method provided by an embodiment of the present invention is shown. The pressure key detection method can be applied to mobile terminals, and may specifically include the following steps:
步骤101:在接收到针对所述移动终端的显示屏幕的触摸操作时,获取所述触摸操作在所述显示屏幕上所处的触摸区域。Step 101: When receiving a touch operation on the display screen of the mobile terminal, obtain the touch area where the touch operation is located on the display screen.
在本发明实施例中,移动终端可以包括手机、PAD(Portable Android Device,平板电脑)等具备触摸屏的移动电子设备。In the embodiment of the present invention, the mobile terminal may include a mobile electronic device with a touch screen, such as a mobile phone or a PAD (Portable Android Device, tablet computer).
触摸操作是指用户执行的触摸移动终端的显示屏幕的操作,如用户通过手指按压显示屏幕,或采用其它方式按压显示屏幕等等。The touch operation refers to an operation performed by the user to touch the display screen of the mobile terminal. For example, the user presses the display screen with his finger or presses the display screen in other ways.
触摸区域是指用户在显示屏幕上执行触摸操作时,触摸的区域。The touch area refers to the area touched by the user when performing a touch operation on the display screen.
在移动终端预先设置有触屏传感器,通过触屏传感器可以感应触摸操作所处的位置,从而可以计算出触摸操作在显示屏幕上所处的区域,即触摸区域。The mobile terminal is pre-set with a touch screen sensor. The touch screen sensor can sense the location of the touch operation, so that the area where the touch operation is located on the display screen, that is, the touch area, can be calculated.
而对于触屏传感器感应节点的感应变化值大小计算触摸面积的方案,已经是本领域较为成熟的技术方案,本发明实施例对此不再加以详细描述。The solution of calculating the touch area based on the sensing change value of the touch screen sensor sensing node is already a relatively mature technical solution in this field, and will not be described in detail in the embodiments of the present invention.
在接收到针对移动终端的显示屏幕的触摸操作时,获取触摸操作在显示屏幕上所处的触摸区域之后,执行步骤102。When a touch operation on the display screen of the mobile terminal is received, step 102 is performed after acquiring the touch area where the touch operation is located on the display screen.
步骤102:在所述触摸区域位于目标压力按键对应的目标区域内的情况下,获取所述触摸操作对应的触摸压力值,及所述触摸操作对应的触摸面积。Step 102: When the touch area is located in the target area corresponding to the target pressure button, obtain the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation.
目标压力按键是指移动终端上预先设置的需要执行触发操作的按键,如亮屏按键、声音调节按键等等。The target pressure button refers to a button that is preset on the mobile terminal and needs to perform a triggering operation, such as a screen bright button, a sound adjustment button, etc.
触摸面积是指用户执行触摸操作所占据的面积,例如,用户使用拇指触摸显示屏幕时,触摸面积较大,而在用户使用中指触摸显示屏幕时,触摸面积较小等。The touch area refers to the area occupied by the user when performing a touch operation. For example, when the user touches the display screen with his thumb, the touch area is larger, but when the user touches the display screen with the middle finger, the touch area is smaller.
通过预先安装的触屏传感器可以感应节点的感应变化值大小,计算出触摸面积。The pre-installed touch screen sensor can sense the sensor change value of the node and calculate the touch area.
目标区域是指显示屏幕上触发目标压力按键的对应事件的区域,对应事件是指按压或触摸目标压力按键所触发的事件,例如,在目标压力按键为声音条件按键时,通过触发调高声音的按键时,可以调高音量,即调高音量的事件可以作为对应事件;再如,在目标压力按键为亮屏按键时,通过触发亮屏按键可以触发显示屏幕由灭屏转换至亮屏,即将灭屏转换为亮屏的事件作为对应事件。目标区域可以是如,在对应事件为由灭屏转换为亮屏的事件时,在显示屏幕的a区域内执行触摸操作时,可以触发屏幕由灭屏转换为亮屏,则将a区域作为目标区域;而在对应事件为调高音量的事件时,在显示屏幕的b区域内执行触摸操作时,可以调高音量,则将b区域作为目标区域。The target area refers to the area on the display screen that triggers the corresponding event of the target pressure button. The corresponding event refers to the event triggered by pressing or touching the target pressure button. For example, when the target pressure button is a sound condition button, by triggering the sound condition When pressing a button, the volume can be increased, that is, the event of increasing the volume can be used as the corresponding event; for another example, when the target pressure button is a bright-screen button, triggering the bright-screen button can trigger the display screen to change from off-screen to on-screen, that is, The event that converts the screen off to on screen is the corresponding event. The target area may be, for example, when the corresponding event is an event that changes the screen from off to on, and when a touch operation is performed in area a of the display screen, it can trigger the screen to change from off to on, then area a is used as the target. area; and when the corresponding event is an event to increase the volume, when a touch operation is performed in area b of the display screen, the volume can be increased, and area b is used as the target area.
可以理解地,上述示例仅是为了更好地理解本发明实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitations to the embodiments of the present invention.
触摸压力值是指触摸操作在显示屏幕上所产生的压力值,通过移动终端内置的触屏传感器可以检测到触摸操作对应的触摸压力值。The touch pressure value refers to the pressure value generated by a touch operation on the display screen. The touch pressure value corresponding to the touch operation can be detected through the touch screen sensor built into the mobile terminal.
在触摸区域位于目标压力按键对应的目标区域内时,可以获取触摸操作对应的触摸压力值,及触摸操作对应的触摸面积,并执行步骤103。When the touch area is located within the target area corresponding to the target pressure button, the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation can be obtained, and step 103 is performed.
步骤103:在所述触摸面积大于所述目标面积范围中的最大面积值,且所述触摸压力值小于所述目标压力范围中的最小压力值的情况下,确定所述目标压力按键已损坏。Step 103: When the touch area is greater than the maximum area value in the target area range and the touch pressure value is less than the minimum pressure value in the target pressure range, determine that the target pressure button is damaged.
目标压力范围是指预先设置的触摸操作所对应的触摸压力值的范围,在触摸操作对应的触摸压力值处于目标压力范围内时,表示该触摸操作可以触发对应事件。The target pressure range refers to the range of touch pressure values corresponding to the preset touch operation. When the touch pressure value corresponding to the touch operation is within the target pressure range, it means that the touch operation can trigger the corresponding event.
目标压力范围可以是由预先执行的测试过程而得到的,而对于目标压力范围的具体获取过程将在下述实施例二中进行详细描述,本发明实施例在此不再加以赘述。The target pressure range may be obtained by a pre-executed test process, and the specific acquisition process of the target pressure range will be described in detail in the following Embodiment 2, which will not be described again in this embodiment of the present invention.
目标面积范围是指预先设置的触摸操作所对应的触摸面积的范围,在触摸操作对应的触摸面积处于目标面积范围内时,表示该触摸操作可以触发对应事件。The target area range refers to the range of the touch area corresponding to the preset touch operation. When the touch area corresponding to the touch operation is within the target area range, it means that the touch operation can trigger the corresponding event.
目标面积范围可以是由预先执行的测试过程而得到的,而对于目标面积范围的具体获取过程将在下述实施例二中进行详细描述,本发明实施例在此不再加以赘述。The target area range may be obtained by a pre-executed test process, and the specific acquisition process of the target area range will be described in detail in the following Embodiment 2, which will not be described again in this embodiment of the present invention.
可以理解地,在本发明中,只有在触摸压力处于目标压力范围内,且目标面积处于目标面积范围内的情况下,可以判定目标压力按键是正常的,否则可以判定目标压力按键是异常的。It can be understood that in the present invention, only when the touch pressure is within the target pressure range and the target area is within the target area range, it can be determined that the target pressure button is normal; otherwise, it can be determined that the target pressure button is abnormal.
对于目标压力范围和目标面积范围的具体范围值可以根据实际情况测试得到,对于这两个范围的具体范围值,本发明实施例不加以限制。The specific range values of the target pressure range and the target area range can be obtained through testing according to actual conditions. The embodiments of the present invention do not limit the specific range values of these two ranges.
最大面积值是指目标面积范围中的面积最大值,例如,目标面积范围为10~30,则最大面积值即为30。The maximum area value refers to the maximum area value in the target area range. For example, if the target area range is 10 to 30, then the maximum area value is 30.
最小压力值是指目标压力范围中的压力最小值,例如,目标压力范围为20~50,则最小压力值即为20。The minimum pressure value refers to the minimum pressure value in the target pressure range. For example, if the target pressure range is 20 to 50, the minimum pressure value is 20.
可以理解地,上述示例仅是为了更好地理解本发明实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitations to the embodiments of the present invention.
而在监测到用户在目标区域内执行的触摸操作,并在触摸操作对应的触摸面积大于目标面积范围中的最大面积值,且触摸操作对应的触摸压力值小于目标压力范围中的最小压力值的情况下,可以确定目标压力按键已经损坏,可以提醒用户及时对目标压力按键对应的压力传感器进行更换。When it is detected that the user performs a touch operation in the target area, and the touch area corresponding to the touch operation is greater than the maximum area value in the target area range, and the touch pressure value corresponding to the touch operation is less than the minimum pressure value in the target pressure range. In this case, it can be determined that the target pressure button has been damaged, and the user can be reminded to promptly replace the pressure sensor corresponding to the target pressure button.
在目标压力按键已损坏的情况下,可以生成提示信息,通过提示信息可以提示用户及时更换目标压力按键,提示信息可以是文字提示信息,如在移动终端的屏幕上显示文字提示,如“该压力按键已损坏”;该提示信息也可以是语言提示信息,即通过语音播报的形式提示用户目标压力按键已损坏。When the target pressure button is damaged, a prompt message can be generated. The prompt message can prompt the user to promptly replace the target pressure button. The prompt message can be a text prompt message, such as a text prompt displayed on the screen of the mobile terminal, such as "This pressure "The key is damaged"; this prompt information can also be a verbal prompt message, that is, a voice broadcast is used to remind the user that the target pressure key is damaged.
步骤104:在所述触摸面积小于所述目标面积范围中的最小面积值,且所述触摸压力值大于所述目标压力范围中的最大压力值的情况下,确定所述目标压力按键的灵敏度大于灵敏度阈值。Step 104: When the touch area is smaller than the minimum area value in the target area range and the touch pressure value is larger than the maximum pressure value in the target pressure range, determine that the sensitivity of the target pressure button is greater than Sensitivity threshold.
最小面积值是指目标面积范围中的面积最小值,例如,目标面积范围为10~30,则最小面积值即为10。The minimum area value refers to the minimum area value in the target area range. For example, if the target area range is 10 to 30, then the minimum area value is 10.
最大压力值是指目标压力范围中的压力最大值,例如,目标压力范围为20~50,则最大压力值即为50。The maximum pressure value refers to the maximum pressure value in the target pressure range. For example, if the target pressure range is 20 to 50, the maximum pressure value is 50.
可以理解地,上述示例仅是为了更好地理解本发明实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitations to the embodiments of the present invention.
灵敏度阈值是指由业务人员预先设置的目标压力按键的灵敏度的最大值,在目标压力按键的灵敏度大于灵敏度阈值时,表示目标压力按键过于灵敏。The sensitivity threshold refers to the maximum value of the sensitivity of the target pressure button preset by the business personnel. When the sensitivity of the target pressure button is greater than the sensitivity threshold, it means that the target pressure button is too sensitive.
而在监测到用户在目标区域内执行的触摸操作,并在触摸操作对应的触摸面积小于目标面积范围中的最小面积值,且触摸操作对应的触摸压力值大于目标压力范围中的最大压力值的情况下,可以确定目标压力按键的灵敏度大于灵敏度阈值,表示目标压力按键的灵敏度出现异常,即目标压力按键过于灵敏,则可以及时提醒用户对目标压力按键的灵敏度进行调整。When it is detected that the user performs a touch operation in the target area, and the touch area corresponding to the touch operation is less than the minimum area value in the target area range, and the touch pressure value corresponding to the touch operation is greater than the maximum pressure value in the target pressure range. In this case, it can be determined that the sensitivity of the target pressure button is greater than the sensitivity threshold, indicating that the sensitivity of the target pressure button is abnormal, that is, the target pressure button is too sensitive, and the user can be promptly reminded to adjust the sensitivity of the target pressure button.
在目标压力按键的灵敏度大于灵敏度阈值的情况下,可以生成提示信息,通过提示信息可以提示用户及时对目标压力按键的灵敏度进行调整,提示信息可以是文字提示信息,如在移动终端的屏幕上显示文字提示,如“该压力按键的灵敏度过高”;提示信息也可以是语言提示信息,即通过语音播报的形式提示用户目标压力按键的灵敏度过高。When the sensitivity of the target pressure button is greater than the sensitivity threshold, prompt information can be generated. The prompt information can prompt the user to adjust the sensitivity of the target pressure button in a timely manner. The prompt information can be text prompt information, such as displayed on the screen of a mobile terminal. Text prompts, such as "The sensitivity of the pressure button is too high"; the prompt information can also be verbal prompt information, that is, a voice broadcast is used to remind the user that the sensitivity of the target pressure button is too high.
本发明实施例通过结合触摸压力值和触摸面积确定压力按键是已经损坏,还是灵敏度过于异常,可以达到预判或检测压力按键是否异常的目的。Embodiments of the present invention determine whether the pressure button has been damaged or the sensitivity is too abnormal by combining the touch pressure value and the touch area, thereby achieving the purpose of predicting or detecting whether the pressure button is abnormal.
本发明实施例提供的压力按键检测方法,通过在接收到针对移动终端的屏幕的触摸操作时,获取触摸操作在屏幕上所处的触摸区域,在触摸区域位于目标压力按键对应的目标区域内的情况下,获取触摸操作对应的触摸压力值及触摸操作对应的触摸面积,在触摸面积大于目标面积范围中的最大面积值,且触摸压力值小于目标压力范围中的最小压力值的情况下,确定目标压力按键已损坏;在触摸面积小于目标面积范围中的最小面积值,且触摸压力值大于目标压力范围中的最大压力值的情况下,确定目标压力按键的灵敏度大于灵敏度阈值。本发明实施例通过结合触摸压力值和触摸面积确定压力按键是否异常,可以达到预判或检测压力按键是否损坏的目的,从而提醒用户及时更换压力传感器。The pressure key detection method provided by the embodiment of the present invention obtains the touch area on the screen where the touch operation is located when receiving a touch operation on the screen of the mobile terminal. When the touch area is located in the target area corresponding to the target pressure key, In this case, obtain the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation. When the touch area is greater than the maximum area value in the target area range, and the touch pressure value is less than the minimum pressure value in the target pressure range, determine The target pressure button is damaged; when the touch area is less than the minimum area value in the target area range, and the touch pressure value is greater than the maximum pressure value in the target pressure range, it is determined that the sensitivity of the target pressure button is greater than the sensitivity threshold. By combining the touch pressure value and the touch area to determine whether the pressure button is abnormal, the embodiment of the present invention can achieve the purpose of predicting or detecting whether the pressure button is damaged, thereby reminding the user to replace the pressure sensor in time.
实施例二Embodiment 2
参照图2,示出了本发明实施例提供的一种压力按键检测方法的步骤流程图,该压力按键检测方法可以应用于移动终端,具体可以包括如下步骤:Referring to Figure 2, a flow chart of steps of a pressure key detection method provided by an embodiment of the present invention is shown. The pressure key detection method can be applied to mobile terminals and may specifically include the following steps:
步骤201:获取针对所述目标区域的多次按压操作。Step 201: Obtain multiple pressing operations for the target area.
在本发明实施例中,移动终端可以包括手机、PAD(Portable Android Device,平板电脑)等具备触摸屏的移动电子设备。In the embodiment of the present invention, the mobile terminal may include a mobile electronic device with a touch screen, such as a mobile phone or a PAD (Portable Android Device, tablet computer).
目标压力按键是指移动终端上预先设置的需要执行触发操作的按键,如亮屏按键、声音调节按键等等。The target pressure button refers to a button that is preset on the mobile terminal and needs to perform a triggering operation, such as a screen bright button, a sound adjustment button, etc.
目标区域是指屏幕上按压目标压力按键的对应事件的区域,对应事件是指按压或触摸目标压力按键所触发的事件,例如,在目标压力按键为声音条件按键时,通过触发调高声音的按键时,可以调高音量,即调高音量的事件可以作为对应事件;再如,在目标压力按键为亮屏按键时,通过触发亮屏按键可以触发屏幕由灭屏转换至亮屏,即将灭屏转换为亮屏的事件作为对应事件。目标区域可以是如,在对应事件为由灭屏转换为亮屏的事件时,在屏幕的a区域内执行触摸操作时,可以触发屏幕由灭屏转换为亮屏,则将a区域作为目标区域;而在对应事件为调高音量的事件时,在屏幕的b区域内执行触摸操作时,可以调高音量,则将b区域作为目标区域。The target area refers to the area on the screen corresponding to the event of pressing the target pressure button. The corresponding event refers to the event triggered by pressing or touching the target pressure button. For example, when the target pressure button is a sound condition button, by triggering a button that increases the sound , the volume can be increased, that is, the event of increasing the volume can be used as the corresponding event; for another example, when the target pressure button is the screen-on button, by triggering the screen-on button, the screen can be triggered to switch from screen off to screen on, and the screen will be off. The event converted to bright screen is used as the corresponding event. The target area can be, for example, when the corresponding event is an event that changes the screen from off to on, and when a touch operation is performed in area a of the screen, it can trigger the screen to change from off to on, then area a is used as the target area. ; And when the corresponding event is an event to increase the volume, when a touch operation is performed in the b area of the screen, the volume can be increased, and the b area is used as the target area.
可以理解地,上述示例仅是为了更好地理解本发明实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitations to the embodiments of the present invention.
按压操作是指在目标压力按键处于正常状态的情况下,对目标压力按键进行测试时按压目标区域的操作。The pressing operation refers to the operation of pressing the target area when testing the target pressure button when the target pressure button is in a normal state.
在本发明中,可以在目标压力按键处于正常状态的情况下,对目标区域执行多次按压操作进行测试,以得到下述步骤中的阈值面积范围和阈值压力范围,而按压操作的次数可以为5次、8次、15次等等,具体地,可以根据业务需求而定,本发明实施例对此不加以限制。In the present invention, when the target pressure button is in a normal state, multiple pressing operations can be performed on the target area for testing to obtain the threshold area range and threshold pressure range in the following steps, and the number of pressing operations can be 5 times, 8 times, 15 times, etc., specifically, can be determined according to business requirements, and this is not limited in the embodiment of the present invention.
在移动终端内预先设置有触屏传感器,通过触屏传感器可以检测得到对目标区域执行的按压操作的次数。A touch screen sensor is preset in the mobile terminal, and the touch screen sensor can detect the number of pressing operations performed on the target area.
在获取针对目标区域的多次按压操作之后,执行步骤202。After obtaining multiple pressing operations on the target area, step 202 is performed.
步骤202:获取每次所述按压操作对应的初始按压面积;所述初始按压面积为所述按压操作接触所述目标区域且未产生压力值时的按压面积。Step 202: Obtain the initial pressing area corresponding to each pressing operation; the initial pressing area is the pressing area when the pressing operation contacts the target area and no pressure value is generated.
初始按压面积是指对目标区域执行按压操作时,按压操作接触目标区域但是没有产生压力值时的按压面积。The initial pressing area refers to the pressing area when the pressing operation touches the target area but does not generate a pressure value when performing a pressing operation on the target area.
移动终端内置的触屏传感器可以通过感应节点的感应变化值大小计算按压面积,而在触屏传感器未检测到按压操作产生压力值时,可以将检测得到的按压面积作为初始按压面积。The touch screen sensor built into the mobile terminal can calculate the pressing area based on the sensing change value of the sensing node. When the touch screen sensor does not detect the pressure value generated by the pressing operation, the detected pressing area can be used as the initial pressing area.
在针对目标区域执行的多次按压操作,可以按照上述方式获取每次按压操作对应的初始按压面积,并执行步骤203。During multiple pressing operations performed on the target area, the initial pressing area corresponding to each pressing operation can be obtained in the above manner, and step 203 is performed.
步骤203:获取在每次所述按压操作触发所述目标压力按键的对应事件时的按压压力值,及所述按压操作对应的目标按压面积。Step 203: Obtain the pressing pressure value when each pressing operation triggers the corresponding event of the target pressure button, and the target pressing area corresponding to the pressing operation.
按压压力值是指对目标区域执行按压操作,并触发了目标压力按键的对应事件时,按压操作所产生的压力值。The pressing pressure value refers to the pressure value generated by the pressing operation when the target area is pressed and the corresponding event of the target pressure button is triggered.
目标按压面积即为对目标区域执行按压操作,并触发了目标压力按键的对应事件时,按压操作所产生的按压面积。The target pressing area is the pressing area generated by the pressing operation when the target area is pressed and the corresponding event of the target pressure button is triggered.
移动终端内置的触屏传感器可以通过感应节点的感应变化值大小计算得到按压面积,而在触发目标压力按键的对应事件时,可以将此时计算到的按压面积作为目标按压面积。并且,此时可以通过触屏传感器检测得到按压操作产生的压力值,并将该压力值作为按压压力值。The touch screen sensor built into the mobile terminal can calculate the pressing area based on the sensing change value of the sensing node, and when the corresponding event of the target pressure button is triggered, the pressing area calculated at this time can be used as the target pressing area. Moreover, at this time, the pressure value generated by the pressing operation can be detected through the touch screen sensor, and the pressure value can be used as the pressing pressure value.
针对多次按压操作,均可以按照上述实现方式,获取在每次按压操作触发对应事件时的按压压力值,及按压操作对应的目标按压面积,并执行步骤204。For multiple pressing operations, the above implementation method can be used to obtain the pressing pressure value when each pressing operation triggers a corresponding event, and the target pressing area corresponding to the pressing operation, and perform step 204.
步骤204:基于多个所述初始按压面积、多个所述按压压力值和多个所述目标按压面积,确定所述目标面积范围和所述目标压力范围。Step 204: Determine the target area range and the target pressure range based on a plurality of the initial pressing areas, a plurality of the pressing pressure values and a plurality of the target pressing areas.
在获取多次按压操作所对应的初始按压面积、按压压力值和目标按压面积之后,可以根据多个初始按压面积、多个按压压力值和多个目标按压面积,确定出目标面积范围和目标压力范围,而对于该过程可以参照下述优选实施例的详细描述。After obtaining the initial pressing area, pressing pressure value and target pressing area corresponding to multiple pressing operations, the target area range and target pressure can be determined based on the multiple initial pressing areas, multiple pressing pressure values and multiple target pressing areas. range, and for this process, reference may be made to the detailed description of the preferred embodiments below.
在本发明的一种优选实施例中,上述步骤204可以包括:In a preferred embodiment of the present invention, the above step 204 may include:
子步骤A1:根据多个所述目标按压面积和多个所述初始按压面积,计算得到多个按压面积比值。Sub-step A1: Calculate multiple pressing area ratios based on multiple target pressing areas and multiple initial pressing areas.
在本发明实施例中,按压面积比值是指每次按压操作对应的目标按压面积和初始按压面积的比值,例如,在一次按压操作对应的目标按压面积为A,初始按压面积为a时,则该按压操作对应的按压面积比值即为A/a。In the embodiment of the present invention, the pressing area ratio refers to the ratio of the target pressing area corresponding to each pressing operation and the initial pressing area. For example, when the target pressing area corresponding to one pressing operation is A and the initial pressing area is a, then The pressing area ratio corresponding to this pressing operation is A/a.
在获取多次按压操作对应的目标按压面积和初始按压面积之后,可以计算得到每次按压操作对应的按压面积比值,即每次按压操作对应的按压面积比值=目标按压面积/初始按压面积。After obtaining the target pressing area and the initial pressing area corresponding to multiple pressing operations, the pressing area ratio corresponding to each pressing operation can be calculated, that is, the pressing area ratio corresponding to each pressing operation = target pressing area/initial pressing area.
在根据多个目标按压面积和多个初始按压面积,计算得到多个按压面积比值之后,执行子步骤A2。After multiple pressing area ratios are calculated based on multiple target pressing areas and multiple initial pressing areas, sub-step A2 is executed.
子步骤A2:根据多个所述按压压力值和多个所述按压面积比值,计算得到所述目标面积范围和所述目标压力范围。Sub-step A2: Calculate the target area range and the target pressure range based on multiple pressing pressure values and multiple pressing area ratio values.
在计算得到多次按压操作对应的按压面积比值后,可以根据多个按压压力值和多个按压面积比值,计算得到目标面积范围和目标压力范围,而对于计算过程可以进一步结合下述优选实施例进行详细描述。After calculating the pressing area ratio corresponding to multiple pressing operations, the target area range and the target pressure range can be calculated based on the multiple pressing pressure values and the multiple pressing area ratios, and the calculation process can be further combined with the following preferred embodiments Describe in detail.
在本发明的一种优选实施例中,上述子步骤A2可以包括:In a preferred embodiment of the present invention, the above sub-step A2 may include:
子步骤B1:获取多个所述按压面积比值中的最大比值和最小比值。Sub-step B1: Obtain the maximum ratio and the minimum ratio among multiple pressing area ratios.
在本发明实施例中,最大比值是指多个按压面积比值中的最大值,例如,多个按压面积比值包括:1/3、1/2、1/4,则最大比值即为1/2。In the embodiment of the present invention, the maximum ratio refers to the maximum value among multiple pressing area ratios. For example, if the multiple pressing area ratios include: 1/3, 1/2, and 1/4, then the maximum ratio is 1/2. .
最小比值是指多个按压面积比值中的最小值,例如,承接上述示例,最小比值即为1/4。The minimum ratio refers to the minimum value among multiple pressing area ratios. For example, following the above example, the minimum ratio is 1/4.
可以理解地,上述示例仅是为了更好地理解本公开实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present disclosure, and are not intended to be the sole limitation on the embodiments of the present invention.
在获取多个按压面积比值之后,可以从多个按压面积比值获得其中的最大比值和最小比值。After obtaining multiple pressing area ratios, the maximum ratio and the minimum ratio can be obtained from the multiple pressing area ratios.
子步骤B2:获取多个所述初始按压面积中的最大按压面积值和最小按压面积值。Sub-step B2: Obtain the maximum pressing area value and the minimum pressing area value among the multiple initial pressing areas.
最大按压面积值是指多个初始按压面积中的最大值,最小按压面积值即是指多个初始按压面积中的最小值,例如,多个初始按压面积包括:5、8、10、9、7、6,其中,最大按压面积值即为10,最小按压面积值即为5。The maximum pressing area value refers to the maximum value among multiple initial pressing areas, and the minimum pressing area value refers to the minimum value among multiple initial pressing areas. For example, the multiple initial pressing areas include: 5, 8, 10, 9, 7, 6, among which, the maximum pressing area value is 10, and the minimum pressing area value is 5.
可以理解地,上述示例仅是为了更好地理解本发明实施例的技术方案而列举的示例,不作为对本发明实施例的唯一限制。It can be understood that the above examples are only examples to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitations to the embodiments of the present invention.
在获取多个初始按压面积之后,可以从多个初始按压面积中获得最大按压面积值和最小按压面积值。After obtaining multiple initial pressing areas, the maximum pressing area value and the minimum pressing area value can be obtained from the multiple initial pressing areas.
子步骤B3:计算得到多个所述按压压力值对应的压力平均值,及多个所述目标按压面积的面积平均值。Sub-step B3: Calculate the average pressure value corresponding to multiple pressing pressure values and the average area value of multiple target pressing areas.
压力平均值是指多个按压压力值的平均值。The pressure average refers to the average of multiple pressing pressure values.
面积平均值是指多个目标按压面积的平均值。The area average refers to the average of the pressed areas of multiple targets.
在得到多个按压压力值之后,可以根据多个按压压力值计算得到压力平均值,即将多个按压压力值相加求和,然后求平均数,即可得到压力平均值。After obtaining multiple pressing pressure values, the pressure average value can be calculated based on the multiple pressing pressure values. That is, the multiple pressing pressure values are added, summed, and then averaged to obtain the pressure average value.
在得到多个目标按压面积之后,可以根据多个目标按压面积计算得到面积平均值,即将多个目标按压面积相加求和,然后求平均数,即可得到面积平均值。After obtaining multiple target pressing areas, the area average value can be calculated based on the multiple target pressing areas. That is, the multiple target pressing areas are added and summed, and then the average is calculated to obtain the area average value.
子步骤B4:基于所述最大比值、所述最小比值、所述面积平均值、所述最大按压面积值和所述最小按压面积值,计算得到所述目标压力范围。Sub-step B4: Calculate the target pressure range based on the maximum ratio, the minimum ratio, the area average, the maximum pressing area value and the minimum pressing area value.
子步骤B5:基于所述最大比值、所述最小比值、所述压力平均值、所述最大按压面积值和所述最小按压面积值,计算得到所述目标面积范围。Sub-step B5: Calculate the target area range based on the maximum ratio, the minimum ratio, the pressure average, the maximum pressing area value and the minimum pressing area value.
在得到上述最大比值、最小比值、面积平均值、最大按压面积、最小按压面积和压力平均值之后,可以结合下述公式计算得到目标压力范围和目标面积范围,具体地,可以如下述公式(1)和公式(2)所示:After obtaining the above maximum ratio, minimum ratio, area average, maximum pressing area, minimum pressing area and pressure average, the target pressure range and target area range can be calculated by combining the following formulas. Specifically, the target pressure range and target area range can be calculated as follows: (1 ) and formula (2) as shown:
gx=[Bmin*z+Amax,Bmax*z+Amin](1)gx=[Bmin*z+Amax, Bmax*z+Amin](1)
zx=[g/Bmax+Amin,g/Bmin+Amax](2)zx=[g/Bmax+Amin, g/Bmin+Amax](2)
上述公式(1)和(2)中,gx表示目标压力范围,zx表示目标面积范围,Bmax表示多次按压操作所对应的多个按压面积比值中的最大比值,Bmin表示多次按压操作所对应的多个按压面积比值中的最小比值,Amax表示多次按压操作所对应的多个初始按压面积中的最大按压面积值,Amin表示多次按压操作所对应的多个初始按压面积中的最小按压面积值,g表示多次按压操作对应的多个按压压力值的压力平均值,z表示多个目标按压面积的面积平均值。In the above formulas (1) and (2), gx represents the target pressure range, zx represents the target area range, Bmax represents the maximum ratio of multiple pressing area ratios corresponding to multiple pressing operations, and Bmin represents the maximum ratio corresponding to multiple pressing operations. The minimum ratio among multiple pressing area ratios, Amax represents the maximum pressing area value among multiple initial pressing areas corresponding to multiple pressing operations, and Amin represents the minimum pressing among multiple initial pressing areas corresponding to multiple pressing operations. Area value, g represents the pressure average of multiple pressing pressure values corresponding to multiple pressing operations, z represents the area average of multiple target pressing areas.
在上述过程中,获取得到的多次按压操作对应的多个初始按压面积、多个按压压力值和多个目标按压面积之后,可以从这些数据中剔除最大和最小数据,或者是采用正态分布的形式,获取中间区域的数据计算得到上述公式中的Bmin、Bmax、Amin、Amax、z以及g,具体地,可以根据实际情况而定,本发明实施例对此不加以限制。In the above process, after obtaining multiple initial pressing areas, multiple pressing pressure values and multiple target pressing areas corresponding to multiple pressing operations, the maximum and minimum data can be eliminated from these data, or a normal distribution can be used In the form, the data in the middle area is obtained and calculated to obtain Bmin, Bmax, Amin, Amax, z and g in the above formula. Specifically, it can be determined according to the actual situation, and the embodiment of the present invention is not limited to this.
可以理解地,上述优选实施例仅是为了更好地理解本发明实施例的技术方案而列举的一种优选方案,而不作为对本发明实施例的唯一限制。It can be understood that the above preferred embodiment is only a preferred solution enumerated for a better understanding of the technical solution of the embodiment of the present invention, and is not the only limitation to the embodiment of the present invention.
在基于多个初始按压面积、多个按压压力值和多个目标按压面积,确定目标面积范围和目标压力范围之后,执行步骤205。After determining the target area range and the target pressure range based on the plurality of initial pressing areas, the plurality of pressing pressure values and the plurality of target pressing areas, step 205 is performed.
步骤205:在接收到针对所述移动终端的屏幕的触摸操作时,获取所述触摸操作在所述屏幕上所处的触摸区域。Step 205: When receiving a touch operation on the screen of the mobile terminal, obtain the touch area where the touch operation is located on the screen.
步骤206:在所述触摸区域位于目标压力按键对应的目标区域内的情况下,获取所述触摸操作对应的触摸压力值,及所述触摸操作对应的触摸面积;所述目标区域为触发所述目标压力按键的对应事件的区域。Step 206: When the touch area is located in the target area corresponding to the target pressure button, obtain the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation; the target area is the triggering area for triggering the touch operation. The area of the corresponding event for the target pressure button.
步骤207:在所述触摸面积大于所述目标面积范围中的最大面积值,且所述触摸压力值小于所述目标压力范围中的最小压力值的情况下,确定所述目标压力按键已损坏;或Step 207: When the touch area is greater than the maximum area value in the target area range and the touch pressure value is less than the minimum pressure value in the target pressure range, determine that the target pressure button is damaged; or
步骤208:在所述触摸面积小于所述目标面积范围中的最小面积值,且所述触摸压力值大于所述目标压力范围中的最大压力值的情况下,确定所述目标压力按键的灵敏度大于灵敏度阈值。Step 208: When the touch area is smaller than the minimum area value in the target area range, and the touch pressure value is larger than the maximum pressure value in the target pressure range, determine that the sensitivity of the target pressure button is greater than Sensitivity threshold.
可以理解地,上述步骤205~步骤208的具体实施方式与上述实施例一中步骤101~步骤104的具体实施方式相似,本发明实施例在此不再加以赘述。It can be understood that the specific implementation manner of the above-mentioned steps 205 to 208 is similar to the specific implementation manner of the above-mentioned steps 101 to 104 in the first embodiment, and will not be described again in this embodiment of the present invention.
步骤209:在所述触摸面积处于所述目标面积范围,且所述触摸压力值处于所述目标压力范围内的情况下,确定所述目标压力按键处于正常状态。Step 209: When the touch area is within the target area range and the touch pressure value is within the target pressure range, determine that the target pressure button is in a normal state.
在得到触摸操作对应的触摸压力值和触摸面积之后,还可以判断触摸压力值是否处于目标压力范围内,以及触摸面积是否处于目标面积范围内。After obtaining the touch pressure value and touch area corresponding to the touch operation, it can also be determined whether the touch pressure value is within the target pressure range and whether the touch area is within the target area range.
在触摸面积处于目标面积范围,且触摸压力值处于目标压力范围内的情况下,即二者同时处于两个范围内的情况下,表示目标压力按键处于正常状态,即目标压力按键未发生异常。When the touch area is within the target area range and the touch pressure value is within the target pressure range, that is, when both are within two ranges at the same time, it means that the target pressure button is in a normal state, that is, no abnormality occurs in the target pressure button.
本发明实施例通过触摸面积和触摸压力值的判断,可以精确得知目标压力按键是否正常,可以提高用户的感知。The embodiment of the present invention can accurately know whether the target pressure button is normal by judging the touch area and touch pressure value, which can improve the user's perception.
本发明实施例提供的压力按键检测方法,除了具备上述实施例一提供的压力按键检测方法所具备的有益效果外,还可以在压力按键已损坏或灵敏度过高的情况下,生成相应的提示信息,以提示用户及时更换压力按键传感器模组或者调整侧压力按键灵敏度。The pressure button detection method provided by the embodiment of the present invention, in addition to having the beneficial effects of the pressure button detection method provided in the first embodiment, can also generate corresponding prompt information when the pressure button is damaged or the sensitivity is too high. , to prompt the user to promptly replace the pressure button sensor module or adjust the side pressure button sensitivity.
实施例三Embodiment 3
参照图3,示出了本发明实施例提供的一种压力按键检测装置的结构示意图,该压力按键检测装置可以应用于移动终端,具体可以包括如下模块:Referring to Figure 3, there is shown a schematic structural diagram of a pressure key detection device provided by an embodiment of the present invention. The pressure key detection device can be applied to mobile terminals, and specifically can include the following modules:
触摸面积获取模块301,用于在接收到针对所述移动终端的屏幕的触摸操作时,获取所述触摸操作在所述屏幕上所处的触摸区域;The touch area acquisition module 301 is configured to acquire the touch area on the screen where the touch operation is located when receiving a touch operation on the screen of the mobile terminal;
触摸压力获取模块302,用于在所述触摸区域位于目标压力按键对应的目标区域内的情况下,获取所述触摸操作对应的触摸压力值,及所述触摸操作对应的触摸面积;The touch pressure acquisition module 302 is configured to acquire the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation when the touch area is located in the target area corresponding to the target pressure button;
按键损坏确定模块303,用于在所述触摸面积大于所述目标面积范围中的最大面积值,且所述触摸压力值小于所述目标压力范围中的最小压力值的情况下,确定所述目标压力按键已损坏;或Key damage determination module 303, configured to determine the target when the touch area is greater than the maximum area value in the target area range and the touch pressure value is less than the minimum pressure value in the target pressure range. The pressure button is damaged; or
灵敏度异常确定模块304,用于在所述触摸面积小于所述目标面积范围中的最小面积值,且所述触摸压力值大于所述目标压力范围中的最大压力值的情况下,确定所述目标压力按键的灵敏度大于灵敏度阈值。Sensitivity abnormality determination module 304, configured to determine the target when the touch area is less than the minimum area value in the target area range and the touch pressure value is greater than the maximum pressure value in the target pressure range. The sensitivity of the pressure button is greater than the sensitivity threshold.
本发明实施例提供的压力按键检测装置,通过在接收到针对移动终端的屏幕的触摸操作时,获取触摸操作在屏幕上所处的触摸区域,在触摸区域位于目标压力按键对应的目标区域内的情况下,获取触摸操作对应的触摸压力值及触摸操作对应的触摸面积,在触摸面积大于目标面积范围中的最大面积值,且触摸压力值小于目标压力范围中的最小压力值的情况下,确定目标压力按键已损坏;在触摸面积小于目标面积范围中的最小面积值,且触摸压力值大于目标压力范围中的最大压力值的情况下,确定目标压力按键的灵敏度大于灵敏度阈值。本发明实施例通过结合触摸压力值和触摸面积确定压力按键是否异常,可以达到预判或检测压力按键是否损坏的目的,从而提醒用户及时更换压力传感器。The pressure key detection device provided by the embodiment of the present invention obtains the touch area on the screen where the touch operation is located when receiving a touch operation on the screen of the mobile terminal, and the touch area is located in the target area corresponding to the target pressure key. In this case, obtain the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation. When the touch area is greater than the maximum area value in the target area range, and the touch pressure value is less than the minimum pressure value in the target pressure range, determine The target pressure button is damaged; when the touch area is less than the minimum area value in the target area range, and the touch pressure value is greater than the maximum pressure value in the target pressure range, it is determined that the sensitivity of the target pressure button is greater than the sensitivity threshold. By combining the touch pressure value and the touch area to determine whether the pressure button is abnormal, the embodiment of the present invention can achieve the purpose of predicting or detecting whether the pressure button is damaged, thereby reminding the user to replace the pressure sensor in time.
实施例四Embodiment 4
参照图4,示出了本发明实施例提供的一种压力按键检测装置的结构示意图,该压力按键检测装置可以应用于移动终端,具体可以包括如下模块:Referring to Figure 4, a schematic structural diagram of a pressure key detection device provided by an embodiment of the present invention is shown. The pressure key detection device can be applied to mobile terminals, and specifically can include the following modules:
按压操作获取模块401,用于获取针对所述目标区域的多次按压操作;Press operation acquisition module 401, used to acquire multiple press operations for the target area;
初始面积获取模块402,用于获取每次所述按压操作对应的初始按压面积;所述初始按压面积为所述按压操作接触所述目标区域且未产生压力值时的按压面积;The initial area acquisition module 402 is used to obtain the initial pressing area corresponding to each pressing operation; the initial pressing area is the pressing area when the pressing operation contacts the target area and no pressure value is generated;
压力面积获取模块403,用于获取在每次所述按压操作触发所述对应事件时的按压压力值,及所述按压操作对应的目标按压面积;The pressure area acquisition module 403 is used to obtain the pressing pressure value when each pressing operation triggers the corresponding event, and the target pressing area corresponding to the pressing operation;
目标范围确定模块404,用于基于多个所述初始按压面积、多个所述按压压力值和多个所述目标按压面积,确定所述阈值面积范围和所述阈值压力范围;Target range determination module 404, configured to determine the threshold area range and the threshold pressure range based on a plurality of the initial pressing areas, a plurality of the pressing pressure values and a plurality of the target pressing areas;
触摸面积获取模块405,用于在接收到针对所述移动终端的屏幕的触摸操作时,获取所述触摸操作在所述屏幕上所处的触摸区域;The touch area acquisition module 405 is configured to acquire the touch area on the screen where the touch operation is located when receiving a touch operation on the screen of the mobile terminal;
触摸压力获取模块406,用于在所述触摸区域位于目标压力按键对应的目标区域内的情况下,获取所述触摸操作对应的触摸压力值,及所述触摸操作对应的触摸面积;The touch pressure acquisition module 406 is configured to acquire the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation when the touch area is located in the target area corresponding to the target pressure button;
按键损坏确定模块407,用于在所述触摸面积大于所述目标面积范围中的最大面积值,且所述触摸压力值小于所述目标压力范围中的最小压力值的情况下,确定所述目标压力按键已损坏;或Key damage determination module 407, configured to determine the target when the touch area is greater than the maximum area value in the target area range and the touch pressure value is less than the minimum pressure value in the target pressure range. The pressure button is damaged; or
灵敏度异常确定模块408,用于在所述触摸面积小于所述目标面积范围中的最小面积值,且所述触摸压力值大于所述目标压力范围中的最大压力值的情况下,确定所述目标压力按键的灵敏度大于灵敏度阈值;Sensitivity abnormality determination module 408, configured to determine the target when the touch area is less than the minimum area value in the target area range and the touch pressure value is greater than the maximum pressure value in the target pressure range. The sensitivity of the pressure button is greater than the sensitivity threshold;
按键正常确定模块409,用于在所述触摸面积处于所述目标面积范围,且所述触摸压力值处于所述目标压力范围内的情况下,确定所述目标压力按键处于正常状态。The key normal determination module 409 is configured to determine that the target pressure key is in a normal state when the touch area is within the target area range and the touch pressure value is within the target pressure range.
优选地,所述目标范围确定模块404包括:Preferably, the target range determination module 404 includes:
比值计算子模块,用于根据多个所述目标按压面积和多个所述初始按压面积,计算得到多个按压面积比值;A ratio calculation submodule, configured to calculate multiple pressing area ratios based on multiple target pressing areas and multiple initial pressing areas;
范围计算子模块,用于根据多个所述按压压力值和多个所述按压面积比值,计算得到所述阈值面积范围和所述阈值压力范围。A range calculation submodule is configured to calculate the threshold area range and the threshold pressure range based on a plurality of pressing pressure values and a plurality of pressing area ratio values.
优选地,所述范围计算子模块包括:Preferably, the range calculation sub-module includes:
比值获取子模块,用于获取多个所述按压面积比值中的最大比值和最小比值;A ratio acquisition submodule is used to obtain the maximum ratio and the minimum ratio among multiple pressing area ratios;
面积值获取子模块,用于获取多个所述初始按压面积中的最大按压面积值和最小按压面积值;The area value acquisition sub-module is used to obtain the maximum pressing area value and the minimum pressing area value among multiple initial pressing areas;
平均值计算子模块,用于计算得到多个所述按压压力值对应的压力平均值,及多个所述目标按压面积的面积平均值;The average value calculation submodule is used to calculate the pressure average value corresponding to multiple pressing pressure values and the area average value of multiple target pressing areas;
压力范围计算子模块,用于基于所述最大比值、所述最小比值、所述面积平均值、所述最大按压面积值和所述最小按压面积值,计算得到所述目标压力范围;A pressure range calculation submodule, configured to calculate the target pressure range based on the maximum ratio, the minimum ratio, the area average, the maximum pressing area value, and the minimum pressing area value;
面积范围计算子模块,用于基于所述最大比值、所述最小比值、所述压力平均值、所述最大按压面积值和所述最小按压面积值,计算得到所述目标面积范围。The area range calculation sub-module is used to calculate the target area range based on the maximum ratio, the minimum ratio, the pressure average, the maximum pressing area value and the minimum pressing area value.
本发明实施例提供的压力按键检测装置,除了具备上述实施例三提供的压力按键检测装置所具备的有益效果外,还可以在压力按键已损坏或灵敏度过高的情况下,生成相应的提示信息,以提示用户及时更换压力按键传感器模组或者调整侧压力按键灵敏度。The pressure button detection device provided by the embodiment of the present invention, in addition to having the beneficial effects of the pressure button detection device provided in the third embodiment, can also generate corresponding prompt information when the pressure button is damaged or the sensitivity is too high. , to prompt the user to promptly replace the pressure button sensor module or adjust the side pressure button sensitivity.
实施例五Embodiment 5
参照图5,为实现本发明各个实施例的一种移动终端的硬件结构示意图。Referring to FIG. 5 , a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention is shown.
该移动终端500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、处理器510、以及电源511等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。The mobile terminal 500 includes but is not limited to: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor 510, and Power supply 511 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in Figure 5 does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or some components may be combined, or different components may be used. layout. In the embodiment of the present invention, mobile terminals include but are not limited to mobile phones, tablet computers, notebook computers, PDAs, vehicle-mounted terminals, wearable devices, and pedometers.
处理器510,用于在接收到针对所述移动终端的屏幕的触摸操作时,获取所述触摸操作在所述屏幕上所处的触摸区域;在所述触摸区域位于目标压力按键对应的目标区域内的情况下,获取所述触摸操作对应的触摸压力值,及所述触摸操作对应的触摸面积;在所述触摸面积大于所述目标面积范围中的最大面积值,且所述触摸压力值小于所述目标压力范围中的最小压力值的情况下,确定所述目标压力按键已损坏;或在所述触摸面积小于所述目标面积范围中的最小面积值,且所述触摸压力值大于所述目标压力范围中的最大压力值的情况下,确定所述目标压力按键的灵敏度大于灵敏度阈值。The processor 510 is configured to, when receiving a touch operation on the screen of the mobile terminal, obtain the touch area on the screen where the touch operation is located; where the touch area is located in a target area corresponding to the target pressure button. If within the case, obtain the touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation; when the touch area is greater than the maximum area value in the target area range, and the touch pressure value is less than In the case of the minimum pressure value in the target pressure range, it is determined that the target pressure button is damaged; or in the case where the touch area is smaller than the minimum area value in the target area range, and the touch pressure value is greater than the In the case of the maximum pressure value in the target pressure range, it is determined that the sensitivity of the target pressure key is greater than the sensitivity threshold.
在本发明实施例中,通过在接收到针对移动终端的屏幕的触摸操作时,获取触摸操作在屏幕上所处的触摸区域,在触摸区域位于目标压力按键对应的目标区域内的情况下,获取触摸操作对应的触摸压力值及触摸操作对应的触摸面积,在触摸面积大于目标面积范围中的最大面积值,且触摸压力值小于目标压力范围中的最小压力值的情况下,确定目标压力按键已损坏;在触摸面积小于目标面积范围中的最小面积值,且触摸压力值大于目标压力范围中的最大压力值的情况下,确定目标压力按键的灵敏度大于灵敏度阈值。本发明实施例通过结合触摸压力值和触摸面积确定压力按键是否异常,可以达到预判或检测压力按键是否损坏的目的,从而提醒用户及时更换压力传感器。In the embodiment of the present invention, when a touch operation on the screen of the mobile terminal is received, the touch area on the screen where the touch operation is located is obtained. When the touch area is located in the target area corresponding to the target pressure button, the touch area on the screen is obtained. The touch pressure value corresponding to the touch operation and the touch area corresponding to the touch operation. When the touch area is greater than the maximum area value in the target area range, and the touch pressure value is less than the minimum pressure value in the target pressure range, it is determined that the target pressure button has been Damage; when the touch area is less than the minimum area value in the target area range, and the touch pressure value is greater than the maximum pressure value in the target pressure range, it is determined that the sensitivity of the target pressure button is greater than the sensitivity threshold. By combining the touch pressure value and the touch area to determine whether the pressure button is abnormal, the embodiment of the present invention can achieve the purpose of predicting or detecting whether the pressure button is damaged, thereby reminding the user to replace the pressure sensor in time.
应理解的是,本发明实施例中,射频单元501可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器510处理;另外,将上行的数据发送给基站。通常,射频单元501包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元501还可以通过无线通信系统与网络和其他设备通信。It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used to receive and send information or signals during a call. Specifically, after receiving downlink data from the base station, it is processed by the processor 510; in addition, Uplink data is sent to the base station. Generally, the radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, transceiver, coupler, low noise amplifier, duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
移动终端通过网络模块502为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides users with wireless broadband Internet access through the network module 502, such as helping users send and receive emails, browse web pages, and access streaming media.
音频输出单元503可以将射频单元501或网络模块502接收的或者在存储器509中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元503还可以提供与移动终端500执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元503包括扬声器、蜂鸣器以及受话器等。The audio output unit 503 may convert the audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as a sound. Furthermore, the audio output unit 503 may also provide audio output related to a specific function performed by the mobile terminal 500 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
输入单元504用于接收音频或视频信号。输入单元504可以包括图形处理器(Graphics Processing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元506上。经图形处理器5041处理后的图像帧可以存储在存储器509(或其它存储介质)中或者经由射频单元501或网络模块502进行发送。麦克风5042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元501发送到移动通信基站的格式输出。The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes still pictures or video images obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphics processor 5041 may be stored in the memory 509 (or other storage media) or sent via the radio frequency unit 501 or the network module 502. Microphone 5042 can receive sounds and can process such sounds into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 501 for output in a phone call mode.
移动终端500还包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板5061的亮度,接近传感器可在移动终端500移动到耳边时,关闭显示面板5061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器505还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The mobile terminal 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light. The proximity sensor can close the display panel 5061 when the mobile terminal 500 moves to the ear. /or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of mobile terminals (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, knock), etc.; the sensor 505 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc. will not be described in detail here.
显示单元506用于显示由用户输入的信息或提供给用户的信息。显示单元506可包括显示面板5061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板5061。The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (OLED), or the like.
用户输入单元507可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板5071上或在触控面板5071附近的操作)。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器510,接收处理器510发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板5071。除了触控面板5071,用户输入单元507还可以包括其他输入设备5072。具体地,其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 507 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect the user's touch operations on or near the touch panel 5071 (for example, the user uses a finger, stylus, or any suitable object or accessory on or near the touch panel 5071 to operate). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller. To the processor 510, receive the command sent by the processor 510 and execute it. In addition, the touch panel 5071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
进一步的,触控面板5071可覆盖在显示面板5061上,当触控面板5071检测到在其上或附近的触摸操作后,传送给处理器510以确定触摸事件的类型,随后处理器510根据触摸事件的类型在显示面板5061上提供相应的视觉输出。虽然在图5中,触控面板5071与显示面板5061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板5071与显示面板5061集成而实现移动终端的输入和输出功能,具体此处不做限定。Further, the touch panel 5071 can be covered on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it is sent to the processor 510 to determine the type of touch event. Then the processor 510 determines the type of touch event according to the touch. The type of event provides corresponding visual output on display panel 5061. Although in Figure 5, the touch panel 5071 and the display panel 5061 are used as two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated. The implementation of the input and output functions of the mobile terminal is not limited here.
接口单元508为外部装置与移动终端500连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元508可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端500内的一个或多个元件或者可以用于在移动终端500和外部装置之间传输数据。The interface unit 508 is an interface for connecting external devices to the mobile terminal 500 . For example, external devices may include a wired or wireless headphone port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc. The interface unit 508 may be used to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 500 or may be used to connect between the mobile terminal 500 and an external device. Transfer data between devices.
存储器509可用于存储软件程序以及各种数据。存储器509可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器509可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store data according to Data created by the use of mobile phones (such as audio data, phone books, etc.), etc. In addition, memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
处理器510是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器510可包括一个或多个处理单元;优选的,处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。The processor 510 is the control center of the mobile terminal, using various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 509, and calling data stored in the memory 509 , execute various functions of the mobile terminal and process data, thereby overall monitoring the mobile terminal. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor The processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 510.
移动终端500还可以包括给各个部件供电的电源511(比如电池),优选的,电源511可以通过电源管理系统与处理器510逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 500 may also include a power supply 511 (such as a battery) that supplies power to various components. Preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby achieving management of charging, discharging, and power consumption management through the power management system. and other functions.
另外,移动终端500包括一些未示出的功能模块,在此不再赘述。In addition, the mobile terminal 500 includes some functional modules not shown, which will not be described again here.
优选的,本发明实施例还提供一种移动终端,包括处理器510,存储器509,存储在存储器509上并可在所述处理器510上运行的计算机程序,该计算机程序被处理器510执行时实现上述压力按键检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present invention also provides a mobile terminal, including a processor 510, a memory 509, and a computer program stored in the memory 509 and executable on the processor 510. When the computer program is executed by the processor 510 Each process of the above embodiment of the pressure key detection method can be implemented and the same technical effect can be achieved. To avoid repetition, details will not be described here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述压力按键检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned pressure key detection method embodiment is implemented, and the same can be achieved. To avoid repetition, the technical effects will not be repeated here. Wherein, the computer-readable storage medium is such as read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of the present invention, many forms can be made without departing from the spirit of the present invention and the scope protected by the claims, all of which fall within the protection of the present invention.