CN109783333A - It repeats to click filter method, device, computer equipment and storage medium - Google Patents

It repeats to click filter method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109783333A
CN109783333A CN201811527631.3A CN201811527631A CN109783333A CN 109783333 A CN109783333 A CN 109783333A CN 201811527631 A CN201811527631 A CN 201811527631A CN 109783333 A CN109783333 A CN 109783333A
Authority
CN
China
Prior art keywords
click
business logic
logic codes
code
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811527631.3A
Other languages
Chinese (zh)
Inventor
彭东远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811527631.3A priority Critical patent/CN109783333A/en
Publication of CN109783333A publication Critical patent/CN109783333A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

It repeats to click filter method, device, computer equipment and storage medium the embodiment of the invention discloses a kind of.The present invention is applied to the R&D process optimization in development field.It is explained the described method includes: being added to business logic codes;If listening to click event, the pending business logic codes are intercepted by intercepting class according to described explain;It parses the note and clicks event code to obtain filtering;The filtering repetition click event code is executed to be filtered so that click event will be repeated.Method by implementing the embodiment of the present invention can realize that business logic codes are separated with non-traffic logical code, improve the reusability and maintainability of code, improve development efficiency.

Description

It repeats to click filter method, device, computer equipment and storage medium
Technical field
The present invention relates to technical field of data processing more particularly to a kind of click filter method, device, computer of repeating to set Standby and storage medium.
Background technique
With science and technology and expanding economy, people's lives level is continuously improved, and smart phone enters people's lives In and have become a part indispensable in people's daily life.User is done shopping by smart phone, browses news and sight Video etc. is seen to carry out recreation, however when operating smart phone, user usually will appear the maloperation of repetition click.It is short The repetition click of time, which will lead to open multiple pages or repeatedly submit, leads to data entanglement.Usually have in the prior art following Two kinds of settling modes, a kind of mode are the time to be clicked using manually recorded last time, then judge by calculating time interval Whether repeat to click;Another way is using abstract processing click event.However, first way is needed to each click thing Part will write the code of same logic, very cumbersome, and the invasive excessive needs of the second way take out all click events As and to third party control is not applicable.
Summary of the invention
It repeats to click filter method, device, computer equipment and storage medium the embodiment of the invention provides a kind of, it is intended to It is excessively cumbersome and not applicable to third party control to solve the problems, such as that filtering repeats click event.
In a first aspect, repeating to click filter method the embodiment of the invention provides a kind of comprising: to business logic codes Addition is explained;If listening to click event, according to it is described explain by intercept class to the pending business logic codes into Row intercepts;It parses the note and clicks event code to obtain filtering;It executes the filtering and repeats to click event code will weigh The complex point event of hitting is filtered.
Second aspect repeats to click filter device the embodiment of the invention also provides a kind of comprising: unit is explained, is used It is explained in being added to business logic codes;Interception unit, if being explained according to described by intercepting class for listening to click event The pending business logic codes are intercepted;Resolution unit clicks thing for parsing the note to obtain filtering Part code;Filter element is filtered for executing the filtering repetition click event code with that will repeat click event.
The third aspect, the embodiment of the invention also provides a kind of computer equipments comprising memory and processor, it is described Computer program is stored on memory, the processor realizes the above method when executing the computer program.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage medium, the storage medium storage There is computer program, the computer program can realize the above method when being executed by a processor.
It repeats to click filter method, device, computer equipment and storage medium the embodiment of the invention provides a kind of.Its In, which comprises business logic codes are added and are explained;If listening to click event, interception is passed through according to the note Class intercepts the pending business logic codes;It parses the note and clicks event code to obtain filtering;It executes The filtering repeats click event code and is filtered with that will repeat click event.The embodiment of the present invention is pending by intercepting Business logic codes carry out repeating to click event filtering, it can be achieved that business logic codes are separated with non-traffic logical code, raising The reusability and maintainability of code improve development efficiency.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram provided in an embodiment of the present invention for repeating to click filter method;
Fig. 2 is the sub-process schematic diagram provided in an embodiment of the present invention for repeating to click filter method;
Fig. 3 is the sub-process schematic diagram provided in an embodiment of the present invention for repeating to click filter method;
Fig. 4 is the sub-process schematic diagram provided in an embodiment of the present invention for repeating to click filter method;
Fig. 5 be another embodiment of the present invention provides repetition click filter method flow diagram;
Fig. 6 is the schematic block diagram provided in an embodiment of the present invention for repeating to click filter device;
Fig. 7 is the schematic block diagram of the specific unit provided in an embodiment of the present invention for repeating to click filter device;
Fig. 8 be another embodiment of the present invention provides repetition click filter device schematic block diagram;And
Fig. 9 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Referring to Fig. 1, Fig. 1 is the schematic flow chart provided in an embodiment of the present invention for repeating to click filter method.This is heavy Complex point hits filter method concrete application in the terminal.The present invention is based on towards tangent plane programming (Aspect Oriented Program) Lai Shixian is a kind of designated parties that code is dynamically cut into class in program operation towards tangent plane programming Method can decouple service logic and non-traffic logic height, so that developer can only be absorbed in the process of development Service logic.In the present invention, when being executed due to different programs, for example, buying, paying, determine, submit, thumbing up, collecting Etc. scenes, be required to filtering repeat click event.Therefore based on towards tangent plane programming, non-traffic logical code is filtered into weight Complex point hits event code is isolated with each business logic codes, and in program operation, shared filtering is repeated click event Code is cut into business logic codes and executes, and so as to avoid intrusion business logic codes, improves reusability, improves exploitation Efficiency improves maintainable.It is specific as follows:
Fig. 1 is the flow diagram provided in an embodiment of the present invention for repeating to click filter method.As shown, this method packet Include following steps S110-S140.
S110, business logic codes are added and are explained.
In one embodiment, business logic codes refer to the execution program of developer's design, for example, purchase commodity, Payment submits data, thumbs up video, collection song etc..Due to being equipped with various applications in mobile terminal, and not There is different corresponding operatings again in same application, it is therefore desirable to add and explain to multiple service logics.Wherein, it explains and refers to one Serial metadata, effect are to provide data for interpreter code, are not explained codes itself by explaining A part, therefore explain and the operational effect of code is not directly affected, it will not invade in code.Specifically, addition note Solution first has to state note, states to define the note in systems with the effect of the system of the informing note, so that industry Business logical code can cooperate interception class to be intercepted when being executed.For example, the note of one@dianjiguolv of statement;Then Mark will be explained into business logic codes, the mode for marking note is to increase to explain before the title of business logic codes, example Such as, before the title of the business logic codes of purchase commodity, increase@dianjiguolv and explain, thus by annotation tag to purchase In the business logic codes of commodity.In other schemes, the mode for marking note be can also be before business logic codes class name Increase and explain, and increases before business logic codes attribute-name and explain.
If S120, listening to click event, explained according to described by intercepting class to the pending service logic generation Code is intercepted.
In one embodiment, it intercepts class to be used to intercept the business logic codes containing explaining, be taken by the monitoring in system Click event is monitored in business, monitors service for the process in monitoring system, when listening to click event by interception class to containing There are the pending business logic codes of note to be intercepted.Specifically, listening to click event in systems can be into system A series of interception classes preset carry out asking whether to intercept the logical code, have been preset by interception class in this present embodiment It is used on and intercepts the business logic codes containing explaining, therefore contain to what is preset for intercepting when listening to click event The interception class of the business logic codes of note is inquired, and the judgment value returned according to the interception class is to determine whether by the industry Business logical code is intercepted.
In one embodiment, as shown in Fig. 2, the step S120 may include step S121-S122.
S121, judged in the business logic codes according to the judgment value obtained from interception class with the presence or absence of the note Solution.
In one embodiment, interception service logical code firstly the need of judge in listened to business logic codes whether There are notes, specifically, obtain function by explaining from the judgment value that obtains in class is intercepted and are judged currently to be monitored Business logic codes, if explaining the judgment value that acquisition function returns is non-empty, determine service logic generation with the presence or absence of explaining Exist in code and explains;If explaining and obtaining the judgment value that function returns is sky, the business logic codes are continued to execute.
If there are the notes in S122, the business logic codes, the business logic codes are intercepted.
In one embodiment, it is explained if existing in the business logic codes intercepted, then needing the service logic Code is intercepted, with the insertion filtering click event code before pending business logic codes execute, in service logic generation Code carries out the filtering of click event before executing.
S130, the parsing note click event code to obtain filtering.
It in one embodiment, is that entire application code is divided into service logic generation based on the thought towards tangent plane programming Code and non-traffic logical code two parts.Wherein, business logic codes are the core in application code, filtered points Hitting event code is the common portion in each application code.For example, buying the application code of commodity and thumbing up view The application code of frequency, wherein generating order according to the commodity of user's selection is in the application code for buy commodity Business logic codes, and filter and repeat click commodity mistake occur then to prevent the commodity amount of addition shopping cart to be purchase commodity Non-traffic logical code in application code;It is thumbed up according to user and the video is added to the list of videos that user is liked In be business logic codes in the application code for thumb up video, and filter and repeat to thumb up to prevent repeatedly thumbing up cancellation The video is added in the list of videos that user is liked is non-traffic logic generation in the application code for thumb up video Code.Therefore, it is non-traffic logical code public in each application code that event code is clicked in the filtering in the present embodiment, is led to The note crossed in intercepted business logic codes clicks event code to obtain filtering.
In one embodiment, as shown in figure 3, the step S130 may include step S131-S132.
S131, the note is parsed to obtain annotating information by reflection.
S132, filtering click event code is obtained according to the annotating information.
In one embodiment, it is code prepared in advance and packaged that event code is clicked in filtering, after obtaining note The note is parsed first, is read by reflection mechanism and explains return annotating information, annotating information explains institute for linking Event code is clicked in corresponding filtering, is obtained the filtering according to the annotating information returned and is clicked event code, to complete to infuse The parsing of solution.
S140, the execution filtering repeat click event code and are filtered with that will repeat click event.
In one embodiment, it obtains filtering to repeat after clicking event code, executes the filtering and repeat to click event code, root It repeats to click the repetition click event judgment rule in event code according to the filtering and judges whether there is repetition click event, if depositing Click event is being repeated, then is filtering the repetition click event and cancels business logic codes;It repeats to click thing if it does not exist Part then continues to execute business logic codes.
In one embodiment, as shown in figure 4, the step S140 may include step S141A-S143A.
S141A, it is compared according to the interval of last time clicked the time and click the time for the first time and prefixed time interval It judges whether there is repetition and clicks event.
In one embodiment, it the time that the time that record user clicks for the first time first is clicked with last time, then counts The time and click the time interval between the time for the first time that user's last time is clicked are calculated, finally by the time interval and default Time interval is compared, so that judging whether there is repetition clicks event.
If S142A, last time, which click the time and click the interval of time for the first time, is less than prefixed time interval, determine In the presence of repetition click event.
In one embodiment, if the time interval clicked twice of head and the tail compared with prefixed time interval less than between preset time Every then illustrating there is repetition click event, for example, time and first time that user's last time is clicked were clicked between the time Time interval is 0.5 second, and prefixed time interval is 1 second, the time and click between the time for the first time that user's last time is clicked Time interval be less than prefixed time interval, determine exist repeat click event.
S143A, the business logic codes are cancelled.
In one embodiment, determine after there is repetition click event, the business logic codes are cancelled, for example, user It thumbs up video to click twice, is divided into 0.5 second between the second click time and click time for the first time, is less than prefixed time interval 1 second, illustrate that user's operation fault exists and repeat click event, cancel secondary repetition click event, video is still added to In the list of videos that user likes;If being divided into 3 seconds between the second click time and click time for the first time, it is greater than between preset time Every 1 second, illustrates that user does not have operation error there is no click event is repeated, continue to execute the view that business logic codes will be thumbed up Frequency is removed from the list of videos that user likes.
In one embodiment, as shown in figure 5, the step S140 may also comprise step: S141a-S143a.
S141a, repetition click event is judged whether there is according to number of clicks detected within a preset time.
In one embodiment, the number of clicks for detecting user within a preset time, according to point detected in preset time It hits number and repeats click event to determine whether existing.For example, preset time is 1 second, user thumbs up video, if user was at 1 second It has inside merely clicked 1 time, illustrating user, there is no operation errors, execute business logic codes for the video thumbed up and are added to user In the list of videos liked.
If S142a, within a preset time number of clicks detected are greater than once, determine there is repetition click event.
In one embodiment, if detecting within a preset time, the number that user is clicked is greater than once, illustrates in the presence of weight Complex point hits the time.For example, preset time is 1 second, user thumbs up video, if user clicks twice in 1 second, illustrates that user grasps Make fault and there is repetition click event.
S143a, cancel the business logic codes,
In one embodiment, after determining to have repetition click event, the business logic codes are cancelled, for example, with Family thumbs up video, and preset time is 1 second, if user clicks twice in 1 second, illustrates that user's operation fault exists and repeats to click Event, cancels secondary repetition click event, and video is still added in the list of videos that user likes;If user was at 1 second It inside clicks primary, within next second but also clicks primary not only, illustrate that user does not have operation error there is no repeating click event, It continues to execute business logic codes and removes the video thumbed up from the list of videos that user likes.
The embodiment of the present invention illustrates a kind of repetition click filter method, is explained by adding to business logic codes;If Click event is listened to, the pending business logic codes are intercepted by intercepting class according to described explain;Parsing The note clicks event code to obtain filtering;Execute the filtering repeat to click event code with will repeat click event into Row filtering, may be implemented business logic codes and separates with non-traffic logical code, improve the reusability and maintainability of code, Improve development efficiency.
Fig. 6 is a kind of schematic block diagram for repeating to click filter device 200 provided in an embodiment of the present invention.As shown in fig. 6, It repeats to click filter method corresponding to above, repeats to click filter device 200 the present invention also provides a kind of.This repeats to click filtering Device 200 includes for executing the above-mentioned unit for repeating to click filter method, which can be configured in desktop computer, plate Computer, laptop computer, etc. in terminals.Specifically, referring to Fig. 6, this repeat click filter device 200 include explain unit 210, Interception unit 220, resolution unit 230 and filter element 240.
Unit 210 is explained, is explained for being added to business logic codes.
In one embodiment, business logic codes refer to the execution program of developer's design, for example, purchase commodity, Payment submits data, thumbs up video, collection song etc..Due to being equipped with various applications in mobile terminal, and not There is different corresponding operatings again in same application, it is therefore desirable to add and explain to multiple service logics.Wherein, it explains and refers to one Serial metadata, effect are to provide data for interpreter code, are not explained codes itself by explaining A part, therefore explain and the operational effect of code is not directly affected, it will not invade in code.Specifically, addition note Solution first has to state note, states to define the note in systems with the effect of the system of the informing note, so that industry Business logical code can cooperate interception class to be intercepted when being executed.For example, the note of one@dianjiguolv of statement;Then Mark will be explained into business logic codes, the mode for marking note is to increase to explain before the title of business logic codes, example Such as, before the title of the business logic codes of purchase commodity, increase@dianjiguolv and explain, thus by annotation tag to purchase In the business logic codes of commodity.In other schemes, the mode for marking note be can also be before business logic codes class name Increase and explain, and increases before business logic codes attribute-name and explain.
Interception unit 220, if being explained according to described by intercepting class to described in pending for listening to click event Business logic codes are intercepted.
In one embodiment, it intercepts class to be used to intercept the business logic codes containing explaining, be taken by the monitoring in system Click event is monitored in business, monitors service for the process in monitoring system, when listening to click event by interception class to containing There are the pending business logic codes of note to be intercepted.Specifically, listening to click event in systems can be into system A series of interception classes preset carry out asking whether to intercept the logical code, have been preset by interception class in this present embodiment It is used on and intercepts the business logic codes containing explaining, therefore contain to what is preset for intercepting when listening to click event The interception class of the business logic codes of note is inquired, and the judgment value returned according to the interception class is to determine whether by the industry Business logical code is intercepted.
In one embodiment, as shown in fig. 7, the interception unit 220 may include subelement: judging unit 221 and blocking Cut subelement 222.
Judging unit 221, for judging to be in the business logic codes according to the judgment value obtained from interception class It is no that there are the notes.
In one embodiment, interception service logical code firstly the need of judge in listened to business logic codes whether There are notes, specifically, obtain function by explaining from the judgment value that obtains in class is intercepted and are judged currently to be monitored Business logic codes, if explaining the judgment value that acquisition function returns is non-empty, determine service logic generation with the presence or absence of explaining Exist in code and explains;If explaining and obtaining the judgment value that function returns is sky, the business logic codes are continued to execute.
Subelement 222 is intercepted, if intercepting the service logic generation for there are the notes in the business logic codes Code.
In one embodiment, it is explained if existing in the business logic codes intercepted, then needing the service logic Code is intercepted, with the insertion filtering click event code before pending business logic codes execute, in service logic generation Code carries out the filtering of click event before executing.
Resolution unit 230 clicks event code for parsing the note to obtain filtering.
It in one embodiment, is that entire application code is divided into service logic generation based on the thought towards tangent plane programming Code and non-traffic logical code two parts.Wherein, business logic codes are the core in application code, filtered points Hitting event code is the common portion in each application code.For example, buying the application code of commodity and thumbing up view The application code of frequency, wherein generating order according to the commodity of user's selection is in the application code for buy commodity Business logic codes, and filter and repeat click commodity mistake occur then to prevent the commodity amount of addition shopping cart to be purchase commodity Non-traffic logical code in application code;It is thumbed up according to user and the video is added to the list of videos that user is liked In be business logic codes in the application code for thumb up video, and filter and repeat to thumb up to prevent repeatedly thumbing up cancellation The video is added in the list of videos that user is liked is non-traffic logic generation in the application code for thumb up video Code.Therefore, it is non-traffic logical code public in each application code that event code is clicked in the filtering in the present embodiment, is led to The note crossed in intercepted business logic codes clicks event code to obtain filtering.
In one embodiment, as shown in fig. 7, the resolution unit 230 may include subelement: reflector element 231 and obtaining Take unit 232.
Reflector element 231, for being parsed to obtain annotating information to the note by reflection.
Acquiring unit 232 clicks event code for obtaining filtering according to the annotating information.
In one embodiment, it is code prepared in advance and packaged that event code is clicked in filtering, after obtaining note The note is parsed first, is read by reflection mechanism and explains return annotating information, annotating information explains institute for linking Event code is clicked in corresponding filtering, is obtained the filtering according to the annotating information returned and is clicked event code, to complete to infuse The parsing of solution.
Filter element 240 is filtered for executing the filtering repetition click event code with that will repeat click event.
In one embodiment, it obtains filtering to repeat after clicking event code, executes the filtering and repeat to click event code, root It repeats to click the repetition click event judgment rule in event code according to the filtering and judges whether there is repetition click event, if depositing Click event is being repeated, then is filtering the repetition click event and cancels business logic codes;It repeats to click thing if it does not exist Part then continues to execute business logic codes.
In one embodiment, as shown in fig. 7, the filter element 240 may include subelement: the first judging unit 241A, First judging unit 242A and cancellation unit 243A.
First judging unit 241A, for according to the click time of last time and the interval of click time first time and in advance If time interval comparison judges whether there is repetition and clicks event.
In one embodiment, it the time that the time that record user clicks for the first time first is clicked with last time, then counts The time and click the time interval between the time for the first time that user's last time is clicked are calculated, finally by the time interval and default Time interval is compared, so that judging whether there is repetition clicks event.
First judging unit 242A is preset if being less than for last time click time and for the first time interval of click time Time interval then determines there is repetition click event.
In one embodiment, if the time interval clicked twice of head and the tail compared with prefixed time interval less than between preset time Every then illustrating there is repetition click event, for example, time and first time that user's last time is clicked were clicked between the time Time interval is 0.5 second, and prefixed time interval is 1 second, the time and click between the time for the first time that user's last time is clicked Time interval be less than prefixed time interval, determine exist repeat click event.
Cancel unit 243A, for cancelling the business logic codes.
In one embodiment, determine after there is repetition click event, the business logic codes are cancelled, for example, user It thumbs up video to click twice, is divided into 0.5 second between the second click time and click time for the first time, is less than prefixed time interval 1 second, illustrate that user's operation fault exists and repeat click event, cancel secondary repetition click event, video is still added to In the list of videos that user likes;If being divided into 3 seconds between the second click time and click time for the first time, it is greater than between preset time Every 1 second, illustrates that user does not have operation error there is no click event is repeated, continue to execute the view that business logic codes will be thumbed up Frequency is removed from the list of videos that user likes.
In one embodiment, as shown in figure 8, the filter element 240 may include subelement: the second judgment sub-unit 241a, the second judging unit 242a and cancellation unit 243a.
Second judgment sub-unit 241a, for judging whether there is weight according to number of clicks detected within a preset time Complex point hits event.
In one embodiment, the number of clicks for detecting user within a preset time, according to point detected in preset time It hits number and repeats click event to determine whether existing.For example, preset time is 1 second, user thumbs up video, if user was at 1 second It has inside merely clicked 1 time, illustrating user, there is no operation errors, execute business logic codes for the video thumbed up and are added to user In the list of videos liked.
Second judging unit 242a, if being greater than once for number of clicks detected within a preset time, judgement is deposited Repeating click event.
In one embodiment, if detecting within a preset time, the number that user is clicked is greater than once, illustrates in the presence of weight Complex point hits the time.For example, preset time is 1 second, user thumbs up video, if user clicks twice in 1 second, illustrates that user grasps Make fault and there is repetition click event.
Cancel unit 243a, for cancel the business logic codes,
In one embodiment, after determining to have repetition click event, the business logic codes are cancelled, for example, with Family thumbs up video, and preset time is 1 second, if user clicks twice in 1 second, illustrates that user's operation fault exists and repeats to click Event, cancels secondary repetition click event, and video is still added in the list of videos that user likes;If user was at 1 second It inside clicks primary, within next second but also clicks primary not only, illustrate that user does not have operation error there is no repeating click event, It continues to execute business logic codes and removes the video thumbed up from the list of videos that user likes.
The embodiment of the present invention illustrates a kind of repetition click filter device, is explained by adding to business logic codes;If Click event is listened to, the pending business logic codes are intercepted by intercepting class according to described explain;Parsing The note clicks event code to obtain filtering;Execute the filtering repeat to click event code with will repeat click event into Row filtering, may be implemented business logic codes and separates with non-traffic logical code, improve the reusability and maintainability of code, Improve development efficiency.
Above-mentioned to repeat to click filter device and can be implemented as the form of computer program a kind of, which can be It is run in computer equipment as shown in Figure 9.
Referring to Fig. 9, Fig. 9 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer Equipment 500 can be terminal, wherein terminal can be smart phone, tablet computer, laptop, desktop computer, a number Word assistant and wearable device etc. have the electronic equipment of communication function.
Refering to Fig. 9, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of repetition click filter method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of repetition click filter method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 9 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step It is rapid: business logic codes being added and are explained;If listening to click event, explained according to described by intercepting class to pending institute Business logic codes are stated to be intercepted;It parses the note and clicks event code to obtain filtering;It executes the filtering and repeats point It hits event code and is filtered so that click event will be repeated.
In one embodiment, processor 502 described is explained by intercepting class to described in pending according to described realizing When business logic codes carry out interception step, it is implemented as follows step: being judged according to the judgment value obtained from interception class It whether there is the note in the business logic codes;If there are the note in the business logic codes, described in interception Business logic codes.
In one embodiment, processor 502 is realizing the parsing note to obtain filtering click event code step When rapid, it is implemented as follows step: the note being parsed to obtain annotating information by reflection;According to the annotating information It obtains filtering and clicks event code.
In one embodiment, processor 502 is realizing the execution filtering repetition click event code will repeat When click event is filtered step, it is implemented as follows step: when clicking according to the click time of last time and for the first time Between interval and prefixed time interval comparison judge whether there is repetition click event;If last time clicks time and first time The interval for clicking the time is less than prefixed time interval, then determines there is repetition click event;Cancel the service logic generation Code.
In one embodiment, processor 502 is realizing the execution filtering repetition click event code will repeat When click event is filtered step, it is implemented as follows step: being judged according to number of clicks detected within a preset time With the presence or absence of repetition click event;If number of clicks detected is greater than once within a preset time, determine there is repetition point Hit event;Cancel the business logic codes.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program, and wherein computer program includes program instruction.The program instruction makes when being executed by processor Processor executes following steps: adding and explains to business logic codes;If listening to click event, explained according to described by blocking Class is cut to intercept the pending business logic codes;It parses the note and clicks event code to obtain filtering;It holds The row filtering repeats click event code and is filtered with that will repeat click event.
In one embodiment, the processor realizes that described pass through according to the note is blocked in the instruction of execution described program Class is cut when carrying out interception step to the pending business logic codes, is implemented as follows step: according to from intercepting in class The judgment value of acquisition judges in the business logic codes with the presence or absence of the note;If existing in the business logic codes The note intercepts the business logic codes.
In one embodiment, the processor realizes the parsing note to obtain executing described program instruction When event code step is clicked in filtering, it is implemented as follows step: the note being parsed by reflection to obtain note letter Breath;Filtering, which is obtained, according to the annotating information clicks event code.
In one embodiment, the processor realizes the execution filtering repetition point executing described program instruction When hitting event code and being filtered step so that click event will be repeated, it is implemented as follows step: according to the click of last time Time and the interval for clicking the time for the first time judge whether there is repetition with prefixed time interval comparison and click event;If last The secondary interval for clicking time and click time for the first time is less than prefixed time interval, then determines there is repetition click event;Cancel Execute the business logic codes.
In one embodiment, the processor realizes the execution filtering repetition point executing described program instruction When hitting event code and being filtered step so that click event will be repeated, it is implemented as follows step: according to institute within a preset time The number of clicks of detection judges whether there is repetition and clicks event;If number of clicks detected is greater than one within a preset time It is secondary, then determine there is repetition click event;Cancel the business logic codes.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of repeat to click filter method characterized by comprising
Business logic codes are added and are explained;
If listening to click event, the pending business logic codes are blocked by intercepting class according to described explain It cuts;
It parses the note and clicks event code to obtain filtering;
The filtering repetition click event code is executed to be filtered so that click event will be repeated.
2. according to claim 1 repeat to click filter method, which is characterized in that described to pass through interception according to the note Class intercepts the pending business logic codes, comprising:
Judged in the business logic codes according to the judgment value obtained from interception class with the presence or absence of the note;
If there are the notes in the business logic codes, the business logic codes are intercepted.
3. according to claim 1 repeat to click filter method, which is characterized in that the parsing note was to obtain Event code is clicked in filter
The note is parsed to obtain annotating information by reflection;
Filtering, which is obtained, according to the annotating information clicks event code.
4. according to claim 1 repeat to click filter method, which is characterized in that described to execute the filtering repetition click Event code is filtered with that will repeat click event, comprising:
The interval of time is clicked with first time according to the click time of last time and prefixed time interval comparison judges whether to deposit Repeating click event;
If last time, which clicks the time, is less than prefixed time interval with the interval for clicking the time for the first time, determine there is repetition point Hit event;
Cancel the business logic codes.
5. according to claim 1 repeat to click filter method, which is characterized in that described to execute the filtering repetition click Event code is filtered with that will repeat click event, comprising:
Repetition, which is judged whether there is, according to number of clicks detected within a preset time clicks event;
If number of clicks detected is greater than once within a preset time, determine there is repetition click event;
Cancel the business logic codes.
6. a kind of repeat to click filter device characterized by comprising
Unit is explained, is explained for being added to business logic codes;
Interception unit, if being patrolled by intercepting class the pending business for listening to click event according to described explain Code is collected to be intercepted;
Resolution unit clicks event code for parsing the note to obtain filtering;
Filter element is filtered for executing the filtering repetition click event code with that will repeat click event.
7. according to claim 6 repeat to click filter device characterized by comprising
Judging unit, for being judged in the business logic codes according to the judgment value obtained from interception class with the presence or absence of institute State note;
Subelement is intercepted, if intercepting the business logic codes for there are the notes in the business logic codes.
8. according to claim 6 repeat to click filter device characterized by comprising
Reflector element, for being parsed to obtain annotating information to the note by reflection;
Acquiring unit clicks event code for obtaining filtering according to the annotating information.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claim 1-5 when executing the computer program Method.
10. a kind of computer readable storage medium, which is characterized in that the storage medium is stored with computer program, the meter Calculation machine program can realize method according to any one of claims 1 to 5 when being executed by a processor.
CN201811527631.3A 2018-12-13 2018-12-13 It repeats to click filter method, device, computer equipment and storage medium Pending CN109783333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811527631.3A CN109783333A (en) 2018-12-13 2018-12-13 It repeats to click filter method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811527631.3A CN109783333A (en) 2018-12-13 2018-12-13 It repeats to click filter method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109783333A true CN109783333A (en) 2019-05-21

