A method, apparatus, storage medium and electronic device for processing access requests

By monitoring the number of accesses within the preset time period and discarding requests when the limit is exceeded, the server load problem caused by high-frequency access by users is solved, ensuring system stability and security.

CN114237879BActive Publication Date: 2025-07-04BEIJING KNOWNSEC INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111487830.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2025-07-04
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

High frequency access by users causes the backend server to fail to meet too many access requests, which may lead to security issues or theft of important data.

Method used

When the interval between the current time point and the first time point is greater than the preset unit time length, the target time period is determined and the access request is discarded when the number of target accesses exceeds the threshold.

Benefits of technology

Effectively limit users' high-frequency access, avoid affecting the normal work of the website or server, and ensure security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114237879B_ABST
    Figure CN114237879B_ABST
Patent Text Reader

Abstract

This application proposes a method, device, storage medium, and electronic device for processing access requests. When the interval between the current time point and the first time point is greater than the preset unit time length, the time period between the second time point and the current time point is determined as the target time period. Here, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access count limit is enabled, and the interval between the second time point and the current time point is the unit time length. When the target access count is greater than or equal to the preset count threshold, the latest access request is discarded. The target access count is the number of accesses by the user within the target time period. In this embodiment, when the target access count is greater than the preset count threshold, it indicates that the access frequency is too high. To avoid affecting the normal operation of the website or server, the access request can be directly discarded at this time, thus achieving the purpose of restricting high-frequency access by users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of the Internet. Specifically, it relates to a method, apparatus, storage medium, and electronic device for processing access requests. Background Art

[0002] In the current era of increasingly developed networks, more and more people start to obtain life information, work information, learning information, etc. online. Due to the multi-directionality of users, there are various possibilities for operating a website. Sometimes, in order to obtain certain information, users may perform non-compliant frequent operations. However, when users access frequently, the backend server will not be able to meet too many access requests, which may lead to security problems on the corresponding website or important data being stolen.

[0003] Therefore, how to overcome the problem that the backend server cannot meet too many access requests when users access frequently has become a difficult problem that those skilled in the art are currently concerned about. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, storage medium, and electronic device for processing access requests to at least partially improve the above problems.

[0005] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, an embodiment of this application provides a method for processing access requests. The method includes:

[0007] When the interval between the current time point and the first time point is greater than a preset unit time length, determine the time period between the second time point and the current time point as the target time period;

[0008] Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when access count limitation is enabled, and the interval between the second time point and the current time point is the unit time length;

[0009] When the target access count is greater than or equal to a preset count threshold, discard the latest access request;

[0010] Wherein, the target access count is the number of accesses by the user within the target time period.

[0011] In a second aspect, an embodiment of this application provides an apparatus for processing access requests. The apparatus includes:

[0012] A preprocessing unit, configured to determine the time period between the second time point and the current time point as the target time period when the interval between the current time point and the first time point is greater than a preset unit time length;

[0013] Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access count limit is enabled, and the interval between the second time point and the current time point is the unit time length;

[0014] An execution unit, configured to discard the latest access request when the target access count is greater than or equal to a preset count threshold;

[0015] Wherein, the target access count is the access count of the user within the target time period.

[0016] In a third aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device includes: a processor and a memory, the memory is used to store one or more programs; when the one or more programs are executed by the processor, the above method is implemented.

[0018] Compared with the prior art, for an access request processing method, device, storage medium and electronic device provided by an embodiment of the present application, when the interval between the current time point and the first time point is greater than a preset unit time length, the time period between the second time point and the current time point is determined as the target time period; wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access count limit is enabled, and the interval between the second time point and the current time point is the unit time length; when the target access count is greater than or equal to a preset count threshold, the latest access request is discarded; wherein, the target access count is the access count of the user within the target time period. In this embodiment, when the target access count is greater than the preset count threshold, it indicates that the access frequency is too high. In order not to affect the normal operation of the website or server, the access request can be directly discarded at this time, so as to achieve the purpose of restricting the user's high-frequency access.

[0019] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. Description of the Drawings

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0021] Figure 1 Schematic diagram of the retrieval times statistical period loop provided by the embodiment of the present application;

[0022] Figure 2 Schematic diagram of the structure of the electronic device provided by the embodiment of the present application;

[0023] Figure 3 Schematic diagram of the process of the access request processing method provided by the embodiment of the present application;

[0024] Figure 4 One of the schematic diagrams of the process of the access request processing method provided by the embodiment of the present application;

[0025] Figure 5a Schematic diagram of the target time period when the first time point is later than the second time point provided by the embodiment of the present application;

[0026] Figure 5b Schematic diagram of the target time period when the first time point is earlier than the second time point provided by the embodiment of the present application;

[0027] Figure 6 Schematic diagram of the structure of the seed target storage segment provided by the embodiment of the present application;

[0028] Figure 7 One of the schematic diagrams of the process of the access request processing method provided by the embodiment of the present application;

[0029] Figure 8 One of the schematic diagrams of the process of the access request processing method provided by the embodiment of the present application;

[0030] Figure 9 Schematic diagram of the units of the access request processing device provided by the embodiment of the present application.

[0031] In the figure: 10 - processor; 11 - memory; 12 - bus; 13 - communication interface; 201 - preprocessing unit; 202 - execution unit. Detailed implementation manners

[0032] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Components of the embodiments of the present application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0033] Accordingly, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the scope of protection of the present application.

[0034] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not require further definition and explanation in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0035] It should be noted that, in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0036] In the description of the present application, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of this application is customarily placed during use. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present application.

[0037] In the description of the present application, it should also be noted that unless otherwise clearly specified and limited, the terms "arranged", "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.

[0038] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0039] In order to limit users' high-frequency access to the website and avoid affecting the stability of the website. An embodiment of the present application provides a possible implementation manner. Taking the unit time set by the administrator as a cycle, the number of times a user can access within each cycle is determined. When a cycle ends, the relevant data of the user's access (number of times, start search time, most recent search time) will be reset.

[0040] As Figure 1 shown, assuming the unit time is 1 hour and the set search times threshold is 30 times. The search times for each unit time are respectively counted, for example, the search times from 0:00 to 1:00, from 1:00 to 2:00, and from 2:00 to 3:00, etc. When the search times within one hour exceed 30 times, the user's access will be restricted.

[0041] Figure 1 The method shown counts in units of time as a cycle, and the user access data is reset for each unit time. When a user searches across two unit times, the highest triggered times will be close to twice. Specifically, as Figure 1 shown, the user's search times in the second half of the first unit time (for example, from 0:30 to 1:00) are 29 times, which is less than the search times threshold, and the user's search times in the first half of the first unit time (for example, from 1:00 to 1:30) are 29 times, which is less than the search times threshold. However, the user's search times within the period from (0:30 to 1:30) are 58 times in total, far exceeding the search times threshold. Therefore, through Figure 1 the scheme shown cannot effectively limit the user's access frequency.

[0042] To overcome the above problems, an embodiment of the present application provides an electronic device, which may be a server device. Please refer to Figure 2 , the structural schematic diagram of the electronic device. The electronic device includes a processor 10, a memory 11, and a bus 12. The processor 10 and the memory 11 are connected through the bus 12. The processor 10 is used to execute the executable module stored in the memory 11, such as a computer program.

[0043] The processor 10 may be an integrated circuit chip having the ability to process signals. In the implementation process, each step of the access request processing method may be completed by an integrated logic circuit of hardware in the processor 10 or by instructions in the form of software. The above-mentioned processor 10 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components.

[0044] The memory 11 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0045] The bus 12 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. Figure 2 Although only one bidirectional arrow is used in the figure, it does not mean that there is only one bus 12 or only one type of bus 12 .

[0046] The memory 11 is used to store programs, such as programs corresponding to the access request processing device. The access request processing device includes at least one software function module that can be stored in the memory 11 in the form of software or firmware or fixed in the operating system (OS) of the electronic device. After receiving the execution instruction, the processor 10 executes the program to implement the access request processing method.

[0047] Possibly, the electronic device provided in the embodiment of the present application further includes a communication interface 13. The communication interface 13 is connected to the processor 10 via a bus. The electronic device can communicate with the user terminal via the communication interface 13 and receive an access request transmitted by the user terminal.

