WO2020248384A1 - 防止请求重复访问方法、装置、计算机设备及存储介质 - Google Patents

防止请求重复访问方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020248384A1
WO2020248384A1 PCT/CN2019/103326 CN2019103326W WO2020248384A1 WO 2020248384 A1 WO2020248384 A1 WO 2020248384A1 CN 2019103326 W CN2019103326 W CN 2019103326W WO 2020248384 A1 WO2020248384 A1 WO 2020248384A1
Authority
WO
WIPO (PCT)
Prior art keywords
event request
event
valid
request
type
Prior art date
Application number
PCT/CN2019/103326
Other languages
English (en)
French (fr)
Inventor
刘翔
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020248384A1 publication Critical patent/WO2020248384A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0796Safety measures, i.e. ensuring safe condition in the event of error, e.g. for controlling element

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment, and storage medium for preventing repeated access requests.
  • the embodiments of the present application provide a method, a device, a computer device, and a storage medium for preventing repeated access requests, so as to solve the problem that the processing efficiency of the system is reduced due to repeated event requests, which in turn affects the work efficiency of users.
  • a method to prevent repeated access requests including:
  • the event type includes a repeatable type and a non-repeatable type
  • the event type is the repeatable type, comparing the number of requests corresponding to the valid event request with a preset threshold, and determining the valid event request whose number of requests exceeds the preset threshold as a repeat event request;
  • the valid event request is matched with the current valid event request in the preset current library, and the valid event request that matches the current valid event request is determined as all The repeated event request;
  • a device for preventing repeated access requests including:
  • the obtaining module is used to obtain the pending event request selected by the operating user
  • the authority judgment module is used to judge the authority of the event request according to the preset authority group, and extract the valid event request;
  • the type judgment module is configured to perform type judgment on the valid event request to obtain the event type corresponding to the valid event request, where the event type includes a repeatable type and a non-repeatable type;
  • the first type module is configured to, if the event type is the repeatable type, compare the number of requests corresponding to the valid event request with a preset threshold, and compare the valid event requests for which the number of requests exceeds the preset threshold Determined as a repeat event request;
  • the second type module is used for matching the valid event request with the current valid event request in the preset current library if the event type is the non-repeatable type, and will match the current valid event request
  • the valid event request of is determined to be the repeated event request
  • the shielding module is used to shield the repeated event request.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the above-mentioned prevention of repeated access requests when the processor executes the computer-readable instructions Method steps.
  • a non-volatile computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, any one of the foregoing prevention requests is realized Repeat the steps of the access method.
  • the foregoing method, device, computer equipment, and storage medium for preventing repeated access requests can accurately identify repeated event requests and perform shielding processing by using permission judgment and type judgment, thereby effectively reducing system load and improving system processing efficiency, and then Improve user efficiency.
  • FIG. 1 is a flowchart of a method for preventing repeated access requests provided by an embodiment of the present application
  • FIG. 2 is a flowchart of updating the event request corresponding to the control according to the method of matching identification information and description information in the method for preventing repeated access requests provided by an embodiment of the present application;
  • FIG. 3 is a flowchart of step S2 in the method for preventing repeated access requests provided by an embodiment of the present application
  • step S4 is a flowchart of step S4 in the method for preventing repeated access requests provided by an embodiment of the present application
  • FIG. 5 is a flowchart of step S5 in the method for preventing repeated access requests provided by an embodiment of the present application
  • FIG. 6 is a flowchart of processing when the event id is different from the current event id in the method for preventing repeated access requests provided by an embodiment of the present application;
  • FIG. 7 is a schematic diagram of a device for preventing repeated access requests provided by an embodiment of the present application.
  • Fig. 8 is a basic structural block diagram of a computer device provided by an embodiment of the present application.
  • the data processing method provided in this application is applied to the server, and the server can be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for preventing repeated access requests is provided, which includes the following steps:
  • an event request corresponding to the control is obtained, and the event request is determined as a pending event request.
  • the event request includes the event id corresponding to the event request and the operating user id corresponding to the event request.
  • the identity of the operating user corresponding to the click control can be queried through the operating user id.
  • control A there is control A in the client, and its corresponding event request is to start the A1 switch. If it is detected that the operating user clicks on the control A on the client, the event request corresponding to the control A is obtained to start the A1 switch, and A1 will be started The event request of the switch is determined as a pending event request.
  • S2 Perform permission judgment on the event request according to the preset permission group, and extract the valid event request.
  • the preset authority group is specifically used to record the legal user id and the user authority corresponding to the legal user id.
  • a valid event request refers to an event request issued by the operating user within the corresponding user authority.
  • the operation user id corresponding to the event request is matched with the legal user id in the preset authorization group to determine whether the operation user has the user authorization corresponding to the event request, and the event request for which the operation user has user authorization is selected, namely Select a valid event request.
  • S3 Perform type judgment on the valid event request to obtain the event type corresponding to the valid event request, where the event type includes a repeatable type and a non-repeatable type.
  • the event id corresponding to the valid event request is compared with the target event id in the preset type data table, and when the event id is the same as the target event id, the preset type data table is obtained.
  • the event type corresponding to the target event request of the target event id that is the same as the event id is determined as the event type corresponding to the valid event request.
  • the preset type data table is specifically used to store the target event id corresponding to the target event request and the event type corresponding to the target event request.
  • the event type refers to dividing the event request into a repeatable type and a non-repeatable type according to the actual needs of users. .
  • repeatable type means that the event request corresponding to this type allows multiple requests
  • non-repeatable type means that the event request corresponding to this type allows only one request.
  • the target event id of the target event request Q in the preset type data table is 123
  • the event type corresponding to the target event request Q is a repeatable type. If there is a valid event request Q1 that has an event id of 123, the event The id is compared with the target event id in the preset type data table, and if the event id123 is the same as the target event id123, the repeatable type corresponding to the target event request Q is determined as the event type corresponding to the valid event request Q1, that is, the valid event The event type corresponding to request A1 is a repeatable type.
  • the request times corresponding to the valid event request is obtained from the preset log library, and the request times is compared with the preset threshold For comparison, a valid event request whose number of selected requests exceeds a preset threshold is determined to be a repeated event request.
  • the preset log library is specifically used to record valid event requests and the number of requests corresponding to valid event requests.
  • the preset threshold can be 10 specifically, or it can be set according to the actual needs of the user, and there is no limitation here.
  • the current valid event request is obtained from the preset current library, and the valid event request is matched with the current valid event request. Select the same valid event request as the current valid event request as a repeated event request.
  • the preset current library is specifically used to store the current valid event request being executed and the current event id corresponding to the current valid event request, and when the execution of the current valid event request is completed, the current valid event request and its corresponding current event The id will be deleted from the preset current library.
  • the repeated event request is masked, that is, the execution of the repeated event request is prohibited.
  • the method for preventing repeated access requests further includes the following steps:
  • control information table refers to a data table specifically used to store different controls and event requests and identification information corresponding to different controls.
  • control can be a button or a label, which can be specifically set according to the actual needs of the user, and the user log library has the same description information as the identification information.
  • S12 Obtain description information from a user log database, where the user log database contains historical event requests and description information corresponding to the historical event requests.
  • the user log database contains historical event requests and description information corresponding to the historical event requests.
  • the identification information obtained in step S11 is matched with the description information obtained in step S12, and if the same description information as the identification information is matched, the event request corresponding to the control is updated to the historical event request corresponding to the description information.
  • the corresponding event requests are empty, and the corresponding identification information is “aaa” and “bbb”; the historical event requests in the user log library are “call A1 switch” and “call A2 switch” ", the corresponding description information is “aaa” and “bbb” respectively.
  • the identification information corresponding to the controls R and T are matched with the description information in the user log library, because the identification information "aaa” corresponding to the control R and the description If the information "aaa” is the same, the event request corresponding to control R is updated to "call A1 switch", and similarly, the event request corresponding to control T is updated to "call A2 switch".
  • the event request corresponding to the control can be updated in real time according to the user log library.
  • the preset update time when the preset update time is reached, the identification information in the control is the same as the description information in the user log library.
  • the historical event request is compared. If the event request is the same as the historical event request, no processing is performed. If the event request is different from the historical event request, the event request corresponding to the control is updated to have the same identification information as the description information in the user log library Historical event request.
  • the preset update time may specifically be 60 minutes, which is not limited here.
  • the preset update time is 60 minutes
  • there is control R1 the corresponding event request is “start 1 channel”
  • the corresponding identification information is "abb”
  • the historical event request in the user log database is "start 2 channel”
  • corresponding The description information of is "abb”.
  • the event request corresponding to the successfully matched control is updated to the historical event request, which can realize the control of the control according to the actual business needs of the user.
  • the corresponding event request is changed, thereby improving the practicability of the system, avoiding the need for users to re-develop the control, reducing the user's development workload, and improving the user's work efficiency.
  • step S2 that is, performing permission judgment on the event request according to a preset permission group, extracting a valid event request includes the following steps:
  • the operation user id corresponding to the event request is used to match the legal user id in the preset authority group to obtain the user authority corresponding to the legal user id in the preset authority group that is the same as the operation user id .
  • S22 According to the user authority, determine whether the pending event request selected by the operating user exceeds the authority.
  • user authority means that the operating user has the right to request an event request, and the user authority includes all authority requests corresponding to the operating user.
  • the event request of the operating user is compared with each permission request corresponding to it. After the comparison, if the event request is the same as the permission request, it means that the operating user has the permission corresponding to the event request.
  • the event request is determined to be a valid event request, and the valid event request is extracted and saved in the preset user library.
  • the preset user database refers to a database specifically used to store valid event requests and event ids corresponding to valid event requests.
  • event request if there is an event request and a permission request that are different, it means that the operating user does not have the permission corresponding to the event request.
  • the event request is determined as an invalid event request, and the event request is withdrawn.
  • the event request is fed back to the operating user corresponding to the event request in a preset manner, prompting the operating user to be restricted by authority and cannot access the corresponding event request.
  • the preset method may be displayed on the operating interface of the operating user in the form of a system message, or may be set according to the actual needs of the user.
  • event request C1 For example, suppose that the user authority corresponding to user C is to execute event request C1, if user C selects event request C1, then the event request C1 is determined as a valid event request, if user C selects event request C2, then the event request C2 is determined It is an invalid event request, and the event request C2 is fed back to the user C in a preset manner, prompting that the user C is restricted by authority and cannot access the event request C2.
  • a permission judgment is made according to the user's permission, to determine whether the operating user has the permission of the event request, and then to determine a valid event request, so as to realize the permission audit of the operating user and ensure the security of the event request.
  • the safety performance of the system can be effectively improved, and the normal processing efficiency of the system can be guaranteed.
  • step S4 that is, if the event type is a repeatable type, comparing the number of requests corresponding to valid event requests with a preset threshold, and determining the repeat event request includes the following steps:
  • the same valid event request can be identified by identifying the event id. Therefore, through the preset user library in step S23, when the same event id is identified in the preset user library, the same event id The corresponding valid event requests are all determined to be the same valid event request.
  • the same valid event request is selected, and the number of requests corresponding to the same valid event request is calculated according to a preset counting rule.
  • the preset counting rule refers to accumulative counting of the same valid event request identified, and if the preset time is reached, the accumulative counting result is cleared and recalculated.
  • the preset time can be 1 minute, or it can be set according to the actual needs of the user, and there is no restriction here.
  • the event id corresponding to a valid event request is 456 and the preset time is 1 minute.
  • the result of the cumulative count is 1, indicating that the valid event request corresponds to The number of requests is 1.
  • the accumulated count result is 2, which means that the number of requests corresponding to the valid event request is 2, and so on.
  • the accumulated count result is cleared, that is, the accumulated count result is 0, indicating that the number of requests corresponding to the valid event request is 0.
  • the number of requests in step S41 is compared with a preset threshold.
  • the valid event request corresponding to the number of requests is determined as a repeated event request.
  • the valid event requests W are determined as repeated event requests.
  • the repeated event request is determined by comparing the number of requests corresponding to the valid event request with a preset threshold, so that the request for the repeated event is realized on the premise that the event type is a repeatable type.
  • the method for preventing repeated access requests further includes the following steps:
  • step S42 the number of requests is compared with a preset threshold, and if the comparison result is that the number of requests is less than or equal to the preset threshold, the valid event request corresponding to the number of requests is identified as a normal request, and the normal request is sent Go to the preset execution port for response request processing.
  • the preset execution port refers to a processing port dedicated to responding to normal requests.
  • the valid event request E is identified as a normal request and sent to the preset execution port Perform response request processing.
  • valid event requests are executed when the number of requests is less than or equal to a preset threshold, so as to realize accurate identification of normal valid event requests, and normal response processing to normal valid event requests, ensuring that the system processes event requests. accuracy.
  • step S5 that is, if the event type is a non-repeatable type, the valid event request is matched with the current valid event request in the preset current library, and it is determined that the repeated event request includes the following step:
  • the valid event request of the non-repeatable type is detected.
  • the event id corresponding to the valid event request is The current event id in the current library is preset for matching.
  • the valid event request is determined as a repeated event request.
  • the valid event request P there is a valid event request P of a non-repeatable type, the event id111 corresponding to the valid event request P, the preset current library contains the current valid event request P1, the current valid event request P1 corresponds to the current event id111, and the event id111 is combined with the current event For comparison with id111, since the event id111 is the same as the current event id111, the valid event request P is determined to be a repeated event request.
  • the repeating event request is determined according to the way the event id is matched with the current event id, so as to achieve accurate identification of the repeating event request under the premise that the event type is a non-repeatable type. Further ensure the accuracy of subsequent shielding of repeated event requests.
  • the method for preventing repeated access requests further includes the following steps:
  • the event id corresponding to the valid event request is matched with the current event id in the preset current library. If there is no current event id in the preset current library that is the same as the event id corresponding to the valid event request, that is, If the event id is different from the current event id, the valid event request is identified as a normal request, and the normal request is sent to the preset execution port for response request processing. At the same time, the valid event request is updated to the current valid event request Preset in the current library.
  • the preset condition is that the execution of the valid event request ends, there is a valid event request R1 of non-repeatable type, the event id111 corresponding to the valid event request R1, and the current valid event request R2 that is currently being executed is preset in the current library, and the current valid event request
  • the current event id222 corresponding to R2 matches the event id111 with the current event id222. Since the event id111 is different from the current event id222, the valid event request R1 is identified as a normal request, and the valid event request R1 is sent to the preset
  • the execution port processes the response request, and at the same time updates the valid event request as the current valid event request to the preset current library. At this time, the preset current library contains the current valid event request R1 and the current valid event request R2.
  • the valid event request when the valid event request reaches a preset condition, the valid event request is deleted from the preset current library.
  • the preset condition may specifically be the end of the execution of the valid event request, or the reaching of the set time, which is specifically set according to the actual needs of the user.
  • the current valid event request R1 in the preset current library is deleted, that is, the current valid event request in the preset current library is only R2, if valid
  • the event request R2 is also executed, the currently valid event request R2 is also deleted from the preset current library, and the preset current library is empty at this time.
  • the event id and its corresponding valid event request are updated to the preset current library, and the valid event request is executed, and when the valid event request reaches the preset
  • the valid event request is deleted from the preset current library, so that the information in the preset current library can be updated in time, and the normal response processing of normal valid event requests can be ensured to ensure subsequent identification of repeated event requests Accuracy.
  • a device for preventing repeated access requests is provided, and the device for preventing repeated access requests corresponds one-to-one with the method for preventing repeated access requests in the foregoing embodiment.
  • the device includes an acquisition module 71, a permission judgment module 72, a type judgment module 73, a first type module 74, a second type module 75 and a shielding module 76.
  • the detailed description of each functional module is as follows:
  • the obtaining module 71 is used to obtain the pending event request selected by the operating user;
  • the permission judgment module 72 is used to judge the permission of the event request according to the preset permission group, and extract the valid event request;
  • the type judgment module 73 is configured to judge the type of the valid event request to obtain the event type corresponding to the valid event request, where the event type includes a repeatable type and a non-repeatable type;
  • the first type module 74 is configured to compare the number of requests corresponding to the valid event request with a preset threshold if the event type is a repeatable type, and determine the valid event request whose request number exceeds the preset threshold as a repeat event request;
  • the second type module 75 is used for matching the valid event request with the current valid event request in the preset current library if the event type is a non-repeatable type, and determining the valid event request matching the current valid event request as a duplicate Event request
  • the shielding module 76 is used to shield repeated event requests.
  • the device for preventing repeated access requests further includes:
  • the first obtaining module is used to obtain the event request and identification information corresponding to the control in the client from the control information table;
  • the second acquisition module is used to acquire description information from a user log library, where the user log library contains historical event requests and description information corresponding to the historical event requests;
  • the matching module is used to match the identification information with the description information. If the identification information is the same as the description information, update the event request corresponding to the control to a historical event request.
  • the authority judgment module 72 includes:
  • the permission acquisition sub-module is used to obtain the user permission of the operating user from the preset permission group;
  • the judging sub-module is used to judge whether the pending event request selected by the operating user exceeds the authority according to the user's authority;
  • the extraction sub-module is used to determine the event request as a valid event request if the operating user has the authority of the event request, and extract the valid event request.
  • the first type module 74 includes:
  • the calculation sub-module is used to calculate the number of requests corresponding to the same valid event request according to the preset counting rule if the event type is a repeatable type;
  • the comparison sub-module is used to compare the number of requests with a preset threshold
  • the first comparison sub-module is configured to determine the valid event request as a repeated event request if the number of requests is greater than the preset threshold.
  • the device for preventing repeated access requests further includes:
  • the second comparison module is configured to execute a valid event request if the number of requests is less than or equal to the preset threshold.
  • the second type module 75 includes:
  • the matching sub-module is used to match the event id corresponding to the valid event request with the current event id in the preset current library if the event type is a non-repeatable type, where the valid event request includes its corresponding event id;
  • the matching same sub-module is used to determine the valid event request as a repeated event request if the event id is the same as the current event id.
  • the device for preventing repeated access requests further includes:
  • the matching difference module is used to update the event id and its corresponding valid event request to the preset current library if the event id is different from the current event id, and execute the valid event request;
  • the delete module is used to delete the valid event request from the preset current library when the valid event request reaches the preset condition.
  • FIG. 8 is a block diagram of the basic structure of the computer device 90 in an embodiment of the present application.
  • the computer device 90 includes a memory 91, a processor 92, and a network interface 93 that are mutually communicatively connected via a system bus. It should be pointed out that FIG. 8 only shows a computer device 90 with components 91-93, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • Its hardware includes but is not limited to microprocessors, dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
  • the memory 91 includes at least one type of readable storage medium, the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 91 may be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90.
  • the memory 91 may also be an external storage device of the computer device 90, such as a plug-in hard disk equipped on the computer device 90, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, Flash Card, etc.
  • the memory 91 may also include both the internal storage unit of the computer device 90 and its external storage device.
  • the memory 91 is generally used to store an operating system and various application software installed in the computer device 90, such as the computer-readable instructions for preventing repeated access requests.
  • the memory 91 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 92 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 92 is generally used to control the overall operation of the computer device 90.
  • the processor 92 is configured to run computer-readable instructions or process data stored in the memory 91, for example, run the computer-readable instructions of the method for preventing repeated access requests.
  • the network interface 93 may include a wireless network interface or a wired network interface, and the network interface 93 is generally used to establish a communication connection between the computer device 90 and other electronic devices.
  • This application also provides another implementation manner, that is, to provide a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores an event request information entry process, and the event request
  • the information entry process may be executed by at least one processor, so that the at least one processor executes the steps of any one of the foregoing methods for preventing repeated access requests.
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a computer device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
  • a computer device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种防止请求重复访问方法、装置、计算机设备及存储介质,涉及人工智能技术领域。所述防止请求重复访问方法包括:获取操作用户选择的待处理的事件请求(S1)并进行权限判断,提取有效事件请求(S2);对有效事件请求进行类型判断得到事件类型(S3);若事件类型为可重复类型,则将有效事件请求对应的请求次数与预设阈值进行比较,将请求次数超过预设阈值的有效事件请求确定为重复事件请求(S4);若事件类型为不可重复类型,则将有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与当前有效事件请求相匹配的有效事件请求确定为重复事件请求(S5);屏蔽重复事件请求(S54)。从而实现对重复事件请求的屏蔽处理,提高系统运行效率,进而提高用户的工作效率。

Description

防止请求重复访问方法、装置、计算机设备及存储介质
【交叉引用】
本申请以2019年6月14日提交的申请号为2019105137164,名称为“防止请求重复访问方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
【技术领域】
本申请涉及人工智能技术领域,尤其涉及一种防止请求重复访问方法、装置、计算机设备及存储介质。
【背景技术】
目前,各种类型的业务应用范围广,存在大量事件请求,同时也存在由于用户的误操作使到相同的事件请求增加的情况,从而增加系统负荷,影响系统处理效率,导致用户无法以正常处理效率使用系统,进而降低用户的工作效率。
【发明内容】
本申请实施例提供一种防止请求重复访问方法、装置、计算机设备及存储介质,以解决由于重复事件请求导致系统处理效率降低,进而影响用户工作效率的问题。
一种防止请求重复访问方法,包括:
获取操作用户选择的待处理的事件请求;
根据预设权限组对所述事件请求进行权限判断,提取有效事件请求;
对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
屏蔽所述重复事件请求。
一种防止请求重复访问装置,包括:
获取模块,用于获取操作用户选择的待处理的事件请求;
权限判断模块,用于根据预设权限组对所述事件请求进行权限判断,提取 有效事件请求;
类型判断模块,用于对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
第一类型模块,用于若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
第二类型模块,用于若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
屏蔽模块,用于屏蔽所述重复事件请求。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述防止请求重复访问方法的步骤。
一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任一种防止请求重复访问方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
上述防止请求重复访问方法、装置、计算机设备及存储介质,通过利用权限判断与类型判断的方式,能够准确地识别出重复事件请求并进行屏蔽处理,从而有效减轻系统负荷,提高系统处理效率,进而提高用户的工作效率。
【附图说明】
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的防止请求重复访问方法的流程图;
图2是本申请实施例提供的防止请求重复访问方法中根据标识信息与描述信息进行匹配的方式对控件对应的事件请求进行更新的流程图;
图3是本申请实施例提供的防止请求重复访问方法中步骤S2的流程图;
图4是本申请实施例提供的防止请求重复访问方法中步骤S4的流程图;
图5是本申请实施例提供的防止请求重复访问方法中步骤S5的流程图;
图6是本申请实施例提供的防止请求重复访问方法中在事件id与当前事件id不相同的情况下进行处理的流程图;
图7是本申请实施例提供的防止请求重复访问装置的示意图;
图8是本申请实施例提供的计算机设备的基本机构框图。
【具体实施方式】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的数据处理方法应用于服务端,服务端具体可以用独立的服务器或者多个服务器组成的服务器集群实现。在一实施例中,如图1所示,提供一种防止请求重复访问方法,包括如下步骤:
S1:获取操作用户选择的待处理的事件请求。
在本申请实施例中,通过对客户端的控件进行检测,当检测到有操作用户点击客户端上的控件时,获取该控件对应的事件请求,并将该事件请求确定为待处理的事件请求。其中,事件请求包括事件请求对应的事件id以及事件请求对应的操作用户id。
需要说明的是,通过操作用户id可以查询到点击控件对应的操作用户身份。
例如:客户端中存在控件A,其对应的事件请求为启动A1开关,若检测到操作用户在客户端上点击控件A时,则获取该控件A对应的事件请求启动A1开关,并将启动A1开关的事件请求确定为待处理的事件请求。
S2:根据预设权限组对事件请求进行权限判断,提取有效事件请求。
在本申请实施例中,预设权限组是专门用于记录合法用户id及合法用户id对应的用户权限。有效事件请求是指操作用户在其对应的用户权限内发出的事件请求。
具体地,利用事件请求对应的操作用户id与预设权限组中的合法用户id进行匹配,进而判断操作用户是否拥有事件请求对应的用户权限,并从中选择操作用户拥有用户权限的事件请求,即选取有效事件请求。
S3:对有效事件请求进行类型判断,得到有效事件请求对应的事件类型,其中,事件类型包括可重复类型和不可重复类型。
具体地,通过预设类型数据表,将有效事件请求对应的事件id与预设类型数据表中的目标事件id进行对比,当事件id与目标事件id相同时,则获取预设类型数据表中与事件id相同的目标事件id的目标事件请求对应的事件类型,将该事件类型确定为该有效事件请求对应的事件类型。
其中,预设类型数据表是指专门用于存储目标事件请求对应的目标事件id以及目标事件请求对应的事件类型,事件类型是指根据用户实际需求将事件请求分为可重复类型和不可重复类型。
需要说明的是,可重复类型是指该类型对应的事件请求允许多次请求,不可重复类型是指该类型对应的事件请求只允许一次请求。
例如,预设类型数据表中存在目标事件请求Q的目标事件id为123,并且目标事件请求Q对应的事件类型为可重复类型,若存在有效事件请求Q1的事件id为123,则将该事件id与预设类型数据表中的目标事件id进行对比,得到事件id123与目标事件id123相同,则将该目标事件请求Q对应的可重复类型确 定为有效事件请求Q1对应的事件类型,即有效事件请求A1对应的事件类型为可重复类型。
S4:若事件类型为可重复类型,则将有效事件请求对应的请求次数与预设阈值进行比较,将请求次数超过预设阈值的有效事件请求确定为重复事件请求。
在本申请实施例中,若根据步骤S3得到有效事件请求对应的事件类型为可重复类型,则从预设日志库中获取该有效事件请求对应的请求次数,并将该请求次数与预设阈值进行比较,选取请求次数超过预设阈值的有效事件请求确定为重复事件请求。
其中,预设日志库是指专门用于记录有效事件请求及有效事件请求对应的请求次数。
预设阈值具体可以是10,也可以根据用户的实际需求进行设置,此处不做限制。
S5:若事件类型为不可重复类型,则将有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与当前有效事件请求相匹配的有效事件请求确定为重复事件请求。
在本申请实施例中,若根据步骤S3得到有效事件请求对应的事件类型为不可重复类型,则从预设当前库中获取当前有效事件请求,并将有效事件请求与当前有效事件请求进行匹配,选取与当前有效事件请求相同的有效事件请求作为重复事件请求。
其中,预设当前库是指专门用于存储正在执行的当前有效事件请求及其当前有效事件请求对应的当前事件id,且当前有效事件请求执行完成时,当前有效事件请求及其对应的当前事件id都将从预设当前库中进行删除。
S6:屏蔽重复事件请求。
具体地,当检测到有效事件请求为重复事件请求时,对重复事件请求进行屏蔽处理,即禁止重复事件请求进行执行。
本实施例中,通过利用预设权限组对待处理的事件请求进行权限判断,提取有效事件请求再对其进行类型判断,得到事件类型,并根据事件类型确定对应的重复事件请求,最后屏蔽重复事件请求,从而实现对重复事件请求的屏蔽处理,减轻系统负荷,提高系统处理效率,进而提高用户的工作效率。
在一实施例中,如图2所示,步骤S1之前,所述防止请求重复访问方法还包括如下步骤:
S11:从控件信息表中获取客户端中的控件对应的事件请求和标识信息。
通过直接从控件信息表中获取客户端中的控件对应的事件请求和标识信息,其中,控件信息表是指专门用于存储不同的控件以及不同的控件对应的事件请求和标识信息的数据表。
需要说明的是,控件可以是按钮,也可以是标签,具体可以根据用户实际的需求进行设置,且在用户日志库中都有与标识信息相同的描述信息。
S12:从用户日志库中获取描述信息,其中,用户日志库包含历史事件请求及其历史事件请求对应的描述信息。
通过直接从用户日志库中获取描述信息,其中,用户日志库包含历史事件 请求及其历史事件请求对应的描述信息。
S13:将标识信息与描述信息进行匹配,若标识信息与描述信息相同,则将控件对应的事件请求更新为历史事件请求。
将步骤S11中得到的标识信息与步骤S12中得到的描述信息进行匹配,若匹配到与标识信息相同的描述信息,则将控件对应的事件请求更新为描述信息对应的历史事件请求。
例如,存在控件R和T,对应的事件请求都为空,对应的标识信息分别为“aaa”和“bbb”;用户日志库中存在历史事件请求分别为“调用A1开关”和“调用A2开关”,其对应的描述信息分别为“aaa”和“bbb”,将控件R和T对应的标识信息分别与用户日志库中的描述信息进行匹配,由于控件R对应的标识信息“aaa”与描述信息“aaa”相同,则将控件R对应的事件请求更新为“调用A1开关”,同理,将控件T对应的事件请求更新为“调用A2开关”。
进一步地,还可以实时根据用户日志库对控件对应的事件请求进行更新,通过设定预设更新时间,当达到预设更新时间时,将控件中的标识信息与用户日志库中的描述信息相同的历史事件请求进行对比,若事件请求与历史事件请求相同,则不做处理,若事件请求与历史事件请求不同,则将控件对应的事件请求更新为标识信息与用户日志库中描述信息相同的历史事件请求。
其中,预设更新时间具体可以是60分钟,此处不做限制。
例如,预设更新时间为60分钟,存在控件R1,对应的事件请求为“启动1通道”,对应的标识信息为“abb”,用户日志库中存在历史事件请求为“启动2通道”,对应的描述信息为“abb”,当达到60分钟时,将R1对应的事件请求“启动1通道”与用户日志库中的历史事件请求“启动2通道”进行对比,由于不同,则将R1对应的事件请求更新为“启动2通道”。
本实施例中,通过利用控件对应的标识信息与用户日志库包含的描述信息进行匹配的方式,将匹配成功的控件对应的事件请求更新为历史事件请求,能够实现根据用户的实际业务需要对控件对应的事件请求进行变更,从而提高系统的实用性,避免用户需要重新对控件进行开发,减轻用户开发工作量,进而提高用户的工作效率。
在一实施例中,如图3所示,步骤S2中,即根据预设权限组对事件请求进行权限判断,提取有效事件请求包括如下步骤:
S21:从预设权限组获取操作用户的用户权限。
具体地,当检测到事件请求时,利用事件请求对应的操作用户id与预设权限组中的合法用户id进行匹配,获取预设权限组中与操作用户id相同的合法用户id对应的用户权限。
S22:根据用户权限,判断操作用户选择的待处理的事件请求是否超过权限。
在本申请实施例中,用户权限是指操作用户拥有对事件请求的请求权利,用户权限包括操作用户对应的所有权限请求。通过步骤S21得到操作用户对应的用户权限,根据用户权限得到该操作用户对应的所有权限请求,将操作用户的事件请求与其对应的每个权限请求进行对比,并根据对比结果判断操作用户的事情请求是否超过权限。
S23:若操作用户拥有事件请求的权限,则将事件请求确定为有效事件请求,并提取有效事件请求。
本实施例中,根据步骤S22将操作用户的事件请求与其对应的每个权限请求进行对比,经过对比后若存在事件请求与权限请求相同,则表示该操作用户拥有该事件请求对应的权限,将该事件请求确定为有效事件请求,并对该有效事件请求进行提取并保存到预设用户库中。其中,预设用户库是指专门用于存储有效事件请求及有效事件请求对应的事件id的数据库。
需要说明的是,若存在事件请求与权限请求都不相同,则表示该操作用户未拥有该事件请求对应的权限,将该事件请求确定为无效事件请求,并对该事件请求进行撤回处理,将该事件请求按照预设的方式反馈给该事件请求对应的操作用户,提示该操作用户受到权限限制,无法访问对应的事件请求。
其中,预设的方式具体可以是系统消息的形式展示在操作用户的操作界面上,也可以根据用户的实际需求进行设置。
例如,假设用户C对应的用户权限为执行事件请求C1,若用户C选择事件请求C1,则将该事件请求C1确定为有效事件请求,若用户C选择事件请求C2,则将该事件请求C2确定为无效事件请求,并将事件请求C2按照预设的方式反馈给用户C,提示用户C受到权限限制,无法访问事件请求C2。
本实施例中,当检测到事件请求时根据用户权限进行权限判断,判断操作用户是否拥有事件请求的权限,进而确定有效事件请求,从而实现对操作用户的权限审核,保证事件请求的安全性,进而能够有效提升系统的安全性能,保证系统的正常处理效率。
在一实施例中,如图4所示,步骤S4中,即若事件类型为可重复类型,则将有效事件请求对应的请求次数与预设阈值进行比较,确定重复事件请求包括如下步骤:
S41:若事件类型为可重复类型,则根据预设计数规则,计算相同的有效事件请求对应的请求次数。
在本申请实施例中,通过识别事件id可以识别出相同的有效事件请求,故通过步骤S23中的预设用户库,当识别到预设用户库中存在相同的事件id时,则相同事件id对应的有效事件请求都确定为相同的有效事件请求。
具体地,若有效事件请求对应的事件类型为可重复类型,则选取相同的有效事件请求,按照预设计数规则,计算相同的有效事件请求对应的请求次数。其中,预设计数规则是指将识别到的相同有效事件请求进行累加计数,若达到预设时间,则对累加计数结果进行清零处理并重新计算。其中,预设时间具体可以是1分钟,也可以根据用户实际需求进行设置,此处不做限制。
例如,假设有效事件请求对应的事件id为456,预设时间为1分钟,当在10秒时检测到事件id为456的有效事件请求时,累加计数的结果为1,表示有效事件请求对应的请求次数为1,当在20秒时检测到事件id为456的有效事件请求时,累加计数的结果为2,表示有效事件请求对应的请求次数为2,以此类推,当达到60秒时,则对累加计数结果清零,即累加计数的结果为0,表示有效事件请求对应的请求次数为0。
S42:将请求次数与预设阈值进行比较。
具体地,根据步骤S41中的请求次数,将该请求次数与预设阈值进行比较。
S43:若请求次数大于预设阈值,则将有效事件请求确定为重复事件请求。
具体地,若比较结果为请求次数大于预设阈值,则将该请求次数对应的有效事件请求确定为重复事件请求。
例如,若预设阈值为5,有效事件请求W的请求次数为6次,由于请求次数6大于预设阈值5,故将有效事件请求W确定为重复事件请求。
本实施例中,若事件类型为可重复类型,通过将有效事件请求对应的请求次数与预设阈值进行比较,确定重复事件请求,从而实现在事件类型为可重复类型的前提下对重复事件请求的准确识别,进一步保证后续对重复事件请求进行屏蔽处理的准确性。
在一实施例中,步骤S42之后,该防止请求重复访问方法还包括如下步骤:
若请求次数小于等于预设阈值,则执行有效事件请求。
具体地,根据步骤S42将该请求次数与预设阈值进行比较,若比较结果为请求次数小于等于预设阈值,则将该请求次数对应的有效事件请求标识为正常请求,并将该正常请求发送到预设执行端口进行响应请求处理。其中,预设执行端口是指专门用于响应正常请求的处理端口。
例如,若预设阈值为5,有效事件请求E的请求次数为4次,由于请求次数4小于预设阈值5,则将有效事件请求E标识为正常请求,并将其发送到预设执行端口进行响应请求处理。
本实施例中,在请求次数小于等于预设阈值的情况下执行有效事件请求,从而实现对正常有效事件请求的准确识别,以及能够对正常有效事件请求的正常响应处理,保证系统处理事件请求的准确性。
在一实施例中,如图5所示,步骤S5中,即若事件类型为不可重复类型,则将有效事件请求与预设当前库中的当前有效事件请求进行匹配,确定重复事件请求包括如下步骤:
S51:若事件类型为不可重复类型,则将有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配,其中,有效事件请求包括其对应的事件id。
在本申请实施例中,若有效事件请求对应的事件类型为不可重复类型,则对不可重复类型的有效事件请求进行检测,当检测到有效事件请求时,将该有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配。
S52:若事件id与当前事件id相同,则将有效事件请求确定为重复事件请求。
具体地,若匹配到有效事件请求对应的事件id与预设当前库中的当前事件id相同,则将该有效事件请求确定为重复事件请求。
例如,存在不可重复类型的有效事件请求P,有效事件请求P对应的事件id111,预设当前库中存在当前有效事件请求P1,当前有效事件请求P1对应的当前事件id111,将事件id111与当前事件id111进行对比,由于事件id111与当前事件id111相同,则将该有效事件请求P确定为重复事件请求。
本实施例中,若事件类型为不可重复类型,则根据事件id与当前事件id进 行匹配的方式确定重复事件请求,从而实现在事件类型为不可重复类型的前提下对重复事件请求的准确识别,进一步保证后续对重复事件请求进行屏蔽处理的准确性。
在一实施例中,如图6所示,步骤S51之后,该防止请求重复访问方法还包括如下步骤:
S511:若事件id与当前事件id不相同,则将事件id及其对应的有效事件请求更新到预设当前库,并执行有效事件请求。
具体地,根据步骤S51将有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配,若预设当前库中未存在与有效事件请求对应的事件id相同的当前事件id,即事件id与当前事件id不相同,则将该有效事件请求标识为正常请求,并将该正常请求发送到预设执行端口进行响应请求处理,同时,将该有效事件请求作为当前有效事件请求更新到预设当前库中。
例如,预设条件为有效事件请求执行结束,存在不可重复类型的有效事件请求R1,有效事件请求R1对应的事件id111,预设当前库中存在正在执行的当前有效事件请求R2,当前有效事件请求R2对应的当前事件id222,将事件id111与当前事件id222进行匹配,由于事件id111与当前事件id222不相同,则将该有效事件请求R1标识为正常请求,并将该有效事件请求R1发送到预设执行端口进行响应请求处理,同时将该有效事件请求作为当前有效事件请求更新到预设当前库中,此时,预设当前库中存在当前有效事件请求R1和当前有效事件请求R2。
S512:当有效事件请求达到预设条件时,将有效事件请求从预设当前库中删除。
具体地,且当该有效事件请求达到预设条件时,将该有效事件请求从预设当前库中进行删除。其中,预设条件具体可以是有效事件请求执行结束,也可以是达到设定时间,具体根据用户实际需求进行设置。
例如,如步骤S511中的例子所述,当有效事件请求R1执行结束时,将预设当前库中当前有效事件请求R1删除,即预设当前库中存在的当前有效事件请求只有R2,若有效事件请求R2也执行结束时,将该当前有效事件请求R2也从预设当前库中进行删除,此时预设当前库为空。
本实施例中,在事件id与当前事件id不相同的情况下,将事件id及其对应的有效事件请求更新到预设当前库中,并执行有效事件请求,且当有效事件请求达到预设条件时,将该有效事件请求从预设当前库中删除,从而实现对预设当前库中的信息进行及时更新,以及能够对正常有效事件请求的正常响应处理,保证后续对重复事件请求进行识别的准确性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种防止请求重复访问装置,该防止请求重复访问装置与上述实施例中防止请求重复访问方法一一对应。如图7所示,该装置包括获取模块71、权限判断模块72、类型判断模块73、第一类型模块74、 第二类型模块75和屏蔽模块76。各功能模块详细说明如下:
获取模块71,用于获取操作用户选择的待处理的事件请求;
权限判断模块72,用于根据预设权限组对事件请求进行权限判断,提取有效事件请求;
类型判断模块73,用于对有效事件请求进行类型判断,得到有效事件请求对应的事件类型,其中,事件类型包括可重复类型和不可重复类型;
第一类型模块74,用于若事件类型为可重复类型,则将有效事件请求对应的请求次数与预设阈值进行比较,将请求次数超过预设阈值的有效事件请求确定为重复事件请求;
第二类型模块75,用于若事件类型为不可重复类型,则将有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与当前有效事件请求相匹配的有效事件请求确定为重复事件请求;
屏蔽模块76,用于屏蔽重复事件请求。
进一步地,防止请求重复访问装置还包括:
第一获取模块,用于从控件信息表中获取客户端中的控件对应的事件请求和标识信息;
第二获取模块,用于从用户日志库中获取描述信息,其中,用户日志库包含历史事件请求及其历史事件请求对应的描述信息;
匹配模块,用于将标识信息与描述信息进行匹配,若标识信息与描述信息相同,则将控件对应的事件请求更新为历史事件请求。
进一步地,权限判断模块72包括:
权限获取子模块,用于从预设权限组获取操作用户的用户权限;
判断子模块,用于根据用户权限,判断操作用户选择的待处理的事件请求是否超过权限;
提取子模块,用于若操作用户拥有事件请求的权限,则将事件请求确定为有效事件请求,并提取有效事件请求。
进一步地,第一类型模块74包括:
计算子模块,用于若事件类型为可重复类型,则根据预设计数规则,计算相同的有效事件请求对应的请求次数;
比较子模块,用于将请求次数与预设阈值进行比较;
第一比较子模块,用于若请求次数大于预设阈值,则将有效事件请求确定为重复事件请求。
进一步地,防止请求重复访问装置还包括:
第二比较模块,用于若请求次数小于等于预设阈值,则执行有效事件请求。
进一步地,第二类型模块75包括:
匹配子模块,用于若事件类型为不可重复类型,则将有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配,其中,有效事件请求包括其对应的事件id;
匹配相同子模块,用于若事件id与当前事件id相同,则将有效事件请求确定为重复事件请求。
进一步地,防止请求重复访问装置还包括:
匹配不相同模块,用于若事件id与当前事件id不相同,则将事件id及其对应的有效事件请求更新到预设当前库,并执行有效事件请求;
删除模块,用于当有效事件请求达到预设条件时,将有效事件请求从预设当前库中删除。
本申请的一些实施例公开了计算机设备。具体请参阅图8,为本申请的一实施例中计算机设备90基本结构框图。
如图8中所示意的,所述计算机设备90包括通过系统总线相互通信连接存储器91、处理器92、网络接口93。需要指出的是,图8中仅示出了具有组件91-93的计算机设备90,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器91至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器91可以是所述计算机设备90的内部存储单元,例如该计算机设备90的硬盘或内存。在另一些实施例中,所述存储器91也可以是所述计算机设备90的外部存储设备,例如该计算机设备90上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器91还可以既包括所述计算机设备90的内部存储单元也包括其外部存储设备。本实施例中,所述存储器91通常用于存储安装于所述计算机设备90的操作系统和各类应用软件,例如所述防止请求重复访问方法的计算机可读指令等。此外,所述存储器91还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器92在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器92通常用于控制所述计算机设备90的总体操作。本实施例中,所述处理器92用于运行所述存储器91中存储的计算机可读指令或者处理数据,例如运行所述防止请求重复访问方法的计算机可读指令。
所述网络接口93可包括无线网络接口或有线网络接口,该网络接口93通常用于在所述计算机设备90与其他电子设备之间建立通信连接。
本申请还提供了另一种实施方式,即提供一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有事件请求信息录入流程,所 述事件请求信息录入流程可被至少一个处理器执行,以使所述至少一个处理器执行上述任意一种防止请求重复访问方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台计算机设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
最后应说明的是,显然以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种防止请求重复访问方法,其特征在于,所述防止请求重复访问方法包括:
    获取操作用户选择的待处理的事件请求;
    根据预设权限组对所述事件请求进行权限判断,提取有效事件请求;
    对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
    若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
    若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
    屏蔽所述重复事件请求。
  2. 如权利要求1所述的防止请求重复访问方法,其特征在于,所述获取操作用户选择的待处理的事件请求的步骤之前,所述防止请求重复访问方法还包括:
    从控件信息表中获取客户端中的控件对应的所述事件请求和标识信息;
    从用户日志库中获取描述信息,其中,所述用户日志库包含历史事件请求及其所述历史事件请求对应的所述描述信息;
    将所述标识信息与所述描述信息进行匹配,若所述标识信息与所述描述信息相同,则将所述控件对应的所述事件请求更新为所述历史事件请求。
  3. 如权利要求1所述的防止请求重复访问方法,其特征在于,所述根据预设权限组对所述事件请求进行权限判断,提取有效事件请求的步骤包括:
    从预设权限组获取所述操作用户的用户权限;
    根据所述用户权限,判断所述操作用户选择的待处理的所述事件请求是否超过权限;
    若所述操作用户拥有所述事件请求的权限,则将所述事件请求确定为有效事件请求,并提取所述有效事件请求。
  4. 如权利要求1所述的防止请求重复访问方法,其特征在于,所述若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求的步骤包括:
    若所述事件类型为所述可重复类型,则根据预设计数规则,计算相同的所述有效事件请求对应的所述请求次数;
    将所述请求次数与预设阈值进行比较;
    若所述请求次数大于预设阈值,则将所述有效事件请求确定为所述重复事件请求。
  5. 如权利要求4所述的防止请求重复访问方法,其特征在于,所述将所述请求次数与预设阈值进行比较的步骤之后,所述防止请求重复访问方法还包括:
    若所述请求次数小于等于预设阈值,则执行所述有效事件请求。
  6. 如权利要求1所述的防止请求重复访问方法,其特征在于,所述若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求的步骤包括:
    若所述事件类型为所述不可重复类型,则将所述有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配,其中,所述有效事件请求包括其对应的所述事件id;
    若所述事件id与所述当前事件id相同,则将所述有效事件请求确定为所述重复事件请求。
  7. 如权利要求6所述的防止请求重复访问方法,其特征在于,所述若所述事件类型为所述不可重复类型,则将所述有效事件请求对应的事件id与预设当前库中的当前事件id进行匹配的步骤之后,所述防止请求重复访问方法还包括:
    若所述事件id与所述当前事件id不相同,则将所述事件id及其对应的所述有效事件请求更新到预设当前库,并执行所述有效事件请求;
    当所述有效事件请求达到预设条件时,将所述有效事件请求从所述预设当前库中删除。
  8. 一种防止请求重复访问装置,其特征在于,所述防止请求重复访问装置包括:
    获取模块,用于获取操作用户选择的待处理的事件请求;
    权限判断模块,用于根据预设权限组对所述事件请求进行权限判断,提取有效事件请求;
    类型判断模块,用于对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
    第一类型模块,用于若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
    第二类型模块,用于若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
    屏蔽模块,用于屏蔽所述重复事件请求。
  9. 如权利要求8所述的防止请求重复访问装置,其特征在于,还包括:
    第一获取模块,用于从控件信息表中获取客户端中的控件对应的所述事件请求和标识信息;
    第二获取模块,用于从用户日志库中获取描述信息,其中,所述用户日志库包含历史事件请求及其所述历史事件请求对应的所述描述信息;
    匹配模块,用于将所述标识信息与所述描述信息进行匹配,若所述标识信息与所述描述信息相同,则将所述控件对应的所述事件请求更新为所述历史事 件请求。
  10. 如权利要求8所述的防止请求重复访问装置,其特征在于,所述权限判断模块包括:
    权限获取子模块,用于从预设权限组获取所述操作用户的用户权限;
    判断子模块,用于根据所述用户权限,判断所述操作用户选择的待处理的所述事件请求是否超过权限;
    提取子模块,用于若所述操作用户拥有所述事件请求的权限,则将所述事件请求确定为有效事件请求,并提取所述有效事件请求。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取操作用户选择的待处理的事件请求;
    根据预设权限组对所述事件请求进行权限判断,提取有效事件请求;
    对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
    若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
    若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
    屏蔽所述重复事件请求。
  12. 如权利要求11所述的计算机设备,其特征在于,所述获取操作用户选择的待处理的事件请求的步骤之前,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    从控件信息表中获取客户端中的控件对应的所述事件请求和标识信息;
    从用户日志库中获取描述信息,其中,所述用户日志库包含历史事件请求及其所述历史事件请求对应的所述描述信息;
    将所述标识信息与所述描述信息进行匹配,若所述标识信息与所述描述信息相同,则将所述控件对应的所述事件请求更新为所述历史事件请求。
  13. 如权利要求11所述的计算机设备,其特征在于,所述根据预设权限组对所述事件请求进行权限判断,提取有效事件请求的步骤包括:
    从预设权限组获取所述操作用户的用户权限;
    根据所述用户权限,判断所述操作用户选择的待处理的所述事件请求是否超过权限;
    若所述操作用户拥有所述事件请求的权限,则将所述事件请求确定为有效事件请求,并提取所述有效事件请求。
  14. 如权利要求11所述的计算机设备,其特征在于,所述若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求的步骤 包括:
    若所述事件类型为所述可重复类型,则根据预设计数规则,计算相同的所述有效事件请求对应的所述请求次数;
    将所述请求次数与预设阈值进行比较;
    若所述请求次数大于预设阈值,则将所述有效事件请求确定为所述重复事件请求。
  15. 如权利要求14所述的计算机设备,其特征在于,所述将所述请求次数与预设阈值进行比较的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    若所述请求次数小于等于预设阈值,则执行所述有效事件请求。
  16. 一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一种处理器执行时,使得所述一种处理器执行如下步骤:
    获取操作用户选择的待处理的事件请求;
    根据预设权限组对所述事件请求进行权限判断,提取有效事件请求;
    对所述有效事件请求进行类型判断,得到所述有效事件请求对应的事件类型,其中,所述事件类型包括可重复类型和不可重复类型;
    若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求;
    若所述事件类型为所述不可重复类型,则将所述有效事件请求与预设当前库中的当前有效事件请求进行匹配,将与所述当前有效事件请求相匹配的有效事件请求确定为所述重复事件请求;
    屏蔽所述重复事件请求。
  17. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述获取操作用户选择的待处理的事件请求的步骤之前,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    从控件信息表中获取客户端中的控件对应的所述事件请求和标识信息;
    从用户日志库中获取描述信息,其中,所述用户日志库包含历史事件请求及其所述历史事件请求对应的所述描述信息;
    将所述标识信息与所述描述信息进行匹配,若所述标识信息与所述描述信息相同,则将所述控件对应的所述事件请求更新为所述历史事件请求。
  18. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述根据预设权限组对所述事件请求进行权限判断,提取有效事件请求的步骤包括:
    从预设权限组获取所述操作用户的用户权限;
    根据所述用户权限,判断所述操作用户选择的待处理的所述事件请求是否超过权限;
    若所述操作用户拥有所述事件请求的权限,则将所述事件请求确定为有效事件请求,并提取所述有效事件请求。
  19. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述若所述事件类型为所述可重复类型,则将所述有效事件请求对应的请求次数与预设阈值进行比较,将所述请求次数超过预设阈值的有效事件请求确定为重复事件请求的步骤包括:
    若所述事件类型为所述可重复类型,则根据预设计数规则,计算相同的所述有效事件请求对应的所述请求次数;
    将所述请求次数与预设阈值进行比较;
    若所述请求次数大于预设阈值,则将所述有效事件请求确定为所述重复事件请求。
  20. 如权利要求19所述的非易失性的计算机可读存储介质,其特征在于,所述将所述请求次数与预设阈值进行比较的步骤之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    若所述请求次数小于等于预设阈值,则执行所述有效事件请求。
PCT/CN2019/103326 2019-06-14 2019-08-29 防止请求重复访问方法、装置、计算机设备及存储介质 WO2020248384A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910513716.4A CN110442466B (zh) 2019-06-14 2019-06-14 防止请求重复访问方法、装置、计算机设备及存储介质
CN201910513716.4 2019-06-14

Publications (1)

Publication Number Publication Date
WO2020248384A1 true WO2020248384A1 (zh) 2020-12-17

Family

ID=68428804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103326 WO2020248384A1 (zh) 2019-06-14 2019-08-29 防止请求重复访问方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110442466B (zh)
WO (1) WO2020248384A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438227B (zh) * 2021-06-23 2024-02-27 平安普惠企业管理有限公司 重复请求的限流方法、装置、设备及存储介质
CN115499399A (zh) * 2022-09-22 2022-12-20 北京声智科技有限公司 一种重复提交请求的处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0635718A (ja) * 1992-07-15 1994-02-10 Matsushita Electric Works Ltd システム異常時のシステム縮退方式
CN104660560A (zh) * 2013-11-20 2015-05-27 腾讯科技(北京)有限公司 授权统计信息的上报方法和装置
CN105915627A (zh) * 2016-05-30 2016-08-31 北京小米移动软件有限公司 业务请求处理方法及装置
CN107544838A (zh) * 2016-06-24 2018-01-05 中兴通讯股份有限公司 一种中断处理方法及装置
CN109634756A (zh) * 2018-11-26 2019-04-16 平安科技(深圳)有限公司 页面事件处理方法、装置、计算机设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6360217B1 (en) * 1999-04-21 2002-03-19 Microsoft Corporation Method and computer program product for calculating event occurrences
CN101604268B (zh) * 2009-07-13 2011-04-06 浪潮电子信息产业股份有限公司 一种监控目录变化事件过滤方法
CN109302300B (zh) * 2017-07-25 2022-03-15 阿里巴巴集团控股有限公司 数据分配和处理方法、系统及计算机可读记录介质
CN109040209A (zh) * 2018-07-23 2018-12-18 深圳市牛鼎丰科技有限公司 拦截重复请求的方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0635718A (ja) * 1992-07-15 1994-02-10 Matsushita Electric Works Ltd システム異常時のシステム縮退方式
CN104660560A (zh) * 2013-11-20 2015-05-27 腾讯科技(北京)有限公司 授权统计信息的上报方法和装置
CN105915627A (zh) * 2016-05-30 2016-08-31 北京小米移动软件有限公司 业务请求处理方法及装置
CN107544838A (zh) * 2016-06-24 2018-01-05 中兴通讯股份有限公司 一种中断处理方法及装置
CN109634756A (zh) * 2018-11-26 2019-04-16 平安科技(深圳)有限公司 页面事件处理方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN110442466A (zh) 2019-11-12
CN110442466B (zh) 2024-05-07

Similar Documents

Publication Publication Date Title
CN108092975B (zh) 异常登录的识别方法、系统、存储介质和电子设备
CN111447150A (zh) 访问请求限流方法、服务器及存储介质
CN108810831B (zh) 短信验证码的推送方法、电子装置及可读存储介质
WO2020233356A1 (zh) 测试环境控制方法、装置、计算机可读存储介质及服务器
WO2019136812A1 (zh) 电子装置、数据调用日志生成及查询方法及存储介质
CN111835737B (zh) 基于自动学习的web攻击防护方法、及其相关设备
CN109634802B (zh) 进程监控方法及终端设备
WO2020248384A1 (zh) 防止请求重复访问方法、装置、计算机设备及存储介质
CN108491304B (zh) 电子装置、业务系统风险控制方法及存储介质
CN111131221A (zh) 接口校验的装置、方法及存储介质
CN113238815B (zh) 一种接口访问控制方法、装置、设备及存储介质
CN112751976B (zh) 基于认证日志的坐席关联方法、系统、设备及存储介质
CN114826946B (zh) 未授权访问接口的检测方法、装置、设备及存储介质
WO2019169771A1 (zh) 电子装置、访问指令信息获取方法及存储介质
WO2019232821A1 (zh) 风控数据处理方法、装置、计算机设备及存储介质
CN112306833A (zh) 应用程序的崩溃统计方法、装置、计算机设备及存储介质
CN116644223A (zh) 数据查询方法、装置、设备及可读介质
CN117313159A (zh) 一种数据处理方法、装置、设备以及存储介质
CN110365642B (zh) 监控信息操作的方法、装置、计算机设备及存储介质
CN116561737A (zh) 基于用户行为基线的密码有效性检测方法及其相关设备
CN112394876A (zh) 大文件存储/读取方法、存储/读取装置和计算机设备
CN112398695B (zh) 一种大规模终端设备管控方法、系统、设备及存储介质
CN114860481A (zh) 剪贴板保护方法、系统、存储介质及计算机设备
CN114386025A (zh) 异常检测方法、装置、电子设备及存储介质
JP2018147444A (ja) 分析プログラムを実行する計算機システム、及び、分析プログラムの実行を監視する方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19932875

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19932875

Country of ref document: EP

Kind code of ref document: A1