CN110703937A - Abnormity detection method, abnormity detection device, storage medium and terminal equipment - Google Patents

Abnormity detection method, abnormity detection device, storage medium and terminal equipment Download PDF

Info

Publication number
CN110703937A
CN110703937A CN201910826323.9A CN201910826323A CN110703937A CN 110703937 A CN110703937 A CN 110703937A CN 201910826323 A CN201910826323 A CN 201910826323A CN 110703937 A CN110703937 A CN 110703937A
Authority
CN
China
Prior art keywords
trigger event
state
signal
touch screen
abnormal
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.)
Pending
Application number
CN201910826323.9A
Other languages
Chinese (zh)
Inventor
林进全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201910826323.9A priority Critical patent/CN110703937A/en
Publication of CN110703937A publication Critical patent/CN110703937A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment

Landscapes

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

Abstract

The embodiment of the application discloses an anomaly detection method, an anomaly detection device, a storage medium and terminal equipment, wherein the method comprises the following steps: detecting a touch signal acting on the touch screen; judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state; and if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal.

Description

Abnormity detection method, abnormity detection device, storage medium and terminal equipment
Technical Field
The present application relates to the field of intelligent terminal technologies, and in particular, to an anomaly detection method and apparatus, a storage medium, and a terminal device.
Background
Touch screens (also called touch screens and touch panels) are inductive liquid crystal display devices capable of receiving input signals such as contacts. The capacitive touch screen is one of the most widely applied touch screens in the terminal equipment, and works by using the capacitive sensing principle of the touch screen, and can judge whether an object such as a finger, a touch pen and the like contacts the touch screen or not and the event state after contacting the touch screen, such as a pressing (down) state, a lifting (up) state, a moving state and the like.
At present, under the scenes of fluorescent lamps, water mist and the like, a capacitive signal of a touch screen is interfered by external signals such as current, water vapor and the like, so that the work of the touch screen is abnormal, at this time, after an object triggers a down event, a coordinate event is always remained in a system, so that the down event is always triggered by the system application and an up event cannot be triggered, the abnormal condition that a system icon is always pressed is caused, and the operation of the touch screen is abnormal; in addition, for the problem of low-probability interference, the current debugging method usually checks whether the trackball is repeatedly fixed by human eyes, which is not only easy to miss abnormal points, but also low in efficiency.
Disclosure of Invention
The embodiment of the application provides an anomaly detection method and device, a storage medium and a terminal device, which can solve the problem of abnormal operation of a touch screen caused by residual events in an interference scene, and can improve the efficiency of fixed-point detection in the interference scene, thereby improving the performance and quality of the touch screen.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides an anomaly detection method, including:
detecting a touch signal acting on the touch screen;
judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
and if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal.
In a second aspect, embodiments of the present application provide an abnormality detection apparatus, which includes a detection unit, a determination unit, and a processing unit, wherein,
the detection unit is configured to detect a touch signal acting on the touch screen;
the judging unit is configured to judge whether a trigger event corresponding to the touch signal belongs to a first state based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
the processing unit is configured to determine that the touch signal is an abnormal signal if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, and trigger abnormal processing on the touch screen according to the abnormal signal.
In a third aspect, an embodiment of the present application provides an anomaly detection apparatus, which includes a memory and a processor; wherein the content of the first and second substances,
the memory for storing a computer program operable on the processor;
the processor, when executing the computer program, is adapted to perform the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing an anomaly detection program, which when executed by at least one processor implements the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a terminal device, which includes at least a touch screen and the abnormality detection apparatus according to the second aspect or the third aspect.
According to the anomaly detection method and device, the storage medium and the terminal device, the touch signals acting on the touch screen are detected; judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; the first state represents that a touch point on the touch screen is in a pressing state; if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal; therefore, after the touch signal is determined to be the abnormal signal, the problem of abnormal operation of the touch screen caused by residual events in an interference scene can be solved by performing abnormal processing on the touch screen, for example, triggering an up event through an analog signal, so that the phenomenon of misoperation of a system is avoided; in addition, through exception handling of the touch screen, for example, abnormal firmware information on the touch screen is acquired through automatic triggering, fixed point detection efficiency in an interference scene can be improved, performance and quality of the touch screen are improved, and user experience is improved.
Drawings
Fig. 1 is a schematic flowchart of an anomaly detection method according to an embodiment of the present application;
fig. 2 is a schematic detailed flowchart of an anomaly detection method according to an embodiment of the present application;
fig. 3 is a detailed flowchart of another anomaly detection method provided in the embodiment of the present application;
fig. 4 is a schematic detailed flowchart of another anomaly detection method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an abnormality detection apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a specific hardware structure of an abnormality detection apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant application and are not limiting of the application. It should be noted that, for the convenience of description, only the parts related to the related applications are shown in the drawings.
Touch screens (also called touch screens and touch panels) are inductive liquid crystal display devices capable of receiving input signals such as contacts. According to the working principle of the touch screen and the information transmission medium, the touch screen can be divided into a plurality of types, including a resistance type touch screen, a capacitance type touch screen, an infrared ray type touch screen, a surface acoustic wave touch screen and the like; among them, the capacitive touch screen is one of the most widely used touch screen types in the terminal device.
For a capacitive touch screen, the capacitive sensing function of the touch screen is to determine whether an object touches the touch screen and report touch information by using the capacitive sensing principle of the touch screen. Here, the object mainly refers to a finger, a stylus, and the like, and the reported touch information includes coordinate information, an event state, and the like, and the event state includes a press (down) state, a lift (up) state, a movement state, and the like.
The capacitive touch screen mainly comprises a transmitting channel and a receiving channel. The capacitance data of the collecting transmitting channel and the collecting receiving channel to the ground are self-capacitance data, the capacitance data between the collecting transmitting channel and the collecting receiving channel are mutual capacitance data, the mutual capacitance data can be used for judging whether an object is in a pressing state or a lifting state or a moving state, and the self-capacitance data can be used for realizing judgment of other auxiliary functions, such as a proximity induction function and the like. In addition, for the capacitive touch screen, the working principle of reporting points still utilizes the capacitance induction principle of the touch screen, and the coordinate information of the touch screen for identifying the object is to find out the peak value difference value in the area by calculating the capacitance difference between the touch screen and the non-touch screen contacted by the current object and calculating the area of the capacitance difference, judge whether the peak value difference value is within the preset reporting point threshold value, and then send the coordinate information of reporting points.
In the using process of the touch screen, under normal conditions, the touch operation of a user usually triggers a down event once or after a period of time, and then triggers an up event; or a move event is triggered after a down event is triggered and an up event is still triggered after a period of time. However, in an interference scene such as a fluorescent lamp and water mist, when a touch screen is subjected to performance test, a capacitance signal of the touch screen is interfered by external signals such as current and water vapor, so that the operation of the touch screen is abnormal, at this time, after an object triggers a down event, a coordinate event is always remained in a system, so that the down event is always triggered by system application and cannot trigger an up event, and the abnormal condition that a system icon is always pressed is caused, so that the operation of the touch screen is abnormal; meanwhile, for the problem of low-probability interference, the current debugging method usually checks whether the trackball is positioned repeatedly by human eyes, so that abnormal points are easily missed, and the efficiency is low.
The embodiment of the application provides an anomaly detection method which is applied to terminal equipment. Detecting a touch signal acting on the touch screen; judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; the first state represents that a touch point on the touch screen is in a pressing state; if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal; therefore, after the touch signal is determined to be the abnormal signal, the problem of abnormal operation of the touch screen caused by residual events in an interference scene can be solved by performing abnormal processing on the touch screen, for example, triggering an up event through an analog signal, so that the phenomenon of misoperation of a system is avoided; in addition, through exception handling of the touch screen, for example, abnormal firmware information on the touch screen is acquired through automatic triggering, fixed point detection efficiency in an interference scene can be improved, performance and quality of the touch screen are improved, and user experience is improved.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic flow chart of an anomaly detection method provided in an embodiment of the present application is shown. As shown in fig. 1, the method may include:
s101: detecting a touch signal acting on the touch screen;
it should be noted that the touch screen is located in the terminal device. The terminal device may be implemented in various forms, for example, the terminal device may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), an electronic reader, a vehicle-mounted device, a navigation device, a wearable device, and other devices including a touch screen.
It should also be noted that the touch screen may be a capacitive touch screen. The touch screen works by utilizing the capacitance sensing principle of the touch screen, and when objects such as fingers and a touch pen of a user contact the touch screen, touch signals are generated. The touch signal may be a first touch signal generated by an object pressing the touch screen, a second touch signal generated by the object being lifted off the touch screen, or a third touch signal generated by the object pressing the touch screen and moving on the touch screen, which is not specifically limited in the embodiment of the present application.
Thus, according to the detected touch signal, the event state of the current trigger event can be determined; wherein, the event state comprises a first state, a second state and the like; here, the first state may be a state corresponding to a down event, and the second state may be a state corresponding to an up event. Thus, assuming that the detected touch signal is the first touch signal or the third touch signal, it can be determined that the corresponding trigger event belongs to the first state; assuming that the detected touch signal is the second touch signal, it can be determined that the corresponding trigger event belongs to the second state.
In addition, the detection of the touch signal may be real-time detection or periodic detection, which is also called timing detection. Since the touch screen performs trigger interruption at regular time, assuming that the reporting rate of the touch screen is 100 hertz (Hz), the event state may be reported at a fixed period of 10 milliseconds (ms), for example, reporting the first state or the second state; that is, in the embodiment of the present application, the detection period of the touch signal may be 10ms, but the embodiment of the present application is not limited specifically.
S102: judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
it should be noted that the first state may be a state corresponding to a down event, that is, the first state may be a state in which a touch point on the touch screen is in a pressed state. However, due to the interference scene of fluorescent lamp, water fog and the like, the trigger event may be always in the first state; thus, after the touch signal is detected, it can be first determined whether the trigger event corresponding to the touch signal belongs to the first state.
In this way, after determining whether the trigger event corresponding to the touch signal belongs to the first state, if the trigger event corresponding to the touch signal does not belong to the first state (i.e., belongs to the second state), it may be directly determined that the touch signal is a non-abnormal signal, and at this time, the abnormal detection method according to the embodiment of the present application is not required to be executed, and the process may be directly ended; if the trigger event corresponding to the touch signal belongs to the first state, it cannot be directly determined whether the touch signal is an abnormal signal, and at this time, the abnormality detection method of the embodiment of the application needs to be executed to determine whether the touch signal is an abnormal signal, and when the touch signal is an abnormal signal, the abnormality processing on the touch screen is triggered according to the abnormal signal.
S103: and if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal.
It should be noted that, when the trigger event belongs to the first state, it is also necessary to determine whether the trigger event satisfies the preset exception policy at this time. The preset abnormal strategy is a preset judgment strategy for judging whether the trigger signal is an abnormal signal or not; for example, the preset exception policy may be to determine whether the duration of the trigger event exceeds a first preset duration, or the preset exception policy may also be to determine whether the duration of the trigger event exceeds a second preset duration and whether a difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold.
In this way, after the triggering event is judged to belong to the first state, whether the triggering event meets a preset abnormal strategy is continuously judged; if the trigger event also meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal; if the trigger event does not meet the preset abnormal strategy, it can be determined that the touch signal is a non-abnormal signal, and at this time, the abnormal detection method of the embodiment of the application does not need to be executed, and the process can be directly ended.
In the embodiment of the application, the touch signal acting on the touch screen is detected; judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; the first state represents that a touch point on the touch screen is in a pressing state; if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal; therefore, after the touch signal is determined to be the abnormal signal, the problem of abnormal operation of the touch screen caused by residual events in an interference scene can be solved by performing abnormal processing on the touch screen, for example, triggering an up event through an analog signal, so that the phenomenon of misoperation of a system is avoided; in addition, through exception handling of the touch screen, for example, abnormal firmware information on the touch screen is acquired through automatic triggering, fixed point detection efficiency in an interference scene can be improved, performance and quality of the touch screen are improved, and user experience is improved.
In some embodiments, prior to S101, the method may further include:
initializing a preset parameter of the touch screen, and setting the preset parameter to be a first value; the preset parameters comprise a pressing zone bit and/or an abnormal touch point.
It should be noted that, before detecting the touch signal, preset parameters of the touch screen may also be initialized; here, the preset parameter may be a pressed flag, which may be represented by Down _ flag; the preset parameter may also be an abnormal touch point, which may be represented by Error _ point.
It should be further noted that the setting value of the preset parameter includes a first value and a second value, and the first value is different from the second value; the first value may be represented by a number, a letter, or a combination of a number and a letter, and the second value may be represented by a number, a letter, or a combination of a number and a letter. In the embodiment of the present application, the first value may be 0, and the second value may be 1; alternatively, the first value may be false and the second value may be true; however, the embodiments of the present application are not particularly limited.
That is, after initializing the preset parameters of the touch screen, the press flag may be set to 0, i.e., Down _ flag is 0; the abnormal touch point may also be set to 0, i.e., Error _ point ═ 0. Then, a touch signal is detected, and when it is determined that a trigger event corresponding to the touch signal belongs to the first state, the pressing flag bit at this time may be set to 1, that is, Down _ flag is 1.
The preset exception strategy can be used for judging whether the duration of the trigger event exceeds a first preset duration or not, and is used for solving the problem that the touch screen operation is abnormal due to the event residue in the interference scene; the preset exception strategy can also be used for judging whether the duration of the trigger event exceeds a second preset duration and whether the difference value between the coordinate information of the trigger event and the coordinate information of the previous time is smaller than a preset distance threshold value, and is used for automatically triggering and acquiring exception firmware information on the touch screen so as to improve the efficiency of fixed point detection in an interference scene; which will be described in detail below, respectively.
Optionally, in some embodiments, for S103, if the trigger event belongs to the first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal may include:
s103 a-1: and when the trigger event belongs to a first state and the duration of the trigger event exceeds a first preset duration, determining that the touch signal is an abnormal signal.
It should be noted that the first state may be a state corresponding to a down event, that is, the first state may be a state in which a touch point on the touch screen is in a pressed state.
It should be further noted that, after the trigger event is determined to belong to the first state, the ID number corresponding to the current trigger event, the trigger time and the coordinate information of the current trigger event, and the like may also be obtained. Wherein the terminal device may include a plurality of ID numbers, each ID number representing an object; here, the object may be a finger, a touch pen, or the like, and generally, the object is a finger, and the terminal device generally supports at most 10 ID numbers. In addition, the coordinate information may include an array formed X, Y in a two-dimensional coordinate system, pressure information, contact area information, and the like.
Thus, under the condition that the trigger event belongs to the first state, whether the duration of the trigger event exceeds the first preset duration or not can be continuously judged, namely whether the duration of the down event exceeds the first preset duration or not is judged; and determining the touch signal as an abnormal signal only if the duration of the down event exceeds a first preset duration so as to perform abnormal processing on the touch screen subsequently.
Further, the triggering of the exception handling of the touch screen according to the exception signal may include:
s103 a-2: controlling the touch screen to trigger a second state through an analog signal; wherein the second state is indicative of a touch point on the touch screen being in a released state.
It should be noted that the second state may be a state corresponding to the up event, that is, the second state may enable the touch point on the touch screen to be in a released state.
Thus, under the condition that the trigger event belongs to the first state, whether the duration of the down event exceeds the first preset duration is judged by judging whether the duration of the trigger event exceeds the first preset duration or not; only if the duration of the down event exceeds a first preset duration, determining that the touch signal is an abnormal signal; in order to solve the problem of abnormal operation of the touch screen caused by the event residue in the interference scene, the second state can be triggered through the analog signal, namely the up event can be directly triggered through the bottom program, so that the problem that the up event is not triggered when the touch screen is always in the down event within the preset time is solved, the problem that the abnormal operation of the touch screen is caused by the event residue in the interference scene is solved, and the user experience is improved.
Specifically, it may be determined whether the trigger event belongs to a first trigger state, and it may also be determined by a timer that a duration of the trigger event exceeds a first preset duration. Therefore, in some embodiments, when it is determined that the trigger event belongs to the first state, the method may further include:
when the trigger event belongs to a first state, adjusting a pressing flag bit from a first value to a second value, and acquiring the trigger time of the trigger event and the coordinate information of the trigger event;
judging whether the trigger event belongs to a first trigger state or not;
if the trigger event belongs to a first trigger state, starting a timer;
if the trigger event does not belong to the first trigger state, canceling the previous timer and restarting the timer; the duration of the timer is a first preset duration.
It should be noted that, if it is determined that the trigger event belongs to the first state, the pressing flag may be adjusted from a first value to a second value, for example, Down _ flag is 1. In addition, the timer is a timer with a fixed period, and the fixed period is the duration of the timer, namely, the first preset duration. Therefore, if the trigger event belongs to the first trigger state, the timer can be directly started and timed; if the trigger event does not belong to the first state, the previous timer task needs to be cancelled, and then the timer is restarted.
Further, in some embodiments, for S103, if the trigger event belongs to the first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal, and triggering exception handling on the touch screen according to the exception signal may include:
when the timing of the timer meets a first preset time length, acquiring the current time of the trigger event;
judging whether the pressing flag bit is a second value or not, and whether the difference value between the current time and the triggering time is greater than a first preset time length or not;
and when the pressing flag bit is a second value and the difference value between the current time and the trigger time is greater than a first preset time length, determining that the touch signal is an abnormal signal, and controlling the touch screen to trigger a second state through an analog signal.
It should be further noted that the trigger time represents the trigger time acquired when the trigger event is determined to belong to the first state, and may be represented by T1; the current time represents the current time acquired when the timing of the timer meets the first preset time length, and can be represented by T2; thus, if Down _ flag is 1 and the difference (T2-T1) between T2 and T1 is greater than the first preset time period, the second state may be triggered by an analog signal at this time; in particular, it may be the second state that directly simulates the trigger event through the underlying program.
For convenience of understanding, fig. 2 shows a detailed flowchart of an anomaly detection method provided in an embodiment of the present application. As shown in fig. 2, the detailed process may include:
s201: initializing a pressing zone bit, and setting a pressing zone bit Down _ flag to be 0;
it should be noted that the pressing flag is represented by a Down _ flag, and when the pressing flag is initialized, the Down _ flag may be set to 0; in addition, the time unit of the pressing may be in the order of microseconds (us).
S202: detecting a touch signal acting on the touch screen;
s203: judging whether a trigger event corresponding to the touch signal is a down event or not;
s204: when the trigger event is a Down event, setting a pressing flag bit Down _ flag to be 1, and acquiring trigger time T1 of the trigger event and ID number and coordinate information corresponding to the trigger event;
it should be noted that the detection of the touch signal may be real-time detection or periodic detection, and the periodic detection is also referred to as timing detection. The touch screen can be triggered and interrupted regularly, and if the report rate of the touch screen is 100Hz, the event state can be reported in a fixed period of 10ms, namely, a down event or an up event is reported; and when the abnormity occurs, the up event is lost, and the down event is always reported at the moment.
In addition, the terminal device may include a plurality of ID numbers, typically supporting a maximum of 10 ID numbers. Here, each ID number represents an object, which may be a finger, a touch pen, or the like, and generally, the object refers to a finger. In addition, the coordinate information may include an array formed X, Y in a two-dimensional coordinate system, pressure information, contact area information, and the like.
In this way, if the current trigger event is a Down event, the press flag Down _ flag may be set to 1 at this time, and the trigger time T1 of the current event and the ID number and the coordinate information corresponding to the current event may be acquired.
S205: judging whether the trigger event is a first down trigger event;
s206: if the trigger event is a first down trigger event, starting a timer;
s207: if the trigger event is not the first down trigger event, canceling the previous timer task and restarting the timer; wherein the fixed period of the timer is T;
it should be noted that the fixed period of the timer, i.e. the first preset duration, can be represented by T. If the current trigger event is a first down event, the timing with a fixed period of T can be directly started; if the current trigger event is not the first down event, the previous timer task can be cancelled, and the timer with the fixed period of T is restarted; during the timing process of the re-timer, the touch signal applied to the touch screen may be detected in a loop, i.e., S202 is performed.
It should also be noted that the fixed period T of the timer requires a cycle time greater than the reporting rate. For example, assuming a reporting rate of 100Hz, the fixed period T of the timer needs to be greater than 10 ms. In the present embodiment, T may be set to 1s, but the present embodiment is not particularly limited.
S208: and when the trigger event is not a Down event, setting a pressing flag bit Down _ flag to be 0, and canceling the task of the timer.
It should be noted that after S203, if the trigger event is a down event, then S204 is executed; if the trigger event is not a down event, S208 is performed.
It should be further noted that, if the trigger event is not a Down event (e.g., an up event), the press flag Down _ flag may be set to 0, and the abnormality detection method according to the embodiment of the present application need not be executed, at this time, the timer task may be cancelled, and the flow is directly ended.
Further, when the trigger event is a down event, the timer is used for timing, and when the timer with the fixed period of T reaches the preset time (T), this time indicates that no up event acting on the touch screen is detected, and at this time, the touch screen needs to be subjected to exception handling. Fig. 3 is a detailed flowchart illustrating another anomaly detection method provided in an embodiment of the present application. As shown in fig. 3, the detailed flow may include:
s301: when the timing of the timer meets T, acquiring the current time T2 of the trigger event;
it should be noted that when the timing time corresponding to the timer with the fixed period is reached, since the trigger event is still a down event at this time, it indicates that an up event is not obtained, S302 needs to be executed, that is, an exception judgment is performed.
S302: judging whether the pressing flag bit is 1 or not and whether T2-T1 is larger than T or not;
s303: when the press flag is 1 and T2-T1 is greater than T, triggering up event and ID number and coordinate information by analog signal;
s304: when the press flag is not 1, or T2-T1 is less than or equal to T, the timer task is cancelled.
It should be noted that after S302, if the determination result is yes, that is, the press flag is 1, and T2-T1 is greater than T, S303 is executed, at this time, the trigger ID number, the coordinate information and the up event are simulated; if the judgment result is negative, i.e. the pressing flag is not 1, or T2-T1 is less than or equal to T, then S304 is executed, at this time, the current timer task is cancelled, and the flow is ended.
It should be further noted that, it is determined whether the trigger event is in the first state (for example, the pressing state), and whether the difference between the current time and the trigger time is greater than the fixed period of the timer; if the two judgment results are yes, the up event can be directly simulated and triggered through a bottom layer program; the information triggered by the underlying program simulation may include a reporting ID number, coordinate information, and up event, as well as pressure information and area information, etc.
In the embodiment of the application, a touch event corresponding to a touch signal is determined by detecting the touch signal acting on the touch screen; if the touch event is a down event, namely belongs to the first state, if the up event is not triggered within a preset time period, the touch signal is an abnormal signal, and the up event can be triggered through the bottom layer program simulation at this time, so that the problem of abnormal operation of the touch screen caused by event residue in an interference scene is solved, the phenomenon of misoperation of a system is avoided, and the user experience is improved.
Optionally, in some embodiments, for S103, if the trigger event belongs to the first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal may include:
s103 b-1: when the trigger event belongs to a first state, the duration of the trigger event exceeds a second preset duration, and the difference value between the coordinate information of the trigger event and the coordinate information of the previous time is smaller than a preset distance threshold, determining that the touch signal is an abnormal signal; and the previous coordinate information represents corresponding coordinate information when a touch signal is detected on the touch screen at the previous time.
It should be noted that the first state may be a state corresponding to a down event, that is, the first state may be a state in which a touch point on the touch screen is in a pressed state. In addition, the first preset duration is a determination value used for measuring whether the touch signal is an abnormal signal, and the second preset duration is also a determination value used for measuring whether the touch signal is an abnormal signal, where values of the second preset duration and the first preset duration may be the same or different, and the embodiment of the present application is not specifically limited.
It should be further noted that, when the trigger event belongs to the first state and the duration of the trigger event exceeds the second preset duration, it may be further determined whether a difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold, so as to determine whether the trigger signal is an abnormal signal and whether the trigger signal belongs to a fixed-point signal generated by pressing the touch screen at a fixed point, so as to perform abnormal processing on the trigger signal in the subsequent step.
Further, the triggering of the exception handling of the touch screen according to the exception signal may include:
s103 b-2: sending an abnormal reporting instruction to the touch screen; the abnormal reporting instruction is used for controlling the touch screen to report abnormal firmware information;
s103 b-3: and receiving and storing the abnormal firmware information reported by the touch screen.
It should be noted that the terminal system in the terminal device and the touch screen system can be interactively communicated; the channel adopted by the interactive communication can be any one of the following: a two-wire Serial bus (I2C) Interface, a Serial Peripheral Interface (SPI) Interface, or an Interrupt (INT) pin. Therefore, the terminal system can send an exception reporting instruction to the touch screen system and can also receive exception firmware information reported by the touch screen system. The terminal system is a large system with a memory and a processor, the touch screen system is a small system with a memory and a processor, and the bottom layer program is located in the bottom layer system in the terminal system.
It should be further noted that the abnormal firmware information may include abnormal information such as a capacitance reference value, a capacitance difference value, a partial state value of the firmware, and a key parameter value of the firmware; after the terminal device receives the abnormal firmware information, the reason of the current fixed point trigger can be analyzed, so that the performance of the touch screen can be improved subsequently.
In this way, under the condition that the trigger event belongs to the first state, whether the duration of the trigger event exceeds a second preset duration and whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value can be judged; determining that the touch signal is an abnormal signal only when the duration of the trigger event exceeds a second preset duration and the difference value between the coordinate information of the trigger event and the coordinate information of the previous time is smaller than a preset distance threshold; in order to improve the efficiency of fixed-point detection in an interference scene, an exception reporting instruction can be sent to the touch screen, and then exception firmware information reported by the touch screen is received and stored; due to the fact that the abnormal firmware information on the touch screen is obtained through automatic triggering, the efficiency of fixed point detection in an interference scene can be improved, the performance and the quality of the touch screen are improved, labor cost is saved, and user experience is improved.
In particular, it may be determined whether the trigger event belongs to a first state for first triggering for determining whether a trigger time of the trigger event needs to be stored. Therefore, in some embodiments, when it is determined that the trigger event belongs to the first state, the method may further include:
when the trigger event belongs to a first state, adjusting a pressing flag bit from a first value to a second value, and acquiring the trigger time of the trigger event and the coordinate information of the trigger event;
judging whether the trigger event belongs to a first trigger state or not;
if the trigger event belongs to a first trigger state, storing the trigger time of the trigger event as first time, and executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value;
and if the trigger event does not belong to the first trigger state, executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value.
It should be noted that, if it is determined that the trigger event belongs to the first state, the pressing flag may be adjusted from a first value to a second value, for example, Down _ flag is 1.
In addition, when the trigger event belongs to a first trigger state, the trigger time of the trigger event needs to be stored, for example, represented by TimeFirst, and then a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold is executed; and when the trigger event does not belong to the first trigger state, directly judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value. That is, the trigger time of the trigger event will need to be stored only if the trigger event belongs to the first state of triggering.
Further, in some embodiments, for S103, if the trigger event belongs to the first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal, and triggering exception handling on the touch screen according to the exception signal may include:
judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value or not;
if the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold, taking the obtained current time of the trigger event as a second time, and judging whether the time length between the second time and the first time exceeds a second preset time length;
when the time length between the second time and the first time exceeds a second preset time length, adjusting the abnormal touch point from a first value to a second value, and sending an abnormal reporting instruction to the touch screen;
and receiving and storing the abnormal firmware information reported by the touch screen.
Further, in some embodiments, the method may further comprise:
and when the duration between the second time and the first time does not exceed a second preset duration, continuing to execute the step of detecting the touch signal acting on the touch screen.
It should be noted that the preset distance threshold may be a minimum distance threshold, and is usually set to 1-2 pixel coordinates. The coordinate information of the touch screen is two-dimensional and comprises an X coordinate and a Y coordinate; in this way, whether the difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold (i.e., a minimum distance threshold) or not needs to be compared with the X coordinate and the Y coordinate, and only when the difference between the X coordinate and the previous coordinate meets the requirement and the difference between the Y coordinate and the previous coordinate meets the requirement, it can be stated that the difference between the coordinate information of the trigger event and the previous coordinate is smaller than the preset distance threshold, and then the duration can be further determined.
It should be noted that the second preset time period may be a maximum threshold time, and is usually set to 10 seconds(s). Here, the trigger time indicates a trigger time acquired when it is determined that the trigger event belongs to the first state, and may be indicated by TimeFirst when stored; the current time represents the acquired current time of the trigger event, and may be represented by T3; thus, when the difference value between the coordinate information of the trigger event and the coordinate information of the previous time is smaller than the preset distance threshold, if the time length (T3-TimeFirst) between T3 and TimeFirst exceeds a second preset time length, the touch signal is an abnormal signal, at this time, an abnormal reporting instruction can be sent to the touch screen, and the abnormal firmware information reported by the touch screen is received and stored; if the time length between T3 and TimeFirst (T3-TimeFirst) does not exceed the second preset time length, it indicates that the touch signal is temporarily a non-abnormal signal, and the step of detecting the touch signal applied to the touch screen may be continuously performed at this time.
For convenience of understanding, fig. 4 shows a detailed flowchart of another anomaly detection method provided in the embodiment of the present application. As shown in fig. 4, the detailed flow may include:
s401: initializing a pressing flag bit, setting the pressing flag bit Down _ flag to be 0, and setting the abnormal touch point Error _ point to be 0;
s402: detecting a touch signal acting on the touch screen;
s403: judging whether a trigger event corresponding to the touch signal is a down event or not;
s404: when the trigger event is a Down event, setting a pressing flag bit Down _ flag to be 1, and acquiring the trigger time of the trigger event and coordinate information corresponding to the trigger event;
s405: when the trigger event is an up event, setting a pressing flag bit Down _ flag to be 0, setting an abnormal touch point Error _ point to be 0, and ending the process;
it should be noted that the detection of the touch signal may be real-time detection or periodic detection, and the periodic detection is also referred to as timing detection. The touch screen can be triggered and interrupted regularly, and if the report rate of the touch screen is 100Hz, the event state can be reported in a fixed period of 10ms, namely, the down event or the up event is reported.
It should be further noted that, if it is determined that the current trigger event is a Down event, at this time, the pressing flag Down _ flag may be set to 1, and the trigger time of the current event and the coordinate information corresponding to the current event are acquired; if the current trigger event is judged to be the up event, the press flag bit Down _ flag can be set to 0 at this time, the abnormal touch point Error _ point is set to 0, the process is exited, and the event does not trigger the capture of the abnormal information.
S406: judging whether the trigger event is a first down trigger event;
s407: if the trigger event is the first down trigger event, storing the trigger time of the trigger event as TimeFirst, and executing S408;
it should be noted that the trigger time (which may be denoted by TimeFirst) of the trigger event needs to be stored only when the trigger event is the first trigger down event. Thus, if the trigger event is not the first trigger down event, S408 is directly performed.
S408: judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a minimum distance threshold value or not;
s409: if the judgment result is negative, setting the abnormal touch point Error _ point to be 0, and ending the process;
s410: if the judgment result is yes, acquiring the current time of the trigger event, and judging whether the difference value between the current time and the TimeFirst exceeds the maximum threshold time;
it should be noted that, after S408, if the determination result is negative, it indicates that the difference between the coordinate information of the trigger event and the coordinate information of the previous time is greater than or equal to the minimum distance threshold, then S409 is executed, that is, the process is ended, and the event does not trigger capture of abnormal information; if the determination result is yes, it indicates that the difference between the coordinate information of the trigger event and the previous coordinate information is smaller than the minimum distance threshold, then S410 is executed, and the present process needs to be executed continuously.
It should also be noted that the minimum distance threshold is typically set to 1-2 pixel coordinates. The coordinate information of the touch screen is two-dimensional and comprises an X coordinate and a Y coordinate; in this way, whether the difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold (i.e., a minimum distance threshold) or not needs to be compared with the X coordinate and the Y coordinate, and only when the difference between the X coordinate and the previous coordinate meets the requirement and the difference between the Y coordinate and the previous coordinate meets the requirement, it can be stated that the difference between the coordinate information of the trigger event and the previous coordinate is smaller than the preset distance threshold, and then the duration can be further determined.
S411: if the judgment result is yes, setting the abnormal touch point Error _ point to be 1, and sending an abnormal reporting instruction to the touch screen;
s412: receiving an abnormal reporting instruction, and reporting abnormal firmware information through a touch screen;
s413: and storing and recording the acquired abnormal firmware information of the touch screen.
It should be noted that, after S410, if the determination result is negative, it indicates that the difference between the current time and the TimeFirst does not exceed the maximum threshold time, it indicates that the touch signal is a non-abnormal signal temporarily, and at this time, S402 may be executed to cyclically detect the touch signal acting on the touch screen; if the judgment result is yes, it indicates that the difference between the current time and the TimeFirst exceeds the maximum threshold time, it indicates that the touch signal is an abnormal signal, the abnormal touch point Error _ point may be set to 1, an abnormal reporting instruction is sent to the touch screen, and at this time, S412 and S413 are executed.
It should be further noted that, whether the difference between the current time and the TimeFirst exceeds the maximum threshold time is determined, that is, whether the current time minus the TimeFirst exceeds the maximum threshold time is compared, where the TimeFirst is the trigger time for recording the first down event, and the current time is the current time for recording the all-down event. The maximum threshold time is generally set to 10s, mainly because the finger of the user does not press the touch screen for such a long time, if the difference between the current time and the TimeFirst exceeds 10s, the touch signal can be considered as an abnormal signal, and the corresponding touch point is an abnormal point.
Further, after the abnormal point is determined, an abnormal reporting instruction needs to be sent to the touch screen system to inform the touch screen that some abnormal information in the firmware needs to be captured; the abnormal information may include a capacitance reference value, a capacitance difference value, some state values of the firmware, some key parameters of the firmware, and the like, and is mainly used for analyzing the reason of the current fixed-point trigger, so as to improve the reason. Meanwhile, after the touch screen receives the instruction, the abnormal firmware information in the firmware is reported to the terminal system, and then the acquired abnormal firmware information is stored and recorded by the terminal system.
In the embodiment of the application, a touch event corresponding to a touch signal is determined by detecting the touch signal acting on the touch screen; if the touch event is a down event, namely belongs to the first state, whether the moving coordinate of the down event is within the minimum sliding threshold value and whether the duration time of the down event is within the maximum time threshold value are judged, if the judgment result is yes, the touch signal is an abnormal signal, and abnormal firmware information in the touch screen at the abnormal moment can be automatically triggered and captured, so that the efficiency of fixed-point detection in an interference scene is improved, the quality of the touch screen is improved, and human resources are saved.
The embodiment provides an anomaly detection method, which detects a touch signal acting on a touch screen; judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; the first state represents that a touch point on the touch screen is in a pressing state; if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal; therefore, after the touch signal is determined to be the abnormal signal, the problem of abnormal operation of the touch screen caused by residual events in an interference scene can be solved by performing abnormal processing on the touch screen, for example, triggering an up event through an analog signal, so that the phenomenon of misoperation of a system is avoided; in addition, through exception handling of the touch screen, for example, abnormal firmware information on the touch screen is acquired through automatic triggering, fixed point detection efficiency in an interference scene can be improved, performance and quality of the touch screen are improved, and user experience is improved.
Based on the same inventive concept of the foregoing embodiment, refer to fig. 5, which shows a schematic structural diagram of an abnormality detection apparatus 50 provided in the embodiment of the present application. As shown in fig. 5, the abnormality detection apparatus 50 may include a detection unit 501, a judgment unit 502, and a processing unit 503, wherein,
the detection unit 501 is configured to detect a touch signal acting on the touch screen;
the determining unit 502 is configured to determine, based on the detected touch signal, whether a trigger event corresponding to the touch signal belongs to a first state; wherein the first state represents that a touch point on the touch screen is in a pressed state;
the processing unit 503 is configured to determine that the touch signal is an abnormal signal if the trigger event belongs to a first state and the trigger event meets a preset abnormal policy, and trigger abnormal processing on the touch screen according to the abnormal signal.
In the foregoing solution, referring to fig. 5, the abnormality detection apparatus 50 may further include a determining unit 504 configured to determine that the touch signal is an abnormal signal when the trigger event belongs to a first state and a duration of the trigger event exceeds a first preset duration.
In the above scheme, the processing unit 503 is specifically configured to control the touch screen to trigger the second state through an analog signal; wherein the second state is indicative of a touch point on the touch screen being in a released state.
In the foregoing solution, the determining unit 504 is specifically configured to determine that the touch signal is an abnormal signal when the trigger event belongs to a first state, the duration of the trigger event exceeds a second preset duration, and a difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold; and the previous coordinate information represents corresponding coordinate information when a touch signal is detected on the touch screen at the previous time.
In the above scheme, the processing unit 503 is specifically configured to send an exception reporting instruction to the touch screen; the abnormal reporting instruction is used for controlling the touch screen to report abnormal firmware information; and receiving and storing the abnormal firmware information reported by the touch screen.
In the above solution, referring to fig. 5, the abnormality detection apparatus 50 may further include an initialization unit 505 configured to perform initialization setting on a preset parameter of the touch screen, and set the preset parameter to a first value; the preset parameters comprise a pressing zone bit and/or an abnormal touch point.
In the above solution, the determining unit 502 is further configured to adjust the pressing flag from a first value to a second value when the trigger event belongs to a first state, and acquire the trigger time of the trigger event and the coordinate information of the trigger event; judging whether the trigger event belongs to a first trigger first state or not; if the trigger event belongs to a first trigger state, starting a timer; if the trigger event does not belong to the first trigger state, canceling the previous timer and restarting the timer; the duration of the timer is a first preset duration.
In the foregoing solution, referring to fig. 5, the abnormality detection apparatus 50 may further include an obtaining unit 506 configured to obtain the current time of the trigger event when the counting time of the timer satisfies a first preset time length;
the determining unit 502 is further configured to determine whether the pressing flag is a second value, and whether a difference between the current time and the trigger time is greater than a first preset time duration;
the processing unit 503 is specifically configured to determine that the touch signal is an abnormal signal when the pressing flag is a second value and the difference between the current time and the trigger time is greater than a first preset time, and control the touch screen to trigger a second state through an analog signal.
In the above solution, the determining unit 502 is further configured to adjust the pressing flag from a first value to a second value when the trigger event belongs to a first state, and acquire the trigger time of the trigger event and the coordinate information of the trigger event; judging whether the trigger event belongs to a first trigger first state or not; if the trigger event belongs to a first trigger state, storing the trigger time of the trigger event as first time, and executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value; and if the trigger event does not belong to the first trigger state, executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value.
In the above solution, the determining unit 502 is specifically configured to determine whether a difference between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold; if the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold, taking the obtained current time of the trigger event as a second time, and judging whether the time length between the second time and the first time exceeds a second preset time length;
the processing unit 503 is specifically configured to adjust the abnormal touch point from the first value to the second value when the duration between the second time and the first time exceeds a second preset duration, and send an abnormal reporting instruction to the touch screen; and receiving and storing the abnormal firmware information reported by the touch screen.
In the above solution, the processing unit 503 is further configured to continue to perform the step of detecting the touch signal acting on the touch screen when the duration between the second time and the first time does not exceed a second preset duration.
It is understood that in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and may also be a module, or may also be non-modular. Moreover, each component in the embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Accordingly, the present embodiments provide a computer storage medium storing an anomaly detection program that, when executed by at least one processor, implements the method of any of the preceding embodiments.
Based on the above-mentioned composition of the abnormality detection apparatus 50 and the computer storage medium, referring to fig. 6, it shows a specific hardware structure of the abnormality detection apparatus 50 provided in the embodiment of the present application, which may include: a communication interface 601, a memory 602, and a processor 603; the various components are coupled together by a bus system 604. It is understood that the bus system 604 is used to enable communications among the components. The bus system 604 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 604 in fig. 6. The communication interface 601 is used for receiving and sending signals in the process of receiving and sending information with other external network elements;
a memory 602 for storing a computer program capable of running on the processor 603;
a processor 603 for, when running the computer program, performing:
detecting a touch signal acting on the touch screen;
judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
and if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal.
It will be appreciated that the memory 602 in the subject embodiment can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM ), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 602 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And the processor 603 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 603. The Processor 603 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The method disclosed in the embodiments of the present application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 602, and the processor 603 reads the information in the memory 602, and performs the above-mentioned method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within 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), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, as another embodiment, the processor 603 is further configured to perform the method of any of the previous embodiments when running the computer program.
Referring to fig. 7, a schematic diagram of a composition structure of a terminal device provided in an embodiment of the present application is shown. As shown in fig. 7, the terminal device 70 may include at least a touch screen 701 and the abnormality detection apparatus 50 according to any one of the foregoing embodiments; the anomaly detection device 50 is mainly used for performing anomaly detection and anomaly processing on the touch screen 701, so that the problem of abnormal operation of the touch screen caused by residual events in an interference scene is solved, the efficiency of fixed-point detection in the interference scene is improved, and the performance and the quality of the touch screen are improved.
It should be noted that, in the present application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. An anomaly detection method, characterized in that it comprises:
detecting a touch signal acting on the touch screen;
judging whether a trigger event corresponding to the touch signal belongs to a first state or not based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
and if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, determining that the touch signal is an abnormal signal, and triggering abnormal processing on the touch screen according to the abnormal signal.
2. The method of claim 1, wherein determining that the touch signal is an abnormal signal if the trigger event belongs to a first state and the trigger event satisfies a predetermined abnormal policy comprises:
and when the trigger event belongs to a first state and the duration of the trigger event exceeds a first preset duration, determining that the touch signal is an abnormal signal.
3. The method of claim 2, wherein triggering exception handling for the touch screen according to the exception signal comprises:
controlling the touch screen to trigger a second state through an analog signal; wherein the second state is indicative of a touch point on the touch screen being in a released state.
4. The method of claim 1, wherein determining that the touch signal is an abnormal signal if the trigger event belongs to a first state and the trigger event satisfies a predetermined abnormal policy comprises:
when the trigger event belongs to a first state, the duration of the trigger event exceeds a second preset duration, and the difference value between the coordinate information of the trigger event and the coordinate information of the previous time is smaller than a preset distance threshold, determining that the touch signal is an abnormal signal; and the previous coordinate information represents corresponding coordinate information when a touch signal is detected on the touch screen at the previous time.
5. The method of claim 4, wherein triggering exception handling for the touch screen according to the exception signal comprises:
sending an abnormal reporting instruction to the touch screen; the abnormal reporting instruction is used for controlling the touch screen to report abnormal firmware information;
and receiving and storing the abnormal firmware information reported by the touch screen.
6. The method of claim 1, wherein prior to detecting the touch signal applied to the touch screen, the method further comprises:
initializing a preset parameter of the touch screen, and setting the preset parameter to be a first value; the preset parameters comprise a pressing zone bit and/or an abnormal touch point.
7. The method of claim 2, wherein when the triggering event is determined to belong to a first state, the method further comprises:
when the trigger event belongs to a first state, adjusting a pressing flag bit from a first value to a second value, and acquiring the trigger time of the trigger event and the coordinate information of the trigger event;
judging whether the trigger event belongs to a first trigger state or not;
if the trigger event belongs to a first trigger state, starting a timer;
if the trigger event does not belong to the first trigger state, canceling the previous timer and restarting the timer; the duration of the timer is a first preset duration.
8. The method according to claim 7, wherein if the trigger event belongs to a first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal, and triggering exception handling on the touch screen according to the exception signal comprises:
when the timing of the timer meets a first preset time length, acquiring the current time of the trigger event;
judging whether the pressing flag bit is a second value or not, and whether the difference value between the current time and the triggering time is greater than a first preset time length or not;
and when the pressing flag bit is a second value and the difference value between the current time and the trigger time is greater than a first preset time length, determining that the touch signal is an abnormal signal, and controlling the touch screen to trigger a second state through an analog signal.
9. The method of claim 4, wherein when it is determined that the triggering event belongs to the first state, the method further comprises:
when the trigger event belongs to a first state, adjusting a pressing flag bit from a first value to a second value, and acquiring the trigger time of the trigger event and the coordinate information of the trigger event;
judging whether the trigger event belongs to a first trigger state or not;
if the trigger event belongs to a first trigger state, storing the trigger time of the trigger event as first time, and executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value;
and if the trigger event does not belong to the first trigger state, executing a step of judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value.
10. The method according to claim 9, wherein if the trigger event belongs to a first state and the trigger event satisfies a preset exception policy, determining that the touch signal is an exception signal, and triggering exception handling on the touch screen according to the exception signal, includes:
judging whether the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold value or not;
if the difference value between the coordinate information of the trigger event and the previous coordinate information is smaller than a preset distance threshold, taking the obtained current time of the trigger event as a second time, and judging whether the time length between the second time and the first time exceeds a second preset time length;
when the time length between the second time and the first time exceeds a second preset time length, adjusting the abnormal touch point from a first value to a second value, and sending an abnormal reporting instruction to the touch screen;
and receiving and storing the abnormal firmware information reported by the touch screen.
11. The method of claim 10, wherein after determining whether the duration between the second time and the first time exceeds a second preset duration, the method further comprises:
and when the duration between the second time and the first time does not exceed a second preset duration, continuing to execute the step of detecting the touch signal acting on the touch screen.
12. An abnormality detection device characterized by comprising a detection unit, a judgment unit, and a processing unit, wherein,
the detection unit is configured to detect a touch signal acting on the touch screen;
the judging unit is configured to judge whether a trigger event corresponding to the touch signal belongs to a first state based on the detected touch signal; wherein the first state represents that a touch point on the touch screen is in a pressed state;
the processing unit is configured to determine that the touch signal is an abnormal signal if the trigger event belongs to a first state and the trigger event meets a preset abnormal strategy, and trigger abnormal processing on the touch screen according to the abnormal signal.
13. An abnormality detection apparatus characterized by comprising a memory and a processor; wherein the content of the first and second substances,
the memory for storing a computer program operable on the processor;
the processor, when running the computer program, is configured to perform the method of any of claims 1 to 11.
14. A computer storage medium storing an anomaly detection program that when executed by at least one processor implements the method of any one of claims 1-11.
15. A terminal device characterized in that it comprises at least a touch screen and an anomaly detection means according to any one of claims 12 or 13.
CN201910826323.9A 2019-09-03 2019-09-03 Abnormity detection method, abnormity detection device, storage medium and terminal equipment Pending CN110703937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910826323.9A CN110703937A (en) 2019-09-03 2019-09-03 Abnormity detection method, abnormity detection device, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910826323.9A CN110703937A (en) 2019-09-03 2019-09-03 Abnormity detection method, abnormity detection device, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN110703937A true CN110703937A (en) 2020-01-17

