CN107422911B - Pressure value detection method and device and computer readable storage medium - Google Patents

Pressure value detection method and device and computer readable storage medium Download PDF

Info

Publication number
CN107422911B
CN107422911B CN201710592294.5A CN201710592294A CN107422911B CN 107422911 B CN107422911 B CN 107422911B CN 201710592294 A CN201710592294 A CN 201710592294A CN 107422911 B CN107422911 B CN 107422911B
Authority
CN
China
Prior art keywords
detection mode
software
pressure value
pressure
frequency
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
CN201710592294.5A
Other languages
Chinese (zh)
Other versions
CN107422911A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710592294.5A priority Critical patent/CN107422911B/en
Publication of CN107422911A publication Critical patent/CN107422911A/en
Application granted granted Critical
Publication of CN107422911B publication Critical patent/CN107422911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • G06Q20/40145Biometric identity checks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to a method and a device for detecting a pressure value and a computer readable storage medium, and relates to the technical field of terminals, wherein the method comprises the following steps: in the process of being in a first detection mode, when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration, switching from the first detection mode to a second detection mode; switching from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold while in the second detection mode, the second pressure threshold being greater than the first pressure threshold. According to the pressure value detection method and device, the detection mode is switched, the power consumption is reduced, meanwhile, the accuracy of pressure value detection can be guaranteed, and the utilization rate is improved.

Description

Pressure value detection method and device and computer readable storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for detecting a pressure value, and a computer-readable storage medium.
Background
With the rapid development of terminal technology, the functions of terminals such as mobile phones, tablet computers, smart watches and the like are increasingly powerful, and the terminals become indispensable tools in work and life of people gradually. At present, the application of sensors in terminals, in particular pressure sensors, is becoming more and more common. The terminal can detect the pressure value in real time through the pressure sensor and carry out corresponding operation processing based on the obtained pressure value. For example, the pressure sensor can be applied to fingerprint pressing to perform fingerprint unlocking in a scene, that is, the terminal detects a pressure value through the pressure sensor, and when the detected pressure value is greater than a preset pressure threshold value and the detected fingerprint data is matched with fingerprint data recorded in advance, fingerprint unlocking is performed.
In the related art, in order to accurately detect the pressure value and facilitate the terminal to perform corresponding operation processing in time, the pressure value may be detected in real time by an installed pressure sensor, or the pressure value may be detected by a first detection mode, where the first detection mode is a mode in which the detection frequency of the pressure value is greater than a first frequency threshold.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for detecting a pressure value, and a computer-readable storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for detecting a pressure value, the method including:
in the process of being in a first detection mode, when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration, switching from the first detection mode to a second detection mode;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold, and the first frequency threshold is greater than the second frequency threshold;
switching from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold while in the second detection mode, the second pressure threshold being greater than the first pressure threshold.
Optionally, before the switching from the first detection mode to the second detection mode, the method further includes:
determining a software identifier to which a currently displayed interface belongs;
and when the preset software identification list comprises the software identification, executing the step of switching from the first detection mode to the second detection mode.
Optionally, the method further comprises:
when a setting instruction is detected, displaying a function setting interface, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
determining at least one software identification from the plurality of software identifications based on the function setting interface;
and storing the at least one software identifier into a blank software identifier list to obtain the preset software identifier list.
Optionally, the second pressure threshold is smaller than a third pressure threshold, where the third pressure threshold is a pressure value that satisfies an operation processing condition.
According to a second aspect of the embodiments of the present disclosure, there is provided a device for detecting a pressure value, the device including:
the device comprises a first switching module, a second switching module and a third switching module, wherein the first switching module is used for switching from a first detection mode to a second detection mode when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration in the process of being in the first detection mode;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold, and the first frequency threshold is greater than the second frequency threshold;
and the second switching module is used for switching from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold in the process of the second detection mode, wherein the second pressure threshold is greater than the first pressure threshold.
Optionally, the apparatus further comprises:
the first determining module is used for determining the software identifier to which the currently displayed interface belongs;
and the triggering module is used for triggering the first switching module to switch from the first detection mode to the second detection mode when a preset software identifier list comprises the software identifier.
Optionally, the apparatus further comprises:
the display module is used for displaying a function setting interface when a setting instruction is detected, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
a second determining module, configured to determine at least one software identifier from the plurality of software identifiers based on the function setting interface;
and the storage module is used for storing the at least one software identifier into a blank software identifier list so as to obtain the preset software identifier list.
According to a third aspect of the embodiments of the present disclosure, there is provided a device for detecting a pressure value, the device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of the method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon instructions which, when executed by a processor, implement the steps of the method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, in the process of being in the first detection mode, if the detected pressure value is smaller than the first pressure threshold and the duration that is smaller than the first pressure threshold is longer than the preset duration, at this time, it may be considered that no external force is pressed, and the first detection mode is switched to the second detection mode. In addition, since the higher the detection frequency is, the more accurate the detected pressure value is, after switching to the second detection mode, if the detected pressure value is greater than the second pressure threshold value, in order to detect the pressure value more accurately, the second detection mode may be switched to the first detection mode, and by switching the detection modes, the update of the pressure value may be detected in real time. Therefore, the detected pressure value is compared with the pressure threshold value, and the corresponding detection mode is switched according to the comparison result, so that the power consumption is reduced, and meanwhile, the accuracy of the detected pressure value can be ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flow chart illustrating a method of detecting a pressure value according to an exemplary embodiment.
Fig. 2A is a flow chart illustrating a method of detecting a pressure value according to another exemplary embodiment.
FIG. 2B is a schematic diagram illustrating the operation of a pressure sensor in accordance with an exemplary embodiment.
FIG. 2C is a schematic diagram illustrating a function setup interface in accordance with an exemplary embodiment.
FIG. 2D is a diagram illustrating a preset software list, according to an exemplary embodiment.
Fig. 3A is a block diagram illustrating a pressure value detection apparatus according to an exemplary embodiment.
Fig. 3B is a block diagram illustrating a pressure value detection apparatus according to another exemplary embodiment.
Fig. 3C is a block diagram illustrating a pressure value detection apparatus according to another exemplary embodiment.
Fig. 4 is a schematic structural diagram illustrating a pressure value detection apparatus 400 according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
For convenience of understanding, before explaining the embodiments of the present disclosure in detail, an application scenario of the embodiments of the present disclosure will be described.
In the embodiment of the present disclosure, a pressure sensor is generally installed in a terminal, and when an external force presses the pressure sensor installed in the terminal, a corresponding pressure value is generated, and a corresponding function can be implemented by performing corresponding operation processing on the detected pressure value.
For example, the detected pressure value can be applied to a fingerprint unlocking function, the fingerprint unlocking function refers to a function of recording and verifying and unlocking a coded lock by using fingerprint data, the terminal detects the pressure value through a pressure sensor, and when the detected pressure value is larger than a preset pressure threshold value and the detected fingerprint data is matched with fingerprint data recorded in advance, fingerprint unlocking is carried out.
For another example, the detected pressure value may be applied to a payment function, and in most of the current life scenes, the terminal may be used for payment, and a payment password needs to be input during payment, but a digital password or a graphic password is troublesome to input as a payment password, and the security is not high. Therefore, the pressure value can be detected through the pressure sensor installed in the terminal, and when the detected pressure value is larger than the preset pressure threshold value and the detected fingerprint data is matched with the fingerprint data recorded in advance, corresponding payment operation is carried out.
For another example, the detected pressure value may also be applied to a touch screen operation, most terminals support the touch screen operation at present, the pressure value on the screen is detected through a pressure sensor installed in the terminal, and when the detected pressure value is greater than a preset pressure threshold, a corresponding selection operation is performed.
In the related art, in order to accurately detect the pressure value and facilitate the terminal to perform corresponding operation processing in time, the pressure value may be detected in real time through an installed pressure sensor, or the pressure value may be detected through a first detection mode. However, when the terminal is not pressed by an external force, the pressure sensor is always in the first detection mode, increasing power consumption. In order to solve this problem, the embodiments of the present disclosure provide a method for detecting a pressure value. Next, a method for detecting a pressure value provided by an embodiment of the present disclosure will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for detecting a pressure value according to an exemplary embodiment, where the method is used in a terminal, such as a mobile phone, a tablet computer, a smart watch, and the like, as shown in fig. 1, and the method includes the following steps.
In step 101, in the process of being in the first detection mode, when the detected pressure value is smaller than the first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is greater than or equal to the preset duration, switching from the first detection mode to the second detection mode;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold value, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold value, and the first frequency threshold value is greater than the second frequency threshold value.
In step 102, during the second detection mode, when the detected pressure value is greater than a second pressure threshold value, the second detection mode is switched to the first detection mode, and the second pressure threshold value is greater than the first pressure threshold value.
In the embodiment of the disclosure, when a pressure sensor installed in a terminal is in a first detection mode, if a detected pressure value is smaller than a first pressure threshold and a duration time smaller than the first pressure threshold is greater than or equal to a preset time, it may be considered that no external force is pressed at this time, and the terminal is switched from the first detection mode to a second detection mode. In addition, since the higher the detection frequency is, the more accurate the detected pressure value is, after the pressure sensor installed in the terminal is switched to the second detection mode, if the detected pressure value is greater than the second pressure threshold value, for more accurate detection of the pressure value, the second detection mode may be switched to the first detection mode, and by switching the detection modes, the update of the pressure value may be detected in real time. Therefore, the detected pressure value is compared with the pressure threshold value, and the corresponding detection mode is switched according to the comparison result, so that the accuracy of detecting the pressure value can be ensured while the power consumption is reduced, and the power consumption and the performance of the terminal can be better matched.
Optionally, before switching from the first detection mode to the second detection mode, the method further includes:
determining a software identifier to which a currently displayed interface belongs;
and when the software identifier is included in the preset software identifier list, executing the step of switching from the first detection mode to the second detection mode.
Optionally, the method further comprises:
when a setting instruction is detected, displaying a function setting interface, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
determining at least one software identifier from a plurality of software identifiers based on the function setting interface;
and storing the at least one software identifier into a blank software identifier list to obtain a preset software identifier list.
Optionally, the second pressure threshold is smaller than a third pressure threshold, which refers to a pressure value that satisfies the operating process condition.
All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, and the embodiments of the present disclosure are not described in detail again.
Fig. 2A is a flow chart illustrating a method of detecting a pressure value according to an exemplary embodiment. The disclosed embodiment will be discussed in conjunction with fig. 2A for the embodiment shown in fig. 1. The method is used in the terminal and comprises the following steps.
In step 201, during the first detection mode, when the detected pressure value is smaller than the first pressure threshold and the duration of the pressure value smaller than the first pressure threshold is greater than or equal to the preset duration, the first detection mode is switched to the second detection mode.
It should be noted that the first detection mode is a mode in which the detection frequency of the pressure value is greater than a first frequency threshold, the second detection mode is a mode in which the detection frequency of the pressure value is less than a second frequency threshold, and the first frequency threshold is greater than the second frequency threshold. That is, the frequency of detecting the pressure value through the first detection mode is greater than the frequency of detecting the pressure value through the second detection module.
It should be further noted that the first pressure threshold may be a value set manually, and the switching operation of the corresponding detection mode is performed according to the comparison result by comparing the real-time detected pressure value with the first pressure threshold. Of course, in order to facilitate the detection of the pressure value, the first pressure threshold may also be greater than or equal to the pressure value on the pressure sensor in the terminal when no external force is pressed, for example, the pressure value on the pressure sensor installed in the terminal when no external force is pressed is set as th1, the first pressure threshold is set as th3, and then th3 may be greater than or equal to th 1.
In the process that the terminal is in the first detection mode, because the first detection mode is a mode in which the detection frequency of the pressure value is greater than the first frequency threshold, if no external force is applied to the terminal at the moment, and the pressure sensor installed in the terminal detects the pressure value in real time through the first detection mode, power consumption can be increased, and resources are wasted. And because the second detection mode is a mode in which the detection frequency of the pressure value is smaller than the second frequency threshold, and the first frequency threshold is larger than the second frequency threshold, the first detection mode can be switched to the second detection mode at this time, so that the detection frequency can be reduced, the power consumption can be reduced, and the utilization rate can be improved.
Referring to fig. 2B, the terminal may generally include an MCU (Micro Control Unit), a signal conditioning module, an analog-to-digital conversion module, and a processor. The signal conditioning module may be an amplifier, and the processor may be a Central Processing Unit (CPU). When the terminal detects a pressure value through the pressure sensor, the voltage signal on the pressure sensor may be detected through the MCU, the detected voltage signal is adjusted through the signal adjustment module, the adjusted voltage signal is output to the analog-to-digital conversion module, the analog-to-digital conversion module converts the input voltage signal to obtain a digital voltage signal, and then the digital voltage signal is sent to the processor, and the digital voltage signal is processed by the processor and then transmitted to an application program, an operating system, a driver, a wireless access point, and the like through an Inter-Integrated Circuit (IIC) to perform corresponding operations.
In the embodiment of the disclosure, when the terminal detects the pressure value through the first detection module, when the voltage signal in the digital form reported by the processor is detected, the voltage signal in the digital form is taken as the detected pressure value, and comparing the detected pressure value with the first pressure threshold value, if the detected pressure value is less than the first pressure threshold value, continuously detecting the pressure value in real time through the first detection module, and in the process of detecting the pressure values through the first detection mode, the time lengths of the detected pressure values which are all smaller than the first pressure threshold value can be counted, and the counted time length is taken as the sustained time length of the pressure value smaller than the first pressure threshold value, and comparing the duration with a preset duration, and if the duration is greater than or equal to the preset duration, switching from the first detection mode to the second detection mode.
For example, when the terminal is currently in the first detection mode, and the voltage signal XX detected on the pressure sensor is processed by the signal conditioning module and the analog-to-digital conversion module, the voltage signal XX is processed by the signal conditioning module and the analog-to-digital conversion module to obtain a digital voltage signal th5, that is, the detected pressure value is th5, the preset duration is 0.5 seconds assuming that the first pressure threshold is th3, and th5 and th3 are compared, and if th5 is smaller than th3, the duration is compared with the preset duration, assuming that the duration is 0.6 seconds, and the duration is greater than the preset duration by 0.5 seconds, so that the terminal can be switched from the first detection mode to the second detection mode.
When the terminal switches the detection modes by the method, as long as the terminal is in the first detection mode and the detected pressure value is smaller than the first pressure threshold and the duration of the pressure value smaller than the first pressure threshold is greater than or equal to the preset duration, the terminal can be switched from the first detection mode to the second detection mode. However, for some software, it may be necessary to acquire a more accurate pressure value, and the second detection mode has a lower detection frequency and a correspondingly lower detection accuracy, so that before switching from the first detection mode to the second detection mode, the software identifier to which the currently displayed interface belongs may also be determined, and when the preset software identifier list includes the software identifier, the step of switching from the first detection mode to the second detection mode is performed. When the preset software identifier list does not include the software identifier, the step of switching from the first detection mode to the second detection module is not executed, that is, the pressure value is continuously detected through the first detection mode.
Wherein, predetermine the software identification list and can leave the factory at the terminal and set up in advance, and of course, different users 'demand may also be different, consequently, in order to be applicable to different users' demand, predetermine the software identification list and also can be set up by the user, and concrete implementation process can be: when a setting instruction is detected, displaying a function setting interface, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, the software is an operating system or an application program, based on the function setting interface, determining at least one software identifier from the plurality of software identifiers, and storing the at least one software identifier into a blank software identifier list to obtain a preset software identifier list.
In one possible implementation manner, after the terminal displays the function setting interface, at least one software identifier can be selected by the user in the function setting interface. That is, the at least one software identification is determined by the user. Of course, in another possible implementation manner, the terminal may also determine, through the third-party system, a frequency at which each of the plurality of software identifiers is stored in the preset software identifier list, select at least one software identifier according to an order from high to low of the frequency, recommend the selected software identifier to the user, and determine, by the user, whether to store the at least one software identifier in the preset software identifier list.
The setting instruction is used for setting a software identifier capable of switching the detection mode of the pressure value, and the setting instruction can be triggered by a user through executing preset operation, wherein the preset operation can be click operation, sliding operation, voice operation and the like. In addition, the software identifier refers to an identifier that uniquely identifies an operating system or an application program, and the identifier may be a text identifier, a number identifier, a shape identifier, an icon, or the like.
For example, when the terminal detects the setting instruction, a function setting interface as shown in fig. 2C may be displayed, where the function setting interface includes 3 software identifiers, such as an operating system 1, an application program 1, and an application program 2. Assume that the user selects the operating system 1 and the application program 1 to be stored in the blank software list, and at this time, the obtained preset software list is as shown in fig. 2D.
After the terminal switches the detection mode of the pressure value from the first detection mode to the second detection mode, because the detection frequency of the second detection mode is low, the terminal is suitable for the condition that the pressure value is lower than the first pressure threshold value, if the pressure value is increased, the second detection mode may not detect the real-time change of the pressure value, so when the pressure value is increased to be larger than the second pressure threshold value, the terminal can also switch from the second detection mode to the first detection mode according to the following steps for more accurate detection of the pressure value.
In step 202, during the second detection mode, when the detected pressure value is greater than a second pressure threshold value, the second detection mode is switched to the first detection mode, and the second pressure threshold value is greater than the first pressure threshold value.
The second pressure threshold may be a value set manually, and the switching operation of the corresponding detection mode is performed according to the comparison result by comparing the real-time detected pressure value with the second pressure threshold. Of course, in order to ensure the accuracy of the detected pressure value, the second pressure threshold value may also be less than or equal to a third pressure threshold value, which refers to a pressure value that satisfies the operating process condition.
The third pressure threshold may be different for different operations, that is, when the pressure value is applied to a plurality of operation processes, at this time, a plurality of third pressure thresholds may be determined according to the plurality of operations, and for more accurate detection of the pressure value, the second pressure threshold may be set to be less than or equal to a minimum third pressure threshold among the plurality of third pressure thresholds. For example, the second pressure threshold is set to th4, the third pressure threshold is set to th2a in the fingerprint unlocking operation, the third pressure threshold is set to th2b in the payment operation, the third pressure threshold is set to th2c in the touch screen operation, and th2c is greater than th2b, and th2b is greater than th2a, where th4 may be set to be less than or equal to th2 a.
In the process that the terminal is in the second detection mode, the second detection mode refers to a mode that the detection frequency of the pressure value is smaller than the second frequency threshold value, that is, the detection frequency of the second detection mode is lower, if the pressure value on the terminal is increased at the moment, and the pressure sensor installed in the terminal detects the pressure value in real time through the second detection mode, some pressure values may not be detected, so that the pressure value cannot be accurately detected in real time. Since the first detection mode is a mode in which the detection frequency of the pressure value is greater than the first frequency threshold, and the first frequency threshold is greater than the second frequency threshold, that is, the detection frequency of the first detection mode is higher, at this time, the second detection mode can be switched to the first detection mode, so as to improve the detection frequency, and further improve the accuracy of detecting the pressure value.
In the embodiment of the disclosure, when the terminal detects a digital voltage signal reported by the processor during the process of detecting the pressure value through the second detection module, the digital voltage signal is used as the detected pressure value, the detected pressure value is compared with the second pressure threshold, and if the detected pressure value is greater than the second pressure threshold, the second detection mode is switched to the first detection mode.
For example, when the terminal is currently in the second detection mode and the voltage signal XX detected on the pressure sensor is processed by the signal conditioning module and the analog-to-digital conversion module, the voltage signal XX is processed to obtain a voltage signal th6 in a digital form, that is, the detected pressure value is th6, if the second pressure threshold is th4, th6 and th4 are compared, and if th6 is greater than th4, at this time, the terminal may be switched from the second detection mode to the first detection mode.
In the embodiment of the disclosure, when a pressure sensor installed in a terminal is in a first detection mode, if a detected pressure value is smaller than a first pressure threshold and a duration time smaller than the first pressure threshold is greater than or equal to a preset time, it may be considered that no external force is pressed at this time, and the terminal is switched from the first detection mode to a second detection mode. In addition, since the higher the detection frequency is, the more accurate the detected pressure value is, after the pressure sensor installed in the terminal is switched to the second detection mode, if the detected pressure value is greater than the second pressure threshold value, in order to detect the pressure value more accurately, the second detection mode may be switched to the first detection mode, and by switching the detection modes, the update of the pressure value may be detected in real time. Therefore, the detected pressure value is compared with the pressure threshold value, and the corresponding detection mode is switched according to the comparison result, so that the accuracy of detecting the pressure value can be ensured while the power consumption is reduced, and the power consumption and the performance of the terminal can be better matched.
After the method provided by the embodiment of the present disclosure is explained in detail by the embodiment shown in fig. 1 and fig. 2A, the apparatus provided by the embodiment of the present disclosure will be described.
Fig. 3A is a block diagram illustrating a pressure value detection apparatus according to an exemplary embodiment. Referring to fig. 3A, the apparatus includes a first switching module 101 and a second switching module 102.
The first switching module 101 is configured to, in the process of being in the first detection mode, switch from the first detection mode to the second detection mode when the detected pressure value is smaller than the first pressure threshold and the duration of the pressure value smaller than the first pressure threshold is greater than or equal to a preset duration;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold value, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold value, and the first frequency threshold value is greater than the second frequency threshold value;
the second switching module 102 is configured to switch from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold value during the second detection mode, where the second pressure threshold value is greater than the first pressure threshold value.
Optionally, referring to fig. 3B, the apparatus further comprises:
the first determining module 103 is configured to determine a software identifier to which a currently displayed interface belongs;
the triggering module 104 is configured to trigger the first switching module to switch from the first detection mode to the second detection mode when the preset software identifier list includes the software identifier.
Optionally, referring to fig. 3C, the apparatus further comprises:
the display module 105 is configured to display a function setting interface when a setting instruction is detected, where the function setting interface includes a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
a second determining module 106, configured to determine at least one software identifier from the plurality of software identifiers based on the function setting interface;
the storage module 107 is configured to store the at least one software identifier into a blank software identifier list to obtain a preset software identifier list.
In the embodiment of the disclosure, when a pressure sensor installed in a terminal is in a first detection mode, if a detected pressure value is smaller than a first pressure threshold and a duration time smaller than the first pressure threshold is greater than or equal to a preset time, it may be considered that no external force is pressed at this time, and the terminal is switched from the first detection mode to a second detection mode. In addition, since the higher the detection frequency is, the more accurate the detected pressure value is, after the pressure sensor installed in the terminal is switched to the second detection mode, if the detected pressure value is greater than the second pressure threshold value, in order to detect the pressure value more accurately, the second detection mode may be switched to the first detection mode, and by switching the detection modes, the update of the pressure value may be detected in real time. Therefore, the detected pressure value is compared with the pressure threshold value, and the corresponding detection mode is switched according to the comparison result, so that the accuracy of detecting the pressure value can be ensured while the power consumption is reduced, and the power consumption and the performance of the terminal can be better matched.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating a detection device 400 for pressure values according to an exemplary embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power supplies for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the methods provided by the embodiments illustrated in fig. 1 or fig. 2A and described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of pressure value detection, the method comprising:
in the process of being in the first detection mode, when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration, switching from the first detection mode to the second detection mode;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold value, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold value, and the first frequency threshold value is greater than the second frequency threshold value;
during the second detection mode, when the detected pressure value is greater than a second pressure threshold, the second detection mode is switched to the first detection mode, and the second pressure threshold is greater than the first pressure threshold.
Optionally, before switching from the first detection mode to the second detection mode, the method further includes:
determining a software identifier to which a currently displayed interface belongs;
and when the software identifier is included in the preset software identifier list, executing the step of switching from the first detection mode to the second detection mode.
Optionally, the method further comprises:
when a setting instruction is detected, displaying a function setting interface, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
determining at least one software identifier from a plurality of software identifiers based on the function setting interface;
and storing the at least one software identifier into a blank software identifier list to obtain a preset software identifier list.
Optionally, the second pressure threshold is smaller than a third pressure threshold, which refers to a pressure value that satisfies the operating process condition.
In the embodiment of the disclosure, when a pressure sensor installed in a terminal is in a first detection mode, if a detected pressure value is smaller than a first pressure threshold and a duration time smaller than the first pressure threshold is greater than or equal to a preset time, it may be considered that no external force is pressed at this time, and the terminal is switched from the first detection mode to a second detection mode. In addition, since the higher the detection frequency is, the more accurate the detected pressure value is, after the pressure sensor installed in the terminal is switched to the second detection mode, if the detected pressure value is greater than the second pressure threshold value, in order to detect the pressure value more accurately, the second detection mode may be switched to the first detection mode, and by switching the detection modes, the update of the pressure value may be detected in real time. Therefore, the detected pressure value is compared with the pressure threshold value, and the corresponding detection mode is switched according to the comparison result, so that the accuracy of detecting the pressure value can be ensured while the power consumption is reduced, and the power consumption and the performance of the terminal can be better matched.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (8)

