Continuous click event processing method and device, terminal, storage medium and product
By detecting the direction parameter value of the combo event, false touch verification is performed, and false touch and non-accidental touch operations are distinguished, which solves the problem of low accuracy in processing combo events in the existing technology and improves the accuracy of processing combo events.
Patent Information
- Application Number
- CN202310327072.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-01
AI Technical Summary
It is difficult for the existing technology to effectively distinguish between accidental touch operations and non-accidental touch operations when processing combo events, resulting in a decrease in processing accuracy.
By detecting the direction parameter values of multiple tap events during a combo event, false touch verification is performed to verify whether the combo event is triggered by a false touch operation, thereby determining whether to execute the corresponding operation instructions.
Effectively filter out combo events triggered by accidental touch operations, improving the accuracy of combo event processing.
Smart Images

Figure CN118732819A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method, device, terminal, storage medium and product for processing combo events. Background Art
[0002] With the development of terminal technology, there are more and more application scenarios in which the terminal can be triggered to perform certain operations by double-clicking the event. For example, a limited edition mobile phone is equipped with a technology that can trigger the electrochromic back cover to change color by double-clicking the back cover of the mobile phone. When the user holds the mobile phone, he can trigger the back cover to change color by gently tapping the back cover twice.
[0003] In the related art, the acceleration change of two tap events is detected by an acceleration sensor inside the terminal. When the acceleration change reaches a threshold, it is determined that a double-click event is detected, and the operation corresponding to the double-click event is executed. Summary of the invention
[0004] The embodiments of the present application provide a method, device, terminal, storage medium and product for processing a combo event, which can improve the accuracy of processing a combo event. The technical solution is as follows:
[0005] In one aspect, a method for processing a combo event is provided, the method comprising:
[0006] When a continuous tap event is detected, obtaining direction parameter values of a plurality of tap events included in the continuous tap event, wherein the direction parameter values of the tap events are used to indicate the tap directions of the tap events;
[0007] Based on the direction parameter values of the multiple tap events, performing an accidental touch check on the continuous tap event, wherein the accidental touch check is used to verify whether the continuous tap event is triggered by an accidental touch operation;
[0008] When verifying that the combo event is not triggered by an accidental touch operation, determining an operation instruction corresponding to the combo event, and executing an operation corresponding to the operation instruction.
[0009] In another aspect, a device for processing a combo event is provided, the device comprising:
[0010] An acquisition module, configured to acquire direction parameter values of a plurality of tap events included in the tap event when a tap event is detected, wherein the direction parameter values of the tap events are used to indicate the tap directions of the tap events;
[0011] A verification module, configured to perform an accidental touch verification on the continuous tap event based on the direction parameter values of the multiple tap events, wherein the accidental touch verification is used to verify whether the continuous tap event is triggered by an accidental touch operation;
[0012] The processing module is used to determine the operation instruction corresponding to the combo event and execute the operation corresponding to the operation instruction when verifying that the combo event is not triggered by an accidental touch operation.
[0013] On the other hand, a terminal is provided, the terminal comprising a processor and a memory, the memory storing at least one program code, the at least one program code being loaded and executed by the processor to implement the above-mentioned method for processing combo events.
[0014] On the other hand, a computer-readable storage medium is provided, wherein at least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by a processor to implement the above-mentioned method for processing combo events.
[0015] On the other hand, a computer program product is provided, wherein at least one program code is stored in the computer program product, and the at least one program code is loaded and executed by a processor to implement the above-mentioned method for processing combo events.
[0016] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0017] In the embodiment of the present application, since the tapping direction of the mis-touch operation and the tapping direction of the combo event of the non-mis-touch operation are different; therefore, when a combo event is detected, the combo event is checked for mis-touch based on the direction parameter values of the multiple tap events included in the combo event to verify whether the combo event is triggered by a mis-touch operation, thereby effectively filtering out the combo events triggered by the mis-touch operation, thereby improving the accuracy of combo event processing.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of a method for processing a combo event provided in an embodiment of the present application;
[0020] Figure 2 is a flowchart of another method for processing a combo event provided by an embodiment of the present application;
[0021] Figure 3 is an acceleration curve diagram of a combo event triggered by a non-accidental touch operation provided in an embodiment of the present application;
[0022] Figure 4 is an acceleration curve diagram of a combo event triggered by an accidental touch operation provided in an embodiment of the present application;
[0023] Figure 5is a flowchart of another method for processing a combo event provided by an embodiment of the present application;
[0024] Figure 6 is a flowchart of another method for processing a combo event provided by an embodiment of the present application;
[0025] Figure 7 is a flowchart of another method for processing a combo event provided by an embodiment of the present application;
[0026] Figure 8 is a flowchart of another method for processing a combo event provided by an embodiment of the present application;
[0027] Fig. 9 It is a structural schematic diagram of a combo event processing device provided in an embodiment of the present application;
[0028] Fig.10 It is a structural block diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the technical solutions and advantages of the present application clearer, the implementation methods of the present application are described in further detail below.
[0030] The terms "first", "second", "third" and "fourth" in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0031] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the direction parameter values involved in this application are all obtained with full authorization.
[0032] The method for processing a continuous tap event provided in the embodiment of the present application is applied to a terminal; a continuous tap event refers to a tap event with more than one tap; for example, a continuous tap event may be a double-tap event, a triple-tap event, or a quadruple-tap event, etc. In the embodiment of the present application, a double-tap event is used as an example for explanation.
[0033] In some embodiments, the terminal is a smart phone, a tablet computer, a virtual reality (VR) device, or a vehicle-mounted terminal, etc., but is not limited thereto. In addition, the method for processing a combo event provided in the embodiment of the present application can be applied in any of the following scenarios:
[0034] (1) The terminal is a smart phone, and the combo event is a double-click event. The double-click event triggers the color change of the back cover of the smart phone. That is, when the user holds the smart phone, tapping the back cover of the smart phone twice can trigger the color change of the back cover of the smart phone.
[0035] (2) The terminal is a VR device, and the combo event is a double-click event. The double-click event triggers the VR device to switch the perspective view. That is, when the user is wearing the VR device, tapping the VR device twice can trigger the VR device to switch the perspective view.
[0036] (3) The terminal is a smart phone, a tablet computer, or a vehicle-mounted terminal, and the combo event is a double-click event, which triggers the terminal to take a screenshot or display a graphic code, etc.
[0037] (4) The terminal is a smart phone, a shielded computer, or a car-mounted terminal, etc., and the continuous tap event is a three-tap event or a four-tap event. The three-tap event or the four-tap event triggers the terminal to perform an operation corresponding to the three-tap event or the four-tap event.
[0038] Figure 1 is a flowchart of a method for processing a combo event provided in an embodiment of the present application, the method being executed by a terminal; see Figure 1 , the method comprising:
[0039] Step 101: when a continuous tap event is detected, direction parameter values of a plurality of tap events included in the continuous tap event are obtained, where the direction parameter values of the tap events are used to indicate the tap directions of the tap events.
[0040] A continuous tap event refers to a tap event with more than one tap; for example, a continuous tap event may be a double-tap event, a triple-tap event, or a quadruple-tap event, etc. The direction parameter value of the tap event may be a first value or a second value; the first value is used to indicate that the tap direction of the tap event is positive, for example, the first value may be 1; the second value is used to indicate that the tap direction of the tap event is negative; for example, the second value may be 0 or -1.
[0041] The terminal includes an acceleration sensor, and the terminal detects a continuous tap event through the acceleration sensor; wherein the process of the acceleration sensor detecting the continuous tap event may be: when the acceleration sensor detects multiple tap events in the current detection cycle, the acceleration sensor determines that a continuous tap event is detected. In addition, when the acceleration sensor detects one tap event in the current detection cycle, the acceleration sensor determines that a single tap event is detected, determines an operation instruction corresponding to the single tap event, and executes an operation corresponding to the operation instruction.
[0042] In some embodiments, the process of the acceleration sensor detecting a tap event in the current detection cycle can be implemented by following the steps (1) to (4), including:
[0043] (1) The acceleration sensor obtains the peak acceleration of the tap event.
[0044] The acceleration sensor can detect the acceleration peak values of multiple coordinate axes; for example, the acceleration sensor can detect the acceleration peak value of the X axis, the acceleration peak value of the Y axis, and the acceleration peak value of the Z axis. In some embodiments, the acceleration sensor obtains the acceleration peak values of these axes, and accordingly, step (1) can be: the acceleration sensor obtains the acceleration peak values of the multiple coordinate axes, and determines the maximum acceleration peak value from the acceleration peak values of the multiple coordinate axes.
[0045] In other embodiments, the acceleration sensor obtains acceleration peak values of different axes according to different hand-held operations; accordingly, step (1) may be: the acceleration sensor determines the hand-held posture of the terminal, obtains a reference coordinate axis matching the hand-held posture, and obtains the acceleration peak value of the axis of the tapping event.
[0046] In some embodiments, the acceleration peak value of the current detection cycle is detected and the acceleration peak value corresponding to the tap event is accurately matched; for example, if the combo event is a double-click event, the terminal detects the acceleration peak value of the current detection cycle, compares multiple acceleration peak values, and obtains an acceleration maximum value and a secondary maximum value.
[0047] (2) The acceleration sensor determines the acceleration change and the duration of the mutation based on the acceleration peak.
[0048] The acceleration sensor determines the initial acceleration value, determines the difference between the acceleration peak value and the initial acceleration value, and obtains the acceleration change; determines the first moment corresponding to the acceleration peak value and the second moment corresponding to the initial acceleration value, determines the time difference between the first moment and the second moment, and obtains the duration of the mutation.
[0049] (3) When the acceleration change reaches a preset change and the duration of the sudden change is less than a preset duration, the acceleration sensor determines that a tap event is detected.
[0050] A large jolt to the terminal may also cause the change to reach the preset change, but the sudden change of the large jolt will last longer; therefore, determining whether a tap event is detected from two perspectives, namely the acceleration change and the sudden change duration, can avoid false touches caused by large jolts.
[0051] (4) When the acceleration change amount does not reach the preset change amount or the duration of the sudden change is not less than the preset duration, the acceleration sensor determines that no combo event is detected.
[0052] In some embodiments, when the acceleration sensor obtains the acceleration peak value, it also obtains the direction parameter value corresponding to the acceleration peak value, and stores the direction parameter value corresponding to the acceleration peak value in the attribute information of the acceleration peak value. When the acceleration sensor detects a combo event, for any tap event included in the combo event, the acceleration sensor determines the attribute information of the acceleration peak value of the tap event, and obtains the direction parameter value of the tap event from the attribute information of the acceleration peak value. For example, the positive and negative attributes of the numerical value of the acceleration peak value are used to determine whether the multiple tap directions of the combo event are consistent, thereby achieving the effect of identifying combo events with inconsistent tap directions.
[0053] In the embodiment of the present application, an extreme value detection scheme is adopted to detect combo events and determine the direction parameter value. Therefore, it is only necessary to store the acceleration peak values and attribute information of the acceleration peak values of multiple tap events in the current detection cycle. There is no need to save the data in the entire detection cycle, which not only ensures the real-time performance of the algorithm, but also saves the memory space occupied by the algorithm.
[0054] In some embodiments, the terminal can also determine the direction parameter value of the tap event based on the coordinate information of the tap point of the tap event; accordingly, the process of the terminal obtaining the direction parameter values of multiple tap events included in the continuous tap event can be: the terminal determines the coordinate information of the tap points of the multiple tap events, determines the reference coordinate axis of the multiple tap events, and determines the direction parameter values of the multiple tap events based on the reference coordinate axis and the coordinate information of the tap points of the multiple tap events.
[0055] In some embodiments, the process of the terminal determining the direction parameter values of multiple tap events based on the reference coordinate axis and the coordinate information of the tap points of the multiple tap events may be as follows: for any tap event, the terminal determines the coordinate value corresponding to the reference coordinate axis from the coordinate information of the tap point of the tap event, and determines the direction parameter value of the tap event based on the coordinate value corresponding to the reference coordinate axis. For example, if the coordinate value corresponding to the reference coordinate axis is a positive number, the direction parameter value of the tap event is determined to be a first value, and the first value is used to indicate that the tap direction of the tap event is positive, for example, the first value may be 1; if the coordinate value corresponding to the reference coordinate axis is a negative number, the direction parameter value of the tap event is determined to be a second value, and the second value is used to indicate that the tap direction of the tap event is negative; for example, the second value may be 0 or -1.
[0056] In the embodiment of the present application, the direction reference value of the tapping event can be determined by the coordinate value, and the operation is simple.
[0057] Step 102: Based on the direction parameter values of the multiple tap events, the continuous tap event is subjected to a false touch check, where the false touch check is used to verify whether the continuous tap event is triggered by a false touch operation.
[0058] Since some combo events may be triggered by an accidental touch operation, in the embodiment of the present application, after detecting the combo event, the combo event is checked for an accidental touch based on the direction parameter values of the multiple tap events included in the combo event, which can avoid responding to the combo event triggered by an accidental touch operation and improve the accuracy of processing the combo event. In some embodiments, when it is verified that the combo event is not triggered by an accidental touch operation, step 103 is executed; when it is verified that the combo event is triggered by an accidental touch operation, the combo event is discarded, thereby effectively filtering out the accidental touch event.
[0059] Step 103: When verifying that the combo event is not triggered by an accidental touch operation, determine the operation instruction corresponding to the combo event, and execute the operation corresponding to the operation instruction.
[0060] The terminal stores the correspondence between the combo event and the operation instruction in advance; in this step, the terminal determines the operation instruction corresponding to the combo event from the correspondence between the combo event and the operation instruction based on the combo event, and executes the operation corresponding to the operation instruction. For example, the combo event is a double-click event, and the double-click event corresponds to a screenshot instruction. The terminal takes a screenshot of the current screen based on the screenshot instruction. For another example, the combo event is a double-click event, and the double-click event corresponds to a display graphic code instruction. The terminal displays the graphic code based on the display graphic code instruction. For another example, the combo event is a triple-click event, and the triple-click event corresponds to a close instruction. The terminal closes the currently running application based on the close instruction.
[0061] In some embodiments, the correspondence between the combo event and the operation instruction can be set by the operating system of the terminal or by the user, so as to realize the operation instruction corresponding to the custom gesture operation. The process of the user setting the correspondence between the combo event and the operation instruction can be: the terminal displays a first setting interface, the first setting interface includes multiple operation instructions, and the selected operation instruction is obtained. At this time, the terminal jumps to a second setting interface, the second setting interface is used to set the combo event, the combo event set in the second setting interface is obtained, and the correspondence between the combo event and the operation instruction is stored.
[0062] In some embodiments, the false touch filtering algorithm provided in the embodiments of the present application can be transplanted to the terminal, so that the terminal can filter false touch operations of combo events such as tapping the back cover and the screen.
[0063] In the embodiment of the present application, since the tapping direction of the mis-touch operation and the tapping direction of the combo event of the non-mis-touch operation are different; therefore, when a combo event is detected, the combo event is checked for mis-touch based on the direction parameter values of the multiple tap events included in the combo event to verify whether the combo event is triggered by a mis-touch operation, thereby effectively filtering out the combo events triggered by the mis-touch operation, thereby improving the accuracy of combo event processing.
[0064] Figure 2 is a flowchart of a method for processing a combo event provided by an embodiment of the present application, which is executed by a terminal; see Figure 2 , the method comprising:
[0065] Step 201: when a continuous tap event is detected, the terminal obtains direction parameter values of a plurality of tap events included in the continuous tap event, where the direction parameter values of the tap events are used to indicate the tap directions of the tap events.
[0066] It should be noted that this step is the same as step 101 and will not be repeated here.
[0067] Step 202: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are the same, the terminal determines that the continuous tap event is not triggered by an accidental touch operation.
[0068] For example, if the continuous tap event is a double-click event, the terminal determines whether the direction parameter values of the two tap events included in the double-click event are the same; if the direction parameter values of the two tap events are the same, the terminal determines that the double-click event is not triggered by an accidental touch operation. The tap detection algorithm of the related art cannot filter out the double-click events with two different tap directions. In the embodiment of the present application, the accidental touch events with two different tap directions can be effectively filtered out, which can improve the accuracy of double-click event processing.
[0069] In some embodiments, the terminal includes an accelerometer, which detects whether the combo event is triggered by an accidental touch operation through the accelerometer; accordingly, step 202 may be: when the direction parameter values of multiple tap events indicate that the tap directions of the multiple tap events are the same, the accelerometer determines that the combo event is not triggered by an accidental touch operation, and reports the combo event to the terminal.
[0070] In the embodiment of the present application, a double-click event is taken as an example for explanation. In order to filter out the false touches caused by two tapping directions being different, it is necessary to find the difference between a normal double-click event and a double-click event triggered by a false touch operation. For a normal double-click event, the acceleration curve is as follows: Figure 3 As shown in , the acceleration peaks of the double-click events have the same sign, either positive or negative. For the acceleration curves of two taps in opposite directions on the X-axis, Figure 4 As shown, in Figure 4 A total of 5 double-click events were triggered in the figure. The two taps of the same event occurred in opposite directions along the X-axis. The numerical manifestation is that the acceleration peaks of the two mutations are positive and negative respectively. Figure 3 and Figure 4 The difference between them can determine that the principle of the double-click event filtering algorithm of the present application is: to determine whether the acceleration peak values of the two taps within a certain set time at the moment when the double-click event occurs are of the same sign. If they are of the same sign, then this double-click event is not triggered by an accidental touch operation; if they are of different signs, then this double-click event is triggered by an accidental touch operation.
[0071] Step 203: When verifying that the combo event is not triggered by an accidental touch operation, determine the operation instruction corresponding to the combo event, and execute the operation corresponding to the operation instruction.
[0072] It should be noted that this step is the same as step 103 and will not be repeated here.
[0073] Step 204: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are different, the terminal determines that the continuous tap event is triggered by an accidental touch operation.
[0074] For example, if a combo event is a double-click event, the terminal determines whether the direction parameter values of the two tapping events included in the double-click event are the same; if the direction parameter values of the two tapping events are different, the terminal determines that the double-click event is triggered by an accidental touch, thereby effectively filtering out double-click events triggered by the user tapping the back cover while the thumb taps the screen, and can also effectively filter out double-click events triggered by the user tapping the screen while the index finger taps the screen, and can also filter out double-click events accidentally triggered when the user shakes the phone, thereby improving the accuracy of processing these double-click events.
[0075] Step 205: When verifying that the continuous tap event is triggered by an accidental touch operation, the terminal discards the continuous tap event.
[0076] In some embodiments, the terminal includes an accelerometer, which detects whether the combo event is triggered by a false touch operation through the accelerometer; accordingly, steps 204 and 205 may be: when the direction parameter values of multiple tap events indicate that the tap directions of the multiple tap events are different, the accelerometer determines that the combo event is triggered by a false touch operation, and the accelerometer discards the combo event and does not report the combo event to the terminal.
[0077] In the embodiment of the present application, since the tapping directions of mis-touch operations are generally different, while the tapping directions of combo events that are not mis-touch operations are the same; therefore, when a combo event is detected, the mis-touch verification is performed on the combo event by determining whether the direction parameter values of multiple tap events included in the combo event are the same to verify whether the combo event is triggered by a mis-touch operation, thereby effectively filtering out combo events triggered by mis-touch operations, thereby improving the accuracy of combo event processing.
[0078] Figure 5 is a flowchart of a method for processing a combo event provided in an embodiment of the present application, which is executed by a VR device. In the embodiment of the present application, a double-click event is used as an example for explanation; see Figure 5 , the method comprising:
[0079] Step 501: When a double-click event is detected, the VR device obtains direction parameter values of two tapping events included in the double-click event, and the direction parameter values of the tapping events are used to indicate the tapping direction of the tapping event.
[0080] It should be noted that this step is the same as step 101 and will not be repeated here.
[0081] Step 502: The VR device performs a false touch check on the double-click event based on the direction parameter values of the two tap events. The false touch check is used to verify whether the double-click event is triggered by a false touch operation.
[0082] When the direction parameter values of the two tap events indicate that the tap directions of the two tap events are the same, the VR device determines that the double-tap event is not triggered by an accidental touch operation. When the direction parameter values of the two tap events indicate that the tap directions of the two tap events are different, the VR device determines that the combo event is triggered by an accidental touch operation.
[0083] Step 503: When verifying that the double-click event is not triggered by an accidental touch operation, the VR device determines a switching instruction corresponding to the double-click event, and switches the perspective view based on the switching instruction.
[0084] In some embodiments, the VR glasses may be VR glasses; and the VR glasses have a perspective function, that is, the display world picture captured by the camera is displayed on the display screen, so that the user can observe the real world without taking off the VR glasses. There are generally two ways to trigger the perspective function. One is passive triggering. When the user walks out of the safety boundary, the VR glasses will automatically turn on the perspective function to ensure the safety of the user; the other is user-active triggering. When the user wants to observe the real world, just tap the VR glasses twice to turn on the perspective function, so that the real world can be seen without taking off the VR glasses. In the embodiment of the present application, the perspective viewing angle of the VR glasses is switched only when the tapping directions of the two tapping events are the same, thereby effectively filtering out the false touches of the two tapping events that are not in the same direction and the false touches of the VR glasses when they are placed on the table, thereby improving the triggering accuracy of the double-click event and optimizing the user experience.
[0085] Step 504: When verifying that the double-click event is triggered by an accidental touch operation, the VR device discards the double-click event.
[0086] In the embodiment of the present application, a double-click event is generally used as a trigger signal for switching perspective on a VR device. This solution can filter out double-click accidental touch events during the VR device wearing process and the adjustment wearing process, prevent frequent perspective switching, and improve user experience.
[0087] Figure 6 is a flowchart of a method for processing a combo event provided in an embodiment of the present application, which is executed by a VR device. In the embodiment of the present application, a double-click event is used as an example for explanation; see Figure 6 , the method comprising:
[0088] Step 601: When a double-click event is detected, the VR device obtains direction parameter values of multiple tap events included in the double-click event, where the direction parameter value of the tap event is used to indicate the tap direction of the tap event.
[0089] It should be noted that this step is the same as step 101 and will not be repeated here.
[0090] Step 602: The VR device performs a false touch check on the double-click event based on the direction parameter values of the multiple tap events. The false touch check is used to verify whether the double-click event is triggered by a false touch operation.
[0091] It should be noted that this step is the same as step 502 and will not be repeated here.
[0092] Step 603: After verifying that the double-click event is not triggered by an accidental touch operation, the VR device obtains the wearing status of the VR device.
[0093] The VR device includes a proximity sensor, and the VR device obtains the wearing state of the VR device through the proximity sensor. When the wearing state is worn, step 605 is executed; when the wearing state is not worn, step 606 is executed. In some embodiments, when the state of the proximity sensor is a close state, the VR device determines that the wearing state is worn; when the state of the proximity sensor is a far state, the VR device determines that the wearing state is not worn.
[0094] Step 604: When the wearing state of the VR device is worn, the VR device determines a switching instruction corresponding to the double-click event, and switches the perspective viewing angle based on the switching instruction.
[0095] In an embodiment of the present application, when the algorithm receives a double-click event reported by the acceleration sensor, it queries the state of the proximity sensor. When the state of the proximity sensor is the proximity state, it determines that the wearing state of the VR device is worn, and reports the double-click event normally. At this time, the VR device determines the switching instruction corresponding to the double-click event, and switches the perspective view based on the switching instruction. If the state of the proximity sensor is the distance state, the double-click event is discarded and the next double-click event is waited for.
[0096] Step 605: When verifying that the double-click event is triggered by an accidental touch operation or the wearing state of the VR device is not worn, the VR device discards the double-click event.
[0097] In the embodiment of the present application, a double-click filtering algorithm combined with wearing detection can filter out double-click events in the non-wearing state, which not only prevents the VR device from switching to the perspective mode due to vibration or bump when not worn, but also avoids frequent perspective switching caused by external vibrations when the VR device is placed on a desktop or the user is not wearing a handheld VR device, thereby avoiding accidental touches due to impacts when not worn, improving the triggering accuracy of the double-click event, and optimizing the user experience.
[0098] Figure 7 is a flowchart of a method for processing a combo event provided in an embodiment of the present application, which is executed by a terminal. In the embodiment of the present application, a combo event is a double-click event as an example for explanation; see Figure 7 , the method comprising:
[0099] Step 701: when a continuous tap event is detected, the terminal obtains direction parameter values of multiple tap events included in the continuous tap event, where the direction parameter values of the tap events are used to indicate the tap directions of the tap events.
[0100] It should be noted that this step is the same as step 101 and will not be repeated here.
[0101] Step 702: The terminal performs an accidental touch check on the continuous tap event based on the direction parameter values of the multiple tap events. The accidental touch check is used to verify whether the continuous tap event is triggered by an accidental touch operation.
[0102] When the direction parameter values of the two tap events indicate that the tap directions of the two tap events are the same, the terminal determines that the double-tap event is not triggered by an accidental touch operation. When the direction parameter values of the two tap events indicate that the tap directions of the two tap events are different, the terminal determines that the continuous tap event is triggered by an accidental touch operation.
[0103] Step 703: When verifying that the double-touch event is not triggered by an accidental touch operation, the terminal determines a color change instruction corresponding to the double-touch event, and switches the color of the back shell of the terminal based on the color change instruction.
[0104] Step 704: When verifying that the continuous tap event is triggered by an accidental touch operation, the terminal discards the continuous tap event.
[0105] In an embodiment of the present application, the terminal determines whether the direction parameter values of the two tap events included in the double-click event are the same; when the direction parameter values of the two tap events are different, the terminal determines that the double-click event is triggered by an accidental touch operation, thereby effectively filtering out double-click events triggered by the user tapping the back cover while also tapping the screen with his thumb, thereby improving the accuracy of processing these double-click events.
[0106] Figure 8 is a flowchart of a method for processing a combo event provided by an embodiment of the present application, which is executed by a terminal; see Figure 8 , the method comprising:
[0107] Step 801: when a continuous tap event is detected, the terminal obtains direction parameter values of multiple tap events included in the continuous tap event, where the direction parameter values of the tap events are used to indicate the tap directions of the tap events.
[0108] It should be noted that this step is the same as step 101 and will not be repeated here.
[0109] Step 802: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are different, but the event library includes a pinch event, the terminal determines that the combo event is not triggered by an accidental touch operation.
[0110] An event library is stored in advance in the terminal, and the event library includes at least one event corresponding to the operation instruction, and the pinch event is a continuous tap event with different tapping directions.
[0111] Step 803: The terminal determines the operation instruction corresponding to the combo event, and executes the operation corresponding to the operation instruction.
[0112] For example, if the continuous tap event is a double-click event, the terminal determines the operation instruction corresponding to the double-click event and executes the operation corresponding to the operation instruction; for another example, if the continuous tap event is a pinch event, the terminal determines the operation instruction corresponding to the pinch event and executes the operation corresponding to the operation instruction.
[0113] Step 804: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are different and the event library does not include a pinch event, the terminal determines that the combo event is triggered by an accidental touch operation.
[0114] Step 805: The terminal discards the combo event.
[0115] In the embodiment of the present application, by setting the operation instructions corresponding to the pinch event, not only the double-click event can be accurately processed, but also the pinch event can be accurately processed, which enriches the gesture operation and further facilitates the user's operation.
[0116] Fig. 9 is a device for processing a combo event provided by an embodiment of the present application; see Fig. 9 , the device comprises:
[0117] An acquisition module 901 is used to acquire direction parameter values of multiple tap events included in the tap event when a tap event is detected, where the direction parameter values of the tap events are used to indicate the tap directions of the tap events;
[0118] A verification module 902, configured to perform an accidental touch verification on the continuous tap event based on the direction parameter values of the multiple tap events, wherein the accidental touch verification is used to verify whether the continuous tap event is triggered by an accidental touch operation;
[0119] The processing module 903 is used to determine the operation instruction corresponding to the combo event and execute the operation corresponding to the operation instruction when verifying that the combo event is not triggered by an accidental touch operation.
[0120] In some embodiments, the verification module 902 is used to determine that the continuous tap event is not triggered by an accidental touch operation when the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are the same.
[0121] In some embodiments, the combo event is a double-click event; the processing module 903 is used to execute any of the following implementations:
[0122] Determine a switching instruction corresponding to the double-click event, and switch the perspective viewing angle of the virtual reality VR device based on the switching instruction;
[0123] A color change instruction corresponding to the double-click event is determined, and a rear shell color of the terminal is switched based on the color change instruction.
[0124] In some embodiments, the processing module 903 is further used to determine the wearing state of the VR device: when the wearing state is worn, determine the switching instruction corresponding to the double-click event, and switch the perspective viewing angle of the VR device based on the switching instruction.
[0125] In some embodiments, the acquisition module 901 is used to determine the attribute information of the acceleration peak of any tap event, wherein the attribute information includes the direction parameter value of the acceleration peak; and obtain the direction parameter value of the tap event from the attribute information of the acceleration peak.
[0126] In some embodiments, the acquisition module 901 is used to determine the coordinate information of the tap points of the multiple tap events; determine the reference coordinate axes of the multiple tap events; and determine the direction parameter values of the multiple tap events based on the reference coordinate axes and the coordinate information of the tap points of the multiple tap events.
[0127] In some embodiments, the verification module 902 is used to determine that the combo event is not triggered by an accidental touch operation when the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are different, but the event library contains a pinch event; wherein the event library includes at least one event corresponding to the operation instruction, and the pinch event is a combo event with different tap directions.
[0128] In the embodiment of the present application, since the tapping direction of the mis-touch operation and the tapping direction of the combo event of the non-mis-touch operation are different; therefore, when a combo event is detected, the combo event is checked for mis-touch based on the direction parameter values of the multiple tap events included in the combo event to verify whether the combo event is triggered by a mis-touch operation, thereby effectively filtering out the combo events triggered by the mis-touch operation, thereby improving the accuracy of combo event processing.
[0129] It should be noted that: the device for processing a combo event provided in the above embodiment only uses the division of the above functional modules as an example when processing a combo event. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the device for processing a combo event provided in the above embodiment and the method for processing a combo event are of the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0130] Fig.10The structure block diagram of a terminal 1000 provided by an exemplary embodiment of the present invention is shown. The terminal 1000 may be: a smart phone, a tablet computer, a VR device, or a vehicle-mounted terminal, etc. Generally, the terminal 1000 includes: a processor 1001 and a memory 1002.
[0131] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0132] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one program code, which is used to be executed by the processor 1001 to implement the method for processing combo events provided in the method embodiment of the present application.
[0133] In some embodiments, the terminal 1000 may further optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002 and the peripheral device interface 1003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1003 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007 and a power supply 1008.
[0134] The peripheral device interface 1003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0135] The radio frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1004 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0136] The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to collect touch signals on the surface or above the surface of the display screen 1005. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1005 can be one, and the front panel of the terminal 1000 is set; in other embodiments, the display screen 1005 can be at least two, which are respectively set on different surfaces of the terminal 1000 or are folded; in some other embodiments, the display screen 1005 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 1000. Even, the display screen 1005 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0137] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0138] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1001 for processing, or input them into the radio frequency circuit 1004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1000. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0139] The power supply 1008 is used to power various components in the terminal 1000. The power supply 1008 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1008 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0140] In some embodiments, the terminal 1000 further includes one or more sensors 1009 . The one or more sensors 1009 include, but are not limited to: an acceleration sensor 1010 , a gyroscope sensor 1011 , a pressure sensor 1012 , an optical sensor 1013 , and a proximity sensor 1014 .
[0141] The acceleration sensor 1010 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1000. For example, the acceleration sensor 1010 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1001 can control the display screen 1005 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1010. The acceleration sensor 1010 can also be used for collecting game or user motion data.
[0142] The gyro sensor 1011 can detect the body direction and rotation angle of the terminal 1000, and the gyro sensor 1011 can cooperate with the acceleration sensor 1010 to collect the user's 3D actions on the terminal 1000. The processor 1001 can implement the following functions based on the data collected by the gyro sensor 1011: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0143] The pressure sensor 1012 can be set in the side frame of the terminal 1000 and / or the lower layer of the display screen 1005. When the pressure sensor 1012 is set in the side frame of the terminal 1000, it can detect the user's holding signal of the terminal 1000, and the processor 1001 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1012. When the pressure sensor 1012 is set in the lower layer of the display screen 1005, the processor 1001 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0144] The optical sensor 1013 is used to collect the ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 according to the ambient light intensity collected by the optical sensor 1013. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is reduced. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 according to the ambient light intensity collected by the optical sensor 1013.
[0145] The proximity sensor 1014, also called a distance sensor, is usually arranged on the front panel of the terminal 1000. The proximity sensor 1014 is used to collect the distance between the user and the front of the terminal 1000. In one embodiment, when the proximity sensor 1014 detects that the distance between the user and the front of the terminal 1000 is gradually decreasing, the processor 1001 controls the display screen 1005 to switch from the screen-on state to the screen-off state; when the proximity sensor 1014 detects that the distance between the user and the front of the terminal 1000 is gradually increasing, the processor 1001 controls the display screen 1005 to switch from the screen-off state to the screen-on state.
[0146] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the terminal 1000, and the terminal 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0147] The embodiment of the present application also provides a computer-readable storage medium, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the method for processing a combo event described in any of the above implementations. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0148] In an exemplary embodiment, a computer program product is further provided. The computer program product stores at least one program code. The at least one program code is loaded and executed by a processor to implement the method for processing a combo event in the above embodiment.
[0149] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on one terminal, or on multiple terminals located at one location, or on multiple terminals distributed at multiple locations and interconnected by a communication network. Multiple terminals distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0150] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0151] The above description is only for the purpose of facilitating the technical solution of the present application to be understood by those skilled in the art, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing a combo event, characterized in that: The method comprises: When a continuous tap event is detected, obtaining direction parameter values of a plurality of tap events included in the continuous tap event, wherein the direction parameter values of the tap events are used to indicate the tap directions of the tap events; Based on the direction parameter values of the multiple tap events, performing an accidental touch check on the continuous tap event, wherein the accidental touch check is used to verify whether the continuous tap event is triggered by an accidental touch operation; When verifying that the combo event is not triggered by an accidental touch operation, determining an operation instruction corresponding to the combo event, and executing an operation corresponding to the operation instruction.
2. The method according to claim 1, characterized in that The performing false touch verification on the continuous tap event based on the direction parameter values of the multiple tap events includes: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are the same, it is determined that the continuous tap event is not triggered by an accidental touch operation.
3. The method according to claim 1 or 2, characterized in that: The combo event is a double-click event; and the determining the operation instruction corresponding to the combo event and executing the operation corresponding to the operation instruction include any of the following implementation methods: Determine a switching instruction corresponding to the double-click event, and switch the perspective viewing angle of the virtual reality VR device based on the switching instruction; A color change instruction corresponding to the double-click event is determined, and a rear shell color of the terminal is switched based on the color change instruction.
4. The method according to claim 3, characterized in that: The determining of the switching instruction corresponding to the double-click event, and switching the perspective viewing angle of the virtual reality VR device based on the switching instruction, includes: Determine the wearing state of the VR device: When the wearing state is already worn, a switching instruction corresponding to the double-click event is determined, and the perspective viewing angle of the VR device is switched based on the switching instruction.
5. The method according to claim 1, characterized in that The step of obtaining direction parameter values of a plurality of tap events included in the combo event includes: For any tap event, determining attribute information of the acceleration peak of the tap event, wherein the attribute information includes a direction parameter value of the acceleration peak; The direction parameter value of the tap event is obtained from the attribute information of the acceleration peak value.
6. The method according to claim 1, characterized in that The step of obtaining direction parameter values of a plurality of tap events included in the combo event includes: Determining coordinate information of the tap points of the multiple tap events; Determining reference coordinate axes of the plurality of tap events; Based on the reference coordinate axis and the coordinate information of the tap points of the multiple tap events, direction parameter values of the multiple tap events are determined.
7. The method according to claim 1, characterized in that The performing false touch verification on the continuous tap event based on the direction parameter values of the multiple tap events includes: When the direction parameter values of the multiple tap events indicate that the tap directions of the multiple tap events are different, but the event library includes a pinch event, determining that the combo event is not triggered by an accidental touch operation; The event library includes at least one event corresponding to an operation instruction, and the pinch event is a continuous tap event with different tapping directions.
8. A device for processing combo events, characterized in that: The device comprises: An acquisition module, configured to acquire direction parameter values of a plurality of tap events included in the tap event when a tap event is detected, wherein the direction parameter values of the tap events are used to indicate the tap directions of the tap events; A verification module, configured to perform an accidental touch verification on the continuous tap event based on the direction parameter values of the multiple tap events, wherein the accidental touch verification is used to verify whether the continuous tap event is triggered by an accidental touch operation; The processing module is used to determine the operation instruction corresponding to the combo event and execute the operation corresponding to the operation instruction when verifying that the combo event is not triggered by an accidental touch operation.
9. A terminal, characterized in that: The terminal includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the method for processing a combo event according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: At least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by the processor to implement the method for processing a combo event as claimed in any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the method for processing a combo event as claimed in any one of claims 1 to 7.
