Touch gesture sensitivity detection method and device, electronic equipment and storage medium
By calculating the correlation coefficients between the touch screen behavior event set and the view offset distance set, the problems of high sensitivity cost of detecting touch gestures and high threshold for popularization in the prior art are solved, and low-cost and efficient sensitivity detection is achieved.
Patent Information
- Application Number
- CN202411192321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art methods for detecting touch gesture sensitivity are costly, the hardware and software are complex in joint adjustment, and the technology popularization threshold is high.
By obtaining the touch screen behavior event set and the view offset distance set, the correlation coefficient between the two is calculated to detect the sensitivity of the touch gesture.
It reduces the detection cost, simplifies the technology popularization process, and achieves low cost and high efficiency of sensitivity detection.
Smart Images

Figure CN119088280A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a touch gesture sensitivity detection method, device, electronic device and storage medium. Background Art
[0002] As information and intelligent life become increasingly common, mobile touch-screen devices such as mobile phones have become essential products in people's lives, bringing great convenience to people's lives and great efficiency improvement in work. The touch-screen function carried by mobile touch-screen devices enables people to interact with the APP installed on the mobile touch-screen devices quickly and directly. During the process of people interacting with the APP, all touch gestures (such as sliding gestures) can be executed on the touch screen, thereby acting on the APP view. The operation process is simple and intuitive, which greatly improves people's operating experience and efficiency.
[0003] In the related technology, when people interact with APP, they perform corresponding touch gestures on the APP view, and the APP view will then produce corresponding responses. It is necessary to detect the sensitivity of the touch gestures to provide a reference standard for improving the APP interaction experience. At present, in order to detect the sensitivity of touch gestures, a high-definition camera is generally used to record the process of a robot performing touch gestures on the APP view to collect the response image of the continuous APP view, and then the sensitivity of the touch gesture is calculated according to certain technical rules. The implementation cost of this technology is relatively high, the control software and hardware are relatively complex, and the threshold for popularization of the technology is relatively high. Summary of the invention
[0004] In order to solve the above-mentioned problem of detecting the sensitivity of touch gestures, a high-definition camera is generally used to record the process of a robot performing touch gestures on an APP view to collect the response image of the continuous APP view, and then the sensitivity of the touch gesture is calculated according to certain technical rules. This technology has high implementation costs, complex control software and hardware coordination, and a high threshold for technology popularization. This application provides a touch gesture sensitivity detection method, device, electronic device and storage medium. The specific technical solution is as follows:
[0005] In a first aspect, the present application provides a touch gesture sensitivity detection method, the method comprising:
[0006] Acquire a touch screen behavior event set, where the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view;
[0007] Obtain a view offset distance set, where the view offset distance set is generated by an object performing at least one touch gesture in an application view;
[0008] Determine a correlation coefficient between a touch screen behavior event in the touch screen behavior event set and a view offset distance in the view offset distance set;
[0009] According to the correlation coefficient, the sensitivity of the touch gesture is detected at least once.
[0010] In an optional implementation, each touch screen behavior event in the touch screen behavior event set records a corresponding touch time;
[0011] The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set includes:
[0012] Traversing the touch screen behavior events in the touch screen behavior event set, and acquiring the touch control moment corresponding to the currently traversed touch screen behavior event;
[0013] In the touch screen behavior event set, detecting whether there are other touch screen behavior events other than the touch screen behavior event at the touch moment;
[0014] If not present, determining a correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set;
[0015] If the touch screen behavior event exists, the touch screen behavior event in the touch screen behavior event set is determined to be invalid, and the touch screen behavior event set is deleted.
[0016] In an optional implementation, the determining a correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set includes:
[0017] Dividing the touch screen behavior event set into at least one touch screen behavior event subset, wherein the touch screen behavior event subset corresponds to a single touch gesture;
[0018] For any of the touch screen behavior event subsets, filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset;
[0019] Determining a correlation coefficient between a touch screen behavior event in the touch screen behavior event subset and a view offset distance in the view offset distance subset;
[0020] The step of detecting the sensitivity of the touch gesture at least once according to the correlation coefficient includes:
[0021] The sensitivity of the touch gesture corresponding to the touch screen behavior event subset is detected according to the correlation coefficient.
[0022] In an optional implementation, the touch screen behavior event set is an ordered set, and the touch screen behavior event records the touch state of the touch gesture;
[0023] The step of dividing the touch screen behavior event set into at least one touch screen behavior event subset includes:
[0024] Acquire an ordered set of touch states, where the ordered set of touch states is stored in the order of execution of all touch states during the execution of the touch gesture;
[0025] According to the touch state ordered set, dividing the touch screen behavior event set into at least one touch screen behavior event subset;
[0026] The order of touch states of the touch screen behavior event records in the touch screen behavior event subset is consistent with the order of touch states in the touch state ordered set.
[0027] In an optional implementation, the view offset distances in the view offset distance set have corresponding distance acquisition moments;
[0028] The filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset includes:
[0029] Determine a touch time range consisting of touch moments corresponding to the touch screen behavior events in the touch screen behavior event subset;
[0030] According to the touch time range, filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset;
[0031] The distance collection time range composed of distance collection moments corresponding to the view offset distances of the view offset distance subset is consistent with the touch time range.
[0032] In an optional implementation, each of the view offset distances is obtained by subtracting a first coordinate value of a marker point on the application view at a previous moment from a second coordinate value at a current moment;
[0033] The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset includes:
[0034] Determine a difference between the second coordinate values corresponding to any adjacent view offset distances in the view offset distance subset, and detect whether the difference is a continuous positive value or a negative value;
[0035] In a case where the difference is a continuous positive value or a negative value, a correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset is determined.
[0036] In an optional embodiment, the method further comprises:
[0037] In a case where the difference is not a continuous positive value or a negative value, determining that the touch gesture corresponding to the touch screen behavior event subset is a touch gesture in multiple directions;
[0038] Splitting the view offset distance subset to obtain a plurality of view offset distance subsequences;
[0039] For any of the view offset distance subsequences, filtering, from the touch screen behavior event subset, a touch screen behavior event subsequence corresponding to the view offset distance subsequence;
[0040] Determining a correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distances in the view offset distance subsequence;
[0041] Detecting the sensitivity of the touch gesture corresponding to the touch screen behavior event subset according to the correlation coefficient includes:
[0042] The sensitivity of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence is detected according to the correlation coefficient.
[0043] In an optional implementation, the touch screen behavior event records the touch point coordinates, and the view offset distance includes a view horizontal offset distance and a view vertical offset distance;
[0044] The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset includes:
[0045] Determine the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset, and perform the following processing:
[0046] Filtering, according to the first sliding direction, the X-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset;
[0047] According to the first sliding direction, screening the view horizontal offset distance included in the view offset distance in the view offset distance subset;
[0048] Determine a correlation coefficient between the X-axis coordinate of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset and the view lateral offset distance included in the view offset distance in the view offset distance subset;
[0049] or,
[0050] Filtering the Y-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset according to the first sliding direction;
[0051] According to the first sliding direction, filtering the view longitudinal offset distance included in the view offset distance in the view offset distance subset;
[0052] Determine a correlation coefficient between the Y-axis coordinate of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset and the view longitudinal offset distance included in the view offset distance in the view offset distance subset.
[0053] In an optional implementation, the determining the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset includes:
[0054] Traversing the touch screen behavior events in the touch screen behavior event subset, and obtaining the X-axis coordinate and the Y-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event;
[0055] For any of the traversed touch screen behavior events, determine the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinate recorded in the traversed touch screen behavior event;
[0056] Determine the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event currently traversed and the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event that has been traversed;
[0057] Selecting a first X-axis coordinate difference from the X-axis coordinate differences, and selecting a first Y-axis coordinate difference from the Y-axis coordinate differences, wherein the first X-axis coordinate difference is the largest X-axis coordinate difference, and the first Y-axis coordinate difference is the largest Y-axis coordinate difference;
[0058] When the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, selecting the largest first X-axis coordinate difference from the first X-axis coordinate differences, and selecting the largest first Y-axis coordinate difference from the first Y-axis coordinate differences;
[0059] When the maximum first X-axis coordinate difference is greater than the maximum first Y-axis coordinate difference, determining the horizontal direction as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset;
[0060] When the maximum first X-axis coordinate difference is less than or equal to the maximum first Y-axis coordinate difference, the vertical direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset.
[0061] In an optional implementation, the touch screen behavior event records the touch point coordinates, and the view offset distance includes a view horizontal offset distance and a view vertical offset distance;
[0062] The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distances in the view offset distance subsequence includes:
[0063] Determine the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence, and perform the following processing:
[0064] According to the second sliding direction, filtering the X-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subsequence;
[0065] According to the second sliding direction, screening the view horizontal offset distance included in the view offset distance in the view offset distance subsequence;
[0066] Determine a correlation coefficient between an X-axis coordinate of the touch point coordinate recorded in the touch screen behavior event record in the touch screen behavior event subsequence and the view horizontal offset distance included in the view offset distance in the view offset distance subsequence;
[0067] or,
[0068] According to the second sliding direction, filtering the Y-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subsequence;
[0069] According to the second sliding direction, screening the view longitudinal offset distance included in the view offset distance subsequence;
[0070] Determine a correlation coefficient between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event in the touch screen behavior event subsequence and the view longitudinal offset distance included in the view offset distance in the view offset distance subsequence.
[0071] In an optional implementation, the determining the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence includes:
[0072] Traversing the touch screen behavior events in the touch screen behavior event subsequence, and obtaining the X-axis coordinate and the Y-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event;
[0073] For any of the traversed touch screen behavior events, determine the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinate recorded in the traversed touch screen behavior event;
[0074] Determine the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event currently traversed and the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event that has been traversed;
[0075] Selecting a second X-axis coordinate difference from the X-axis coordinate differences, and selecting a second Y-axis coordinate difference from the Y-axis coordinate differences, wherein the second X-axis coordinate difference is the largest X-axis coordinate difference, and the second Y-axis coordinate difference is the largest Y-axis coordinate difference;
[0076] When the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, selecting the largest second X-axis coordinate difference from the second X-axis coordinate differences, and selecting the largest second Y-axis coordinate difference from the second Y-axis coordinate differences;
[0077] When the maximum second X-axis coordinate difference is greater than the maximum second Y-axis coordinate difference, determining the horizontal direction as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence;
[0078] When the maximum second X-axis coordinate difference is less than or equal to the maximum second Y-axis coordinate difference, the vertical direction is determined as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence.
[0079] In a second aspect, the present application provides a touch gesture sensitivity detection device, the device comprising:
[0080] An event set acquisition module, used to acquire a touch screen behavior event set, wherein the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view;
[0081] A distance set acquisition module, used to acquire a view offset distance set, wherein the view offset distance set is generated by an object performing at least one touch gesture in an application view;
[0082] a coefficient determination module, configured to determine a correlation coefficient between a touch screen behavior event in the touch screen behavior event set and a view offset distance in the view offset distance set;
[0083] A sensitivity detection module is used to detect the sensitivity of the touch gesture at least once according to the correlation coefficient.
[0084] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0085] Memory, used to store computer programs;
[0086] The processor is used to implement any touch gesture sensitivity detection method described in the first aspect when executing the program stored in the memory.
[0087] In a fourth aspect, a storage medium is further provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes any of the touch gesture sensitivity detection methods described in the first aspect.
[0088] In a fifth aspect, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned touch gesture sensitivity detection methods.
[0089] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the method provided by the embodiment of the present application obtains a touch screen behavior event set, which is generated by an object performing at least one touch gesture on an application view; obtains a view offset distance set, which is generated by an object performing at least one touch gesture in an application view; determines the correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set; and detects the sensitivity of at least one touch gesture based on the correlation coefficient.
[0090] By obtaining a touch screen behavior event set and a view offset distance set, both of which are generated by an object performing at least one touch gesture on an application view, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of at least one touch gesture is detected based on the correlation coefficient. In this way, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of the touch gesture can be detected based on the correlation coefficient. The implementation cost of this technology is low, which reduces the threshold for popularization of the technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0092] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0093] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0094] Figure 1 A schematic diagram of an implementation flow of a touch gesture sensitivity detection method provided in an embodiment of the present application;
[0095] Figure 2 A schematic diagram of an implementation flow of another touch gesture sensitivity detection method provided in an embodiment of the present application;
[0096] Figure 3 A trajectory diagram of a unidirectional sliding gesture provided in an embodiment of the present application;
[0097] Figure 4 A trajectory diagram of a multi-directional sliding gesture provided in an embodiment of the present application;
[0098] Figure 5 A schematic diagram of the structure of a touch gesture sensitivity detection device provided in an embodiment of the present application;
[0099] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0101] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0102] In the embodiment of the present application, the sensitivity of the touch gesture is reflected in that when the touch is accelerated (e.g., sliding) after the finger touches the screen, the APP view responds with acceleration, when the touch is decelerated after the finger touches the screen, the APP view responds with deceleration, when the finger stops, the APP view stops, and when the finger touches the screen in a different direction, the APP view changes. The change in finger speed can be measured by the change in position on the touch screen per unit time, and the speed at which the APP view follows the change can be measured by the change in the position of the scrolling APP view content compared to the container origin. The sensitivity of the touch gesture is measured by analyzing whether the change trends of the first two are consistent.
[0103] Based on the above invention concept, Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a touch gesture sensitivity detection method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0104] S101, obtaining a touch screen behavior event set, where the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view.
[0105] In an embodiment of the present application, a touch screen behavior event set can be obtained, wherein the touch screen behavior event set includes multiple touch screen behavior events, and the touch screen behavior event set is generated by an object (such as a user) performing at least one touch gesture (such as a sliding gesture) on an application view, which means that the object (such as a user) performing at least one touch gesture on the application view will generate a touch screen behavior event set.
[0106] It should be noted that the touch screen behavior event usually includes the touch state (such as finger pressing, finger moving, finger stopping, finger lifting, canceling, etc.), touch point coordinates (such as (x, y)), touch time (determined by the screen touch sampling rate), etc. In addition, it may also include the screen direction (vertical horizontal screen, vertical screen, face up, face down), etc., which is not limited in the embodiments of the present application.
[0107] Among them, the above-mentioned touch moment recorded in the touch screen behavior event is determined by the screen touch sampling rate of the current mobile device (such as a mobile phone). The time interval for sampling each touch screen behavior event is consistent. Taking a screen touch sampling rate of 60Hz as an example, the time interval between the touch moments recorded in each touch screen behavior event is 1 / 60 second.
[0108] In addition, the object (such as a user) performs at least one touch gesture on the application view, and the corresponding touch point coordinates are normally one, but there may be multiple ones, which means that the object (such as a user) performs at least one touch gesture on the application view with multiple fingers. At this time, for the same touch moment, there will be multiple touch screen behavior events, in which the recorded touch moments are the same, but the touch point coordinates are different. This situation will be filtered later, and the touch screen behavior events will be stored in order according to the touch moments to obtain a touch screen behavior event set.
[0109] S102, obtaining a view offset distance set, where the view offset distance set is generated by an object performing at least one touch gesture in an application view.
[0110] In an embodiment of the present application, in addition to obtaining the touch screen behavior event set as mentioned above, a view offset distance set can also be obtained. The view offset distance set, like the above touch screen behavior event set, is also generated by an object performing at least one touch gesture in the application view, which means that an object (for example, a user) performing at least one touch gesture on the application view will generate a touch screen behavior event set and a view offset distance set.
[0111] For the view offset distance set, which includes multiple view offset distances, and each view offset distance has a corresponding distance collection moment, the distance collection moment is determined by the screen touch sampling rate of the current mobile device (such as a mobile phone), and the time interval for each view offset distance sampling is consistent. Taking a screen touch sampling rate of 60Hz as an example, the time interval for the distance collection moment corresponding to each view offset distance is 1 / 60 second.
[0112] The view offset distance can be calculated from the coordinate values of a point on the APP view before and after sliding, which can be subdivided into the horizontal offset distance of the X axis and the vertical offset distance of the Y axis. For example, for the APP view, during the sliding process, there is a visible range, namely, frame, and the APP view has a corresponding slidable area, namely, contentsize. In the process of sliding the APP view's visible range in the slidable area with the user's finger, the coordinate values of the vertices in the APP view's visible range before and after sliding can be used to calculate the offset distance, which is usually reflected in contentOffset.
[0113] S103: Determine a correlation coefficient between a touch screen behavior event in a touch screen behavior event set and a view offset distance in a view offset distance set.
[0114] S104: Detect the sensitivity of at least one touch gesture according to the correlation coefficient.
[0115] In the embodiment of the present application, for the touch screen behavior event set and the view offset distance set, a correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set can be determined, and the sensitivity of at least one touch gesture is detected according to the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set. The determination of the correlation coefficient will be described later.
[0116] Through the above description of the technical solution provided by the embodiment of the present application, by obtaining a touch screen behavior event set and a view offset distance set, both of which are generated by an object performing at least one touch gesture on an application view, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of at least one touch gesture is detected based on the correlation coefficient. In this way, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of the touch gesture can be detected based on the correlation coefficient. The implementation cost of this technology is low, which reduces the threshold for popularization of the technology.
[0117] Before executing the above method, it is first necessary to detect whether the application view supports touch gestures, such as whether it supports sliding gestures. To this end, it is detected whether the components in the application view are interactive and whether the response area of the application view is larger than the window area of the application view; if the components in the application view are interactive and the response area of the application view is larger than the window area of the application view, it means that the application view supports touch gestures, and the above method can be executed at this time.
[0118] In addition, in the embodiment of the present application, in the process of obtaining the touch screen behavior event set, there may be multiple touch point coordinates at the same touch moment, that is, there are multiple fingers touching the screen at the same time. Since multi-finger sliding performs inconsistently on different mobile devices, for example, three-finger sliding can switch APPs, and four-finger aggregate sliding can return to the main screen of the mobile device, etc., the embodiment of the present application only analyzes the situation of single-finger sliding and eliminates the situation of multi-finger sliding.
[0119] Based on this, Figure 2 FIG. 1 is a schematic diagram of an implementation flow of another touch gesture sensitivity detection method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0120] S201, obtaining a touch screen behavior event set, where the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view.
[0121] In the embodiment of the present application, this step is similar to the above-mentioned step S101, and the embodiment of the present application will not be described one by one here.
[0122] S202, obtaining a view offset distance set, where the view offset distance set is generated by an object performing at least one touch gesture in an application view.
[0123] In the embodiment of the present application, this step is similar to the above-mentioned step S102, and the embodiment of the present application will not be described one by one here.
[0124] S203, traversing the touch screen behavior events in the touch screen behavior event set, and obtaining the touch time corresponding to the currently traversed touch screen behavior event.
[0125] S204: Detect whether there are any touch screen behavior events other than the touch screen behavior event at the touch moment in the touch screen behavior event set.
[0126] S205: If not, determine a correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set.
[0127] S206: If the touch screen behavior event exists, determine the touch screen behavior event in the touch screen behavior event set as invalid, and delete the touch screen behavior event set.
[0128] In the embodiment of the present application, a corresponding touch moment is recorded for each touch screen behavior event in the touch screen behavior event set. Thus, the touch screen behavior events in the touch screen behavior event set are traversed to obtain the touch moment corresponding to the touch screen behavior event; in the touch screen behavior event set, it is detected whether there are other touch screen behavior events other than the touch screen behavior event at the touch moment; if not, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined; if so, the touch screen behavior event in the touch screen behavior event set is determined to be invalid, and the touch screen behavior event set is deleted.
[0129] In this way, the touch screen behavior events in the touch screen behavior event set are traversed, and according to the touch time recorded in the touch screen behavior event, it is detected whether there are multiple touch screen behavior events at the same touch time. Single-finger touch (such as sliding) can be retained, and multi-finger touch (such as sliding) can be eliminated.
[0130] S207: Detect the sensitivity of at least one touch gesture according to the correlation coefficient.
[0131] In the embodiment of the present application, this step is similar to the above-mentioned step S104, and the embodiment of the present application will not be described one by one here.
[0132] By obtaining a touch screen behavior event set and a view offset distance set, both of which are generated by an object performing at least one touch gesture on an application view, it is detected whether there is a multi-finger touch in the touch screen behavior event set. If not, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of at least one touch gesture is detected based on the correlation coefficient. In this way, the correlation coefficient between the touch screen behavior event in the touch screen behavior event set and the view offset distance in the view offset distance set is determined, and the sensitivity of the touch gesture can be detected based on the correlation coefficient. The implementation cost of this technology is low, which reduces the threshold for popularization of the technology.
[0133] In addition, in the above-mentioned case where multi-finger touch is eliminated, the touch screen behavior event set should be divided into at least one touch screen behavior event subset, and the touch screen behavior event subset corresponds to a single touch gesture, which means that each complete touch gesture should be determined to facilitate sensitivity detection for each complete touch gesture.
[0134] For example, the entire sliding process in which a finger contacts the screen to slide and eventually leaves the screen is considered a complete sliding gesture, which includes multiple touch states. The order of touch states generated by a conventional sliding gesture is: finger pressed, finger moved, finger stopped, and finger lifted. Among them, the finger movement can be continuous or non-continuous. However, in the actual sliding process, abnormal situations may occur, namely abnormal touch cancellation and abnormal leaving the screen, such as a higher priority interruption of the system during the sliding process (incoming phone call, etc.), and sliding from the screen to the outside of the screen.
[0135] Based on this, the touch screen behavior event set is divided into at least one touch screen behavior event subset, and the touch screen behavior event subset corresponds to a single touch gesture; for any touch screen behavior event subset, the view offset distance subset corresponding to the touch screen behavior event subset is screened from the view offset distance set; the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset is determined; and according to the correlation coefficient, the sensitivity of the touch gesture corresponding to the touch screen behavior event subset is detected.
[0136] Among them, the touch screen behavior event set is an ordered set, and the touch screen behavior event records the touch state of the touch gesture. The principle of dividing the touch screen behavior event set is: obtain the touch state ordered set, the touch state ordered set is all touch states in the touch gesture execution process stored in the execution order; according to the touch state ordered set, the touch screen behavior event set is divided into at least one touch screen behavior event subset; the ordering of the touch states recorded in the touch screen behavior event in the touch screen behavior event subset is consistent with the ordering of the touch states in the touch state ordered set.
[0137] For example, for an ordered set of touch states, it can be finger pressed, finger moved, finger stopped, and finger lifted. Among them, finger movement can be multiple and continuous, or there can be none. In this way, loop through the touch screen behavior events in the touch screen behavior event set, find the first touch screen behavior event that records the touch state of finger pressed, and store the first touch screen behavior event in a temporary data set; continue to traverse the touch screen behavior events in the touch screen behavior event set, find the touch screen behavior event that records the touch state of finger moved or finger lifted, and store the touch screen behavior event in a temporary data set; if no touch screen behavior event that records the touch state of finger moved or finger lifted is found, clear the temporary data set; continue to traverse the touch screen behavior events in the touch screen behavior event set, If the touch state recorded in the previous touch screen behavior event is finger movement, and the touch state recorded in the currently traversed touch screen behavior event is finger movement or finger stop, it can be appended to the temporary data set, otherwise the temporary data set is cleared; continue to traverse the touch screen behavior events in the touch screen behavior event set, if the touch state recorded in the previous touch screen behavior event is finger stop, and the touch state recorded in the currently traversed touch screen behavior event is finger lift, it can be appended to the temporary data set, otherwise the temporary data set is cleared; if the touch state recorded in the currently traversed touch screen behavior event is finger lift, and the temporary data set is not empty, it means that the current sliding gesture is over, and the touch screen behavior events in the temporary data set are stored in the touch screen behavior event subset, and the temporary data set is cleared at the same time; according to the above logic loop traversal, the touch screen behavior event set can be divided into at least one touch screen behavior event subset, and each touch screen behavior event subset corresponds to a single sliding gesture.
[0138] In this way, the touch screen behavior event set is divided into at least one touch screen behavior event subset, and the touch screen behavior event subset corresponds to a single touch gesture. Correspondingly, the view offset distance set is also divided into corresponding view offset distance subsets, which correspond to the touch screen behavior event subsets. To this end, the touch time range composed of touch moments corresponding to the touch screen behavior events in the touch screen behavior event subset is determined; according to the touch time range, the view offset distance subset corresponding to the touch screen behavior event subset is screened from the view offset distance set; the distance collection time range composed of distance collection moments corresponding to the view offset distance of the view offset distance subset is consistent with the touch time range.
[0139] In addition, in the embodiment of the present application, the touch gestures can be classified into two categories: one is a unidirectional touch gesture, for example, Figure 3 The trajectory diagram of the unidirectional sliding gesture shown in FIG. 1 is another type of multi-directional touch gesture, such as Figure 4 The trajectory diagram of the multi-directional sliding gesture is shown in FIG. For a multi-directional touch gesture, it is necessary to split it into multiple single-directional touch gestures. Figure 3 The unidirectional sliding gesture shown in FIG. 1 is similar to that shown in FIG. 1 , thereby realizing the detection of the sensitivity of each unidirectional touch gesture. Figure 3 The unidirectional sliding gesture shown can be directly detected for sensitivity without splitting.
[0140] To this end, each view offset distance is obtained by subtracting the first coordinate value of the marker point (such as a vertex) on the application view at the previous moment from the second coordinate value at the current moment. The difference between the second coordinate values corresponding to any adjacent view offset distances in the view offset distance subset can be determined, and it can be detected whether the difference is a continuous positive value or a negative value; if the difference is a continuous positive value or a negative value, it means that the touch gesture corresponding to the touch screen behavior event subset is a unidirectional touch gesture, and at this time, the correlation coefficient between the touch screen behavior event in the touch screen behavior event subset and the view offset distance in the view offset distance subset can be determined.
[0141] Among them, in the process of determining the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distance in the view offset distance subset, since the touch point coordinates are recorded in the touch screen behavior event, the touch point coordinates include X-axis coordinates and Y-axis coordinates. Similarly, the view offset distance includes the view horizontal offset distance and the view vertical offset distance. It is necessary to use the sliding direction of the touch gesture corresponding to the touch screen behavior event subset to filter the touch point coordinates and the view offset distance, and retain the X-axis coordinates and the view horizontal offset distance, or the Y-axis coordinates and the view vertical offset distance related to the sliding direction to participate in the calculation of the correlation coefficient.
[0142] Based on this, determine the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset, and perform the following processing: according to the first sliding direction (the first sliding direction is the horizontal direction at this time), filter the X-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subset; according to the first sliding direction (the first sliding direction is the horizontal direction at this time), filter the view lateral offset distance included in the view offset distance in the view offset distance subset; determine the X-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subset, and compare them with the view offset distance included in the view offset distance subset. or, according to the first sliding direction (the first sliding direction is the vertical direction), filter the Y-axis coordinate of the touch point coordinates recorded in the touch screen behavior event subset; according to the first sliding direction (the first sliding direction is the vertical direction), filter the view longitudinal offset distance included in the view offset distance in the view offset distance subset; determine the correlation coefficient between the Y-axis coordinate of the touch point coordinates recorded in the touch screen behavior event subset and the view longitudinal offset distance included in the view offset distance in the view offset distance subset.
[0143] For example, the X-axis coordinate of the touch point coordinate recorded in the touch screen behavior event subset and the view lateral offset distance included in the view offset distance in the view offset distance subset are shown in Table 1 below. The consistency of the changes in these two sets of data can be used as a reference standard to detect the sensitivity of the touch gesture corresponding to the touch screen behavior event subset. Among them, the consistency of the changes in these two sets of data is analyzed by using a correlation coefficient, such as a Pearson correlation coefficient, to determine the Pearson correlation coefficient between the X-axis coordinate of the touch point coordinate recorded in the touch screen behavior event subset and the view lateral offset distance included in the view offset distance in the view offset distance subset. The value range of the Pearson correlation coefficient is -1 to 1. The closer its absolute value is to 1, the stronger the correlation is, and the closer its absolute value is to 0, the weaker the correlation is. When the correlation coefficient is less than 0, it means that the two sets of data are negatively correlated, and when it is greater than 0, it is positively correlated.
[0144]
[0145]
[0146] Table 1
[0147] Among them, for determining the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset, specifically, it can be traversing the touch screen behavior events in the touch screen behavior event subset, and obtaining the X-axis coordinate and Y-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event; for any touch screen behavior event that has been traversed, determining the X-axis coordinate difference between the X-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinates recorded in the already traversed touch screen behavior event; determining the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event and the Y-axis coordinate of the touch point coordinates recorded in the already traversed touch screen behavior event; selecting the first X-axis coordinate difference from the X-axis coordinate differences, and selecting the X-axis coordinate difference from the X-axis coordinate differences. The first Y-axis coordinate difference is selected from the Y-axis coordinate differences, the first X-axis coordinate difference is the largest X-axis coordinate difference, and the first Y-axis coordinate difference is the largest Y-axis coordinate difference; when the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, the largest first X-axis coordinate difference is selected from the first X-axis coordinate differences, and the largest first Y-axis coordinate difference is selected from the first Y-axis coordinate differences; when the largest first X-axis coordinate difference is greater than the largest first Y-axis coordinate difference, the horizontal direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset; when the largest first X-axis coordinate difference is less than or equal to the largest first Y-axis coordinate difference, the vertical direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset.
[0148] For example, traverse the second touch screen behavior event in the touch screen behavior event subset, obtain the X-axis coordinate and Y-axis coordinate of the touch point coordinate recorded in the second touch screen behavior event, that is, (x2, y2), and for the first touch screen behavior event that has been traversed, determine the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the second touch screen behavior event currently traversed and the X-axis coordinate of the touch point coordinate recorded in the first touch screen behavior event that has been traversed, that is, x2-x1. At this time, the X-axis coordinate is The standard difference value is regarded as the maximum X-axis coordinate difference, that is, the first X-axis coordinate difference, denoted as Max(x)=x2-x1. Similarly, the Y-axis coordinate difference between the touch point coordinates of the second touch screen behavior event record currently traversed and the Y-axis coordinate difference of the touch point coordinates of the first touch screen behavior event record that has been traversed, that is, y2-y1, is determined. At this time, the Y-axis coordinate difference is regarded as the maximum Y-axis coordinate difference, that is, the first Y-axis coordinate difference, denoted as Max(y)=y2-y1.
[0149] Then, from the third touch screen behavior event to the last touch screen behavior event, in the process of traversing each touch screen behavior event, calculate the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinate recorded in any already traversed touch screen behavior event, and then select the largest X-axis coordinate difference as the first X-axis coordinate difference, calculate the Y-axis coordinate difference between the touch point coordinate recorded in the currently traversed touch screen behavior event and the Y-axis coordinate of the touch point coordinate recorded in the already traversed touch screen behavior event, and then select the largest Y-axis coordinate difference as the first Y-axis coordinate difference. In this way, when the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, multiple first X-axis coordinate differences and multiple first Y-axis coordinate differences can be obtained. The largest first X-axis coordinate difference is selected from the first X-axis coordinate differences, and the largest first Y-axis coordinate difference is selected from the first Y-axis coordinate differences. When the largest first X-axis coordinate difference is greater than the largest first Y-axis coordinate difference, the horizontal direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset. When the largest first X-axis coordinate difference is less than or equal to the largest first Y-axis coordinate difference, the vertical direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset.
[0150] For the correlation coefficient between the X-axis coordinate of the touch point coordinate recorded in the touch screen behavior event in the above touch screen behavior event subset and the view horizontal offset distance included in the view offset distance in the view offset distance subset, or the correlation coefficient between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event in the touch screen behavior event subset and the view vertical offset distance included in the view offset distance in the view offset distance subset, the coefficient range in which the correlation coefficient is located can be found, the sensitivity corresponding to the coefficient range can be found, and the sensitivity can be determined as the sensitivity of the touch gesture corresponding to the touch screen behavior event subset. For example, as shown in Table 2 below, different coefficient ranges have different sensitivities, and the coefficient range in which the correlation coefficient is located can be found, the sensitivity corresponding to the coefficient range can be found, and the sensitivity can be determined as the sensitivity of the touch gesture corresponding to the touch screen behavior event subset.
[0151] Coefficient range Sensitivity 0~0.2 Very weak sensitivity 0.2~0.4 Less sensitive 0.4~0.6 Moderately sensitive 0.6~0.8 Higher degree of sensitivity 0.8~1 Highly sensitive
[0152] Table 2
[0153] In addition, the above-mentioned method determines the difference between the second coordinate values corresponding to any adjacent view offset distances in the view offset distance subset, and detects whether the difference is a continuous positive value or a negative value. When the difference is not a continuous positive value or a negative value, it determines that the touch gesture corresponding to the touch screen behavior event subset is a touch gesture in multiple directions; the view offset distance subset is divided to obtain multiple view offset distance subsequences; for any view offset distance subsequence, the touch screen behavior event subsequence corresponding to the view offset distance subsequence is screened from the touch screen behavior event subset; determines the correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distance of the view offset distance subsequence; and according to the correlation coefficient, detects the sensitivity of the single-direction touch gesture corresponding to the touch screen behavior event subsequence.
[0154] Among them, for the difference determined above, a target search is performed from the difference, and the target difference and the previous difference represent quantities with opposite meanings (for example, if the current difference is a positive number, the previous difference is a negative number); determine any adjacent view offset distance corresponding to the target difference, and select the target image offset distance from any adjacent view offset distance; according to the distance acquisition time corresponding to the target image offset distance, divide the view offset distance subset into multiple view offset distance subsequences.
[0155] In the process of determining the correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distance in the view offset distance subsequence, since the touch point coordinates are recorded in the touch screen behavior event, the touch point coordinates include the X-axis coordinate and the Y-axis coordinate. Similarly, the view offset distance includes the view horizontal offset distance and the view vertical offset distance. It is necessary to determine the sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence, filter the touch point coordinates and the view offset distance, and retain the X-axis coordinate and the view horizontal offset distance, or the Y-axis coordinate and the view vertical offset distance related to the sliding direction to participate in the calculation of the correlation coefficient.
[0156] Based on this, the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence is determined, and the following processing is performed: according to the second sliding direction, the X-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subsequence are filtered; according to the second sliding direction, the view horizontal offset distance included in the view offset distance in the view offset distance subsequence is filtered; the correlation coefficient between the X-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subsequence and the view horizontal offset distance included in the view offset distance in the view offset distance subsequence is determined; or, according to the second sliding direction, the Y-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subsequence are filtered; according to the second sliding direction, the view vertical offset distance included in the view offset distance in the view offset distance subsequence is filtered; the correlation coefficient between the Y-axis coordinates of the touch point coordinates recorded in the touch screen behavior event subsequence and the view vertical offset distance included in the view offset distance in the view offset distance subsequence is determined.
[0157] Among them, for the disadvantage of the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence, it can be specifically traversing the touch screen behavior events in the touch screen behavior event subsequence, and obtaining the X-axis coordinate and Y-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event; for any of the touch screen behavior events that have been traversed, determining the X-axis coordinate difference between the X-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinates recorded in the already traversed touch screen behavior event; determining the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinates recorded in the currently traversed touch screen behavior event and the Y-axis coordinate of the touch point coordinates recorded in the already traversed touch screen behavior event; selecting a second X-axis coordinate difference from the X-axis coordinate difference, and selecting a second X-axis coordinate difference from the Y-axis coordinate difference. A second Y-axis coordinate difference is selected from the second X-axis coordinate differences, the second X-axis coordinate difference is the largest X-axis coordinate difference, and the second Y-axis coordinate difference is the largest Y-axis coordinate difference; when the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, the largest second X-axis coordinate difference is selected from the second X-axis coordinate differences, and the largest second Y-axis coordinate difference is selected from the second Y-axis coordinate differences; when the largest second X-axis coordinate difference is greater than the largest second Y-axis coordinate difference, the horizontal direction is determined as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence; when the largest second X-axis coordinate difference is less than or equal to the largest second Y-axis coordinate difference, the vertical direction is determined as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence.
[0158] For the correlation coefficient between the X-axis coordinate of the touch point coordinates recorded in the touch screen behavior event subsequence and the view horizontal offset distance included in the view offset distance in the view offset distance subsequence, or the correlation coefficient between the Y-axis coordinate of the touch point coordinates recorded in the touch screen behavior event subsequence and the view vertical offset distance included in the view offset distance in the view offset distance subsequence, as shown in Table 2 above, the coefficient range in which the correlation coefficient is located can be found, the sensitivity corresponding to the coefficient range can be found, and the sensitivity can be determined as the sensitivity of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence.
[0159] Corresponding to the above method embodiment, the present application embodiment also provides a touch gesture sensitivity detection device, such as Figure 5 As shown, the device may include: an event set acquisition module 510, a distance set acquisition module 520, a coefficient determination module 530, and a sensitivity detection module 540.
[0160] An event set acquisition module 510, configured to acquire a touch screen behavior event set, wherein the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view;
[0161] A distance set acquisition module 520, configured to acquire a view offset distance set, wherein the view offset distance set is generated by an object performing at least one touch gesture in an application view;
[0162] A coefficient determination module 530, configured to determine a correlation coefficient between a touch screen behavior event in the touch screen behavior event set and a view offset distance in the view offset distance set;
[0163] The sensitivity detection module 540 is used to detect the sensitivity of at least one touch gesture according to the correlation coefficient.
[0164] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.
[0165] Memory 63, used for storing computer programs;
[0166] The processor 61 is used to execute the program stored in the memory 63 to implement the following steps:
[0167] Acquire a touch screen behavior event set, wherein the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view; acquire a view offset distance set, wherein the view offset distance set is generated by an object performing at least one touch gesture in an application view; determine a correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set; and detect the sensitivity of at least one of the touch gestures based on the correlation coefficient.
[0168] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0169] The communication interface is used for communication between the above electronic device and other devices.
[0170] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0171] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0172] In another embodiment provided in the present application, a storage medium is further provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes the touch gesture sensitivity detection method described in any one of the above embodiments.
[0173] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the touch gesture sensitivity detection method described in any one of the above embodiments.
[0174] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0175] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0176] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0177] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A touch gesture sensitivity detection method, characterized in that: The method comprises: Acquire a touch screen behavior event set, where the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view; Obtain a view offset distance set, where the view offset distance set is generated by an object performing at least one touch gesture in an application view; Determine a correlation coefficient between a touch screen behavior event in the touch screen behavior event set and a view offset distance in the view offset distance set; According to the correlation coefficient, the sensitivity of the touch gesture is detected at least once.
2. The method according to claim 1, characterized in that Each touch screen behavior event in the touch screen behavior event set records a corresponding touch time; The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set includes: Traversing the touch screen behavior events in the touch screen behavior event set, and acquiring the touch control moment corresponding to the currently traversed touch screen behavior event; In the touch screen behavior event set, detecting whether there are other touch screen behavior events other than the touch screen behavior event at the touch moment; If not present, determining a correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set; If the touch screen behavior event exists, the touch screen behavior event in the touch screen behavior event set is determined to be invalid, and the touch screen behavior event set is deleted.
3. The method according to claim 2, characterized in that The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event set and the view offset distances in the view offset distance set includes: Dividing the touch screen behavior event set into at least one touch screen behavior event subset, wherein the touch screen behavior event subset corresponds to a single touch gesture; For any of the touch screen behavior event subsets, filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset; Determining a correlation coefficient between a touch screen behavior event in the touch screen behavior event subset and a view offset distance in the view offset distance subset; The step of detecting the sensitivity of the touch gesture at least once according to the correlation coefficient includes: The sensitivity of the touch gesture corresponding to the touch screen behavior event subset is detected according to the correlation coefficient.
4. The method according to claim 3, characterized in that The touch screen behavior event set is an ordered set, and the touch screen behavior event records the touch state of the touch gesture; The step of dividing the touch screen behavior event set into at least one touch screen behavior event subset includes: Acquire an ordered set of touch states, where the ordered set of touch states is stored in the order of execution of all touch states during the execution of the touch gesture; According to the touch state ordered set, dividing the touch screen behavior event set into at least one touch screen behavior event subset; The order of touch states of the touch screen behavior event records in the touch screen behavior event subset is consistent with the order of touch states in the touch state ordered set.
5. The method according to claim 3, characterized in that: The view offset distances in the view offset distance set have corresponding distance collection moments; The filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset includes: Determine a touch time range consisting of touch moments corresponding to the touch screen behavior events in the touch screen behavior event subset; According to the touch time range, filtering, from the view offset distance set, a view offset distance subset corresponding to the touch screen behavior event subset; The distance collection time range composed of distance collection moments corresponding to the view offset distances of the view offset distance subset is consistent with the touch time range.
6. The method according to claim 3, characterized in that Each of the view offset distances is obtained by subtracting a first coordinate value of a marker point on the application view at a previous moment from a second coordinate value at a current moment; The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset includes: Determine a difference between the second coordinate values corresponding to any adjacent view offset distances in the view offset distance subset, and detect whether the difference is a continuous positive value or a negative value; In a case where the difference is a continuous positive value or a negative value, a correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset is determined.
7. The method according to claim 6, characterized in that The method further comprises: In a case where the difference is not a continuous positive value or a negative value, determining that the touch gesture corresponding to the touch screen behavior event subset is a touch gesture in multiple directions; Splitting the view offset distance subset to obtain a plurality of view offset distance subsequences; For any of the view offset distance subsequences, filtering, from the touch screen behavior event subset, a touch screen behavior event subsequence corresponding to the view offset distance subsequence; Determining a correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distances in the view offset distance subsequence; Detecting the sensitivity of the touch gesture corresponding to the touch screen behavior event subset according to the correlation coefficient includes: The sensitivity of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence is detected according to the correlation coefficient.
8. The method according to claim 6, characterized in that The touch screen behavior event records the touch point coordinates, and the view offset distance includes the view horizontal offset distance and the view vertical offset distance; The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subset and the view offset distances in the view offset distance subset includes: Determine the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset, and perform the following processing: Filtering, according to the first sliding direction, the X-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset; According to the first sliding direction, screening the view horizontal offset distance included in the view offset distance in the view offset distance subset; Determine a correlation coefficient between the X-axis coordinate of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset and the view lateral offset distance included in the view offset distance in the view offset distance subset; or, Filtering the Y-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset according to the first sliding direction; According to the first sliding direction, filtering the view longitudinal offset distance included in the view offset distance in the view offset distance subset; Determine a correlation coefficient between the Y-axis coordinate of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subset and the view longitudinal offset distance included in the view offset distance in the view offset distance subset.
9. The method according to claim 8, characterized in that The determining the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset includes: Traversing the touch screen behavior events in the touch screen behavior event subset, and obtaining the X-axis coordinate and the Y-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event; For any of the traversed touch screen behavior events, determine the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinate recorded in the traversed touch screen behavior event; Determine the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event currently traversed and the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event that has been traversed; Selecting a first X-axis coordinate difference from the X-axis coordinate differences, and selecting a first Y-axis coordinate difference from the Y-axis coordinate differences, wherein the first X-axis coordinate difference is the largest X-axis coordinate difference, and the first Y-axis coordinate difference is the largest Y-axis coordinate difference; When the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, selecting the largest first X-axis coordinate difference from the first X-axis coordinate differences, and selecting the largest first Y-axis coordinate difference from the first Y-axis coordinate differences; When the maximum first X-axis coordinate difference is greater than the maximum first Y-axis coordinate difference, determining the horizontal direction as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset; When the maximum first X-axis coordinate difference is less than or equal to the maximum first Y-axis coordinate difference, the vertical direction is determined as the first sliding direction of the touch gesture corresponding to the touch screen behavior event subset.
10. The method according to claim 7, characterized in that The touch screen behavior event records the touch point coordinates, and the view offset distance includes the view horizontal offset distance and the view vertical offset distance; The determining of the correlation coefficient between the touch screen behavior events in the touch screen behavior event subsequence and the view offset distances in the view offset distance subsequence includes: Determine the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence, and perform the following processing: According to the second sliding direction, filtering the X-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subsequence; According to the second sliding direction, screening the view horizontal offset distance included in the view offset distance in the view offset distance subsequence; Determine a correlation coefficient between an X-axis coordinate of the touch point coordinate recorded in the touch screen behavior event record in the touch screen behavior event subsequence and the view horizontal offset distance included in the view offset distance in the view offset distance subsequence; or, Filtering the Y-axis coordinates of the touch point coordinates of the touch screen behavior event record in the touch screen behavior event subsequence according to the second sliding direction; According to the second sliding direction, screening the view longitudinal offset distance included in the view offset distance subsequence; Determine a correlation coefficient between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event in the touch screen behavior event subsequence and the view longitudinal offset distance included in the view offset distance in the view offset distance subsequence.
11. The method according to claim 10, characterized in that The determining a second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence includes: Traversing the touch screen behavior events in the touch screen behavior event subsequence, and obtaining the X-axis coordinate and the Y-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event; For any of the traversed touch screen behavior events, determine the X-axis coordinate difference between the X-axis coordinate of the touch point coordinate recorded in the currently traversed touch screen behavior event and the X-axis coordinate of the touch point coordinate recorded in the traversed touch screen behavior event; Determine the Y-axis coordinate difference between the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event currently traversed and the Y-axis coordinate of the touch point coordinate recorded in the touch screen behavior event that has been traversed; Selecting a second X-axis coordinate difference from the X-axis coordinate differences, and selecting a second Y-axis coordinate difference from the Y-axis coordinate differences, wherein the second X-axis coordinate difference is the largest X-axis coordinate difference, and the second Y-axis coordinate difference is the largest Y-axis coordinate difference; When the traversal of the touch screen behavior events in the touch screen behavior event subset is completed, selecting the largest second X-axis coordinate difference from the second X-axis coordinate differences, and selecting the largest second Y-axis coordinate difference from the second Y-axis coordinate differences; When the maximum second X-axis coordinate difference is greater than the maximum second Y-axis coordinate difference, determining the horizontal direction as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence; When the maximum second X-axis coordinate difference is less than or equal to the maximum second Y-axis coordinate difference, the vertical direction is determined as the second sliding direction of the unidirectional touch gesture corresponding to the touch screen behavior event subsequence.
12. A touch gesture sensitivity detection device, characterized in that: The device comprises: An event set acquisition module, used to acquire a touch screen behavior event set, wherein the touch screen behavior event set is generated by an object performing at least one touch gesture on an application view; A distance set acquisition module, used to acquire a view offset distance set, where the view offset distance set is generated by an object performing at least one touch gesture in an application view; a coefficient determination module, configured to determine a correlation coefficient between a touch screen behavior event in the touch screen behavior event set and a view offset distance in the view offset distance set; A sensitivity detection module is used to detect the sensitivity of the touch gesture at least once according to the correlation coefficient.
13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-11 when executing a program stored in a memory.
14. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