[0048] It should be understood that Figure 2The structure shown is only a schematic diagram of a part of the electronic device. The electronic device may further include more or fewer components than those shown in Figure 2 or have a different configuration from that shown in Figure 2 . Figure 2 Each component shown in can be implemented by hardware, software, or a combination thereof.

[0049] A method for processing access requests provided by an embodiment of the present application can be, but is not limited to, applied to the electronic device shown in Figure 2 . For the specific process, please refer to Figure 3 . The access request processing method includes S106 and S112.

[0050] S106. When the interval between the current time point and the first time point is greater than the preset unit time length, determine the time period between the second time point and the current time point as the target time period.

[0051] Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access count limit is enabled, and the interval between the second time point and the current time point is the unit time length.

[0052] It can be understood that in this embodiment, the target time period changes with the current time point. Taking the unit time length as 1 hour as an example, when the current time point is 1:00, the target time period is 0:00 - 1:00; when the current time point is 1:05, the target time period is 0:05 - 1:05. This is completely different from directly segmenting time according to the unit time as described above.

[0053] S112. When the target access count is greater than or equal to the preset count threshold, discard the latest access request.

[0054] Wherein, the target access count is the number of accesses by the user within the target time period.

[0055] It should be understood that when the target access count is greater than the preset count threshold, it indicates that the access frequency is too high. In order not to affect the normal operation of the website or server, the access request can be directly discarded at this time.

[0056] In this embodiment, the target time period changes with the current time point. Obtaining the number of user accesses within the target time period can effectively avoid the problem that the number of user accesses within a certain interval is too high but not detected, and the access frequency of the user is not limited. It can avoid the situation of missed detection and ensure that the high-frequency access limit can be properly implemented.

[0057] In summary, the embodiment of the present application provides a method for processing access requests. When the interval between the current time point and the first time point is greater than the preset unit time length, the time period between the second time point and the current time point is determined as the target time period. Here, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access count limit is enabled, and the interval between the second time point and the current time point is the unit time length. When the target access count is greater than or equal to the preset count threshold, the latest access request is discarded. Here, the target access count is the number of accesses by the user within the target time period. In this embodiment, when the target access count is greater than the preset count threshold, it indicates that the access frequency is too high. To avoid affecting the normal operation of the website or server, the access request can be directly discarded at this time, thereby achieving the purpose of restricting the user's high-frequency access.

[0058] Based on Figure 3 the above, regarding how to determine the target time period, the embodiment of the present application also provides a possible implementation method. Please refer to Figure 4 , the access request processing method further includes: S105 and S107.

[0059] S105, determine whether the first time point is earlier than the second time point. If so, execute S106; if not, execute S107.

[0060] As recorded in the previous text, the interval between the second time point and the current time point is the unit time length. When the first time point is earlier than the second time point, it means that the interval between the current time point and the first time point is greater than the preset unit time length.

[0061] Specifically, please refer to Figure 5a and Figure 5b , Figure 5a is a schematic diagram of the target time period when the first time point is later than the second time point, Figure 5b is a schematic diagram of the target time period when the first time point is earlier than the second time point. Among them, Figure 5a and Figure 5b the time when the administrator enables the configuration in is the first time point, and the time corresponding to A is the second time point.

[0062] As Figure 5a shown, when the first time point is later than the second time point, it means that the access count limit has not been enabled at the second time point, that is, the user access requests received within the period from the second time point (A) to the first time point do not need to be considered. At this time, S107 will be executed to determine the time period between the first time point and the current time point as the target time period. Conversely, S106 will be executed.

[0063] S107, determine the time period between the first time point and the current time point as the target time period.

[0064] Please continue to refer to Figure 4 Regarding how to obtain the target access times, an embodiment of the present application further provides a possible implementation manner. As Figure 4 shown, the access request processing method further includes S108 and S109.

[0065] S108, delete the timeout access requests in the target storage segment.

[0066] Among them, the timeout access request is an access request that does not belong to the target time period.

[0067] Please continue to refer to Figure 5a , Figure 5a in Figure 5b , the time periods before the first time point (the time when the administrator enables the configuration) do not belong to the target time period. Therefore, the access requests received before the first time point are all timeout access requests.

[0068] in

[0069] , the time periods before the second time point (A) do not belong to the target time period. Therefore, the access requests received before the second time point are all timeout access requests. Figure 5a and Figure 5b in

[0070] Please continue to refer to Figure 4 , after obtaining the target access times, it is necessary to determine the size relationship between the target access times and a preset times threshold. Optionally, after S109, the access request processing method further includes: S110 and S111.

[0071] S110, determine whether the target access times are less than the preset times threshold. If so, execute S111; if not, execute S112.

[0072] It should be understood that when the target access times are less than the preset times threshold, it means that the user's access frequency does not exceed the limit. Therefore, it is necessary to respond to the user's access request, that is, execute S111; otherwise, execute S112.

[0073] S111, add the latest access request to the target storage segment for the latest response access request.

[0074] Optionally, please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a target storage segment provided by an embodiment of the present application. As Figure 6 shown, the target storage segment can be a queue array.

[0075] Assume that the unit time length is 1 hour and the preset number threshold is 10 times. Within the unit time length, each time a new user's access request is received, it can be stored in the queue array. When the time point of receiving the user's access request for the 11th time is the current time point, if the target access number within the target time period corresponding to the current time point is less than the number threshold, the access request received for the 11th time is added to the queue array, and the first data in the queue array, that is, the access request received for the first time, is removed.

[0076] Based on Figure 4 this, regarding how to enable the access number limit, the embodiments of the present application also provide a possible implementation manner. Please refer to Figure 7 , the access request processing method further includes: S101 and S103.

[0077] S101, when receiving the request for enabling the access number limit transmitted by the management terminal, enable the access number limit.

[0078] Optionally, the administrator can transmit the request for enabling the access number limit to the electronic device through the management terminal. When the electronic device receives the request for enabling the access number limit transmitted by the management terminal, it enables the access number limit.

[0079] S103, set the time point when the access number limit is enabled as the first time point.

[0080] Based on Figure 4 this, regarding how to enable the access number limit, the embodiments of the present application also provide a possible implementation manner. Please refer to Figure 8 , the access request processing method further includes: S102 and S103.

[0081] S102, when the time reaches the pre-configured time point for enabling the access number limit, enable the access number limit.

[0082] Optionally, for the convenience of management, the user can set the time point for enabling the access number limit through a configuration file or parameters. For example, set the time period from 8:00 pm to 12:00 am as the time period for enabling the access number limit. When it reaches 8:00 pm, the electronic device enables the access number limit and sets 8:00 pm as the first time point.

[0083] S103, set the time point when the access number limit is enabled as the first time point.

[0084] Based on Figure 7 and Figure 8 this, regarding how the electronic device obtains the unit time length and the preset number threshold, the embodiments of the present application also provide a possible implementation manner. The access request processing method further includes S104.

[0085] S104. Call the pre-stored configuration file to obtain the unit time length and the preset number threshold.

[0086] Optionally, the administrator can upload the configuration file to the electronic device through the management terminal. The electronic device stores the configuration file and, after starting to access, calls the pre-stored configuration file to obtain the unit time length and the preset number threshold.

[0087] It should be understood that the electronic device can determine the second time point based on the current time point and the unit time length.

[0088] It should be understood that the user access request in the embodiments of the present application can be a request from the same user terminal or a request sent by terminals from the same area, which is not limited herein.

[0089] In the embodiments of the present application, the administrator can set the unit time length and the number threshold, manage the on / off state of the access number limit; without setting a timer, the user access data can be cleared regularly, saving performance, and there will be no situation where a user exceeds the limit but is determined to be a normal access.

[0090] Please refer to Figure 9 , Figure 9 which is an access request processing device provided by the embodiments of the present application. Optionally, the access request processing device is applied to the electronic device described above.

[0091] The access request processing device includes: a preprocessing unit 201 and an execution unit 202.

[0092] The preprocessing unit 201 is configured to determine the time period between the second time point and the current time point as the target time period when the interval between the current time point and the first time point is greater than the preset unit time length.