1. A method for detecting a pressure value, the method comprising:
in the process of being in a first detection mode, when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration, determining a software identifier to which a currently displayed interface belongs; when a preset software identification list comprises the software identification, switching from the first detection mode to a second detection mode, wherein the software identification in the preset software identification list is determined by a third-party system according to the frequency of each software identification stored in the preset software identification list, and the software identification is determined by a user from at least one software identification recommended by the third-party system according to the sequence from high frequency to low frequency, and is an identification uniquely identifying one operating system or one application program;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold, and the first frequency threshold is greater than the second frequency threshold;
switching from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold while in the second detection mode, the second pressure threshold being greater than the first pressure threshold.
2. The method of claim 1, further comprising:
when a setting instruction is detected, displaying a function setting interface, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
determining at least one software identification from the plurality of software identifications based on the function setting interface;
and storing the at least one software identifier into a blank software identifier list to obtain the preset software identifier list.
3. The method of any of claims 1 or 2, wherein the second pressure threshold is less than a third pressure threshold, the third pressure threshold being a pressure value that satisfies an operational process condition.
4. A device for detecting a pressure value, the device comprising:
the device comprises a first switching module, a second switching module and a third switching module, wherein the first switching module is used for switching from a first detection mode to a second detection mode when the detected pressure value is smaller than a first pressure threshold value and the duration of the pressure value smaller than the first pressure threshold value is larger than or equal to a preset duration in the process of being in the first detection mode;
the first determining module is used for determining the software identifier to which the currently displayed interface belongs;
the trigger module is used for triggering the first switching module to switch from the first detection mode to the second detection mode when a preset software identification list comprises the software identification, the software identification in the preset software identification list is determined by a third-party system according to the frequency of each software identification stored in the preset software identification list, the software identification is determined by a user from at least one software identification recommended by the third-party system according to the sequence from high frequency to low frequency, and the software identification is an identification uniquely identifying one operating system or one application program;
the first detection mode refers to a mode that the detection frequency of the pressure value is greater than a first frequency threshold, the second detection mode refers to a mode that the detection frequency of the pressure value is less than a second frequency threshold, and the first frequency threshold is greater than the second frequency threshold;
and the second switching module is used for switching from the second detection mode to the first detection mode when the detected pressure value is greater than a second pressure threshold in the process of the second detection mode, wherein the second pressure threshold is greater than the first pressure threshold.
5. The apparatus of claim 4, further comprising:
the display module is used for displaying a function setting interface when a setting instruction is detected, wherein the function setting interface comprises a plurality of software identifiers, each software identifier corresponds to installed software, and the software is an operating system or an application program;
a second determining module, configured to determine at least one software identifier from the plurality of software identifiers based on the function setting interface;
and the storage module is used for storing the at least one software identifier into a blank software identifier list so as to obtain the preset software identifier list.
6. The apparatus of any of claims 4 or 5, wherein the second pressure threshold is less than a third pressure threshold, the third pressure threshold being a pressure value that satisfies an operational process condition.
7. A device for detecting a pressure value, the device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any of the methods of claims 1-3.
8. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of any of the methods of claims 1-3.
CN201710592294.5A 2017-07-19 2017-07-19 Pressure value detection method and device and computer readable storage medium Active CN107422911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710592294.5A CN107422911B (en) 2017-07-19 2017-07-19 Pressure value detection method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710592294.5A CN107422911B (en) 2017-07-19 2017-07-19 Pressure value detection method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107422911A CN107422911A (en) 2017-12-01
CN107422911B true CN107422911B (en) 2020-12-18

Family

ID=60430690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710592294.5A Active CN107422911B (en) 2017-07-19 2017-07-19 Pressure value detection method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107422911B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109901769B (en) 2017-12-07 2021-03-02 京东方科技集团股份有限公司 Feature recognition structure, manufacturing method, driving method and related device
CN113542478B (en) * 2021-07-16 2022-10-14 南昌黑鲨科技有限公司 Pressure-sensitive control protection system and method and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102890672A (en) * 2011-07-18 2013-01-23 汉王科技股份有限公司 Method and device for finding application program of mobile terminal
CN104038618A (en) * 2013-03-06 2014-09-10 联想(北京)有限公司 Access control method and electronic equipment
CN105468278A (en) * 2015-11-06 2016-04-06 网易(杭州)网络有限公司 Touch screen operation identification and response method and apparatus based on virtual key, and game manipulation method and apparatus
CN106406496A (en) * 2016-09-05 2017-02-15 芯海科技(深圳)股份有限公司 Low power consumption control method for pressure-sensitive key identification device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5345050B2 (en) * 2009-12-25 2013-11-20 株式会社ワコム Indicator, position detection device and position detection method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102890672A (en) * 2011-07-18 2013-01-23 汉王科技股份有限公司 Method and device for finding application program of mobile terminal
CN104038618A (en) * 2013-03-06 2014-09-10 联想(北京)有限公司 Access control method and electronic equipment
CN105468278A (en) * 2015-11-06 2016-04-06 网易(杭州)网络有限公司 Touch screen operation identification and response method and apparatus based on virtual key, and game manipulation method and apparatus
CN106406496A (en) * 2016-09-05 2017-02-15 芯海科技(深圳)股份有限公司 Low power consumption control method for pressure-sensitive key identification device

Also Published As

Publication number Publication date
CN107422911A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN106951884B (en) Fingerprint acquisition method and device and electronic equipment
EP3136793B1 (en) Method and apparatus for awakening electronic device
EP3133528A1 (en) Method and apparatus for fingerprint identification
EP3099063A1 (en) Video communication method and apparatus
CN107102772B (en) Touch control method and device
EP3046016A1 (en) Method and apparatus for switching display mode
EP3151117A1 (en) Method and device for delaying information broadcasting
CN106357934B (en) Screen locking control method and device
US20170123587A1 (en) Method and device for preventing accidental touch of terminal with touch screen
EP3076745B1 (en) Methods and apparatuses for controlling wireless access point
US10379602B2 (en) Method and device for switching environment picture
US11243660B2 (en) Method and device for displaying application, and storage medium
CN110262692B (en) Touch screen scanning method, device and medium
EP3361369B1 (en) Method and device for displaying time on mobile device
CN107885418B (en) Terminal, split screen display method and device
EP3136206A1 (en) Method and apparatus for setting threshold
CN108073328B (en) Touch response method and device
EP3249505A1 (en) Method and device for controlling state of touch screen, electronic device
CN104243829A (en) Self-shooting method and self-shooting device
CN109862169B (en) Electronic equipment control method, device and storage medium
CN108874450B (en) Method and device for waking up voice assistant
CN107422911B (en) Pressure value detection method and device and computer readable storage medium
CN106919302B (en) Operation control method and device of mobile terminal
CN105786561B (en) Method and device for calling process
CN108647074B (en) Method, device, hardware device and medium for displaying dynamic information in screen locking state

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant