Disclosure of Invention
The invention aims at solving the technical problems of the prior art and provides a mobile terminal touch screen track unlocking processing method, a device, a terminal device and a storage medium.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a mobile terminal touch screen track unlocking processing method comprises the following steps:
acquiring a touch track detected by a touch screen of a mobile terminal;
judging whether the acquired touch track is a single-line track or not;
when the touch track is a single-line track, acquiring the number of high points in the single-line touch track;
and controlling the unlocking of the mobile terminal when the number of the high points in the single-line touch track is equal to the preset number of the high points for unlocking.
The method for unlocking the track of the touch screen of the mobile terminal comprises the following steps of:
the number of high points for unlocking the mobile terminal is preset.
The method for unlocking the track of the touch screen of the mobile terminal, wherein the step of acquiring the touch track detected by the touch screen of the mobile terminal comprises the following steps:
when the touch screen detects that the touch screen is touched, starting to record coordinates of the touch points in time sequence;
and when the touch screen detects release, finishing recording to acquire the touch track detected by the touch screen of the mobile terminal.
The step of judging whether the acquired touch track is a single-line track or not comprises the following steps of:
judging whether the same time point contains two touch points or not in all the touch points recorded in the acquired touch track;
when the same time point contains two touch points, judging that the acquired touch track is not a single-line track;
when the condition that the same time point contains two touch points does not exist, the acquired touch track is judged to be a single-line track.
According to the mobile terminal touch screen track unlocking processing method, when the touch track is a single-line track, the step of obtaining the number of high points in the single-line touch track comprises the following steps:
and when the touch track is a single-line track, acquiring the number of high points bent to the same direction in the single-line touch track.
According to the mobile terminal touch screen track unlocking processing method, when the number of high points in the single-line touch track is equal to the number of preset high points for unlocking, the step of controlling the unlocking mobile terminal comprises the following steps:
comparing the number of high points in the current single-line touch track with the number of preset high points for unlocking;
and judging whether the number of the high points in the current single-line touch track is equal to the number of the preset high points for unlocking, and if so, controlling the unlocking of the mobile terminal.
The method for unlocking the track of the touch screen of the mobile terminal, wherein the step of judging whether the number of the high points in the current single-line touch track is equal to the preset number of the high points for unlocking comprises the following steps:
the current single-line touch track to be judged comprises N touch points, and the coordinates of the touch points of the current single-line touch track to be judged are as follows in time sequence: y1, Y2, … …, Y N;
wherein the recording time of the touch points arranged in front is earlier than that of the touch points arranged in back;
performing filtering treatment on the current single-line touch track to be judged for a plurality of times until the number of high points before and after the filtering treatment is the same;
and judging whether the number of the high points of the current single-line touch track is the same as the preset number of the high points.
A mobile terminal touch screen track unlocking processing device, wherein the device comprises:
the track acquisition module is used for acquiring a touch track detected by the touch screen of the mobile terminal;
the judging module is used for judging whether the acquired touch track is a single-line track or not;
the high point acquisition module is used for acquiring the number of high points in the single-line touch track when the touch track is the single-line track;
and the unlocking control module is used for controlling the unlocking of the mobile terminal when the number of the high points in the single-line touch track is equal to the preset number of the high points used for unlocking.
The terminal equipment comprises a memory, a processor and a mobile terminal touch screen track unlocking processing program which is stored in the memory and can run on the processor, wherein the processor realizes the steps of any mobile terminal touch screen track unlocking processing method when executing the mobile terminal touch screen track unlocking processing program.
A computer readable storage medium, wherein a mobile terminal touch screen track unlocking processing program is stored thereon, and when the mobile terminal touch screen track unlocking processing program is executed by a processor, the steps of the mobile terminal touch screen track unlocking processing method are implemented.
The beneficial effects are that: compared with the prior art, the invention provides a track unlocking processing method for a mobile terminal touch screen, which comprises the steps of acquiring a touch track detected by the mobile terminal touch screen in advance; and judging whether the track is a single-line track or not, if so, acquiring coordinates of a touch point on the track, and then performing corresponding processing to judge whether unlocking is successful or not. After the unlocking is completed, the unlocking track path is not unique, so that the unlocking mode is more flexible, and the user can operate and use conveniently, thereby greatly enriching the choice of unlocking when one track is drawn through the touch screen, improving the user experience, providing convenience for the user and providing convenience for the user.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and more specific, the present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear … …) are included in the embodiments of the present invention, the directional indications are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Today in technology assisted life, people and various terminal devices such as photocopies have been surrounded in life by devices such as mobile phones, tablets, computers, televisions. Terminal devices have slowly penetrated into corners of people's lives.
With the development of technology and the continuous improvement of living standard of people, various mobile terminals such as mobile phones are becoming more and more popular, and mobile phones have become an indispensable communication tool in people's life. More and more functions of mobile phones exist, and most mobile phones now have a touch screen function.
Touch screens are widely used input devices for mobile terminals, and when a user touches the touch screen, touch coordinate points need to be sent to a central processing unit, or the central processing unit needs to read the touch coordinate points from the touch screen, and then acquire tracks for operation.
With the rapid development of mobile terminal technology, the screen of the mobile terminal is larger and larger at present, generally occupies a plane of the mobile terminal, and the touch screen is also arranged on the plane at the same time, so that the input area of the touch screen is very large, the touch screen is largely used on the mobile terminal, particularly, the touch screen is almost used as a main input device of the intelligent mobile terminal at present, and therefore, the unlocking of the intelligent mobile terminal is almost based on the unlocking of the touch screen. In the prior art, the most common unlocking modes of a touch screen of a mobile terminal are sliding unlocking, password unlocking, pattern drawing and unlocking and the like. After the conventional unlocking method with more uses is set, the unlocking touch track path is limited, the unlocking mode is inflexible, and the user is inconvenient to use sometimes.
In order to solve the problems in the prior art, the present embodiment provides a method for unlocking a track of a touch screen of a mobile terminal, by which a touch track detected by the touch screen of the mobile terminal is obtained; judging whether the acquired touch track is a single-line track or not; when the touch track is a single-line track, acquiring the number of high points in the single-line touch track; and controlling the unlocking of the mobile terminal when the number of the high points in the single-line touch track is equal to the preset number of the high points for unlocking. After the unlocking is set, the path of the unlocking track is not unique, and the unlocking mode is flexible, so that the choice of unlocking when one track is drawn through the touch screen is greatly enriched, the user experience is improved, and convenience is provided for the user.
For example, a user can set 4 high points on a mobile terminal mobile phone for unlocking the mobile terminal mobile phone, so that when the user wants to unlock the mobile terminal, the user can directly control the mobile terminal to unlock by drawing a single-line track touch line with 4 high points (also called vertexes) on a touch screen.
Exemplary method
The method for unlocking the track of the mobile terminal touch screen of the embodiment can be applied to terminal equipment, and specifically as shown in fig. 1, the method for unlocking the track of the mobile terminal touch screen comprises the following steps:
step S100, a touch track detected by a touch screen of a mobile terminal is obtained;
in the embodiment of the invention, the mobile terminal mobile phone is taken as an example for describing the invention in detail, when the mobile terminal mobile phone is required to be unlocked, a user operates and draws an unlocking graph on the mobile terminal mobile phone touch screen.
Preferably, as shown in fig. 2, the step of acquiring the touch track detected by the touch screen of the mobile terminal specifically includes:
step S101, when the touch screen detects that the touch screen is touched, starting to record coordinates of the touch points in time sequence;
in the embodiment of the invention, when a user operates on the touch screen and the touch screen detects that the touch screen is touched, the coordinates of the touch points are recorded in time sequence.
And step S102, when the touch screen detects release, recording is completed to acquire a touch track detected by the touch screen of the mobile terminal.
In the embodiment of the invention, when the user finishes drawing the unlocking track line on the touch screen, the touch is released, and when the touch screen detects the release, the recording is completed to acquire the touch track detected by the touch screen of the mobile terminal.
Step 200, judging whether the acquired touch track is a single-line track;
in the embodiment of the invention, when the touch track operated by the user is obtained, whether the obtained touch track is a single-line track is judged in real time. I.e., determine if the current touch trajectory is a single-line trajectory. According to the invention, a complex touch line is not needed for unlocking, and the unlocking memory is conveniently reduced by adopting a single-line track, so that the unlocking efficiency is accelerated.
Specifically, as shown in fig. 3, the step of determining whether the acquired touch trajectory is a single-line trajectory in step S200 includes:
step S201, judging whether the same time point contains two touch points or not in all the touch points recorded in the acquired touch track;
in the embodiment of the invention, when judging whether the same time point contains two touch points or not in all the touch points recorded in the acquired touch track. In the embodiment of the invention, the single-line track only has one touch point at the same time. If two touch points exist at the same time, the two touch points are touched by two fingers, and then the single-line track is not formed.
Step S202, judging that the acquired touch track is not a single-line track when the same time point contains two touch points;
in the embodiment of the present invention, as described above, when it is determined that, among all the touch points recorded in the acquired touch trajectory, there is a case where the same time point includes two touch points, it is determined that the acquired touch trajectory is not a single-line trajectory. The method comprises the steps of carrying out a first treatment on the surface of the For example, if one of the recorded tracks includes two touch points p1, p2, then the user is considered to have touched both touch points at one time, so the track is not a single-line track. The invention has simple and convenient judgment and does not occupy excessive memory.
In step S203, when there is no case where the same time point includes two touch points, it is determined that the acquired touch trajectory is a single-line trajectory.
In the embodiment of the invention, when judging that the same time point does not contain two touch points in all the touch points recorded in the acquired touch track, the acquired touch track is judged to be a single-line track. That is, in the embodiment of the present invention, the single-line track has only one touch point at the same time.
Step S300, when the touch track is a single-line track, acquiring the number of high points in the single-line touch track;
in the embodiment of the invention, when the touch track is a single-line track, the number of high points in the single-line touch track is obtained. In this embodiment, as shown in fig. 4, the touch line BC touch line with the start point of B and the end point of C drawn on the touch screen 10 by the user shown in fig. 4 is a single-line track line, and the number of high points A1, A2, and A3 in fig. 4 is 3. In the present invention, when the touch track is a single-line track, the number of high points in the single-line track, for example, the number of high points A1, A2, and A3 shown in fig. 4, is 3 high points, is obtained.
In the implementation of the present invention, the steps are set before S100:
the number of high points for unlocking the mobile terminal is preset. For example, the number of high points for unlocking the mobile terminal is preset to be 3.
In the preferred embodiment of the invention, the number of high points in the same direction is adopted for judging the number of the high points. For example, as shown in fig. 4, when the touch trajectory is a single-line trajectory, the number of high points curved in the same direction in the single-line touch trajectory is obtained. The number of high points A1, A2, and A3 curved in the same direction as shown in fig. 4 is 3.
And step 400, controlling to unlock the mobile terminal when the number of high points in the single-line touch track is equal to the preset number of high points for unlocking.
In the embodiment of the invention, when the number of high points in the single-line touch track is equal to the number of preset high points for unlocking, the unlocking of the mobile terminal is controlled. For example, when the number of preset high points for unlocking is 3 and the number of high points in the single-line touch track currently operated by the user on the touch screen of the lock screen is also 3, the number of the preset high points for unlocking is equal to the number of preset high points, and the mobile terminal is controlled to be unlocked.
Specifically, as shown in fig. 5, step S300 in this embodiment includes:
step S301, comparing the number of high points in the current single-line touch track with the number of preset high points for unlocking;
as shown in fig. 4, in the embodiment of the present invention, the number of high points curved in the same direction in the current single-line touch track is preferably compared with the preset number of high points for unlocking.
And step S302, judging whether the number of high points in the current single-line touch track is equal to the number of preset high points for unlocking, and controlling the mobile terminal to be unlocked if the number of the high points is equal to the number of the preset high points for unlocking.
Specifically, the step of judging whether the number of high points in the current single-line touch track is equal to the preset number of high points for unlocking comprises the following steps:
the current single-line touch track to be judged comprises N touch points, and the coordinates of the touch points of the current single-line touch track to be judged are as follows in time sequence: y1, Y2, … …, Y N;
wherein the recording time of the touch points arranged in front is earlier than that of the touch points arranged in back;
performing filtering treatment on the current single-line touch track to be judged for a plurality of times until the number of high points before and after the filtering treatment is the same;
in an embodiment of the present invention, the filtering includes:
c21, setting the track to be filtered to contain M touch points, wherein the coordinates of the touch points of the track to be filtered are as follows in time sequence: z < 1 >, Y < 2 >, … …, Z < M >;
and C22, obtaining track touch point coordinates according to the time sequence after the track to be filtered is filtered, wherein the time sequence is as follows: x < 1 >, X < 2 >, … …, X < H >;
wherein, X [1] =Z [2] -Z [1], X [2] =Z [3] -Z [2], X [3] =Z [4] -Z [3], … … ], X [ H ] =Z [ M ] -Z [ M-1].
Preferably, the high point in the embodiment of the present invention is a data where the data is larger than the previous data and smaller than the next data.
And judging whether the number of the high points of the current single-line touch track is the same as the preset number of the high points.
And controlling to unlock the mobile terminal when the number of high points in the current single-line touch track is equal to the number of preset high points for unlocking.
From the above, in the embodiment of the present invention, the method is adopted to obtain the touch track detected by the touch screen of the mobile terminal in advance; and judging whether the track is a single-line track or not, if so, acquiring coordinates of a touch point on the track, and then performing corresponding processing to judge whether unlocking is successful or not. After the unlocking is completed, the unlocking track path is not unique, so that the unlocking mode is more flexible, and the user can operate and use conveniently, thereby greatly enriching the choice of unlocking when one track is drawn through the touch screen, improving the user experience, providing convenience for the user and providing convenience for the user.
Exemplary apparatus
As shown in fig. 6, an embodiment of the present invention provides a device for unlocking a track of a touch screen of a mobile terminal, where the device includes:
the track acquisition module 10 is used for acquiring a touch track detected by the touch screen of the mobile terminal;
the judging module 20 is configured to judge whether the acquired touch trajectory is a single-line trajectory;
the high point obtaining module 30 is configured to obtain the number of high points in the single-line touch track when the touch track is the single-line track;
and the unlocking control module 40 is configured to control unlocking the mobile terminal when the number of high points in the single-line touch track is equal to the preset number of high points for unlocking, as described above.
In one implementation, the trajectory acquisition module 10 includes:
the recording unit is used for starting to record coordinates of the touch points according to time sequence when the touch screen detects that the touch screen is touched;
and the release acquisition unit is used for acquiring the touch track detected by the touch screen of the mobile terminal after the touch screen detects the release.
In one implementation, the determining module 20 includes:
the judging unit is used for judging whether the same time point contains two touch points or not in all the touch points recorded in the acquired touch track;
a confirmation unit configured to determine that the acquired touch trajectory is not a single-line trajectory when there is a case where the same time point includes two touch points;
and the judging unit is used for judging that the acquired touch track is a single-line track when the condition that the same time point contains two touch points does not exist.
In one implementation, the unlock control module 40 includes:
the comparison unit is used for comparing the number of high points in the current single-line touch track with the preset number of high points for unlocking;
and the unlocking control unit is used for judging whether the number of the high points in the current single-line touch track is equal to the number of the preset high points used for unlocking, and controlling the mobile terminal to be unlocked if the number of the high points in the current single-line touch track is equal to the number of the preset high points used for unlocking.
Based on the above embodiment, the present invention also provides a terminal device, and a functional block diagram thereof may be shown in fig. 7. The terminal equipment comprises a processor, a memory, a network interface, a display screen and a touch screen which are connected through a system bus. Wherein the processor of the terminal device is adapted to provide computing and control capabilities. The memory of the terminal device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the terminal device is used for communicating with an external terminal through a network connection. The computer program when executed by the processor is used for realizing a track unlocking processing method of the touch screen of the mobile terminal. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen, and the touch screen of the terminal device is preset on the terminal device.
It will be appreciated by those skilled in the art that the functional block diagram shown in fig. 7 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the terminal device to which the present inventive arrangements are applied, and that a particular terminal device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a terminal device is provided, where the terminal device includes a memory, a processor, and a mobile terminal touch screen track unlocking processing program stored in the memory and capable of running on the processor, and when the processor executes the mobile terminal touch screen track unlocking processing program, the processor implements the following operation instructions:
acquiring a touch track detected by a touch screen of a mobile terminal;
judging whether the acquired touch track is a single-line track or not;
when the touch track is a single-line track, acquiring the number of high points in the single-line touch track;
and when the number of the high points in the single-line touch track is equal to the number of the preset high points for unlocking, controlling the unlocking of the mobile terminal, wherein the method is specifically described above.
The step of obtaining the touch track detected by the touch screen of the mobile terminal comprises the following steps:
the number of high points for unlocking the mobile terminal is preset.
The step of acquiring the touch track detected by the touch screen of the mobile terminal comprises the following steps:
when the touch screen detects that the touch screen is touched, starting to record coordinates of the touch points in time sequence;
and when the touch screen detects release, finishing recording to acquire the touch track detected by the touch screen of the mobile terminal.
The step of judging whether the acquired touch track is a single-line track comprises the following steps:
judging whether the same time point contains two touch points or not in all the touch points recorded in the acquired touch track;
when the same time point contains two touch points, judging that the acquired touch track is not a single-line track;
when the condition that the same time point contains two touch points does not exist, the acquired touch track is judged to be a single-line track.
Wherein, when the touch track is a single-line track, the step of obtaining the number of high points in the single-line touch track includes:
and when the touch track is a single-line track, acquiring the number of high points bent to the same direction in the single-line touch track.
Wherein, when the number of high points in the single-line touch track is equal to the number of preset high points for unlocking, the step of controlling the unlocking mobile terminal comprises the following steps:
comparing the number of high points in the current single-line touch track with the number of preset high points for unlocking;
and judging whether the number of the high points in the current single-line touch track is equal to the number of the preset high points for unlocking, and if so, controlling the unlocking of the mobile terminal.
The step of judging whether the number of high points in the current single-line touch track is equal to the preset number of high points for unlocking comprises the following steps:
the current single-line touch track to be judged comprises N touch points, and the coordinates of the touch points of the current single-line touch track to be judged are as follows in time sequence: y1, Y2, … …, Y N;
wherein the recording time of the touch points arranged in front is earlier than that of the touch points arranged in back;
performing filtering treatment on the current single-line touch track to be judged for a plurality of times until the number of high points before and after the filtering treatment is the same;
and judging whether the number of the high points of the current single-line touch track is the same as the preset number of the high points.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In summary, the invention discloses a method, a device, a terminal device and a storage medium for unlocking a track of a touch screen of a mobile terminal, wherein the method comprises the following steps: acquiring a touch track detected by a touch screen of a mobile terminal; judging whether the acquired touch track is a single-line track or not; when the touch track is a single-line track, acquiring the number of high points in the single-line touch track; and controlling the unlocking of the mobile terminal when the number of the high points in the single-line touch track is equal to the preset number of the high points for unlocking. After the unlocking is set, the path of the unlocking track is not unique, and the unlocking mode is flexible, so that the choice of unlocking when one track is drawn through the touch screen is greatly enriched, the user experience is improved, and convenience is provided for the user.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.