CN107402711B - Volume adjusting method and device and computer readable storage medium - Google Patents
Volume adjusting method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN107402711B CN107402711B CN201710592646.7A CN201710592646A CN107402711B CN 107402711 B CN107402711 B CN 107402711B CN 201710592646 A CN201710592646 A CN 201710592646A CN 107402711 B CN107402711 B CN 107402711B
- Authority
- CN
- China
- Prior art keywords
- signal
- touch
- sensor
- touch signal
- volume
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/167—Audio in a user interface, e.g. using voice commands for navigating, audio feedback
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Position Input By Displaying (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure relates to a volume adjustment method, a volume adjustment device and a computer readable storage medium. The volume adjusting method comprises the following steps: acquiring a touch signal through a first sensor, and detecting whether the touch position of the touch signal is in a target area of the touch screen; acquiring an action type signal corresponding to the touch signal through a second sensor, and detecting whether the action type corresponding to the touch signal is a click type; determining that the touch position of the touch signal is in a target area of the touch screen, and determining that the touch signal is a volume adjusting signal when the action type corresponding to the touch signal is a click type; and adjusting the volume of the terminal according to the volume adjusting signal. According to the method, the situation of misoperation of a user can be eliminated by adding the detection step of preventing mistaken touch, the accuracy of volume adjustment is improved, the entity volume key can be replaced by touch operation, and the problem that the entity volume key is a hindrance to the design of an ultrathin terminal is solved.
Description
Technical Field
The present disclosure relates to the field of touch control, and in particular, to a volume adjustment method and apparatus, and a computer-readable storage medium.
Background
In the related art, two physical volume keys on the side of the terminal are the most common way of adjusting the volume on the terminal, wherein one physical volume key is used for increasing the volume of the terminal, and the other physical volume key is used for decreasing the volume of the terminal. However, since the ultra-thin mobile phone is a trend of the current mobile phone industry design, the physical volume key becomes one of the obstacles of the ultra-thin mobile phone.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a volume adjustment method, apparatus, and computer-readable storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a volume adjusting method applied to a terminal having a touch screen, the volume adjusting method including:
acquiring a touch signal through a first sensor, and detecting whether the touch position of the touch signal is in a target area of the touch screen;
acquiring an action type signal corresponding to the touch signal through a second sensor, and detecting whether the action type corresponding to the touch signal is a click type;
recording a first moment when a touch signal is acquired through the first sensor;
recording a second moment when the second sensor acquires the action type signal;
when the time difference between the first moment and the second moment is smaller than a first set threshold value, determining that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor;
determining that the touch position of the touch signal is in a target area of the touch screen, and determining that the touch signal is a volume adjusting signal when the action type corresponding to the touch signal is the click type;
and adjusting the volume of the terminal according to the volume adjusting signal.
Optionally, the determining that the touch signal is a volume adjustment signal includes:
recording and determining a third moment of a touch position of the touch signal in a target area of the touch screen;
recording a fourth moment when the action type corresponding to the touch signal is determined to be the click type;
and when the time difference between the third moment and the fourth moment is smaller than a second set threshold, determining that the touch signal is a volume adjusting signal.
Optionally, the acquiring, by the second sensor, an action type signal corresponding to the touch signal includes: acquiring an acceleration signal corresponding to the touch signal through an acceleration sensor;
the determining that the action type corresponding to the touch signal is a click type includes: and when the acceleration characteristic corresponding to the acceleration signal is determined to be matched with the acceleration characteristic corresponding to the clicking action, determining that the action type corresponding to the touch signal is the clicking type.
Optionally, the determining that the acceleration feature corresponding to the acceleration signal matches the acceleration feature corresponding to the clicking action includes:
determining that the waveform characteristics of the acceleration signal meet a preset condition, wherein the waveform characteristics at least comprise two of a wave peak value, a wave valley value, a change time from a starting point to a wave peak value and a time from the wave peak to a wave valley.
Optionally, the target area includes a first target area and a second target area, and adjusting the volume of the terminal according to the volume adjustment signal includes:
when the touch position is in the first target area, increasing the volume of the terminal;
and when the touch position is in the second target area, reducing the volume of the terminal.
According to a second aspect of the embodiments of the present disclosure, there is provided a volume adjusting device applied to a terminal having a touch screen, the volume adjusting device including:
the first detection module is configured to acquire a touch signal through a first sensor and detect whether a touch position of the touch signal is in a target area of the touch screen;
the second detection module is configured to acquire an action type signal corresponding to the touch signal through a second sensor and detect whether the action type corresponding to the touch signal is a click type;
the first determining module is configured to determine that the touch signal is a volume adjusting signal when the touch position of the touch signal is determined to be in the target area of the touch screen and the action type corresponding to the touch signal is the click type;
the adjusting module is configured to adjust the volume of the terminal according to the volume adjusting signal;
the first recording module is configured to record a first moment when the touch signal is acquired through the first sensor;
a second recording module configured to record a second time when the second sensor acquires the action type signal;
and the second determining module is configured to determine that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor when determining that the time difference between the first time and the second time is smaller than a first set threshold.
Optionally, the first determining module includes:
the first recording sub-module is configured to record a third moment when the touch position of the touch signal is determined to be in the target area of the touch screen;
the second recording submodule is configured to record a fourth moment when the action type corresponding to the touch signal is determined to be the click type;
the determining submodule is configured to determine that the touch signal is a volume adjusting signal when the time difference between the third time and the fourth time is smaller than a second set threshold.
Optionally, the second detection module is configured to acquire an acceleration signal corresponding to the touch signal through an acceleration sensor; the first determining module is configured to determine that the action type corresponding to the touch signal is the click type when determining that the acceleration characteristic corresponding to the acceleration signal matches the acceleration characteristic corresponding to the click action.
Optionally, the first determination module is configured to determine that a waveform characteristic of the acceleration signal satisfies a preset condition, the waveform characteristic including at least two of a peak value, a valley value, a change time of a start point to a peak value, and a peak to valley time.
Optionally, the target area comprises a first target area and a second target area; the adjustment module includes:
a first adjusting submodule configured to increase the terminal volume when the touch position is within the first target area;
a second adjustment submodule configured to decrease the terminal volume when the touch position is within the second target area.
According to a third aspect of the embodiments of the present disclosure, there is provided a volume adjusting device applied to a terminal having a touch screen, including:
a processor;
a memory for storing processor-executable instructions;
a touch screen;
wherein the processor is configured to:
acquiring a touch signal through a first sensor, and detecting whether the touch position of the touch signal is in a target area of the touch screen;
acquiring an action type signal corresponding to the touch signal through a second sensor, and detecting whether the action type corresponding to the touch signal is a click type;
recording a first moment when a touch signal is acquired through the first sensor;
recording a second moment when the second sensor acquires the action type signal;
when the time difference between the first moment and the second moment is smaller than a first set threshold value, determining that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor;
determining that the touch position of the touch signal is in a target area of the touch screen, and determining that the touch signal is a volume adjusting signal when the action type corresponding to the touch signal is the click type;
and adjusting the volume of the terminal according to the volume adjusting signal.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the volume adjustment method provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps that a target area is arranged on a terminal touch screen, in order to adjust the volume of a terminal, whether the touch position of a touch signal is in the target area or not is detected, and whether the touch operation corresponding to the touch signal is click operation or not is detected, so that the condition of misoperation of a user can be eliminated, the accuracy of volume adjustment is improved, the click operation of the target area is similar to the click of an entity volume key in the related technology, namely the entity volume key is replaced by the touch operation, and the problem that the entity volume key becomes the obstruction of the design of an ultrathin terminal is solved.
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 present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a volume adjustment method according to an exemplary embodiment.
Fig. 2 is an interface diagram of a terminal shown in accordance with an exemplary embodiment.
Fig. 3 is another flow chart illustrating a method of volume adjustment according to an example embodiment.
Fig. 4 is another flow chart illustrating a method of volume adjustment according to an example embodiment.
FIG. 5 is an x-axis data plot of acceleration sensor output when the terminal is at rest, according to an exemplary embodiment.
FIG. 6 is an x-axis data plot of acceleration sensor output when a terminal is clicked, according to an example embodiment.
Fig. 7 is a block diagram illustrating a volume adjustment device according to an exemplary embodiment.
Fig. 8 is another block diagram illustrating a volume adjustment device according to an exemplary embodiment.
Fig. 9 is a block diagram illustrating a first determination module of a volume adjustment device according to an example embodiment.
Fig. 10 is a block diagram illustrating an adjustment module of a volume adjustment device according to an exemplary embodiment.
Fig. 11 is a block diagram illustrating a volume adjustment device 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 implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a volume adjustment method according to an exemplary embodiment, where the volume adjustment method is applied to a terminal having a touch screen, as shown in fig. 1, and includes the following steps.
In step S11, a touch signal is obtained by a first sensor, and it is detected whether a touch position of the touch signal is within a target area of the touch screen.
In step S12, an action type signal corresponding to the touch signal is obtained through a second sensor, and it is detected whether the action type corresponding to the touch signal is a click type.
In step S13, when it is determined that the touch position of the touch signal is within the target area of the touch screen and the action type corresponding to the touch signal is the click type, it is determined that the touch signal is a volume adjustment signal.
In step S14, the volume of the terminal is adjusted according to the volume adjustment signal.
The terminal in the present disclosure may be a smartphone, a smart watch, a smart bracelet, a tablet computer, or the like. The terminal includes a touch screen, and in step S11, a first sensor acquires a touch signal and detects whether a touch position of the touch signal is within a target area of the touch screen. Wherein the first sensor may be a capacitive sensor; when a user touches the screen with a finger, the capacitance change value of the screen is obtained through the capacitance sensor, and then the generated touch signal can be obtained. The first sensor may be a pressure sensor; when a user touches the screen with a finger, the pressure change value of the screen is obtained through the capacitive sensor, and then the generated touch signal can be obtained.
And after the touch signal is acquired, detecting whether the touch position of the touch signal is in the target area of the touch screen. Taking a capacitive touch screen as an example, when a finger touches the screen, due to an electric field of a human body, a coupling capacitor is formed between a user and the surface of the touch screen, for a high-frequency current, the capacitor is a direct conductor, so that the finger draws a small current from a contact point, the current respectively flows out from electrodes on four corners of the touch screen, the current flowing through the four electrodes is in direct proportion to the distances from the finger to the four corners, a touch position of the touch point, namely an (x, y) coordinate, is obtained through accurate calculation of the proportion of the four currents, and whether the touch position is in the target area is determined according to the (x, y) coordinate.
As shown in fig. 1, the steps S12 and S11 have no sequential execution order, and after acquiring the touch signal, the steps S11 and S12 may be performed simultaneously. In step S12, the action type signal corresponding to the touch signal may be detected by a second sensor, for example, when the user clicks the terminal with a finger, a displacement, a speed, an acceleration, or a pressure applied to the touch screen of the terminal may change, and may be detected by the corresponding second sensor (e.g., a displacement sensor, a speed sensor, an acceleration sensor, or a pressure sensor). Since the user may consider the touch signal to be a volume adjustment signal due to a fact that the finger or a part of the skin of the human body is in the target area of the terminal due to a misoperation in the process of using the touch screen, for example, the finger slides into the target area when sliding on the touch screen, the disclosure may exclude the misoperation of the user by adding the step S12 of detecting whether the action type corresponding to the touch signal is a click type, thereby improving the accuracy of volume adjustment.
As shown in fig. 1, when the detection result of the step S11 is that the touch position is within the target area and the detection result of the step S12 is that the action type corresponding to the touch signal is the click type, the step S13 is executed to determine that the touch signal is a volume adjustment signal.
After determining that the touch signal is a volume adjustment signal, executing step S14, and adjusting the volume of the terminal according to the volume adjustment signal. When the touch position is detected not to be in the target area or the touch operation is not the click operation, no operation may be performed.
Optionally, the target area may include a first target area and a second target area, and the adjusting the volume of the terminal according to the volume adjustment signal may include: when the touch position is in the first target area, increasing the volume of the terminal; and when the touch position is in the second target area, reducing the volume of the terminal. When the touch position is in the first target area, the touch signal is a volume adjusting signal for increasing the volume in the terminal; and when the touch position is in the second target area, the touch signal is a volume adjusting signal for reducing the volume in the terminal.
For example, as shown in fig. 2, a first target area 211 and a second target area 212 are provided on the touch screen 21 of the terminal 20, where the first target area 211 represents a volume-up position and the second target area 212 represents a volume-down position. If the resolution of the display screen of the terminal 20 is 1440 × 2560, the top coordinate position of the first target area 211 is (1439, 220), and the bottom coordinate position is (1439, 370), the touch operation of the click type with the x coordinate of 1439 and the y coordinate ranging from 220 to 370 may be recognized as the volume adjustment signal for increasing the volume. Similarly, assuming that the top coordinate position of the second target area 212 is (1439, 480) and the bottom coordinate position is (1439, 630), the click-type touch operation with the x coordinate of 1439 and the y coordinate ranging from 480 to 630 can be recognized as the volume adjustment signal for reducing the volume.
Optionally, the degree of the volume adjustment signal for adjusting the volume of the terminal is directly proportional to the number of clicks of the clicking operation. For example, once the touch screen is clicked, the volume of the terminal is increased by one grid; and clicking the touch screen three times, and turning up the volume of the terminal for three grids.
According to the method, the target area is arranged on the terminal touch screen, in order to adjust the volume of the terminal, whether the touch position of the touch signal is in the target area or not is detected, and whether the action type corresponding to the touch signal is a click type or not is detected, so that the condition of misoperation of a user can be eliminated, the accuracy of volume adjustment is improved, the click operation of the target area is similar to the click of an entity volume key in the related technology, namely the entity volume key is replaced by the touch operation, and the problem that the entity volume key becomes the obstruction of the design of an ultrathin terminal is solved.
Fig. 3 is another flow chart illustrating a method of volume adjustment according to an example embodiment. As shown in fig. 3, the volume adjusting method is applied to a terminal having a touch screen and may include the following steps.
In step S31, a touch signal is obtained by a first sensor, and it is detected whether a touch position of the touch signal is within a target area of the touch screen.
In step S32, an action type signal corresponding to the touch signal is obtained through a second sensor, and it is detected whether the action type corresponding to the touch signal is a click type.
In step S33, a first time when a touch signal is acquired by the first sensor is recorded.
In step S34, a second time at which the second sensor acquires the motion type signal is recorded.
In step S35, when it is determined that the time difference between the first time and the second time is smaller than the first set threshold, it is determined that the motion type signal acquired by the second sensor is the motion type signal corresponding to the touch signal acquired by the first sensor.
In step S36, when it is determined that the touch position of the touch signal is within the target area of the touch screen and the action type corresponding to the touch signal is the click type, it is determined that the touch signal is a volume adjustment signal.
In step S37, the volume of the terminal is adjusted according to the volume adjustment signal.
Since the acquisition of the touch signal and the acquisition of the motion type signal are performed by two different sensors, in order to avoid the problem that the time of events reported by the two sensors (where the first sensor reports the acquired touch signal and the second sensor reports the acquired motion type signal) is inconsistent and the problem that the motion type signal acquired by the second sensor does not correspond to the touch signal acquired by the first sensor, a first time window is set, the width of the first time window is the first set threshold, and the first set threshold may be 10ms or 8ms, which is not limited in this disclosure.
When the first sensor acquires a touch signal, recording the touch signal as a first moment; when the second sensor acquires the action type signal, recording the action type signal as a second moment; and if the time difference between the first time and the second time is within a first time window (namely, smaller than the first set threshold), determining that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor. When the time difference between the first time and the second time is not within the first time window (i.e. is greater than the first set threshold), the adjustment signal may be considered to be invalid, and is a faulty action, and may not be operated.
By recording the first moment when the touch signal is acquired by the first sensor and the second moment when the action type signal is acquired by the second sensor, when the time difference between the two moments is detected to be smaller than a first set threshold value, the action type signal acquired by the second sensor can be determined to be the action type signal corresponding to the touch signal acquired by the first sensor, so that the accuracy of volume adjustment is further improved, and the situation that the volume of the terminal is adjusted by a user due to misoperation is avoided.
Fig. 4 is another flow chart illustrating a method of volume adjustment according to an example embodiment. As shown in fig. 4, the volume adjusting method is applied to a terminal having a touch screen, and may include the following steps.
In step S41, a touch signal is obtained by a first sensor, and it is detected whether a touch position of the touch signal is within a target area of the touch screen.
In step S42, an action type signal corresponding to the touch signal is obtained through a second sensor, and it is detected whether the action type corresponding to the touch signal is a click type.
In step S43, a third time when the touch position of the touch signal is determined to be within the target area of the touch screen is recorded.
In step S44, a fourth time when the action type corresponding to the touch signal is determined to be the click type is recorded.
In step S45, when it is determined that the time difference between the third time and the fourth time is smaller than a second set threshold, it is determined that the touch signal is a volume adjustment signal.
In step S46, the volume of the terminal is adjusted according to the volume adjustment signal.
Although the detection of whether the touch position is in the target area and the detection of whether the action type corresponding to the touch signal is the click type are both completed in the framework layer, the two detections are correspondingly performed by two different CPUs, in order to avoid the problem that the times of two CPUs reporting events (one of which reports that the touch position is in the target area and the other reports that the action type corresponding to the touch signal is the click type) are inconsistent, a second time window is set, the width of the second time window is the second set threshold, and the second set threshold may be 20ms or 15ms, for which, the disclosure is not particularly limited.
When one CPU detects that the touch position is in the target area, recording as a third moment; when the other CPU detects that the action type corresponding to the touch signal is the fourth moment of the click type, recording the action type as the fourth moment; and if the time difference between the third moment and the fourth moment is within a second time window (namely, less than a second set threshold), the touch signal is a volume adjusting signal, and the volume of the terminal is adjusted according to the volume adjusting signal. When the time difference between the third time and the fourth time is not within a second time window (i.e. greater than a second set threshold), the adjustment signal may be considered to be invalid, and is a behavior of misoperation, and may not be operated.
And when the time difference is detected to be smaller than a second set threshold, the volume of the terminal is adjusted according to the volume adjusting signal, so that the accuracy of volume adjustment is further improved, and the situation that the volume of the terminal is adjusted due to misoperation of a user is avoided.
The method comprises the steps that a user clicks a target area of a touch screen and the user mistakenly operates the target area of the touch screen, so that the accelerated speed generated by a terminal is obviously different, for example, the terminal slides into the target area of the touch screen when sliding on the touch screen, and the accelerated speed generated by the terminal is obviously smaller than the accelerated speed generated by clicking the touch screen, and therefore, whether the touch operation is the click operation can be confirmed by detecting the accelerated speed of the terminal.
Optionally, the terminal is provided with an acceleration sensor, and the obtaining of the action type signal corresponding to the touch signal by the second sensor includes: acquiring an acceleration signal corresponding to the touch signal through an acceleration sensor; the determining that the action type corresponding to the touch signal is a click type includes: and when the acceleration characteristic corresponding to the acceleration signal is determined to be matched with the acceleration characteristic corresponding to the clicking action, determining that the action type corresponding to the touch signal is the clicking type.
Since the operation type corresponding to the acceleration signal needs to be determined according to the waveform characteristics of the signal, the fourth time in step S44 in fig. 4 may be later than the third time in step S43.
Wherein the determining that the acceleration feature corresponding to the acceleration signal matches the acceleration feature corresponding to the clicking action comprises: determining that the waveform characteristics of the acceleration signal meet a preset condition, wherein the waveform characteristics at least comprise two of a wave peak value, a wave valley value, a change time from a starting point to a wave peak value and a time from the wave peak to a wave valley. The preset condition may be that at least two of a peak value, a valley value, a change time from a starting point to the peak value, and a time from the peak value to the valley are within a corresponding preset value range, for example, the peak value of the acceleration signal is greater than a first preset value, the valley value of the acceleration signal is greater than a second preset value, the change time from the starting point to the peak value of the acceleration signal is less than a third preset value, and the time from the peak value to the valley of the acceleration signal is less than a fourth preset value.
The acceleration sensor can detect acceleration signals in three different directions of an x axis, a y axis and a z axis, the present disclosure can detect whether an acceleration feature corresponding to the acceleration signal of the terminal in one direction of the three different directions of the x axis, the y axis and the z axis matches with an acceleration feature corresponding to a click action through the acceleration sensor, and when the acceleration sensor detects that the acceleration feature corresponding to the acceleration signal of the terminal in one direction matches with the acceleration feature corresponding to the click action, the action type corresponding to the touch signal is a click type.
Optionally, when it is detected by the acceleration sensor that an acceleration feature corresponding to an acceleration signal of the terminal in the x-axis direction matches an acceleration feature corresponding to a click action, the action type corresponding to the touch signal is a click type. Referring to fig. 5 and 6, fig. 5 is a graph illustrating x-axis data output by an acceleration sensor when a terminal is at rest according to an exemplary embodiment, and fig. 6 is a graph illustrating x-axis data output by an acceleration sensor when a terminal is clicked according to an exemplary embodiment. In fig. 5 and 6, the abscissa is time in units of ms; the ordinate is the displacement in the x-axis direction in mm.
As shown in fig. 5, when the terminal is held stationary, the x-axis data of the acceleration sensor is substantially 0. Fig. 6 is x-axis data output by the acceleration sensor when the user double-clicks the touch screen. As shown in FIG. 6, it can be seen that a single click corresponds to a regular waveform, with the peaks of the two waveforms in FIG. 6 being around 2mm and the troughs being around-3 mm. Namely, the terminal is clicked to enable the acceleration signal generated by the terminal to be greatly different from the static state of the terminal, so that whether the acceleration characteristic corresponding to the acceleration signal of the terminal is matched with the acceleration characteristic corresponding to the click action or not can be detected through the acceleration sensor, and the action type corresponding to the touch signal is confirmed to be the click type.
For example, whether the wave peak value of the acceleration signal in the x-axis direction is greater than 1.5mm, whether the wave trough value of the acceleration signal is greater than 2mm, whether the change time from the start point of the acceleration signal to the wave peak value (i.e., the time from the x-axis to the wave peak) is less than 5ms, and whether the time from the wave peak of the acceleration signal to the wave trough of the acceleration signal is less than 3ms may be detected to confirm that the action type corresponding to the touch signal is the click type. Assuming that a wave peak value of the acceleration signal in the x-axis direction is greater than 1.5mm, a wave trough value is greater than 2mm, a change time from a starting point to a wave peak value (i.e., a time from the x-axis to the wave peak) is less than 5ms, and a time from the wave peak to the wave trough is less than 3ms, it may be determined that the action type corresponding to the touch signal is a click type.
Whether the action type corresponding to the touch signal is the click type or not is determined by detecting whether the acceleration characteristic corresponding to the acceleration signal of the terminal is matched with the acceleration characteristic corresponding to the click action, so that the condition of misoperation of a user can be eliminated, and the accuracy of volume adjustment is improved; and when the touch position is in the target area and the acceleration characteristic corresponding to the acceleration signal of the terminal is matched with the acceleration characteristic corresponding to the clicking action, adjusting the volume of the terminal according to the volume adjusting signal so as to replace the volume adjustment of the entity volume key to the terminal.
Fig. 7 is a block diagram illustrating a volume adjustment device according to an exemplary embodiment. Referring to fig. 7, the volume adjusting apparatus 700 is applied to a terminal having a touch screen, and the volume adjusting apparatus 700 includes a first detecting module 710, a second detecting module 720, a first determining module 730, and an adjusting module 740.
The first detection module 710 is configured to acquire a touch signal through a first sensor, and detect whether a touch position of the touch signal is within a target area of the touch screen.
The second detecting module 720 is configured to acquire an action type signal corresponding to the touch signal through a second sensor, and detect whether the action type corresponding to the touch signal is a click type.
The first determining module 730 is configured to determine that the touch signal is a volume adjustment signal when the touch position of the touch signal is determined to be in the target area of the touch screen and the action type corresponding to the touch signal is the click type.
The adjusting module 740 is configured to adjust the volume of the terminal according to the volume adjusting signal.
Optionally, as shown in fig. 8, the volume adjusting apparatus 700 may further include:
a first recording module 750 configured to record a first time when a touch signal is acquired by the first sensor;
a second recording module 760 configured to record a second time when the second sensor acquires the action type signal;
the second determining module 770 is configured to determine that the motion type signal acquired by the second sensor is the motion type signal corresponding to the touch signal acquired by the first sensor when it is determined that the time difference between the first time and the second time is smaller than a first set threshold.
Optionally, as shown in fig. 9, the first determining module 730 may include:
a first recording sub-module 731 configured to record a third time when the touch position of the touch signal is determined to be within the target area of the touch screen;
the second recording sub-module 732 is configured to record a fourth time when the action type corresponding to the touch signal is determined to be the click type;
the determining sub-module 733, configured to determine that the touch signal is a volume adjustment signal when it is determined that a time difference between the third time and the fourth time is smaller than a second set threshold.
Optionally, the second detecting module 720 is configured to obtain an acceleration signal corresponding to the touch signal through an acceleration sensor; the first determining module 730 is configured to determine that the action type corresponding to the touch signal is the click type when determining that the acceleration characteristic corresponding to the acceleration signal matches the acceleration characteristic corresponding to the click action.
Optionally, the first determining module 730 is configured to determine that the waveform characteristics of the acceleration signal satisfy a preset condition, the waveform characteristics at least including two of a peak value, a valley value, a change time from a start point to a peak value, and a peak-to-valley time.
Optionally, as shown in fig. 10, the target area includes a first target area and a second target area, and the adjusting module 740 includes:
a first adjusting sub-module 741 configured to increase the terminal volume when the touch position is within the first target area;
a second adjusting submodule 742 configured to decrease the terminal volume when the touch position is within the second target area.
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.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the volume adjustment method provided by the present disclosure.
Fig. 11 is a block diagram illustrating a device 800 for volume adjustment according to an exemplary embodiment. For example, the apparatus 800 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. 11, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the volume adjustment method described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 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.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a 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 808 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 device 800 is in an operating mode, such as a shooting 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 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 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 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 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 assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 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 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 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 800 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 volume adjustment method described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the volume adjustment method described above 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.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure 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 present disclosure is limited only by the appended claims.
Claims (12)
1. A volume adjusting method is applied to a terminal with a touch screen, and is characterized by comprising the following steps:
acquiring a touch signal through a first sensor, and detecting whether the touch position of the touch signal is in a target area of the touch screen;
acquiring an action type signal corresponding to the touch signal through a second sensor, and detecting whether the action type corresponding to the touch signal is a click type;
recording a first moment when a touch signal is acquired through the first sensor;
recording a second moment when the second sensor acquires the action type signal;
when the time difference between the first moment and the second moment is smaller than a first set threshold value, determining that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor;
determining that the touch position of the touch signal is in a target area of the touch screen, and determining that the touch signal is a volume adjusting signal when the action type corresponding to the touch signal is the click type;
and adjusting the volume of the terminal according to the volume adjusting signal.
2. The method of claim 1, wherein the determining that the touch signal is a volume adjustment signal comprises:
recording and determining a third moment of a touch position of the touch signal in a target area of the touch screen;
recording a fourth moment when the action type corresponding to the touch signal is determined to be the click type;
and when the time difference between the third moment and the fourth moment is smaller than a second set threshold, determining that the touch signal is a volume adjusting signal.
3. The method according to claim 1, wherein the obtaining, by the second sensor, the action type signal corresponding to the touch signal includes: acquiring an acceleration signal corresponding to the touch signal through an acceleration sensor;
the determining that the action type corresponding to the touch signal is a click type includes: and when the acceleration characteristic corresponding to the acceleration signal is determined to be matched with the acceleration characteristic corresponding to the clicking action, determining that the action type corresponding to the touch signal is the clicking type.
4. The method of claim 3, wherein determining that the acceleration signature corresponding to the acceleration signal matches the acceleration signature corresponding to the clicking action comprises:
determining that the waveform characteristics of the acceleration signal meet a preset condition, wherein the waveform characteristics at least comprise two of a wave peak value, a wave valley value, a change time from a starting point to a wave peak value and a time from the wave peak to a wave valley.
5. The method according to any one of claims 1-4, wherein the target area comprises a first target area and a second target area, and wherein adjusting the volume of the terminal according to the volume adjustment signal comprises:
when the touch position is in the first target area, increasing the volume of the terminal;
and when the touch position is in the second target area, reducing the volume of the terminal.
6. A volume adjustment device is applied to a terminal with a touch screen, and is characterized by comprising:
the first detection module is configured to acquire a touch signal through a first sensor and detect whether a touch position of the touch signal is in a target area of the touch screen;
the second detection module is configured to acquire an action type signal corresponding to the touch signal through a second sensor and detect whether the action type corresponding to the touch signal is a click type;
the first determining module is configured to determine that the touch signal is a volume adjusting signal when the touch position of the touch signal is determined to be in the target area of the touch screen and the action type corresponding to the touch signal is the click type;
the adjusting module is configured to adjust the volume of the terminal according to the volume adjusting signal;
the first recording module is configured to record a first moment when the touch signal is acquired through the first sensor;
a second recording module configured to record a second time when the second sensor acquires the action type signal;
and the second determining module is configured to determine that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor when determining that the time difference between the first time and the second time is smaller than a first set threshold.
7. The apparatus of claim 6, wherein the first determining module comprises:
the first recording sub-module is configured to record a third moment when the touch position of the touch signal is determined to be in the target area of the touch screen;
the second recording submodule is configured to record a fourth moment when the action type corresponding to the touch signal is determined to be the click type;
the determining submodule is configured to determine that the touch signal is a volume adjusting signal when the time difference between the third time and the fourth time is smaller than a second set threshold.
8. The apparatus according to claim 6, wherein the second detection module is configured to acquire an acceleration signal corresponding to the touch signal through an acceleration sensor; the first determining module is configured to determine that the action type corresponding to the touch signal is the click type when determining that the acceleration characteristic corresponding to the acceleration signal matches the acceleration characteristic corresponding to the click action.
9. The apparatus of claim 8, wherein the first determining module is configured to determine that a waveform characteristic of the acceleration signal satisfies a preset condition, the waveform characteristic comprising at least two of a peak value, a valley value, a time of change from an origin to a peak value, and a time from a peak to a valley.
10. The apparatus of any of claims 6-9, wherein the target region comprises a first target region and a second target region; the adjustment module includes:
a first adjusting submodule configured to increase the terminal volume when the touch position is within the first target area;
a second adjustment submodule configured to decrease the terminal volume when the touch position is within the second target area.
11. A volume adjusting device is applied to a terminal with a touch screen, and comprises:
a processor;
a memory for storing processor-executable instructions;
a touch screen;
wherein the processor is configured to:
acquiring a touch signal through a first sensor, and detecting whether the touch position of the touch signal is in a target area of the touch screen;
acquiring an action type signal corresponding to the touch signal through a second sensor, and detecting whether the action type corresponding to the touch signal is a click type;
recording a first moment when a touch signal is acquired through the first sensor;
recording a second moment when the second sensor acquires the action type signal;
when the time difference between the first moment and the second moment is smaller than a first set threshold value, determining that the action type signal acquired by the second sensor is the action type signal corresponding to the touch signal acquired by the first sensor;
determining that the touch position of the touch signal is in a target area of the touch screen, and determining that the touch signal is a volume adjusting signal when the action type corresponding to the touch signal is the click type;
and adjusting the volume of the terminal according to the volume adjusting signal.
12. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the volume adjustment method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710592646.7A CN107402711B (en) | 2017-07-19 | 2017-07-19 | Volume adjusting method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710592646.7A CN107402711B (en) | 2017-07-19 | 2017-07-19 | Volume adjusting method and device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107402711A CN107402711A (en) | 2017-11-28 |
CN107402711B true CN107402711B (en) | 2020-03-03 |
Family
ID=60401004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710592646.7A Active CN107402711B (en) | 2017-07-19 | 2017-07-19 | Volume adjusting method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107402711B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107958273B (en) * | 2017-12-15 | 2021-08-03 | 北京小米移动软件有限公司 | Volume adjusting method and device and storage medium |
CN108683812B (en) * | 2018-05-14 | 2020-09-22 | Oppo(重庆)智能科技有限公司 | Volume adjusting method and device and mobile terminal |
CN108762715B (en) * | 2018-06-21 | 2021-04-02 | Oppo广东移动通信有限公司 | Electronic equipment sound control method, device and equipment |
CN111459447B (en) * | 2020-03-31 | 2023-05-19 | 维沃移动通信有限公司 | Volume adjustment display method and electronic equipment |
CN113126835A (en) * | 2021-04-30 | 2021-07-16 | 北京钛方科技有限责任公司 | Detection method, touch device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281376A (en) * | 2013-07-04 | 2015-01-14 | 福建省辉锐材料科技有限公司 | Control method and system of mobile terminal |
CN105739895A (en) * | 2015-03-26 | 2016-07-06 | 努比亚技术有限公司 | Mobile terminal and touch operation method therefor |
CN105843474A (en) * | 2016-03-23 | 2016-08-10 | 努比亚技术有限公司 | Volume adjustment system and method |
CN105867766A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Sound volume adjustment method and terminal |
CN106775329A (en) * | 2016-12-30 | 2017-05-31 | 北京小米移动软件有限公司 | Trigger method and device, the electronic equipment of click event |
-
2017
- 2017-07-19 CN CN201710592646.7A patent/CN107402711B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281376A (en) * | 2013-07-04 | 2015-01-14 | 福建省辉锐材料科技有限公司 | Control method and system of mobile terminal |
CN105739895A (en) * | 2015-03-26 | 2016-07-06 | 努比亚技术有限公司 | Mobile terminal and touch operation method therefor |
CN105843474A (en) * | 2016-03-23 | 2016-08-10 | 努比亚技术有限公司 | Volume adjustment system and method |
CN105867766A (en) * | 2016-03-28 | 2016-08-17 | 乐视控股(北京)有限公司 | Sound volume adjustment method and terminal |
CN106775329A (en) * | 2016-12-30 | 2017-05-31 | 北京小米移动软件有限公司 | Trigger method and device, the electronic equipment of click event |
Also Published As
Publication number | Publication date |
---|---|
CN107402711A (en) | 2017-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107402711B (en) | Volume adjusting method and device and computer readable storage medium | |
CN105446646B (en) | Content input method, device and touch control device based on dummy keyboard | |
CN106484284B (en) | Method and device for switching single-hand mode | |
RU2677360C1 (en) | Method and device for recognition of gestures | |
CN107102772B (en) | Touch control method and device | |
CN106873834B (en) | Method and device for identifying triggering of key and mobile terminal | |
CN107390932B (en) | Edge false touch prevention method and device and computer readable storage medium | |
JP6431911B2 (en) | Method and apparatus for setting a threshold | |
CN112905103B (en) | False touch processing method and device and storage medium | |
EP3232301A1 (en) | Mobile terminal and virtual key processing method | |
CN112905136A (en) | Screen projection control method and device and storage medium | |
CN106775210B (en) | Wallpaper changing method and device | |
CN107402677B (en) | Method and device for recognizing finger lifting in touch operation and terminal | |
CN106990893B (en) | Touch screen operation processing method and device | |
CN115756198A (en) | Wet hand touch identification method and device, electronic equipment and medium | |
CN107203315B (en) | Click event processing method and device and terminal | |
CN116204073A (en) | Touch control method, touch control device, electronic equipment and storage medium | |
CN108804009B (en) | Gesture recognition method and device | |
CN108762554A (en) | touch event response method and device | |
CN114296587A (en) | Cursor control method and device, electronic equipment and storage medium | |
CN112363647A (en) | Touch operation method and device and storage medium | |
CN111736718A (en) | Touch screen control method and device | |
CN108334762B (en) | Terminal unlocking method and device | |
CN106843691B (en) | Operation control method and device of mobile terminal | |
CN112445363A (en) | Electronic device, control method and device for electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |