Request verification method, device, medium and electronic device based on tree interceptor
Through tree interceptor structure and logical calculation, the problem of increasing interceptor chain length and repeated configuration is solved, and more efficient request checksum response processing is achieved.
Patent Information
- Application Number
- CN201811156189.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2038-09-30
AI Technical Summary
The existing interceptor chain is getting longer, resulting in testing difficulties and duplicate configuration problems, and only when the previous interceptor passes can the next interceptor be executed, resulting in inefficiency.
Adopt a tree interceptor structure, and generates a tree interceptor through proxy objects. The interceptor is arranged according to the tree structure, and logically calculates to generate verification results, and decides whether to respond to requests based on the results, allowing an interceptor in the tree interceptor Continue to fork downward to execute other interceptors when they fail.
Reduces the length of the interceptor chain, solves the problem of repeated configuration, and improves the efficiency and flexibility of request verification.
Smart Images

Figure CN110968497B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a request verification method, device, medium and electronic device based on a tree interceptor. Background Art
[0002] Currently, interceptors all use chain interceptors, which form an interceptor chain with a group of interceptors to intercept requests in sequence. After a group of interceptors are fully verified, they jump to a specific page.
[0003] However, as more and more interceptors are configured, the length of the interceptor chain becomes longer and longer, and there is a possibility that interceptors are configured repeatedly, and the next interceptor can only be executed after the previous interceptor passes, which makes testing difficult.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a request verification method, device, medium and electronic device based on a tree interceptor, thereby at least to a certain extent overcoming one or more problems such as the increasingly long interceptor chain and testing difficulties caused by the limitations and defects of related technologies.
[0006] Other features and advantages of the embodiments of the present invention will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0007] According to a first aspect of an embodiment of the present invention, a request verification method based on a tree interceptor is provided, comprising:
[0008] Based on the received request, a proxy object corresponding to the request is generated, the proxy object searches for an interceptor corresponding to the request and generates a tree-shaped interceptor;
[0009] Call the interceptor in the tree interceptor to verify the request and obtain the verification result;
[0010] Based on the above verification results, determine whether to respond to the above request.
[0011] In one embodiment of the present invention, based on the above-mentioned solution, the above-mentioned generation of a corresponding tree interceptor based on the received request includes:
[0012] Based on the preset interceptor configuration file, find the interceptor corresponding to the above request and generate an interceptor list;
[0013] According to the preset tree structure, the interceptors in the above interceptor list are arranged to generate a tree interceptor.
[0014] In one embodiment of the present invention, based on the above scheme, calling the interceptor in the above tree interceptor to verify the above request and obtain the verification result includes:
[0015] Import the above request into the above tree interceptor;
[0016] The interceptor in the tree interceptor performs logical calculation on the request to obtain a calculated value;
[0017] Based on the above calculated value, the left branch or the right branch of the above tree interceptor is called to continue to perform logical calculation on the above request;
[0018] When the above request is calculated in the above tree interceptor, a verification result is generated.
[0019] In one embodiment of the present invention, based on the above scheme, determining whether to respond to the above request based on the above verification result includes:
[0020] When the above verification result is true, in response to the above request, jump to the requested page;
[0021] When the above test result is false, the above request is intercepted.
[0022] According to a second aspect of an embodiment of the present invention, a request verification device based on a tree interceptor is provided, comprising: a generation module, a verification module, and a response module; wherein:
[0023] A generation module, used to generate a proxy object corresponding to the request based on the received request, the proxy object searches for an interceptor corresponding to the request and generates a tree-shaped interceptor;
[0024] A verification module, used to call the interceptor in the tree interceptor to verify the request and obtain the verification result;
[0025] The response module is used to determine whether to respond to the request based on the verification result.
[0026] In one embodiment of the present invention, based on the above solution, the generation module is specifically used for:
[0027] Based on the preset interceptor configuration file, find the interceptor corresponding to the above request and generate an interceptor list;
[0028] According to the preset tree structure, the interceptors in the above interceptor list are arranged to generate a tree interceptor.
[0029] In one embodiment of the present invention, based on the above solution, the verification module is specifically used for:
[0030] Import the above request into the above tree interceptor;
[0031] The interceptor in the tree interceptor performs logical calculation on the request to obtain a calculated value;
[0032] Based on the above calculated value, the left branch or the right branch of the above tree interceptor is called to continue to perform logical calculation on the above request;
[0033] When the above request is calculated in the above tree interceptor, a verification result is generated.
[0034] In one embodiment of the present invention, based on the above solution, the above response module is specifically used for:
[0035] When the above verification result is true, in response to the above request, jump to the requested page;
[0036] When the above test result is false, the above request is intercepted.
[0037] According to a third aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the request verification method based on a tree interceptor as in the first aspect of the above embodiment is implemented.
[0038] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a request verification method based on a tree interceptor as in the first aspect of the above-mentioned embodiment.
[0039] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0040] In the technical solutions provided by some embodiments of the present invention, a proxy object corresponding to the request is generated based on the received request, and the proxy object finds the interceptor corresponding to the request to generate a tree-shaped interceptor; the interceptor in the tree-shaped interceptor is called to verify the request and obtain the verification result; based on the verification result, it is determined whether to respond to the request. The technical solution of the embodiment of the present invention can intercept the request through the tree-shaped interceptor, and when a certain interceptor in the tree-shaped interceptor fails, it can continue to fork downward to execute other interceptors, which reduces the length of the interceptor chain and can solve the problem of repeated configuration of interceptors.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0043] Figure 1 A flowchart of a request verification method based on a tree interceptor according to an embodiment of the present invention is schematically shown;
[0044] Figure 2 A schematic diagram of a tree interceptor according to an embodiment of the present invention is schematically shown;
[0045] Figure 3 A block diagram schematically shows a request verification device based on a tree interceptor according to an embodiment of the present invention;
[0046] Figure 4 The structure diagram of the computer system of the electronic device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present invention will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0048] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0050] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0051] Figure 1 The flowchart of the request verification method based on the tree interceptor according to an embodiment of the present invention is schematically shown.
[0052] Reference Figure 1 As shown, a request verification method based on a tree interceptor according to an embodiment of the present invention includes the following steps:
[0053] Step S110, generating a proxy object corresponding to the request based on the received request, the proxy object searches for an interceptor corresponding to the request, and generates a tree-shaped interceptor;
[0054] Step S120, calling the interceptor in the tree interceptor to verify the request and obtain the verification result;
[0055] Step S130: Determine whether to respond to the request based on the verification result.
[0056] Figure 1 The technical solution of the illustrated embodiment can intercept requests through a tree-shaped interceptor. When a certain interceptor in the tree-shaped interceptor fails, it can continue to fork downward to execute other interceptors, thereby reducing the length of the interceptor chain and solving the problem of repeated configuration of interceptors.
[0057] The following Figure 1 The implementation details of each step shown in are elaborated in detail:
[0058] In step S110, a proxy object corresponding to the request is generated based on the received request, and the proxy object finds out the interceptor corresponding to the request and generates a tree-shaped interceptor.
[0059] In one embodiment of the present invention, after receiving a request, a proxy object corresponding to the request is generated; the proxy object searches for the interceptor corresponding to the request based on a preset interceptor configuration file and generates an interceptor list; the interceptors in the interceptor list are arranged according to a preset tree structure to generate a tree-shaped interceptor.
[0060] In one embodiment of the present invention, the request may be a partial web request, a user login request, a log audit request, or other Action request for a user object.
[0061] In one embodiment of the present invention, based on the above solution, the interceptor is implemented based on the dynamic proxy mechanism of Java. In the dynamic proxy mechanism of Java, there are two important classes or interfaces, one is the InvocationHandler interface (Interface), and the other is the Proxy class (Class). This class and interface are necessary for implementing dynamic proxy.
[0062] In one embodiment of the present invention, based on the above solution, each dynamic proxy class must implement the InvocationHandler interface, and each instance of the proxy class is associated with a handler. When a method is called through a proxy object, the method call will be forwarded to the invoke method of the InvocationHandler interface for calling; and the role of the Proxy class is to dynamically create a proxy object class.
[0063] In one embodiment of the present invention, the interceptor can perform some processing before or after the Action and Result are executed in Java. Specifically, it can be an object that dynamically intercepts the Action call and can prevent the execution of the object before it is called.
[0064] In one embodiment of the present invention, when a request directed to a container is received from a client, the proxy object of the interceptor is called. The proxy object queries the configuration file for the interceptor corresponding to the request based on the client's request, generates a tree-shaped interceptor, and then passes the relevant parameters in the request to the tree-shaped interceptor for calculation.
[0065] Figure 2 The figure schematically shows a tree interceptor according to an embodiment of the present invention.
[0066] In one embodiment of the present invention, based on the above scheme, the interceptor method is generally called by proxy. When the request reaches the container, the configuration file is searched, and the corresponding interceptor object is instantiated according to the configuration, and then a tree interceptor is generated, and finally the interceptor in the tree interceptor is forked and called. Among them, the interceptor is an implementation of AOP (Aspect Oriented Programming); the tree interceptor is to connect the interceptors into a forked tree according to certain rules, such as Figure 2 As shown, when accessing the intercepted method or field, the interceptors in the tree interceptor will be called in the order previously defined.
[0067] In step S120, the interceptor in the tree interceptor is called to verify the request and obtain a verification result.
[0068] In one embodiment of the present invention, based on the aforementioned scheme, the request is imported into a tree-shaped interceptor; the interceptor in the tree-shaped interceptor performs logical calculations on the request to obtain a calculated value; based on the calculated value, the left branch or the right branch of the tree-shaped interceptor is called to continue to perform logical calculations on the request; when the request is calculated in the tree-shaped interceptor, a verification result is generated.
[0069] In one embodiment of the present invention, when the calculated value of an interceptor in a tree-shaped interceptor returns false, the next level interceptor of the tree-shaped interceptor can continue to be called. As long as the last interceptor in the tree-shaped interceptor returns True, the request can be responded to, the correct page can be jumped, or the requested object can be called.
[0070] In one embodiment of the present invention, based on the aforementioned solution, the interceptor is implemented by relying on the Java reflection mechanism, and the dynamic proxy implemented by JDK is used. The dynamic proxy implemented by JDK needs to rely on the interface. The interceptor is applied in AOP, which is to call a method before a service or a method, or to call a method after a method. The interceptor is not configured in web.xml.
[0071] In one embodiment of the present invention, the interceptor function may be implemented by using an inherited class HandlerInterceptorAdapter, or an abstract class AbstractInterceptor, or implementing the HandleInterceptor interface.
[0072] In step S130, based on the verification result, it is determined whether to respond to the request.
[0073] In one embodiment of the present invention, based on the above-mentioned solution, when the verification result is true, in response to the request, jump to the requested page; when the verification result is false, intercept the request.
[0074] In one embodiment of the present invention, a custom interceptor is implemented using the HandlerInterceptorAdapter provided by the Spring framework to intercept and control login requests. The workflow is: if the current user is not logged in, jump to the login page; after successful login, jump to the previously visited URL page.
[0075] In the technical solutions provided by some embodiments of the present invention, a corresponding tree-shaped interceptor is generated based on the received request; an interceptor in the tree-shaped interceptor is called to verify the request and obtain a verification result; based on the verification result, it is determined whether to respond to the request. In this way, the technical solution of the embodiment of the present invention can intercept the request through the tree-shaped interceptor, and when one of the interceptors in the tree-shaped interceptor fails, other interceptors can be further forked downwards to execute, thereby reducing the length of the interceptor chain and solving the problem of repeated configuration of interceptors.
[0076] Figure 3 A block diagram of a request verification device based on a tree interceptor according to an embodiment of the present invention is schematically shown.
[0077] Reference Figure 3 As shown, a request verification device 300 based on a tree interceptor according to an embodiment of the present invention includes: a generation module 301, a verification module 302, and a response module 303; wherein,
[0078] A generating module 301, used to generate a corresponding tree interceptor based on the received request;
[0079] The verification module 302 is used to call the interceptor in the tree interceptor to verify the request and obtain the verification result;
[0080] The response module 303 is used to determine whether to respond to the request based on the verification result.
[0081] In one embodiment of the present invention, the generation module 301 is specifically used for:
[0082] After receiving the request, a proxy object corresponding to the request is generated;
[0083] The proxy object finds the interceptor corresponding to the request based on the preset interceptor configuration file and generates an interceptor list;
[0084] According to the preset tree structure, the interceptors in the interceptor list are arranged to generate a tree interceptor.
[0085] In one embodiment of the present invention, the verification module 302 is specifically used for:
[0086] Import the request into the tree interceptor;
[0087] The interceptors in the tree interceptor perform logical calculations on the request to obtain the calculated values;
[0088] Based on the calculated value, the left branch or right branch of the tree interceptor is called to continue the logical calculation of the request;
[0089] When the request is calculated in the tree interceptor, the verification result is generated.
[0090] In one embodiment of the present invention, the response module 303 is specifically used for:
[0091] When the verification result is true, in response to the request, jump to the requested page;
[0092] When the test result is false, the request is intercepted.
[0093] Since the various functional modules of the request verification device based on a tree interceptor in the example embodiment of the present invention correspond to the steps of the example embodiment of the request verification method based on a tree interceptor mentioned above, for details not disclosed in the embodiment of the device of the present invention, please refer to the embodiment of the request verification method based on a tree interceptor of the present invention mentioned above.
[0094] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 of an electronic device suitable for implementing an embodiment of the present invention. Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0095] like Figure 4 As shown, computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. Various programs and data required for system operation are also stored in RAM 403. CPU 401, ROM 402 and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0096] The following components are connected to the I / O interface 405: an input section 1206 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0097] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0098] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0101] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the request verification method based on the tree interceptor in the above embodiment.
[0102] For example, the electronic device described above can be implemented as follows: Figure 1 As shown in: Step S110, generating a corresponding tree interceptor based on the received request; Step S120, calling the interceptor in the tree interceptor, verifying the request, and obtaining a verification result; Step S130, determining whether to respond to the request based on the verification result.
[0103] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0104] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0105] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0106] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A request verification method based on a tree interceptor, characterized in that: include: Based on the received request, a proxy object corresponding to the request is generated, the proxy object finds out the interceptor corresponding to the request, and generates a tree interceptor; the tree interceptor includes a plurality of interceptors connected in a tree structure; Calling the interceptor in the tree interceptor to verify the request and obtain the verification result; Based on the verification result, determining whether to respond to the request; Among the multiple interceptors, when the verification result of any interceptor is false, the request is transferred to the corresponding next-level interceptor until the verification result when it is transferred to the last interceptor is false, and the request is intercepted.
2. The request verification method based on the tree interceptor according to claim 1 is characterized in that: The proxy object finds the interceptor corresponding to the request and generates a tree interceptor, including: Find the interceptor corresponding to the request based on the preset interceptor configuration file and generate an interceptor list; According to a preset tree structure, the interceptors in the interceptor list are arranged to generate a tree-shaped interceptor.
3. The request verification method based on the tree interceptor according to claim 1 is characterized in that: The calling of the interceptor in the tree-shaped interceptor to verify the request and obtain the verification result includes: Importing the request into the tree interceptor; The interceptor in the tree interceptor performs logical calculation on the request to obtain a calculated value; Based on the calculated value, calling the left branch or the right branch of the tree interceptor to continue to perform logical calculation on the request; When the request is calculated in the tree interceptor, a verification result is generated.
4. The request verification method of the tree interceptor according to claim 1, characterized in that: The determining whether to respond to the request based on the verification result includes: When the verification result is true, in response to the request, jump to the requested page; When the verification result is false, the request is intercepted.
5. A request verification device based on a tree interceptor, characterized in that: include: Generation module, verification module, response module; among them, A generation module, used to generate a proxy object corresponding to the request based on the received request, the proxy object finds out the interceptor corresponding to the request and generates a tree interceptor; the tree interceptor includes a plurality of interceptors connected in a tree structure; A verification module, used for calling the interceptor in the tree interceptor, verifying the request and obtaining a verification result; A response module, used to determine whether to respond to the request based on the verification result; Among the multiple interceptors, when the verification result of any interceptor is false, the request is transferred to the corresponding next-level interceptor until the verification result when it is transferred to the last interceptor is false, and the request is intercepted.
6. The request verification device based on the tree interceptor according to claim 5, characterized in that: The generation module is specifically used for: Find the interceptor corresponding to the request based on the preset interceptor configuration file and generate an interceptor list; According to a preset tree structure, the interceptors in the interceptor list are arranged to generate a tree-shaped interceptor.
7. The request verification device based on the tree interceptor according to claim 5, characterized in that: The verification module is specifically used for: Importing the request into the tree interceptor; The interceptor in the tree interceptor performs logical calculation on the request to obtain a calculated value; Based on the calculated value, calling the left branch or the right branch of the tree interceptor to continue to perform logical calculation on the request; When the request is calculated in the tree interceptor, a verification result is generated.
8. The request verification device based on the tree interceptor according to claim 5, characterized in that: The response module is specifically used for: When the verification result is true, in response to the request, jump to the requested page; When the verification result is false, the request is intercepted.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the request verification method based on a tree interceptor according to any one of claims 1 to 4 is implemented.
10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the request verification method based on the tree interceptor as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and system for managing authority
CN104363211A