Family

ID=69193351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910826323.9A Pending CN110703937A (en) 2019-09-03 2019-09-03 Abnormity detection method, abnormity detection device, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN110703937A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988177A (en) * 2020-08-20 2020-11-24 深信服科技股份有限公司 Bypass control method, system, equipment and computer medium
CN112099666A (en) * 2020-09-10 2020-12-18 深圳市科航科技发展有限公司 Touch control method, system, terminal and storage medium applied to capacitive screen
CN112445380A (en) * 2020-12-08 2021-03-05 安徽鸿程光电有限公司 Infrared touch control method, device and all-in-one machine
CN115269297A (en) * 2022-09-27 2022-11-01 北京云迹科技股份有限公司 Touch screen fault automatic diagnosis method, device, equipment and storage medium
CN115694464A (en) * 2022-11-03 2023-02-03 东莞市力博得电子科技有限公司 Pressure sensing switch control method and device, electronic equipment and readable storage medium
CN115718555A (en) * 2022-11-16 2023-02-28 河南翔宇医疗设备股份有限公司 Control method of man-machine interaction and related assembly

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2267580A1 (en) * 2009-06-25 2010-12-29 Research In Motion Limited Method to detect and recover from stuck keys on an electronic device keyboard
US20130207935A1 (en) * 2010-10-19 2013-08-15 Panasonic Corporation Touch panel device
CN103914137A (en) * 2012-12-28 2014-07-09 京瓷办公信息系统株式会社 Operation input device, and information processing apparatus provided with the same
US20150242051A1 (en) * 2014-02-21 2015-08-27 Qualcomm Incorporated Systems and methods of moisture detection and false touch rejection on touch screen devices
CN106664540A (en) * 2015-07-07 2017-05-10 华为技术有限公司 Method, apparatus and system for detecting anomaly of terminal device
CN107066138A (en) * 2015-12-23 2017-08-18 意象无限股份有限公司 Signal detection method for preventing mistaken touch in touch system
US10013094B1 (en) * 2011-08-05 2018-07-03 P4tents1, LLC System, method, and computer program product for a multi-pressure selection touch screen
CN108491115A (en) * 2018-03-13 2018-09-04 青岛海尔洗衣机有限公司 Household appliance control method and household electrical appliance
CN109976580A (en) * 2019-03-26 2019-07-05 深圳市火王燃器具有限公司 A kind of false-touch prevention control method and device of intelligence kitchen appliance touch screen

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2267580A1 (en) * 2009-06-25 2010-12-29 Research In Motion Limited Method to detect and recover from stuck keys on an electronic device keyboard
US20130207935A1 (en) * 2010-10-19 2013-08-15 Panasonic Corporation Touch panel device
US10013094B1 (en) * 2011-08-05 2018-07-03 P4tents1, LLC System, method, and computer program product for a multi-pressure selection touch screen
CN103914137A (en) * 2012-12-28 2014-07-09 京瓷办公信息系统株式会社 Operation input device, and information processing apparatus provided with the same
US20150242051A1 (en) * 2014-02-21 2015-08-27 Qualcomm Incorporated Systems and methods of moisture detection and false touch rejection on touch screen devices
CN106664540A (en) * 2015-07-07 2017-05-10 华为技术有限公司 Method, apparatus and system for detecting anomaly of terminal device
CN107066138A (en) * 2015-12-23 2017-08-18 意象无限股份有限公司 Signal detection method for preventing mistaken touch in touch system
CN108491115A (en) * 2018-03-13 2018-09-04 青岛海尔洗衣机有限公司 Household appliance control method and household electrical appliance
CN109976580A (en) * 2019-03-26 2019-07-05 深圳市火王燃器具有限公司 A kind of false-touch prevention control method and device of intelligence kitchen appliance touch screen

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988177A (en) * 2020-08-20 2020-11-24 深信服科技股份有限公司 Bypass control method, system, equipment and computer medium
CN111988177B (en) * 2020-08-20 2023-05-12 深信服科技股份有限公司 Bypass control method, bypass control system, bypass control equipment and computer medium
CN112099666A (en) * 2020-09-10 2020-12-18 深圳市科航科技发展有限公司 Touch control method, system, terminal and storage medium applied to capacitive screen
CN112099666B (en) * 2020-09-10 2024-03-29 深圳市科航科技发展有限公司 Touch control method, system, terminal and storage medium applied to capacitive screen
CN112445380A (en) * 2020-12-08 2021-03-05 安徽鸿程光电有限公司 Infrared touch control method, device and all-in-one machine
CN112445380B (en) * 2020-12-08 2022-04-01 安徽鸿程光电有限公司 Infrared touch control method, device and all-in-one machine
CN115269297A (en) * 2022-09-27 2022-11-01 北京云迹科技股份有限公司 Touch screen fault automatic diagnosis method, device, equipment and storage medium
CN115694464A (en) * 2022-11-03 2023-02-03 东莞市力博得电子科技有限公司 Pressure sensing switch control method and device, electronic equipment and readable storage medium
CN115694464B (en) * 2022-11-03 2023-09-12 东莞市力博得电子科技有限公司 Pressure-sensitive switch control method, pressure-sensitive switch control device, electronic equipment and readable storage medium
CN115718555A (en) * 2022-11-16 2023-02-28 河南翔宇医疗设备股份有限公司 Control method of man-machine interaction and related assembly

Similar Documents

Publication Publication Date Title
CN110703937A (en) Abnormity detection method, abnormity detection device, storage medium and terminal equipment
CN108021259B (en) False touch prevention method and electronic equipment
CN108596092B (en) Gesture recognition method, device, equipment and storage medium
CN106775084B (en) A kind of false-touch prevention method, device and mobile terminal of touch screen
CN104571693B (en) Information processing method and electronic equipment
US20180011686A1 (en) Method and device for activating preset function in wearable electronic terminal
CN101963873B (en) Method for setting and calibrating capacitive-type touch panel capacitance base value
CN104007932A (en) Touch point recognition method and device
CN106681636B (en) Method and device for preventing false touch and mobile terminal
US20160328112A1 (en) Method for processing touch signal and terminal device
CN108874284B (en) Gesture triggering method
CN107087075B (en) Prompting method based on screen fingerprint identification and mobile terminal
US10488988B2 (en) Electronic device and method of preventing unintentional touch
CN104536643A (en) Icon dragging method and terminal
CN109669566B (en) Method and device for controlling report point output
CN111625174B (en) Touch screen control method and device, electronic equipment and storage medium
CN107390996A (en) A kind of processing method and mobile terminal of power key false touch
WO2014183527A1 (en) Method and device for managing touch-control area, and computer storage medium
CN105159555A (en) User equipment control method and user equipment
CN106527907B (en) Screen capture processing method and device for intelligent terminal
CN107407996B (en) Suspension touch device and method
EP3511813B1 (en) Force touch method and terminal
CN110764683A (en) Processing operation method and terminal
CN110531894B (en) False touch prevention method, electronic device and computer readable storage medium
CN111752444A (en) Knocking event detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117