Family

ID=66496200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811527631.3A Pending CN109783333A (en) 2018-12-13 2018-12-13 It repeats to click filter method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109783333A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502527A (en) * 2019-08-26 2019-11-26 深圳前海环融联易信息科技服务有限公司 Method, apparatus, computer equipment and the storage medium of background request anti-replay
CN111274574A (en) * 2020-01-16 2020-06-12 恩亿科(北京)数据科技有限公司 Webpage event anti-shaking method and device, server and computer readable storage medium
CN112118352A (en) * 2020-08-31 2020-12-22 京东数字科技控股股份有限公司 Method and device for processing notification trigger message
CN113709258A (en) * 2021-10-27 2021-11-26 湖南新云网科技有限公司 Praise anti-replay method, equipment and storage medium
CN114578727A (en) * 2022-01-29 2022-06-03 深圳市云鼠科技开发有限公司 Service logic control method for cleaning robot
CN115129202A (en) * 2022-07-22 2022-09-30 平安壹钱包电子商务有限公司 Control method and device for user click event
CN115996246A (en) * 2023-03-23 2023-04-21 云粒智慧科技有限公司 Processing method and device of target protocol request, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082400A1 (en) * 2008-09-29 2010-04-01 Yahoo! Inc.. Scoring clicks for click fraud prevention
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082400A1 (en) * 2008-09-29 2010-04-01 Yahoo! Inc.. Scoring clicks for click fraud prevention
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

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
UNCOCHEN: "Android中AOP的应用实践之过滤重复点击", pages 1 - 5, Retrieved from the Internet <URL:https://www.jb51.net/article/147326.htm> *
你好***!!!: "spring-mvc ***+注解 解决重复请求", 《CSDN》, 10 November 2017 (2017-11-10), pages 1 - 6 *
梅甫定: "《矿井三维实时数字通风***研究与开发》", pages: 11 - 16 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502527A (en) * 2019-08-26 2019-11-26 深圳前海环融联易信息科技服务有限公司 Method, apparatus, computer equipment and the storage medium of background request anti-replay
CN111274574A (en) * 2020-01-16 2020-06-12 恩亿科(北京)数据科技有限公司 Webpage event anti-shaking method and device, server and computer readable storage medium
CN112118352A (en) * 2020-08-31 2020-12-22 京东数字科技控股股份有限公司 Method and device for processing notification trigger message
CN113709258A (en) * 2021-10-27 2021-11-26 湖南新云网科技有限公司 Praise anti-replay method, equipment and storage medium
CN113709258B (en) * 2021-10-27 2022-02-11 湖南新云网科技有限公司 Praise anti-replay method, equipment and storage medium
CN114578727A (en) * 2022-01-29 2022-06-03 深圳市云鼠科技开发有限公司 Service logic control method for cleaning robot
CN115129202A (en) * 2022-07-22 2022-09-30 平安壹钱包电子商务有限公司 Control method and device for user click event
CN115996246A (en) * 2023-03-23 2023-04-21 云粒智慧科技有限公司 Processing method and device of target protocol request, electronic equipment and storage medium
CN115996246B (en) * 2023-03-23 2023-06-09 云粒智慧科技有限公司 Processing method and device of target protocol request, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109783333A (en) It repeats to click filter method, device, computer equipment and storage medium
CN108509209A (en) A kind of generation method, device, computer equipment and the storage medium of resource packet
CN109299362A (en) Similar enterprise&#39;s recommended method, device, computer equipment and storage medium
CN109241358A (en) Metadata management method, device, computer equipment and storage medium
CN103336737B (en) Information handling systems and the method for enforcement thereof
CN110069519A (en) Data information management method, apparatus, computer equipment and storage medium
CN103401698B (en) For the monitoring system that server health is reported to the police in server set group operatione
CN108933785A (en) Network risks monitoring method, device, computer equipment and storage medium
CN107911487A (en) Information-pushing method, device, server and readable storage medium storing program for executing
CN109977089A (en) Blog management method, device, computer equipment and computer readable storage medium
CN109491860A (en) Method for detecting abnormality, terminal device and the medium of application program
CN109582500A (en) Data reconstruction method, device, computer equipment and storage medium
CN109272219A (en) Performance appraisal method, apparatus, computer equipment and storage medium
CN108470004A (en) Test script generation method, test method, device, equipment and storage medium
CN108665174A (en) Method for prewarning risk, device, computer equipment and storage medium
CN108647143A (en) MOCK interface test methods, device, computer equipment and storage medium
CN109271315A (en) Scripted code detection method, device, computer equipment and storage medium
CN106598914A (en) Data processing method and device
CN109189668A (en) Interface test method, device, computer equipment and storage medium
CN108664396A (en) Bank&#39;s interactive interface verification method, device, computer equipment and storage medium
CN104182302A (en) Database backup method and device
CN107515950A (en) A kind of image processing method, device, terminal and computer-readable recording medium
CN109189790A (en) Data managing method, device, computer equipment and storage medium
CN108984339A (en) Data reconstruction method and Related product
CN110134538A (en) Method, apparatus, medium and the electronic equipment of quick positioning question log

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