[0093] Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when the access number limit is enabled, and the interval between the second time point and the current time point is the unit time length.

[0094] The execution unit 202 is configured to discard the latest access request when the target access number is greater than or equal to the preset number threshold.

[0095] Wherein, the target access number is the number of accesses by the user within the target time period.

[0096] Optionally, the preprocessing unit 201 can execute S101 to S109 above, and the execution unit 202 can execute S110 to S112 above.

[0097] It should be noted that the access request processing device provided in this embodiment can execute the method flow shown in the above method flow embodiment to achieve corresponding technical effects. For a brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiments.

[0098] The embodiment of the present application also provides a storage medium, which stores computer instructions and programs. When the computer instructions and programs are read and run, they execute the access request processing method of the above embodiment. The storage medium can include memory, flash memory, registers or their combination, etc.

[0099] The following provides an electronic device, which can be a server device. The electronic device is as Figure 2 shown and can implement the above access request processing method. Specifically, the electronic device includes: a processor 10, a memory 11, and a bus 12. The processor 10 can be a CPU. The memory 11 is used to store one or more programs. When the one or more programs are executed by the processor 10, the access request processing method of the above embodiment is executed.

[0100] In the embodiments provided in the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0101] In addition, in each embodiment of the present application, the functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0102] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0103] The foregoing are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

[0104] For those skilled in the art, it is obvious that the present application is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present application, the present application can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application. Any reference signs in the claims should not be regarded as limiting the claimed rights.

Claims

1. A method for processing access requests, characterized in that, The method includes: When the interval between the current time point and the first time point is greater than a preset unit time length, determining the time period between the second time point and the current time point as the target time period; Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when access count limitation is enabled, and the interval between the second time point and the current time point is the unit time length; Deleting the timeout access requests in the target storage segment, where the timeout access requests are the access requests that do not belong to the target time period; Counting the number of access requests in the target storage segment after deleting the timeout access requests as the target access count; When the target access count is greater than or equal to a preset count threshold, discarding the latest access request; Wherein, the target access count is the number of accesses by the user within the target time period; When the target access count is less than the preset count threshold, adding the latest access request to the target storage segment for responding to the latest access request.

2. The access request processing method according to claim 1, wherein Before determining the time period between the second time point and the current time point as the target time period, the method further includes: Judging whether the first time point is earlier than the second time point; If not, determining the time period between the first time point and the current time point as the target time period.

3. The access request processing method according to claim 2, wherein Before judging whether the first time point is earlier than the second time point, the method further includes: When receiving an access count limitation enabling request transmitted by the management terminal, enabling access count limitation; Setting the time point when access count limitation is enabled as the first time point.

4. The access request processing method according to claim 2, wherein, Before judging whether the first time point is earlier than the second time point, the method further includes: When the time reaches the pre-configured time point for enabling access count limitation, enabling access count limitation; Setting the time point when access count limitation is enabled as the first time point.

5. The access request processing method according to claim 3 or 4, characterized in that, After enabling access count limitation, the method further includes: Invoking a pre-stored configuration file to obtain the unit time length and the preset count threshold.

6. An access request processing device, characterized in that, The device includes: A preprocessing unit, configured to determine the time period between the second time point and the current time point as the target time period when the interval between the current time point and the first time point is greater than a preset unit time length; Wherein, the current time point is the time point when the latest access request from the user is received, the first time point is the time point when access count limitation is enabled, and the interval between the second time point and the current time point is the unit time length; The preprocessing unit is further configured to delete the timeout access requests in the target storage segment, where the timeout access requests are the access requests that do not belong to the target time period; counting the number of access requests in the target storage segment after deleting the timeout access requests as the target access count; An execution unit, configured to discard the latest access request when the target access count is greater than or equal to a preset count threshold; Wherein, the target access count is the number of accesses by the user within the target time period; The execution unit is further configured to add the latest access request to the target storage segment for responding to the latest access request when the number of target access times is less than the preset number threshold.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1-5.

8. An electronic device, characterized in that, Comprising: A processor and a memory, where the memory is used to store one or more programs; When the one or more programs are executed by the processor, it implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Access management method, terminal and computer readable storage medium

    CN112784288A