CN113867553A - Quick click processing method and device, storage medium and electronic equipment - Google Patents
Quick click processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN113867553A CN113867553A CN202010542704.7A CN202010542704A CN113867553A CN 113867553 A CN113867553 A CN 113867553A CN 202010542704 A CN202010542704 A CN 202010542704A CN 113867553 A CN113867553 A CN 113867553A
- Authority
- CN
- China
- Prior art keywords
- click
- detection
- quick
- function
- calling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a processing method and device for quick click, a storage medium and electronic equipment. The method comprises the following steps: calling a method based on the original method to obtain a function method of the original method; calling detection judgment logic of the quick click event, judging a function method and determining whether a detection identifier exists or not; if yes, calling a quick click detection protocol; acquiring a parameter set of a function method based on a parameter calling function in a quick click detection protocol, calling a judgment method of a view class object, and determining the view class object in the parameter set; determining a click event corresponding to the view class object and a time interval of each click event based on an over-click judgment function in a quick click detection protocol, and judging the time interval of each click event; when the time interval of each click event does not exceed the preset click interval, determining that the click of the next click event is too fast, and discarding the next click event, thereby avoiding the influence of the too fast click on the system operation.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a processing method and device for quick click, a storage medium and electronic equipment.
Background
The click operation is a common operation in the control of the terminal, and the terminal detects and correspondingly clicks to realize the control of the terminal.
When the click is too fast, frequent response to the click operation is easily caused, and the normal operation of the system is influenced.
Disclosure of Invention
The invention provides a processing method and device for quick clicking, a storage medium and electronic equipment, which are used for preventing the terminal from being clicked too quickly.
In a first aspect, an embodiment of the present invention provides a method for processing a quick click, including:
calling a method based on an original method to obtain a function method of the original method;
calling detection judgment logic of a quick click event, judging the function method and determining whether a detection identifier exists or not;
if so, calling a quick click detection protocol, wherein the quick click detection protocol and the function method are respectively and independently packaged;
acquiring a parameter set of a function method based on a parameter calling function in the quick click detection protocol, calling a judgment method of a view class object, and determining the view class object in the parameter set;
determining click events corresponding to the view class objects and time intervals of the click events based on an over-quick click judgment function in the quick click detection protocol, and judging the time intervals of the click events;
and when the time interval of each click event does not exceed the preset click interval, determining that the click of the next click event is too fast, and discarding the next click event.
In a second aspect, an embodiment of the present invention further provides a device for processing a quick click, including:
the function method obtaining module is used for obtaining a function method of an original method based on the original method calling method;
the detection identifier determining module is used for calling detection judgment logic of the quick click event, judging the function method and determining whether a detection identifier exists or not;
the quick click detection protocol calling module is used for calling a quick click detection protocol if a detection identifier exists, wherein the quick click detection protocol and the function method are respectively and independently packaged;
the view class object determining module is used for obtaining a parameter set of a function method based on a parameter calling function in the quick click detection protocol, calling a judging method of a view class object and determining the view class object in the parameter set;
the time interval judging module is used for determining click events corresponding to the view class objects and the time intervals of the click events based on an over-quick click judging function in the quick click detection protocol and judging the time intervals of the click events;
and the click processing module is used for determining that the click of the next click event is too fast when the time interval of each click event does not exceed the preset click interval, and discarding the next click event.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by one or more processors, cause the one or more processors to implement the method for processing quick clicks provided by any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for processing a quick click provided in any embodiment of the present invention.
According to the technical scheme of the embodiment, the original method and the quick click detection protocol are independently packaged, the detection identifier is arranged in the function method of the original method, when the detection identifier is detected in the function method of the original method, the quick click detection protocol is called, quick click detection is carried out on the function method of the original method, the quick click detection protocol does not need to be written in each original method, the problems of code redundancy and high maintenance cost in the system are solved, and the code quality of the system is improved. The quick click detection protocol is used for judging the time interval of a click event based on a preset click interval, determining whether the click event which is clicked too fast exists or not, and processing the click event which is clicked too fast through the time interval judgment result, so that the influence of the click too fast on the system operation is effectively avoided.
Drawings
Fig. 1 is a schematic flowchart of a processing method for quick click according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a processing method for quick click according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a quick click processing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a fast click processing method according to an embodiment of the present invention, which is applicable to prevent a click event from being too fast, and can be executed by a fast click processing apparatus according to an embodiment of the present invention, which can be integrated in an electronic device such as a mobile phone or a tablet computer. The method specifically comprises the following steps:
s110, calling a method based on the original method, and obtaining a function method of the original method.
And S120, calling a detection judgment logic of the quick click event, judging the function method, determining whether a detection identifier exists, if so, executing the step S130, and if not, executing the step S170.
S130, calling a quick click detection protocol, wherein the quick click detection protocol and the function method are respectively and independently packaged.
S140, acquiring a parameter set of the function method based on a parameter calling function in the quick click detection protocol, calling a judgment method of the view class object, and determining the view class object in the parameter set.
S150, determining click events corresponding to the view class objects and time intervals of the click events based on an over-quick click judgment function in the quick click detection protocol, and judging the time intervals of the click events.
And S160, when the time interval of each click event does not exceed the preset click interval, determining that the click of the next click event is too fast, and discarding the next click event.
And S170, executing the function method.
The original method may be a method executed by the click event. When the original method is triggered, detection of a click event is performed during operation. In this embodiment, the quick click detection protocol is used to determine a quick click for any original method. The function method and the quick click detection protocol of the original method are respectively and independently packaged, and the quick click detection protocol is called when the function method of the original method has the detection requirement of quick click. The different original methods can call the quick click detection protocol based on the detection identifier, and are used for detecting the quick click event of the different original methods, the quick click detection protocol does not need to be written in each original method, the problems of code redundancy in the system and high maintenance cost are solved, and the code quality of the system is improved.
The method for acquiring the function of the original method based on the original method calling method comprises the following steps: calling a signature function to acquire signature information of the original method; and based on the signature information, calling a getMethod () method in a methodSignature object to determine a function method corresponding to the original method. The signature function may be a method signature method (method signature) join point. Further, the Method for acquiring the function Method corresponding to the original Method may be a Method, which may be defined as a Method, that is, the function Method corresponding to the original Method.
Because the function method of the original method and the quick click detection protocol are independently packaged, the detection marks are respectively arranged in the function method with the quick click detection and are used for calling the quick click detection protocol. After the function method corresponding to the original method is obtained, whether a detection identifier is set is detected, where the detection identifier may be a preset identifier of a quick click detection protocol or description information DelayClick, and the preset identifier may be a unique identifier determined based on the quick click detection protocol, such as a hash value. The unique detection identifier is set in the function method, so that a quick click detection protocol is written in each function method instead, the code result of the function method is simplified, and the system code redundancy is avoided.
Optionally, the invoking a detection and judgment logic of the quick click event, judging the function method, and determining whether the detection identifier exists includes: and calling and executing a detection judgment logic of the quick click event, wherein the detection judgment logic can be a method. If the execution result of the detection judgment logic is null, determining that no detection identifier exists in the function method, namely the original method does not need to carry out quick click detection, and finishing the original method through return; and if the execution result of the detection judgment logic is the delayClick object of the delayClick type, determining that the detection identifier exists in the function method.
When it is determined that the detection flag exists, a quick click detection protocol is invoked, which in some embodiments may be:
among them, the definition @ extension (replacement policy. RUNTIME) is used to define the quick click detection protocol to be effective during the running period of the original method, and the definition @ Target (ElementType. METHOD) is used to define the quick click detection protocol to be only applied to the method and not to be referenced to other types (for example, variables, classes, parameters, etc.).
The terminal interacts with the user through the interactive page, and the user clicks the keys or controls in the interactive page to control the terminal. The inputs to the original method include a variety of forms such as, but not limited to, parameters, classes, variables, and the like. The input parameter corresponding to the click event is a view class object, and in this embodiment, it is determined whether the click event exists by determining whether the view class object exists in the input parameter. Specifically, each parameter of the original method, namely a parameter set of the parameter of the original method, is obtained, and when a view class object exists in the parameter set of the parameter of the original method, a click event is determined to exist.
The original method may be defined as clickPoint, and the parameter entered in the original method is a joinpoint parameter of the proceedingjoinpoint type. The quick click detection protocol comprises a parameter calling function, the parameter calling function is called, for example, JoinPount. getArgs (), a parameter set of the function method is obtained, the parameter set comprises at least one parameter, and the view class object is judged for each parameter. Specifically, the determination of the view class object may be performed in parallel on a plurality of parameter entries, or the determination of the view class object may be performed in parallel on a plurality of parameter entries sequentially in a loop manner until the view class object in the parameter entry set is determined. In the embodiment, the click event of the user on the original method is accurately acquired through the determined view class object, and the accuracy of quick click detection is improved.
The quick click detection protocol comprises an over-quick click judgment function, and the judgment logic of the over-quick click judgment function can be an isFastClick method. Accordingly, click too fast decision function if (!isfastClick (view, delayClick. value ())). Specifically, the time stamp of each click event is determined, the time interval between any two click events is obtained, and the time interval between any two click events is judged based on the preset click interval delayclick.value () in the click-too-fast judging function. Value () may be input by the user in advance, and may be set according to the user requirement, for example, 1500 milliseconds.
When the time interval does not exceed the preset click interval, returning to return true, indicating that the click event is too fast, discarding the click event after the click event is too fast, and executing the original method only based on the previous click event; and when the time interval is larger than the preset click interval, returning to return false, which indicates that the click of the next click event is normal, and respectively executing the original method based on the two click events. Execution of the original method may be by calling joinpoint.
According to the technical scheme of the embodiment, the original method and the quick click detection protocol are independently packaged, the detection identification is arranged in the function method of the original method, when the detection identification is detected in the function method of the original method, the quick click detection protocol is called, quick click detection is carried out on the function method of the original method, the quick click detection protocol does not need to be written in each original method, the problems of code redundancy and high maintenance cost in the system are solved, and the code quality of the system is improved. The quick click detection protocol is used for judging the time interval of a click event based on a preset click interval, determining whether the click event which is clicked too fast exists or not, and processing the click event which is clicked too fast through the time interval judgment result, so that the influence of the click too fast on the system operation is effectively avoided.
Example two
Fig. 2 is a schematic flow chart of a processing method for quick click according to a second embodiment of the present invention, where the method includes:
s210, calling the method based on the original method, and obtaining the function method of the original method.
And S220, calling a detection judgment logic of the quick click event, judging the function method, determining whether a detection identifier exists, if so, executing a step S230, and if not, executing a step S200.
S230, calling a quick click detection protocol, wherein the quick click detection protocol and the function method are respectively and independently packaged.
S240, creating a View type with an empty View class Object, and defining the type of each parameter in the parameter set as an Object type.
S250, circularly calling a judging method of the View class object, respectively judging whether each parameter of the parameter set is a View type, if so, executing the step S260.
S260, converting the parameter into an object of the View type, and assigning the parameter into a View object in the View type.
S270, by calling a click event acquisition function view.getId () method, the ID information of the view object is determined, and the view object with the same ID information is determined.
S280, calculating a time interval between two click events with the same ID information, and comparing the time interval with a preset click interval delayclick.
S290, when the time interval of each click event does not exceed the preset click interval, determining that the click of the next click event is too fast, and discarding the next click event.
And S200, executing the original method.
In this embodiment, when it is determined that a detection identifier exists in a function method of an original method, a join unit. The type of the parameter to be entered in the parameter set is unknown, the parameter to be entered in the parameter set can be marked as Object class, and whether the parameter to be entered is a view class Object is judged in sequence, and when the judgment is successful, the view class Object is determined to exist. In this embodiment, the view class object may be determined for the parameter entries in the parameter entry set based on a for-loop manner, so as to improve the determination efficiency.
On the basis of the above embodiment, the method further includes: and calling an abnormality detection function to carry out abnormality detection on the original method, throwing the abnormality to a system when the original method has abnormal operation, and terminating the detection of the quick click. Specifically, in the process of acquiring the parameter, the original method is subjected to anomaly detection. For example, an implementation logic may be defined: public class ClickJoin { }, and describes the DelayClick protocol in the ClickJoin class, specifically:
@Around("methodAnnotated()")
public void clickPoint(ProceedingJoinPoint joinPoint)throws Throwable{
}
when the original method is abnormal, the abnormality is thrown out in a rows Throwable mode, and an abnormality prompt is given to the system. By the abnormity detection of the original method, the situation that the original method cannot normally operate is avoided.
Optionally, circularly determining whether each parameter in the parameter-entry parameter set is a view class object, and determining a parameter that is successfully determined as a view class object includes: creating a View class with a View class object empty, such as View null; sequentially calling each parameter of the parameter set by a for (Object arg: join point. getarg ()) loop function, further calling a View type judging function, such as arg instanceof View, sequentially judging each parameter of the parameter set, if the judged parameter of the parameter is a View type, returning the View type judging function to the tube, and if the judged parameter of the parameter is not the View type, returning the View type judging function to the flash. Converting the type of the parameter with the successfully judged parameter entry into a View class Object, adding the View class Object to the View class, namely determining the parameter entry with the return value of ture as the View class Object, converting the type of the parameter entry from an Object class into the View class, and adding the View class into a pre-created View class, specifically, a View (View) arg.
It should be noted that there is only one view class object in the reference parameter of an original method. Correspondingly, after any parameter is judged to be of the View type, the judgment of the View type of the undetermined parameter in the parameter set is terminated, for example, a break is called to terminate the for loop, so that the invalid judgment after the View type object is determined is avoided. When the view class object does not exist in the parameter set of the original method, it is determined that the click event does not need to be processed in the original method, the execution of the quick click detection protocol can be ended by calling return, and the original method is continuously executed.
When the time interval between the click events corresponding to the view class object is smaller than or equal to the preset click interval, determining that the quick click condition exists, processing the quick click event, and avoiding the influence of the quick click event on the normal operation of the system.
In this embodiment, a method, getannotion (DelayClick, class) method may be called to obtain a DelayClick type object DelayClick, where DelayClick is protocol description information in a quick click detection protocol, and a judgment logic that judges whether the obtained object is clicked too fast is used to judge whether the obtained object is clicked too fast. Wherein the decision logic may be the isFastClick method. Accordingly, whether the click is too fast is judged by a judgment condition of if (!isfastClick (view).
Optionally, determining click events corresponding to the view class objects and a time interval of each click event includes: determining a corresponding click event according to the identifier of the view class object; determining a time interval for each of the click events based on the time stamp of the click event. The identifier of the view class object may be an ID number of the view class object, and may be obtained through a view getId () function, for example. And determining the click event carrying the ID number, for example, determining whether the ID numbers of the two click events are the same and are the ID numbers of the view class objects. If yes, determining the time interval of the click events in the same view class based on the time stamp of the click events. Optionally, the time interval between two click events adjacent to any two timestamps may be separately determined, or the time interval between any click event and the first click event may be determined. Comparing the time interval with an incoming preset click interval delayclick value (), returning to return true when the time interval does not exceed the preset click interval, indicating that a subsequent click event clicks too fast, discarding the subsequent click event clicking too fast, and executing the original method only based on the previous click event; and when the time interval is larger than the preset click interval, returning to return false, which indicates that the click of the next click event is normal, and respectively executing the original method based on the two click events. Execution of the original method may be by calling joinpoint.
According to the technical scheme of the embodiment, when the detection identifier is set in the original method, the quick click detection protocol is called, the View type object in the parameter set of the original function is judged in a circulating mode through the quick click detection protocol, the time interval of the click event is determined according to the object ID information of the View type, the quick click is judged, the quick click event is discarded, the frequent execution of the original method is avoided, and the influence of the quick click on the system operation is avoided.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a quick click processing device according to a third embodiment of the present invention, where the device includes:
a function method obtaining module 310, configured to obtain a function method of an original method based on an original method calling method;
the detection identifier determining module 320 is configured to invoke a detection judgment logic of a quick click event, judge the function method, and determine whether a detection identifier exists;
a fast click detection protocol calling module 330, configured to call a fast click detection protocol if a detection identifier exists, where the fast click detection protocol and the function method are separately encapsulated;
the view class object determining module 340 is configured to obtain a parameter set of a function method based on a parameter call function in the quick click detection protocol, call a determination method of a view class object, and determine the view class object in the parameter set;
a time interval determining module 350, configured to determine, based on an over-click determining function in the quick click detection protocol, click events corresponding to the view class object and time intervals of the click events, and determine the time intervals of the click events;
and the click processing module 360 is configured to determine that a click event is too fast to click after the click event is determined when the time interval of each click event does not exceed a preset click interval, and discard the click event after the click event.
Optionally, the function method obtaining module 310 is configured to:
calling a signature function to acquire signature information of the original method;
and based on the signature information, calling a getMethod () method in a methodSignature object to determine a function method corresponding to the original method.
Optionally, the detection identifier determining module 320 is configured to:
calling and executing a detection judgment logic of the quick click event;
if the execution result of the detection judgment logic is null, determining that no detection identifier exists in the function method;
and if the execution result of the detection judgment logic is the delayClick object of the delayClick type, determining that the detection identifier exists in the function method.
Optionally, the view class object determining module 340 is configured to:
creating a View type with a View class object being empty;
defining the type of each parameter in the parameter set as Object type;
circularly calling a judging method of the View class object, and respectively judging whether each parameter of the parameter set is a View type;
if yes, converting the parameter into an object of the View type, and assigning the parameter into a View object in the View type.
Optionally, the view class object determining module 340 is further configured to:
and after any parameter is judged to be the View type, terminating the View type judgment of the undetermined parameter in the parameter set.
Optionally, the time interval determining module 350 is configured to:
obtaining a function view by calling a click event, determining ID information of a view object, and determining the view object with the same ID information;
the time interval of two click events of the same ID information is calculated and compared with a preset click interval delayclick.
Optionally, the apparatus further comprises:
and the abnormity detection module is used for calling an abnormity detection function to carry out abnormity detection on the original method, throwing the abnormity to the system when the original method has abnormal operation, and stopping the detection of the quick click.
The processing device for the quick click can execute the processing method for the quick click provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the processing method for executing the quick click.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an electronic device 412 suitable for use in implementing embodiments of the present invention. The electronic device 412 shown in fig. 4 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention. The device 412 is typically an electronic device that undertakes image classification functions.
As shown in fig. 4, the electronic device 412 is in the form of a general purpose computing device. The components of the electronic device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), with one or more devices that enable a user to interact with the electronic device 412, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 412 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 422. Also, the electronic device 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 420. As shown, network adapter 420 communicates with the other modules of electronic device 412 over bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 412, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 416 executes various functional applications and data processing, such as implementing the fast click processing method provided by the above-described embodiment of the present invention, by executing programs stored in the storage device 428.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform operations associated with a method for processing a quick click provided by any of the embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the method for processing a quick click according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A method for processing a quick click is characterized by comprising the following steps:
calling a method based on an original method to obtain a function method of the original method;
calling detection judgment logic of a quick click event, judging the function method and determining whether a detection identifier exists or not;
if so, calling a quick click detection protocol, wherein the quick click detection protocol and the function method are respectively and independently packaged;
acquiring a parameter set of a function method based on a parameter calling function in the quick click detection protocol, calling a judgment method of a view class object, and determining the view class object in the parameter set;
determining click events corresponding to the view class objects and time intervals of the click events based on an over-quick click judgment function in the quick click detection protocol, and judging the time intervals of the click events;
and when the time interval of each click event does not exceed the preset click interval, determining that the click of the next click event is too fast, and discarding the next click event.
2. The method according to claim 1, wherein the obtaining of the function method of the original method based on the original method calling method comprises:
calling a signature function to acquire signature information of the original method;
and based on the signature information, calling a getMethod () method in a methodSignature object to determine a function method corresponding to the original method.
3. The method of claim 1, wherein said invoking a quick click event detection decision logic to decide on the function method to determine whether a detection flag exists comprises:
calling and executing a detection judgment logic of the quick click event;
if the execution result of the detection judgment logic is null, determining that no detection identifier exists in the function method;
and if the execution result of the detection judgment logic is the delayClick object of the delayClick type, determining that the detection identifier exists in the function method.
4. The method of claim 1, wherein the invoking the decision method for the view class object to determine the view class object in the parameter set comprises:
creating a View type with a View class object being empty;
defining the type of each parameter in the parameter set as Object type;
circularly calling a judging method of the View class object, and respectively judging whether each parameter of the parameter set is a View type;
if yes, converting the parameter into an object of the View type, and assigning the parameter into a View object in the View type.
5. The method of claim 4, further comprising:
and after any parameter is judged to be the View type, terminating the View type judgment of the undetermined parameter in the parameter set.
6. The method according to claim 1, wherein the determining, based on a click event obtaining function in the quick click detection protocol, click events corresponding to the view class objects and time intervals of the click events, and determining the time intervals of the click events comprises:
obtaining a function view by calling a click event, determining ID information of a view object, and determining the view object with the same ID information;
the time interval of two click events of the same ID information is calculated and compared with a preset click interval delayclick.
7. The method of claim 1, further comprising;
and calling an abnormality detection function to carry out abnormality detection on the original method, throwing the abnormality to a system when the original method has abnormal operation, and terminating the detection of the quick click.
8. A quick click processing apparatus, comprising:
the function method obtaining module is used for obtaining a function method of an original method based on the original method calling method;
the detection identifier determining module is used for calling detection judgment logic of the quick click event, judging the function method and determining whether a detection identifier exists or not;
the quick click detection protocol calling module is used for calling a quick click detection protocol if a detection identifier exists, wherein the quick click detection protocol and the function method are respectively and independently packaged;
the view class object determining module is used for obtaining a parameter set of a function method based on a parameter calling function in the quick click detection protocol, calling a judging method of a view class object and determining the view class object in the parameter set;
the time interval judging module is used for determining click events corresponding to the view class objects and the time intervals of the click events based on an over-quick click judging function in the quick click detection protocol and judging the time intervals of the click events;
and the click processing module is used for determining that the click of the next click event is too fast when the time interval of each click event does not exceed the preset click interval, and discarding the next click event.
9. An electronic device, characterized in that the device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of processing a quick click as recited in any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of handling a quick click according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010542704.7A CN113867553B (en) | 2020-06-15 | 2020-06-15 | Quick click processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010542704.7A CN113867553B (en) | 2020-06-15 | 2020-06-15 | Quick click processing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113867553A true CN113867553A (en) | 2021-12-31 |
CN113867553B CN113867553B (en) | 2023-09-26 |
Family
ID=78980849
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010542704.7A Active CN113867553B (en) | 2020-06-15 | 2020-06-15 | Quick click processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113867553B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000056916A (en) * | 1998-08-06 | 2000-02-25 | Takenaka Komuten Co Ltd | Hand pointing device |
US20080172271A1 (en) * | 2007-01-16 | 2008-07-17 | Nhn Corporation | Method and apparatus for monitoring invalid clicks |
US20120120002A1 (en) * | 2010-11-17 | 2012-05-17 | Sony Corporation | System and method for display proximity based control of a touch screen user interface |
CN103678492A (en) * | 2013-11-13 | 2014-03-26 | 复旦大学 | Web click counting method based on web crawler behavior identification and buffering updating strategies |
CN105335062A (en) * | 2015-09-23 | 2016-02-17 | 小米科技有限责任公司 | Information editing operation processing method and apparatus |
CN105653724A (en) * | 2016-01-20 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Page exposure monitoring method and device |
CN106445935A (en) * | 2015-08-05 | 2017-02-22 | 腾讯科技(深圳)有限公司 | Misjudgment processing method and device of click data |
CN106775074A (en) * | 2016-12-05 | 2017-05-31 | 广东欧珀移动通信有限公司 | The method of controlling operation thereof and device of terminal |
US20170180229A1 (en) * | 2015-12-18 | 2017-06-22 | Google Inc. | Systems and methods for latency reduction in content item interactions using client-generated click identifiers |
CN107168757A (en) * | 2017-03-31 | 2017-09-15 | 武汉斗鱼网络科技有限公司 | A kind of Android ends prevent View controls from clicking on the method and device of shake |
US20170323100A1 (en) * | 2015-01-26 | 2017-11-09 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, apparatus and storage medium for defending against malicious clicks |
CN107526589A (en) * | 2017-08-04 | 2017-12-29 | 北京五八信息技术有限公司 | Page display method and device |
CN110058757A (en) * | 2016-09-06 | 2019-07-26 | 苹果公司 | For carrying out the device and method of processing and disambiguation to touch input |
US20190303215A1 (en) * | 2018-03-28 | 2019-10-03 | Google Llc | Controlling the triggering of function calls from content items |
CN110837317A (en) * | 2019-10-28 | 2020-02-25 | 华为终端有限公司 | Method, device and equipment for preventing user from mistakenly touching on display interface |
-
2020
- 2020-06-15 CN CN202010542704.7A patent/CN113867553B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000056916A (en) * | 1998-08-06 | 2000-02-25 | Takenaka Komuten Co Ltd | Hand pointing device |
US20080172271A1 (en) * | 2007-01-16 | 2008-07-17 | Nhn Corporation | Method and apparatus for monitoring invalid clicks |
US20120120002A1 (en) * | 2010-11-17 | 2012-05-17 | Sony Corporation | System and method for display proximity based control of a touch screen user interface |
CN103678492A (en) * | 2013-11-13 | 2014-03-26 | 复旦大学 | Web click counting method based on web crawler behavior identification and buffering updating strategies |
US20170323100A1 (en) * | 2015-01-26 | 2017-11-09 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, apparatus and storage medium for defending against malicious clicks |
CN106445935A (en) * | 2015-08-05 | 2017-02-22 | 腾讯科技(深圳)有限公司 | Misjudgment processing method and device of click data |
CN105335062A (en) * | 2015-09-23 | 2016-02-17 | 小米科技有限责任公司 | Information editing operation processing method and apparatus |
US20170180229A1 (en) * | 2015-12-18 | 2017-06-22 | Google Inc. | Systems and methods for latency reduction in content item interactions using client-generated click identifiers |
CN105653724A (en) * | 2016-01-20 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Page exposure monitoring method and device |
CN110058757A (en) * | 2016-09-06 | 2019-07-26 | 苹果公司 | For carrying out the device and method of processing and disambiguation to touch input |
CN106775074A (en) * | 2016-12-05 | 2017-05-31 | 广东欧珀移动通信有限公司 | The method of controlling operation thereof and device of terminal |
CN107168757A (en) * | 2017-03-31 | 2017-09-15 | 武汉斗鱼网络科技有限公司 | A kind of Android ends prevent View controls from clicking on the method and device of shake |
CN107526589A (en) * | 2017-08-04 | 2017-12-29 | 北京五八信息技术有限公司 | Page display method and device |
US20190303215A1 (en) * | 2018-03-28 | 2019-10-03 | Google Llc | Controlling the triggering of function calls from content items |
CN110837317A (en) * | 2019-10-28 | 2020-02-25 | 华为终端有限公司 | Method, device and equipment for preventing user from mistakenly touching on display interface |
Also Published As
Publication number | Publication date |
---|---|
CN113867553B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10460099B2 (en) | System and method of detecting malicious code in files | |
US7665138B2 (en) | Detecting method and architecture thereof for malicious codes | |
EP3488346B1 (en) | Anomaly detection using sequences of system calls | |
CN108287769B (en) | Information processing method and device | |
US11055168B2 (en) | Unexpected event detection during execution of an application | |
CN107276851B (en) | Node abnormity detection method and device, network node and console | |
CN108470126B (en) | Data processing method, device and storage medium | |
CN110647472A (en) | Breakdown information statistical method and device, computer equipment and storage medium | |
JP2004126854A (en) | Attack countermeasure system | |
CN112306833A (en) | Application program crash statistical method and device, computer equipment and storage medium | |
CN111597553A (en) | Process processing method, device, equipment and storage medium in virus searching and killing | |
CN113467981A (en) | Exception handling method and device | |
CN108595240B (en) | Screen snapshot capturing method, device and equipment and readable storage medium | |
CN111163070A (en) | Method, device, equipment and medium for judging correct link of service chain safety deployment under mimicry defense | |
US11361077B2 (en) | Kernel-based proactive engine for malware detection | |
US11307973B2 (en) | Method and device for testing robustness and stability of SMM, and storage medium | |
CN113867553A (en) | Quick click processing method and device, storage medium and electronic equipment | |
CN115617564A (en) | Processing method and device for kernel exception, electronic equipment and storage medium | |
CN115935341A (en) | Vulnerability defense method, system, server and storage medium | |
CN113867701A (en) | Container object instantiation method and device, storage medium and electronic equipment | |
CN114253825B (en) | Memory leak detection method, device, computer equipment and storage medium | |
CN110472415B (en) | Malicious program determination method and device | |
US20140059389A1 (en) | Computer and memory inspection method | |
EP4394604A1 (en) | Fault processing method and apparatus, electronic device, and storage medium | |
EP3293660A1 (en) | System and method of detecting malicious code in files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |