CN103294720B - A kind of network request event screening technique and device - Google Patents

A kind of network request event screening technique and device Download PDF

Info

Publication number
CN103294720B
CN103294720B CN201210052287.3A CN201210052287A CN103294720B CN 103294720 B CN103294720 B CN 103294720B CN 201210052287 A CN201210052287 A CN 201210052287A CN 103294720 B CN103294720 B CN 103294720B
Authority
CN
China
Prior art keywords
request event
request
screening time
time point
screening
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.)
Active
Application number
CN201210052287.3A
Other languages
Chinese (zh)
Other versions
CN103294720A (en
Inventor
周健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201210052287.3A priority Critical patent/CN103294720B/en
Publication of CN103294720A publication Critical patent/CN103294720A/en
Application granted granted Critical
Publication of CN103294720B publication Critical patent/CN103294720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method and device of network request event screening, for solving, request event screening rhythm is uncontrollable and request event screening process is easily by the technical problem of malicious interference.The present invention is corresponding by carrying out request event out to be screened and the time point of multiple settings, according between the access time of the time point and request event sender for setting or the time for initiating request event whether compare relation selected to determine request event, the method that the present invention is provided ensure that and correctly filter out required request event in the case where concurrently attack is faced maliciously, also ensure that, no matter the request event of requirement can be correctly filtered out in the case of still big in request amount in the few situation of request amount, so as to increased the controllability of network request event screening, improve the noise immunity of network request event screening.

Description

A kind of network request event screening technique and device
Technical field
A kind of the present invention relates to Internet technical field, more particularly to request event sieve with network request event as object Choosing method and device.
Background technology
Fixation probability algorithm, the method is generally adopted to set fixed screening in existing network request event filtering algorithm Rate, determines selected request event quantity according to this probability.For example, certain day needs to filter out 24 request events, it is contemplated that have 240000 request events, then be set to a ten thousandth by screening rate.If the same day only has 1000 request events, the possible same day one Individual request event all cannot screened out;If there are 2,400,000 request events on the same day, may all request events at 2 In hour just screened out.
The request event screening sequence for optimizing is understood this screening rate of dynamic calculation or does other restrictions, especially asks thing In the case of the screened limited amount out of part, for example according to a period of time request event number before current time come after calculating The request event number of continuous time, so that calculate current screening rate.For example, 24 request events will be filtered out for one day, each is little When filter out 1, have within first hour 100 requests to filter out first request event, program calculates the screening rate of second hour It is one of percentage, there are 10,000 request events within as a result second hour, will causes the first few minutes of second hour just will screen All request events all screen, so this may result in some malicious users using this defect, open per hour A period of time of beginning repeats altofrequency and sends request event to occupy multiple selected chances, so as to cause request event to screen Poor controllability, the low situation of anti-interference.
Dynamic probabilistic algorithm after fixation probability algorithm above-mentioned and improvement, it is impossible to enough request quantitative changes of solution well The difficult problem that screening rate changes therewith in the case of change, because the sieve calculated according to the situation for the previous period of current time It is an estimation to select rate, may before time request amount very high subsequently again very low, may so cause a period of time below Selected request event is little;Time request amount before being likely to is very low subsequently again very high, may so cause next one Section time selected request event is a lot.For especially for dynamic probabilistic algorithm, malicious user employing is often faced Repetition or concurrent fashion carry out the situation of malicious attack.The algorithm that some optimized may be to the IP address of requestor and user's account Number carry out malice detection, but for concurrently initiating the malicious requests behavior of request event using distributed way from different main frames Still cannot be well solved.
Content of the invention
In view of this, present invention is primarily targeted at providing a kind of network request event screening technique and device, it is used for Existing network request event screening process poor controllability is solved, noise immunity is low, it is impossible to prevent the skill of concurrent malicious requests behavior Art problem.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
One side based on the embodiment of the present invention, there is provided a kind of network request event screening technique, the method include:
In the range of request event screening time, one or more request event screening times are determined by random algorithm Point;
After receiving request event, the time point for receiving request event is carried out with current request event screening time point Relatively, determine selected request according to the time sequencing that request event is received in current request event screening time interval Event;
The request event screening time interval refers to more than or equal to current request event screening time point less than next request Time interval between event screening time point, if current request event screening time point is screened for last request event Between point, then the request event screening time interval refer to more than or equal to last request event screening time point less than described please Seek the time interval between the end time point of event screening time scope.
Further, the foundation receives the time sequencing of request event in current request event screening time interval The step of determining selected request event is specially:
In the case of the corresponding selected request event of a request event screening time point, will be in current request thing First request event received in part screening time interval is defined as selected request event;
In the case of the corresponding multiple selected request events of a request event screening time point, will be in current request thing The request event of the corresponding number being initially received in part screening time interval is defined as selected request event.
Further, the request event screening time scope is divided into multiple time periods, is passed through within each time period Random algorithm determines one or more request event screening time points.
Further, after the request event screening time scope is divided into multiple time periods, also include:
It is each time period distribution weights according to the online curve of user;
Quantity according to selected request event of the weights determination within each time period;
The number of the request event screening time point determined by random algorithm within each time period with determined The selected request event within the time period quantity corresponding.
Further, in the case of the event handling function for having multiple species is corresponding with selected request event, it is every Individual selected request event determines the type of corresponding event handling function at random, is determining event using same type When processing the request event that initiated before function processed the user, then ignore selected request thing of the user in rear initiation Part.
Further, if not receiving request event in current request event screening time interval, by current request The planned number accumulation of the corresponding selected request event of event screening time point is interval interior to next request event screening time, or will The planned number of the corresponding selected request event of current request event screening time point becomes invalid after the specified date process.
Another aspect based on the embodiment of the present invention, there is provided a kind of network request event screening plant, the device include:
Setup module, for arranging request event screening time scope, the quantity of selected request event;
Request event screening time point determining module, in the range of request event screening time, by random algorithm Determine one or more request event screening time points;
Request event screening module, when screening with current request event for comparing the time point of the request event for receiving Between point, determine selected asking according to the time sequencing of the request event received in current request event screening time is interval Seek event;
The request event screening time interval refers to more than or equal to current request event screening time point less than next request Time interval between event screening time point, if current request event screening time point is screened for last request event Between point, then the request event screening time interval refer to more than or equal to last request event screening time point less than request thing Time interval between the end time point of part screening time scope.
Further, in the case of the corresponding selected request event of a request event screening time point, described Request event screening module is used for determining first request event received in current request event screening time interval For selected request event;In the case of the corresponding multiple selected request events of a request event screening time point, will The request event of the corresponding number being initially received in current request event screening time interval is defined as selected request thing Part.
Further, the request event screening time point determining module is additionally operable to the request event screening time model Enclose and be divided into multiple time periods, one or more request event screening time points are determined by random algorithm within each time period.
Further, the request event screening time point determining module is additionally operable to according to user's online curve when being each Between section distribution weights, according to the quantity that the weights determine selected request event within each time period;The request event The number of the request event screening time point that screening time point determining module was determined by random algorithm within each time period with The selected request event quantity determined for the time period is corresponding.
Further, in the case of the event handling function for having multiple species is corresponding with selected request event, it is every Individual selected request event determines the type of corresponding event handling function at random, is determining event using same type When processing the request event that initiated before function processed the user, then ignore selected request thing of the user in rear initiation Part.
Further, if not receiving request event in current request event screening time interval, request event is sieved The planned number accumulation of corresponding for current request event screening time point selected request event is sieved by modeling block to next request event Select in time interval, or the planned number of corresponding for current request event screening time point selected request event is become invalid after the specified date place Reason.
The present invention corresponding by carrying out the number of request event to be screened and multiple default time points, according to default when Between point and request event sender access time or initiate request event time between compare relation to determine request thing Whether part is selected, and the method that the present invention is provided is ensure that needed for correctly filtering out in the case where concurrently attack is faced maliciously Request event, it is also possible to ensure, no matter correctly can filter out in the case of still big in request amount in the few situation of request amount The request event of requirement, so as to increased the controllability of network request event screening, improves network request event sieve The noise immunity of choosing.
Description of the drawings
The step of Fig. 1 is a kind of request event screening technique provided in an embodiment of the present invention flow chart;
Fig. 2 is request event screening technique of the present invention;
Fig. 3 is a kind of user terminal for realizing the method for the invention proposed by the present invention.
Specific embodiment
The present invention basic thought be:(can be people by each request event out to be screened using certain algorithm For arranging or adopting random algorithm) carry out corresponding with the time, so a series of request events out to be screened are translated into One with the sequence (hereinafter referred time serieses) of time correlation, after each request event is received, when being received according to request event Time whether selected to judge request event with the result that request event screening time sequence is compared
For making the object, technical solutions and advantages of the present invention become more apparent, by the following examples and referring to the drawings, right The present invention is further described.
The step of Fig. 1 is a kind of request event screening technique provided in an embodiment of the present invention flow chart, the method are specifically wrapped Include following steps:
Step 101, configuring request event screening time scope;
Before request event screening starts, request event screening time scope is set by system manager, in request The request event received within the scope of event screening time is considered as effective request event, in request event screening time The request event received outside scope will be ignored.Can for example set request event screening time scope as:December 1 in 2011 The morning 11 day:00 to 2011 evening 11 on December 1,:00, totally 12 hours, the request event within the time range is Effective request event.
Step 102, be arranged in the range of request event screening time by be screened go out request event quantity N;
Step 103, request event screening time point is determined in the range of the request event screening time by random algorithm;
The embodiment determines request event screening time point using random algorithm in the range of request event screening time, By step 1 set request event screening time scope as a example by, if by be screened go out request event quantity be 12, please Event screening time scope is asked to be divided into 12 sections, per section corresponding 1 hour, i.e., need to be in the morning 11:00 to evening 11:12 are determined between 00 Individual request event screening time point, if the distributing uniformity in view of request event screening time point on a timeline, can lead to Cross following formula to produce request event screening time point:
Tpi=Ti*3600+Rand(Maxint)mod 3600
Wherein, i be more than or equal to 0 less than 12 positive integer, TpiFor request event screening time point (unit is the second), TiFor Request event screening start after the hourage that passes, the random factor that Maxint is used by random function Rand (), instruction with Machine function generates less than the random number equal to Maxint.The implication of the formula is:One is determined in the range of current hour at random Time point is used as the request event screening time point in current hour.For example, request event screening time is determined in the 3rd hour Point Tp3Calculation be:Assume the random value 6530, T that random function is providedp3=2*3600+6530mod 3600= 10130, i.e. the 10130th second after request event screening is started are a request event screening time point.
Do not considering that request event screening time point, can completely random ground on a timeline distributively in the case of uniformity Screen in request event produce 12 request events between last second for end being screened to request event in first second for starting Screening time point, still by taking the request event screening time scope that step 101 sets as an example, to the request event for filtering out Quantity is 12, then the method for producing request event screening time point is:
Tpi=start_time+Rand (12*3600)
Wherein, i be more than or equal to 0 less than 12 positive integer, TpiFor request event screening time point, start_time is please Seek event screening time scope initial time (unit is the second).Then time point in such cases is may be greater than equal to request thing Arbitrary value of the part screening time scope start time point less than request event screening time end of extent (EOE) time point, and pass through this The request event screening time point for planting complete random fashion generation needs first to be ranked up determination request event screening time point Precedence.
Step 104, receive request event after, when will receive the time point of request event and screening with current request event Between point be compared, the request event initiated at first will be defined as selected request in current request event screening time interval Event;
The request event screening time interval refers to more than or equal to current request event screening time point less than next request Time interval between event screening time point, if current request event screening time point is screened for last request event Between point, then the request event screening time interval refer to more than or equal to current request event screening time point less than request event sieve Select the time interval between end time point;
In the embodiment, if current request event screening time point only corresponds to a selected request event, working as First request event in front request event screening time interval is confirmed as selected request event, as shown in Fig. 2 Wherein Bifilar hollow circle for request event screening time point (corresponding all to be screened go out request event, so as to a series of To be screened go out request event be converted into the sequence of and time correlation), triangle for request event receive when Between point, screen i-th request event when, the time point of the request event X that system is received is closest to i-th request event Screening time point, and meet more than or equal to i-th request event screening time point this condition, therefore determine please for system Ask event X selected, and record the relevant information of request event X;If current request event screening time point is corresponding multiple selected In request event, then will be interval for current request event screening time in the request event determination of respective amount that is initially received For selected request event, for example:It is N to assume that current request event screening time point needs the request event quantity of screening, The N number of request event being initially received in current request event screening time interval is defined as selected request event then;
Preferably, if not receiving request event in current request event screening time interval, by current request thing The planned number accumulation of the corresponding selected request event of part screening time point is interval interior to next request event screening time, or ought The planned number of the corresponding selected request event of front request event screening time point becomes invalid after the specified date process
Embodiment 2
In the embodiment, the cycles such as request event screening time scope are divided into multiple time periods, and the cycle of division can root According to needing voluntarily to determine, for example, 1 hour or half an hour is can be identified as, for each time period, according to the use of statistical average The online quantity in family gives one weights of the corresponding time period, and being then converted into the weights according to certain proportionate relationship will quilt The request event quantity that chooses, and be to generate corresponding time period and want selected request event quantity phase by random fashion Deng request event screening time point.As shown in figure 3, comprising the following steps that:
Step 301, setting request event screening time scope are 6 points to 12 points, by request event screening time scope point Into 6 equal portions, respectively T1~T6, according to the online quantity of statistical average user in each time period, relation is according to a certain percentage The corresponding time period sets selected request event quantity;
For example within six time periods of T1~T6, the online quantity of statistical average user is respectively 100,000,300,000,800,000,80 Ten thousandth, 300,000,100,000, selected request event quantity to be arranged for each time period by the screening rate of ten a ten thousandths, then exist The request event screening time point arranged in six time periods of T1~T6 is respectively 1,3,8,8,3,1, quite In weights are assigned for each time period, average online user's quantity is more, and weights are bigger, corresponding selected request event Quantity is also more.
Step 303, it is each to generate the request event quantity phase selected with the time period by random algorithm time period Deng request event screening time point;
Step 304, receive request event after, when will receive the time point of request event and screening with current request event Between point be compared, the request event initiated at first will be defined as selected request in current request event screening time interval Event;
Method with reference to shown in Fig. 2, as a request event screening time point only corresponds to a selected request thing Part, is therefore confirmed as selected request event in interval interior first request event of current request event screening time; If the corresponding multiple selected request events of current request event screening time point, interval by current request event screening time The request event of the respective amount being inside initially received is defined as selected request event.
Preferably, in the case of the event handling function for having multiple species is corresponding with selected request event, it is each Selected request event determines the type of corresponding event handling function at random, for example, can upset event handling function at random, The event handling function sequence of random alignment is corresponded to the request event screening time point sequence for randomly generating, each request thing The corresponding event handling function type of part screening time point does not all know.For example there are two kinds of event handling function types, respectively A Class and B classes, are provided with 10 request event screening time points, have 3 A class event handling functions, 7 B class event handling functions, A classes and B class event handling functions are mixed by the event handling letter to form shape such as BBABBABBBA by random fashion then The event handling function sequence is corresponded to each request event screening time point by Number Sequence in order, when request event is screened, Determine that selected request event is corresponding according to request event screening time point and the corresponding relation of event handling function type Event handling function.
Further, methods described can also support event handling function type function of shielding, for example, be used determining During the request event that the event handling function of same type was initiated before processing the user, then ignore the user in rear initiation Selected request event, the request event user not sent are processed using the event handling function of same type;If should The request event sent before the corresponding event handling function type user of time point was not used, then allow the user to send Request event use the event handling function.
The above, only presently preferred embodiments of the present invention is not intended to limit protection scope of the present invention.

Claims (12)

1. a kind of network request event screening technique, it is characterised in that the method includes:
In the range of request event screening time, one or more request event screening time points are determined by random algorithm;
After receiving request event, the time point for receiving request event is compared with current request event screening time point Compared with if the corresponding multiple selected request events of current request event screening time point, it is assumed that current request event screening time It is N that point needs the request event quantity of screening, receives request event according in current request event screening time interval Time sequencing determines selected N number of request event;
The request event screening time interval refers to more than or equal to current request event screening time point and less than next request thing Time interval between part screening time point, if current request event screening time point is last request event screening time Point, then the request event screening time interval refer to more than or equal to last request event screening time point and less than described Time interval between the end time point of request event screening time scope.
2. method according to claim 1, it is characterised in that the foundation is in current request event screening time is interval Receive the step of the time sequencing of request event determines selected request event and be specially:
In the case of the corresponding selected request event of a request event screening time point, will sieve in current request event Receive in time interval first request event is selected to be defined as selected request event;
In the case of the corresponding multiple selected request events of a request event screening time point, will sieve in current request event The request event of the corresponding number being initially received in time interval is selected to be defined as selected request event.
3. method according to claim 2, it is characterised in that when the request event screening time scope is divided into multiple Between section, one or more request event screening time points are determined by random algorithm within each time period.
4. method according to claim 3, it is characterised in that multiple the request event screening time scope to be divided into After time period, also include:
It is each time period distribution weights according to the online curve of user;
Quantity according to selected request event of the weights determination within each time period;
The number of the request event screening time point determined by random algorithm within each time period with determined by The quantity of the selected request event in the time period is corresponding.
5. the method according to any one of Claims 1-4, it is characterised in that
In the case of the event handling function for having multiple species is corresponding with selected request event, it is each selected request thing Part determines the type of corresponding event handling function at random, is processed using the event handling function of same type determining During the request event that initiates before the user, then ignore selected request event of the user in rear initiation.
6. the method according to any one of Claims 1-4, it is characterised in that
If not receiving request event in current request event screening time interval, by current request event screening time point The planned number accumulation of corresponding selected request event is interval interior to next request event screening time, or current request event is sieved The planned number of the corresponding selected request event of time point is selected to become invalid after the specified date process.
7. a kind of network request event screening plant, it is characterised in that the device includes:
Setup module, for arranging request event screening time scope, the quantity of selected request event;
Request event screening time point determining module, for, in the range of request event screening time, being determined by random algorithm One or more request event screening time points;
Request event screening module, for comparing the time point of the request event for receiving and current request event screening time Point, if the corresponding multiple selected request events of current request event screening time point, it is assumed that current request event screening time It is N that point needs the request event quantity of screening, according to the request event received in current request event screening time interval Time sequencing determine selected N number of request event;
The request event screening time interval refers to more than or equal to current request event screening time point and less than next request thing Time interval between part screening time point, if current request event screening time point is last request event screening time Point, then the request event screening time interval refer to more than or equal to last request event screening time point and less than request Time interval between the end time point of event screening time scope.
8. device according to claim 7, it is characterised in that
In the case of the corresponding selected request event of a request event screening time point, the request event screens mould Block is used for for first request event received in current request event screening time interval being defined as selected request Event;
In the case of the corresponding multiple selected request events of a request event screening time point, will sieve in current request event The request event of the corresponding number being initially received in time interval is selected to be defined as selected request event.
9. device according to claim 8, it is characterised in that
When the request event screening time point determining module is additionally operable to for the request event screening time scope to be divided into multiple Between section, one or more request event screening time points are determined by random algorithm within each time period.
10. device according to claim 9, it is characterised in that
It is each time period distribution weights that the request event screening time point determining module is additionally operable to according to the online curve of user, According to the quantity that the weights determine selected request event within each time period;
The request event screening time point determining module was sieved by the request event that random algorithm determines within each time period Select the number of time point corresponding with the selected request event quantity determined for the time period.
11. devices according to any one of claim 7 to 10, it is characterised in that
In the case of the event handling function for having multiple species is corresponding with selected request event, it is each selected request thing Part determines the type of corresponding event handling function at random, is processed using the event handling function of same type determining During the request event that initiates before the user, then ignore selected request event of the user in rear initiation.
12. devices according to any one of claim 7 to 10, it is characterised in that
If not receiving request event in current request event screening time interval, request event screening module currently will be asked The planned number of the corresponding selected request event of event screening time point is asked to accumulate in next request event screening time interval, or The planned number of corresponding for current request event screening time point selected request event is become invalid after the specified date process.
CN201210052287.3A 2012-03-01 2012-03-01 A kind of network request event screening technique and device Active CN103294720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210052287.3A CN103294720B (en) 2012-03-01 2012-03-01 A kind of network request event screening technique and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210052287.3A CN103294720B (en) 2012-03-01 2012-03-01 A kind of network request event screening technique and device

Publications (2)

Publication Number Publication Date
CN103294720A CN103294720A (en) 2013-09-11
CN103294720B true CN103294720B (en) 2017-03-15

Family

ID=49095607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210052287.3A Active CN103294720B (en) 2012-03-01 2012-03-01 A kind of network request event screening technique and device

Country Status (1)

Country Link
CN (1) CN103294720B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101641674A (en) * 2006-10-05 2010-02-03 斯普兰克公司 Time series search engine
CN102075592A (en) * 2010-12-30 2011-05-25 吕晓雯 Method for screening DNS (Domain Name System) request

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4931245B2 (en) * 2007-11-30 2012-05-16 インターナショナル・ビジネス・マシーンズ・コーポレーション Access control method, server device and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101641674A (en) * 2006-10-05 2010-02-03 斯普兰克公司 Time series search engine
CN102075592A (en) * 2010-12-30 2011-05-25 吕晓雯 Method for screening DNS (Domain Name System) request

Also Published As

Publication number Publication date
CN103294720A (en) 2013-09-11

Similar Documents

Publication Publication Date Title
CN108494703A (en) A kind of access frequency control method, device and storage medium
CN106484528B (en) For realizing the method and device of cluster dynamic retractility in Distributed Architecture
CN102387401B (en) Method, device and equipment for adjusting play time point of audio and video information
CN106130972B (en) resource access control method and device
CN111726303A (en) Flow control method and device and computing equipment
CN106713982A (en) Screen protection method and system of smart television
CN102347912A (en) Method and system for obtaining dynamic update in instant messaging software
CN106530019A (en) Server with function of performing dynamic configuration on winning probability
CN103810045A (en) Resource allocation method, resource manager, resource server and system
CN110430045A (en) A kind of random digit generation method based on distributed common recognition algorithm
CN110471749A (en) Task processing method, device, computer readable storage medium and computer equipment
CN108322487A (en) P2p nodes selection method and device and node updating method and device
CN107948176A (en) A kind of information security Enhancement Method and controller towards CAN network
CN106682944A (en) Server for processing lottery information in real-time lottery activity
CN106789498A (en) The network address assignment method of Modbus communication networks, from node device and communication system
CN111355589A (en) Reconfigurable ring oscillator physical unclonable function circuit and excitation generation method thereof
CN110045964A (en) Software gray scale dissemination method, proxy server, configuration center and system
CN103580887B (en) Client, upgrade method and system
CN103294720B (en) A kind of network request event screening technique and device
CN109309708B (en) Method, medium, apparatus and system for increasing block production speed in block chain system
CN110461006A (en) Reduce WLAN interference method, device and terminal device
CN108234143A (en) The processing method of message, device and equipment during a kind of live streaming
CN111901405B (en) Multi-node monitoring method and device, electronic equipment and storage medium
CN102984191A (en) Method and device and equipment used for determining behavior related quality information
CN104809122B (en) A kind of method and device accessing webpage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant