CN110955568A - Method and device for positioning problems of touch screen, equipment and storage medium - Google Patents

Method and device for positioning problems of touch screen, equipment and storage medium Download PDF

Info

Publication number
CN110955568A
CN110955568A CN201911077906.2A CN201911077906A CN110955568A CN 110955568 A CN110955568 A CN 110955568A CN 201911077906 A CN201911077906 A CN 201911077906A CN 110955568 A CN110955568 A CN 110955568A
Authority
CN
China
Prior art keywords
event
touch
touch event
output file
action
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.)
Granted
Application number
CN201911077906.2A
Other languages
Chinese (zh)
Other versions
CN110955568B (en
Inventor
林进全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201911077906.2A priority Critical patent/CN110955568B/en
Publication of CN110955568A publication Critical patent/CN110955568A/en
Application granted granted Critical
Publication of CN110955568B publication Critical patent/CN110955568B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a method for positioning problems of a touch screen, which comprises the following steps: acquiring an operation log; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; and if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file. The embodiment of the application also provides a positioning device, equipment and a storage medium for the problems of the touch screen.

Description

Method and device for positioning problems of touch screen, equipment and storage medium
Technical Field
The embodiment of the application relates to electronic technology, and relates to but is not limited to a method, a device, equipment and a storage medium for positioning a touch screen problem.
Background
As an input device, the touch screen can provide a simple, convenient and natural man-machine interaction mode. And is gradually applied to the fields of inquiry of public information, industrial control, military command, electronic games, multimedia teaching, and the like. At present, touch screens are adopted as input devices of electronic equipment such as mobile phones and computers which are frequently used in life and work of people.
In the use process of the current electronic equipment such as a mobile phone, a computer and the like, the problem of no response of probabilistic clicking or no response of sliding often occurs. Therefore, the electronic device manufacturer is required to investigate the cause of the non-response, for example, whether the investigation is a touch screen firmware problem, an input protocol (an input protocol of the android system) problem, or an application itself problem. In the positioning method in the prior art, the problem is reset through a video recording tool and a track line opening function provided in an android system, and then the recorded video and the track line are provided for research and development to debug the problem.
However, the positioning method in the prior art has the following defects: first, the use of a recording tool tends to cause the system to jam. Second, users often forget to turn on the recording tool and trace functions when resetting problems.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for positioning a touch screen problem, a device, and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for locating a problem on a touch screen, where the method includes:
acquiring an operation log;
extracting description information of the touch event from the operation log; the description information comprises coordinates;
forming an output file by the touch event in the operation log;
and if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file.
In an embodiment of the present application, the method further includes:
if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
and if the interval duration is less than the preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file.
In an embodiment of the present application, the method further includes:
if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of the two adjacent action reporting events in the touch event;
and if the distance is larger than or equal to the preset sliding distance, prompting an error, and displaying the position of the coordinates of the two adjacent action reporting events in the output file.
In an embodiment of the present application, the method further includes:
if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events;
and if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file.
In an embodiment of the present application, the method further includes:
and if the first pressing event is matched with the lifting event after the first pressing event, determining the track of the touch event in the output file.
In this embodiment of the present application, the determining a track of a touch event in the output file includes:
acquiring the types of all action reporting events corresponding to the same operation body identifier in the touch event, and the coordinates and time of each action reporting event;
and connecting the corresponding coordinates according to the type and time of each action reporting event to obtain the track of the touch event corresponding to the operation body identifier.
In the embodiment of the application, the preset time period is the minimum report interval duration corresponding to the touch screen.
In a second aspect, an embodiment of the present application provides a device for locating a touch screen problem, where the device includes:
an acquisition unit configured to acquire an operation log;
an extracting unit configured to extract description information of a touch event from the operation log; the description information comprises coordinates;
the forming unit is used for forming an output file by the touch event in the operation log;
and the processing unit is used for prompting an error if the coordinate of the touch event is not in a preset coordinate range, and displaying the position of the coordinate in the output file.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps in the method for locating a touch screen problem as described above.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the method for locating a touch screen problem as described above.
The embodiment of the application provides a method, a device, equipment and a storage medium for positioning problems of a touch screen, wherein operation logs are obtained; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; and if the coordinate of the touch event is not in the preset coordinate range, prompting an error and displaying the position of the coordinate in the output file, so that a method for quickly positioning the problem of the touch screen can be provided under the condition of missing recorded-frequency information, and the problem solving efficiency of engineers is improved.
Drawings
FIG. 1 is a first schematic flow chart illustrating an implementation of a method for locating a problem on a touch screen according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a second implementation flow of a method for positioning a problem of a touch screen according to an embodiment of the present application;
FIG. 3 is a third schematic view illustrating an implementation flow of a method for positioning a problem on a touch screen according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a component structure of a positioning apparatus for solving the problem of the touch screen according to an embodiment of the present disclosure;
fig. 5 is a hardware entity diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will describe the specific technical solutions of the present application in further detail with reference to the accompanying drawings in the embodiments of the present application. The following examples are intended to illustrate the present application only and are not intended to limit the scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
According to the technical scheme, the touch event is analyzed by acquiring the trigger time, the coordinates, the event information, the page information and the like of the touch event in the log, so that the track process of multi-point touch is analyzed and restored. The technical scheme in the embodiment of the application can be applied to electronic equipment such as a mobile phone or a tablet personal computer of an android system, and can analyze the touch screen event information and restore the operation process of the touch screen event information through an offline log under the condition of missing recorded frequency information. In addition, the technical scheme in the embodiment of the application is simple and convenient to operate, and a user only needs to start the log function of the input protocol to reproduce the problem and provide the log.
The embodiment of the application provides a method for positioning a touch screen problem, the method is applied to an electronic device, the function realized by the method can be realized by calling a program code through a processor in the electronic device, of course, the program code can be stored in a computer storage medium, and the electronic device at least comprises the processor and the storage medium. Fig. 1 is a first schematic flow chart illustrating an implementation process of a method for positioning a problem of a touch screen according to an embodiment of the present application, as shown in fig. 1, the method includes:
s101, acquiring an operation log;
for example, if a user finds that a problem occurs in a touch operation (for example, no response to touch occurs, or an actual touch operation does not match a response of the electronic device, or a touch response is delayed, etc.) during a process of using the electronic device, or a product engineer detects the electronic device before the electronic device leaves a factory, a log corresponding to the touch operation may be downloaded and further processed.
Step S102, extracting description information of the touch event from the operation log; the description information comprises coordinates;
here, the description information of the touch event may be extracted from the operation log by a method of searching for a keyword. For example, the keyword may be "InputLog: ViewRootImpl".
Step S103, forming an output file by the touch event in the operation log;
in the embodiment of the application, all touch events extracted from the operation log can be saved and stored as an output file.
And step S104, if the coordinates of the touch event are not in the preset coordinate range, prompting an error, and displaying the position of the coordinates in the output file.
For example, if the preset range of the abscissa corresponding to the touch operation is 0 to 2400 pixels, the preset range of the ordinate is 0 to 1920 pixels, and the coordinate of the touch event is [40, 50], the coordinate of the touch event is within the preset coordinate range. If the coordinate of the touch event is [2401, 50], indicating that the coordinate of the touch event is not in a preset coordinate range, and displaying the position of the abnormal coordinate [2401, 50] in the output file, for example, the abnormal coordinate is positioned in the row and column in the output file.
In the embodiment of the application, the operation log is obtained; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; and if the coordinate of the touch event is not in the preset coordinate range, prompting an error and displaying the position of the coordinate in the output file, so that a method for quickly positioning the problem of the touch screen can be provided under the condition of missing recorded-frequency information, and the problem solving efficiency of engineers is improved.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, where the method includes:
step S111, obtaining an operation log;
step S112, extracting description information of the touch event from the operation log; the description information comprises coordinates;
step S113, forming an output file by the touch event in the operation log;
step S114, if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file;
step S115, if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
here, the touch event may be a current touch event, and the adjacent touch event may be a touch event adjacent to the front of the current touch event, or a touch event adjacent to the back of the current touch event. The current touch event may be a touch event screened by the keyword.
And step S116, if the interval duration is less than a preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file.
In the embodiment of the application, the preset time period can be a reporting rate corresponding to the touch screen. And then, if the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event is less than the corresponding point reporting rate of the touch screen, prompting an error, and displaying the row and column positions of the time stamp of the touch event and the time stamp of the adjacent touch event in the output file.
In the embodiment of the application, the operation log is obtained; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; if the coordinates of the touch event are not in the preset coordinate range, prompting an error, and displaying the position of the coordinates in the output file; if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event; and if the interval duration is less than the preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file, so that the method for quickly positioning the touch screen problem can be provided under the condition of missing the recorded-frequency information, and the problem solving efficiency of an engineer is improved.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, where the method includes:
step S121, obtaining an operation log;
step S122, extracting description information of the touch event from the operation log; the description information comprises coordinates;
step S123, forming an output file by the touch event in the operation log;
step S124, if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file;
step S125, if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
step S126, if the interval duration is less than a preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file;
step S127, if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of two adjacent action reporting events in the touch event;
for example, if a finger is pressed down on the touch screen for five seconds and then lifted up, a touch event is generated. The ACTION reporting event recorded in the log of the touch event may be "ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ UP", that is, the touch event includes four ACTION reporting events in total. The first ACTION _ DOWN and the second ACTION _ DOWN belong to two adjacent ACTION reporting events, the second ACTION _ DOWN and the third ACTION _ DOWN belong to two adjacent ACTION reporting events, and the third ACTION _ DOWN and the first ACTION _ UP belong to two adjacent ACTION reporting events.
For another example, when a finger is pressed down on the touch screen and then slid a distance and lifted up, it is a touch event. The ACTION reporting event recorded in the log of the touch event may be "ACTION _ DOWN … ACTION" ACTION _ MOVE … ACTION "ACTION _ MOVE … ACTION" ACTION _ UP ", that is, the touch event includes four ACTION reporting events in total. The first "ACTION _ DOWN" and the first "ACTION _ MOVE" belong to two adjacent ACTION reporting events, the first "ACTION _ MOVE" and the second "ACTION _ MOVE" belong to two adjacent ACTION reporting events, and the second "ACTION _ MOVE" and the first "ACTION _ UP" belong to two adjacent ACTION reporting events.
And step S128, if the distance is larger than or equal to the preset sliding distance, prompting an error, and displaying the position of the coordinates of the two adjacent action reporting events in the output file.
Here, the preset sliding distance may be determined according to a coordinate range within which the operating body can slide in a time duration corresponding to the reporting rate of the touch screen.
In the embodiment of the application, the operation log is obtained; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; if the coordinates of the touch event are not in the preset coordinate range, prompting an error, and displaying the position of the coordinates in the output file; if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event; if the interval duration is less than the preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file; if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of the two adjacent action reporting events in the touch event; and if the distance is larger than or equal to the preset sliding distance, prompting an error, and displaying the position of the coordinates of the two adjacent action reporting events in the output file, so that a method for quickly positioning the touch screen problem can be provided under the condition of missing recorded-frequency information, and the problem solving efficiency of an engineer is improved.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, where the method includes:
step S131, obtaining an operation log;
step S132, extracting description information of the touch event from the operation log; the description information comprises coordinates;
step S133, forming an output file by the touch event in the operation log;
step S134, if the coordinates of the touch event are not in the preset coordinate range, prompting an error, and displaying the position of the coordinates in the output file;
step S135, if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
step S136, if the interval duration is less than a preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file;
step S137, if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of two adjacent action reporting events in the touch event;
step S138, if the distance is larger than or equal to a preset sliding distance, an error is prompted, and the positions of the coordinates of the two adjacent action reporting events in the output file are displayed;
step S139, if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events;
for example, if a finger is pressed down on the touch screen for five seconds and then lifted up, a touch event is generated. And the ACTION reporting event recorded in the log by the touch event may be "id [0] ═ 0 … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ UP". Then, the first press-DOWN event corresponding to the same operation body identifier (id [0] ═ 0) is the first "ACTION ═ ACTION _ DOWN", the lift-UP event after the first press-DOWN event is the first "ACTION ═ ACTION _ UP", and the first press-DOWN event is matched with the lift-UP event after the first press-DOWN event.
For another example, when a finger is pressed down on the touch screen and then slid a distance and lifted up, it is a touch event. And the ACTION reporting event recorded in the log by the touch event may be "id [0] ═ 0 … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ MOVE … ACTION ═ ACTION _ MOVE … ACTION ═ ACTION _ UP". Then, the first press-DOWN event corresponding to the same operation body identifier (id [0] ═ 0) is the first "ACTION ═ ACTION _ DOWN", the lift-UP event after the first press-DOWN event is the first "ACTION ═ ACTION _ UP", and the first press-DOWN event is matched with the lift-UP event after the first press-DOWN event.
Here, if on the touch screen, the relative movement or the opposite movement of two different fingers is used to realize the zooming in or out of the content in the display screen, it is also a touch event. And two different operation body identifiers exist in the touch event, which correspond to two different fingers, respectively, where the identifier number of the first finger may be "id [0] ═ 0", and the identifier number of the second finger may be "id [1] ═ 1".
And step S140, if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file.
In the embodiment of the application, the operation log is obtained; extracting description information of the touch event from the operation log; the description information comprises coordinates; forming an output file by the touch event in the operation log; if the coordinates of the touch event are not in the preset coordinate range, prompting an error, and displaying the position of the coordinates in the output file; if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event; if the interval duration is less than the preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file; if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of the two adjacent action reporting events in the touch event; if the distance is larger than or equal to a preset sliding distance, prompting an error, and displaying the position of the coordinates of the two adjacent action reporting events in the output file; if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events; and if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file, so that a method for quickly positioning the touch screen problem can be provided under the condition of missing recorded information, and the problem solving efficiency of an engineer is improved.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, where the method includes:
step S141, obtaining an operation log;
step S142, extracting description information of the touch event from the operation log; the description information comprises coordinates;
step S143, forming an output file by the touch event in the operation log;
step S144, if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file;
step S145, if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
step S146, if the interval duration is less than a preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file;
step S147, if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of two adjacent action reporting events in the touch event;
step S148, if the distance is larger than or equal to the preset sliding distance, an error is prompted, and the positions of the coordinates of the two adjacent action reporting events in the output file are displayed;
step S149, if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events;
step S150, if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file;
and S151, if the first pressing event is matched with the lifting event after the first pressing event, determining the track of the touch event in the output file.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, and fig. 2 is a schematic diagram of an implementation flow of the method for positioning a touch screen problem according to the embodiment of the present application, and as shown in fig. 2, the method includes:
step S201, obtaining an operation log;
step S202, extracting description information of the touch event from the operation log; the description information comprises coordinates;
step S203, forming an output file by the touch event in the operation log;
step S204, if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file;
step S205, if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
step S206, if the interval duration is less than a preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file;
step S207, if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of two adjacent action reporting events in the touch event;
s208, if the distance is larger than or equal to a preset sliding distance, prompting an error, and displaying the positions of the coordinates of the two adjacent action reporting events in the output file;
step S209, if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events;
step S210, if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file;
step S211, if the first pressing event is matched with the lifting event after the first pressing event, acquiring the types of all action reporting events corresponding to the same operation body identifier in the touch event, and the coordinates and time of each action reporting event;
for example, if a finger is pressed down on the touch screen for five seconds and then lifted up, a touch event is generated. And the ACTION reporting event recorded in the log by the touch event may be "id [0] ═ 0 … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ UP". Then, the types of all the action reporting events corresponding to the same operation body identifier (id [0] ═ 0) in the touch event include a press-down event and a lift-up event, and further, the coordinates and time of each press-down event and each lift-up event need to be determined.
For another example, when a finger is pressed down on the touch screen and then slid a distance and lifted up, it is a touch event. And the ACTION reporting event recorded in the log by the touch event may be "id [0] ═ 0 … ACTION ═ ACTION _ DOWN … ACTION ═ ACTION _ MOVE … ACTION ═ ACTION _ MOVE … ACTION ═ ACTION _ UP". Then, the types of all the action reporting events corresponding to the same operation body identifier (id [0] ═ 0) in the touch event include a press-down event, a move event, and a lift-up event, and further, the coordinates and time of each of the press-down event, the move event, and the lift-up event need to be determined.
And step S212, connecting the corresponding coordinates according to the type and time of each action reporting event to obtain the track of the touch event corresponding to the operation body identifier.
Based on the foregoing embodiment, an embodiment of the present application further provides a method for positioning a touch screen problem, and fig. 3 is a schematic view of an implementation flow of the method for positioning a touch screen problem according to the embodiment of the present application, and as shown in fig. 3, the method includes:
s301, traversing the acquired offline logs, screening out all information related to touch operation through keyword retrieval, and storing the screened information as a first file;
in this embodiment of the present application, the keywords in the offline log may be retrieved, for example: the keyword "InputLog: ViewRootImpl" screens out all information related to touch operations. Wherein the information related to the touch operation may include: an identification number of an operation body (e.g., a finger) corresponding to the touch operation, an event type of the touch operation, coordinates of the touch operation, a time of the touch operation, and the like. The event type of the touch operation includes a press-down event, a move event, a lift-up event, and the like.
For example, in a log information "15: 15: 10.21526462646 DInputLog: viewrootimpact [ navigator ]," enqueueInputEvent, { ACTION ═ ACTION _ DOWN, ACTION button ═ 0, id [0] (0), x [0] (53.0), y [0] (79.0), toolType [0] (tol _ TYPE _ filler, button state ═ 0, metaState ═ 0, scans ═ 0x0, edgeFlags ═ 0x0, pointercouterouch ═ 1, testysize ═ 0, event 7543323, timedown 7543323, event ═ 0, pointerevent: "event": event ". 0, event". 0.7, event ": event," -event ": event," -event ": touch operation, [ 0.7, and" touch operation ": this indicates that the touch operation is an event,", event ". 0.7.
Here, different operation bodies may correspond to different identification numbers. For example, the identification number corresponding to the first finger pressing the touch screen is 0, the identification number corresponding to the tenth finger pressing the touch screen is 9, and the finger can be released every time the finger leaves one identification number in the middle.
Step S302, setting a coordinate range, and judging whether abnormal coordinates which do not conform to the coordinate range exist in the first file;
in the embodiment of the present application, the set coordinate range may include an X maximum value, a Y maximum value, an X minimum value, and a Y minimum value. Wherein, X represents the horizontal axis direction corresponding to the touch operation, and Y represents the vertical axis direction corresponding to the touch operation.
For example, the maximum value of X corresponding to the touch operation on the touch screen is 2400 pixels, the maximum value of Y is 1920 pixels, the minimum value of X is 0 pixels, and the minimum value of Y is 0 pixels. And when the abscissa in the first file is smaller than the minimum value 0 pixel point of X or the ordinate in the first file is smaller than the minimum value 0 pixel point of Y, prompting an error, wherein the abscissa or the ordinate is an abnormal coordinate. Or when the horizontal and vertical coordinates in the first file are equal to the minimum value 0 pixel point of X and the minimum value 0 pixel point of Y at the same time, an error is prompted, and the horizontal and vertical coordinates are abnormal coordinates. Or when the abscissa in the first file is larger than or equal to the maximum 2400 pixel points of X or the ordinate in the first file is larger than or equal to the maximum 1920 pixel points of Y, an error is prompted, and the abscissa and the ordinate are abnormal coordinates.
Step S303, if the abnormal coordinates exist, prompting an error;
here, the error may be presented by displaying an error line number. For example, if the anomalous coordinates are located in the third row in the first file, the row number of the third row may be displayed to prompt the user that anomalous coordinates exist in this row.
Step S304, if no abnormal coordinate exists, setting a minimum reporting interval threshold time, and judging whether the interval between each touch event is greater than or equal to the minimum reporting interval threshold time;
in this embodiment of the application, the minimum reporting interval threshold time may be a touch screen reporting rate. Such as 100HZ for the touch screen support used by the project, the minimum tick interval threshold time is 10 MS.
Here, the minimum reporting interval threshold time refers to a frequency of reporting data to the terminal system by the touch screen. For example, if 10MS (MS) reports data to the mobile phone once, the minimum time interval is 10 MS.
Step S305, if the interval between the touch events is less than the minimum report point interval threshold time, prompting an error;
here, the error may be presented by displaying an error line number.
Step S306, if the interval between the touch events is more than or equal to the minimum report point interval threshold time, setting a maximum sliding threshold distance;
step S307, judging whether the coordinate interval triggered by the current event and the last event is less than or equal to the maximum sliding threshold distance between one touch event;
for example, the coordinate range of the touch screen is 0-2400 pixels on the horizontal axis and 0-1900 pixels on the vertical axis, and the maximum sliding threshold distance needs to be determined according to the coordinate range within which the operation body (e.g., a finger) can slide in the time corresponding to the touch screen reporting rate. For example, the touch screen supports 100HZ (hertz), and within a 10MS (millisecond) reporting rate, the hand limit distance is 120 pixels in the horizontal axis direction of the touch operation and 120 pixels in the vertical axis direction of the touch operation. Therefore, if the coordinate range is exceeded, the time reported by the firmware is considered to be abnormal.
Step S308, if the coordinate interval is larger than the maximum sliding threshold distance, an error is prompted;
here, the error may be presented by displaying an error line number.
Step S309, if the coordinate interval is less than or equal to the maximum sliding threshold distance, acquiring the identification number of the current operation body;
step S310, if the first event corresponding to the identification number of the current operation body is a pressing event, recording the coordinate corresponding to the pressing event as the starting point of the current operation body, and storing the time, the coordinate and the event information of the pressing event for drawing;
here, the identification number of each current operation body may be acquired, and if it is determined that the event is a pressing event, the coordinate corresponding to the pressing event is recorded as the starting point of the touch operation of the current operation body, and the time, the coordinate information, and the event information of the coordinate are stored and plotted. And circularly detecting, namely recording a coordinate corresponding to the lift-up event as the terminal point of the touch operation of the current operation body when the lift-up event is judged, and finishing the drawing of the touch operation of the current operation body.
And if the identification number of the current operation body, the press-down event and the lift-up event do not appear in pairs, the abnormity is prompted.
Generally, the maximum number of operators that can be simultaneously supported by the current android system is 10 fingers, that is, only ten fingers of touch operation can be responded to at the same time. For example, if eleven fingers press simultaneously, there will be one finger not support. Meanwhile, when a plurality of fingers perform touch operation, each finger has an own identification number, and therefore coordinate information, event information and time information of each identification number between trigger pressing events, moving events and lifting point reporting rates of each event can be recorded, and a touch operation track corresponding to each identification number is drawn according to the coordinate information, the event information and the time information.
Step S311, performing circular detection, and if the event corresponding to the identification number of the current operation body is a lift event, recording a coordinate corresponding to the lift event as an end point of the current operation body, and finishing the track drawing of the current operation body;
step S312, judging whether the events corresponding to the identification number of the current operation body are not paired with each other;
and step 313, if the press-down event and the lift-up event are not paired, presenting an exception.
According to the technical scheme, the method for rapidly positioning the multi-point touch input protocol problem of the touch screen can be provided under the condition that the recorded frequency information is lost, the efficiency of the manual screening problem of an engineer is low, the problem solving efficiency is improved, and meanwhile the positioning method for finding the abnormal input protocol problem is provided.
Based on the foregoing embodiments, the present application provides a positioning apparatus for a touch screen problem, where the apparatus includes units, modules included in the units, and components included in the modules, and may be implemented by a processor in an electronic device; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, a CPU (Central Processing Unit, which may be a Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing), an FPGA (Field programmable gate Array), or the like is used.
Fig. 4 is a schematic structural diagram of a positioning apparatus for solving the problem of the touch screen according to an embodiment of the present application, and as shown in fig. 4, the apparatus 400 includes:
an acquisition unit 401 configured to acquire an operation log;
an extracting unit 402, configured to extract description information of a touch event from the operation log; the description information comprises coordinates;
a forming unit 403, configured to form an output file from the touch event in the operation log;
and the processing unit 404 is configured to prompt an error if the coordinate of the touch event is not within a preset coordinate range, and display a position of the coordinate in the output file.
In some embodiments, the apparatus further comprises:
the time length determining unit is used for determining the interval time length between the time stamp of the touch event and the time stamp of the adjacent touch event if the coordinate of the touch event is in a preset coordinate range;
and the prompting unit is used for prompting an error if the interval duration is less than a preset time period, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file.
In some embodiments, the apparatus further comprises:
the distance determining unit is used for determining the distance between the coordinates of two adjacent action reporting events in the touch event for one time if the interval duration is greater than or equal to the preset time period;
and the prompting unit is further used for prompting an error if the distance is greater than or equal to a preset sliding distance, and displaying the position of the coordinates of the two adjacent action reporting events in the output file.
In some embodiments, the apparatus further comprises:
the time determining unit is used for determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event if the distance is smaller than the preset sliding distance; the press-down event and the lift-up event belong to action reporting events;
and the prompting unit is further used for prompting an error if the first pressing event is not matched with the lifting event after the first pressing event, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file.
In some embodiments, the apparatus further comprises:
and the track determining unit is used for determining the track of the touch event in the output file if the first pressing event is matched with the lifting event after the first pressing event.
In some embodiments, the trajectory determination unit includes:
the acquisition module is used for acquiring the types of all action reporting events corresponding to the same operation body identifier in the touch event, and the coordinates and time of each action reporting event;
and the track determining module is used for connecting the corresponding coordinates according to the type and the time of each action reporting event to obtain the track of the touch event corresponding to the operation body identifier.
In some embodiments, the preset time period is a minimum report interval duration corresponding to the touch screen.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the positioning method for the touch screen problem is implemented in the form of a software functional module, and is sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing an electronic device (which may be a personal computer, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read Only Memory), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be run on the processor, and the processor executes the computer program to implement the steps in the method for positioning a touch screen problem provided in the foregoing embodiment.
Correspondingly, the embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the positioning method for the touch screen problem.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that fig. 5 is a schematic diagram of a hardware entity of an electronic device according to an embodiment of the present application, and as shown in fig. 5, the hardware entity of the electronic device 500 includes: a processor 501, a communication interface 502, and a memory 503, wherein:
the processor 501 generally controls the overall operation of the electronic device 500.
The communication interface 502 may enable the electronic device 500 to communicate with other terminals or servers via a network.
The Memory 503 is configured to store instructions and applications executable by the processor 501, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 501 and modules in the electronic device 500, and may be implemented by FLASH Memory or RAM (Random Access Memory).
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a ROM (Read-only Memory), a RAM (Random Access Memory), a magnetic disk, and an optical disk.
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 (10)

1. A method for locating a problem on a touch screen, the method comprising:
acquiring an operation log;
extracting description information of the touch event from the operation log; the description information comprises coordinates;
forming an output file by the touch event in the operation log;
and if the coordinate of the touch event is not in the preset coordinate range, prompting an error, and displaying the position of the coordinate in the output file.
2. The method of claim 1, further comprising:
if the coordinates of the touch event are in a preset coordinate range, determining the interval duration between the time stamp of the touch event and the time stamp of the adjacent touch event;
and if the interval duration is less than the preset time period, prompting an error, and displaying the time stamp of the touch event and the position of the time stamp of the adjacent touch event in the output file.
3. The method of claim 2, further comprising:
if the interval duration is greater than or equal to the preset time period, determining the distance between the coordinates of the two adjacent action reporting events in the touch event;
and if the distance is larger than or equal to the preset sliding distance, prompting an error, and displaying the position of the coordinates of the two adjacent action reporting events in the output file.
4. The method of claim 3, further comprising:
if the distance is smaller than the preset sliding distance, determining a first pressing event corresponding to the same operation body identifier in the touch event and a lifting event after the first pressing event; the press-down event and the lift-up event belong to action reporting events;
and if the first pressing event is not matched with the lifting event after the first pressing event, prompting an error, and displaying the positions of the first pressing event and the lifting event after the first pressing event in the output file.
5. The method of claim 4, further comprising:
and if the first pressing event is matched with the lifting event after the first pressing event, determining the track of the touch event in the output file.
6. The method of claim 5, wherein determining the trajectory of the touch event in the output file comprises:
acquiring the types of all action reporting events corresponding to the same operation body identifier in the touch event, and the coordinates and time of each action reporting event;
and connecting the corresponding coordinates according to the type and time of each action reporting event to obtain the track of the touch event corresponding to the operation body identifier.
7. The method according to claim 2 or 3, wherein the preset time period is a minimum report interval duration corresponding to the touch screen.
8. An apparatus for locating a problem with a touch screen, the apparatus comprising:
an acquisition unit configured to acquire an operation log;
an extracting unit configured to extract description information of a touch event from the operation log; the description information comprises coordinates;
the forming unit is used for forming an output file by the touch event in the operation log;
and the processing unit is used for prompting an error if the coordinate of the touch event is not in a preset coordinate range, and displaying the position of the coordinate in the output file.
9. An electronic device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor when executing the program performs the steps in the method for locating a touch screen problem according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for locating a touch screen problem according to any one of claims 1 to 7.
CN201911077906.2A 2019-11-06 2019-11-06 Touch screen problem positioning method and device, equipment and storage medium Active CN110955568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911077906.2A CN110955568B (en) 2019-11-06 2019-11-06 Touch screen problem positioning method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911077906.2A CN110955568B (en) 2019-11-06 2019-11-06 Touch screen problem positioning method and device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110955568A true CN110955568A (en) 2020-04-03
CN110955568B CN110955568B (en) 2023-09-01

Family

ID=69976098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911077906.2A Active CN110955568B (en) 2019-11-06 2019-11-06 Touch screen problem positioning method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110955568B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238680A (en) * 2021-05-28 2021-08-10 广州绿怡信息科技有限公司 Screen touch and break detection method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512023A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for Monkey testing
CN106775084A (en) * 2016-12-16 2017-05-31 广东欧珀移动通信有限公司 A kind of false-touch prevention method of touch-screen, device and mobile terminal
CN108009073A (en) * 2017-12-21 2018-05-08 深圳市金立通信设备有限公司 By method, terminal and the computer-readable recording medium of daily record reproduction touch trajectory
US20180364865A1 (en) * 2015-11-20 2018-12-20 Nubia Technology Co., Ltd. Touch control method, user equipment, input processing method, mobile terminal and intelligent terminal
CN109782960A (en) * 2019-02-19 2019-05-21 Oppo广东移动通信有限公司 Touch screen report point region switching method, electronic device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512023A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for Monkey testing
US20180364865A1 (en) * 2015-11-20 2018-12-20 Nubia Technology Co., Ltd. Touch control method, user equipment, input processing method, mobile terminal and intelligent terminal
CN106775084A (en) * 2016-12-16 2017-05-31 广东欧珀移动通信有限公司 A kind of false-touch prevention method of touch-screen, device and mobile terminal
CN108009073A (en) * 2017-12-21 2018-05-08 深圳市金立通信设备有限公司 By method, terminal and the computer-readable recording medium of daily record reproduction touch trajectory
CN109782960A (en) * 2019-02-19 2019-05-21 Oppo广东移动通信有限公司 Touch screen report point region switching method, electronic device and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238680A (en) * 2021-05-28 2021-08-10 广州绿怡信息科技有限公司 Screen touch and break detection method and device

Also Published As

Publication number Publication date
CN110955568B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
US10048804B2 (en) Method for preventing false touches on terminal and terminal
CN108021259B (en) False touch prevention method and electronic equipment
US10559283B2 (en) Automated user device damage remediation
CN110347716B (en) Log data processing method, device, terminal equipment and storage medium
CN107329659B (en) Permission setting method and device, electronic equipment and storage medium
CN107741902B (en) Program application detection method and program application detection device
US20160328112A1 (en) Method for processing touch signal and terminal device
CN105653171A (en) Fingerprint identification based terminal control method, terminal control apparatus and terminal
CN104598128A (en) Method and system for recommending solutions on basis of operation behaviors of users
US20150207923A1 (en) Method, terminal and computer storage medium for triggering a communication with a contact
CN104866226A (en) Terminal device and method for controlling same
TW201516653A (en) Method, apparatus and computer program product for debugging and error prevention
US10146372B2 (en) Method for controlling blank screen gesture processing and terminal
CN105468133B (en) Touch processing method and device
CN105323748B (en) Test error uploading method and device
US10228792B2 (en) Touch determining device and method, and display device
CN110955568B (en) Touch screen problem positioning method and device, equipment and storage medium
CN106919489B (en) Method and device for monitoring abnormal exit of application interface of application program
CN107239202B (en) Control instruction identification method and device
CN110275639B (en) Touch data processing method and device, terminal and storage medium
CN109710111B (en) False touch prevention method and electronic equipment
CN110377444B (en) Fault alarm method, device, electronic equipment and computer readable storage medium
US20130113708A1 (en) Method and apparatus enabling keystroke acceleration
CN106527907B (en) Screen capture processing method and device for intelligent terminal
EP2840468A1 (en) Input 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
GR01 Patent grant
GR01 Patent grant