A request derivation control method, device and equipment

By using the request derivation control method in the zero-trust gateway, we create derivative requests that are processed in parallel, solving the problems of thread blocking and queue overflow in the prior art, and improving concurrency performance and business processing efficiency.

CN115550448BActive Publication Date: 2025-06-10BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211119143.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-06-10
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

When the prior art handles complex and diversified service inspections in a zero-trust gateway, it is easy to deal with thread blocking and queue overflow problems, affecting concurrency performance and business processing efficiency.

Method used

The request derivation control method is used to obtain the user's first business request as the base request, create multiple derivative requests in the callback function of the base request, and send these derivative requests to the service server for parallel processing. The response results are aggregated through the shared cache area, and finally, release or block the base request based on the aggregation result.

Benefits of technology

By processing derived requests in parallel, thread blocking and queue overflow are avoided, and concurrency performance and business processing efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550448B_ABST
    Figure CN115550448B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a request derivation control method, apparatus, and device. The method includes: obtaining a user base request; creating a plurality of derived requests in a callback function of the base request when the business processing of the base request interacts with a plurality of third-party services; sending the derived requests to a business server so that the business server performs business interaction processing in parallel through the plurality of derived requests and returns a derived request response result; extracting the derived request response result according to the callback function of the derived request and placing the derived request response result in a preset shared cache area; extracting a pointer to the base request in the shared cache area to activate the callback function of the base request; aggregating the derived request response results according to the callback function of the base request, and determining whether to release or block the base request to an application server according to the aggregation result. The present disclosure can improve concurrency performance and business processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a request derivation control method, apparatus, and device. Background Art

[0002] As an entry between different domains, the zero-trust gateway processes complex and diversified inspection services. To complete the security inspection of a single request, it is often necessary to interact with various services. Currently, a request receiving queue scheme or a thread pool technology is generally used for business processing. However, the above schemes all have problems such as processing thread blocking and queue overflow, which affect the concurrent performance and business processing efficiency. Summary of the Invention

[0003] To solve the above technical problems, the present disclosure provides a request derivation control method, apparatus, and device.

[0004] The present disclosure provides a request derivation control method, including:

[0005] Obtain the first service request of a user, and use the service request as a base request;

[0006] In the case where the business processing of the base request interacts with multiple third-party services, create multiple derived requests in the callback function of the base request;

[0007] Send the derived requests to a service server, so that the service server performs business interaction processing in parallel through the multiple derived requests and returns derived request response results;

[0008] Extract the derived request response results according to the callback functions of the derived requests, and place the derived request response results in a preset shared cache area;

[0009] Extract the pointer of the base request in the shared cache area to activate the callback function of the base request; the callback function of the base request is used to converge and process the derived request response results;

[0010] Converge the derived request response results according to the callback function of the base request, and determine whether to release or block the base request to an application server according to the convergence result.

[0011] Optionally, the obtaining the first service request of a user includes:

[0012] When an event receiving process that listens for network events listens to the first service request sent by a user, place the service request in an event tree;

[0013] Extract the service request from the event tree through an event processing process.

[0014] Optionally, creating multiple derived requests in the callback function of the base request includes:

[0015] Triggering the creation event of the derived request in the callback function of the base request. For each derived request, the creation event includes:

[0016] Creating a derived request object of the derived request class;

[0017] Copying the parameter information in the base request object corresponding to the base request into the derived request object;

[0018] Creating a shared cache area for saving the service data extracted from the base request;

[0019] When initializing the derived request, extracting the service data from the shared cache area;

[0020] Setting the service configuration file of the derived request, where the service configuration file includes: request header, request body, Uniform Resource Locator (URL), and callback function.

[0021] Optionally, sending the multiple derived requests to the service server includes:

[0022] Sending the multiple derived requests to the service server by calling a non-blocking interface.

[0023] Optionally, the method further includes:

[0024] When the event receiving process listening for network events monitors the response result of the derived request generated by the service server, putting the response result of the derived request into the event tree.

[0025] Optionally, determining to allow or block the base request to the application server according to the aggregation result includes:

[0026] Judging whether the response results of the multiple derived requests are all secure according to the aggregation result;

[0027] If so, allowing the base request to the application server;

[0028] If not, blocking the base request to the application server.

[0029] Optionally, the method further includes:

[0030] Creating a handler linked list including multiple handler nodes, where each handler node is used to process a dimension of security check.

[0031] Optionally, the method further includes:

[0032] During the period of waiting for the business server to return the response result of the derived request, continuously process new network events and suspend the base request.

[0033] The present disclosure also provides a request derivation control device, including:

[0034] A base request acquisition module, configured to acquire the first business request of a user and use the business request as the base request;

[0035] A request creation module, configured to create a plurality of derived requests in the callback function of the base request when the business processing of the base request interacts with a plurality of third-party services;

[0036] A request sending module, configured to send the derived request to a business server, so that the business server performs business interaction processing in parallel through the plurality of derived requests and returns a response result of the derived request;

[0037] A result extraction module, configured to extract the response result of the derived request according to the callback function of the derived request and place the response result of the derived request in a preset shared cache area;

[0038] A function activation module, configured to extract a pointer of the base request from the shared cache area to activate the callback function of the base request; the callback function of the base request is used to converge and process the response result of the derived request;

[0039] A result processing module, configured to converge the response result of the derived request according to the callback function of the base request, and determine whether to release or block the base request to an application server according to the convergence result.

[0040] The present disclosure also provides an electronic device, where the electronic device includes:

[0041] A processor;

[0042] A memory for storing executable instructions of the processor;

[0043] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the above request derivation control method.

[0044] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art:

[0045] The present disclosure relates to a request derivation control method, apparatus, and device. The method includes: obtaining a user base request; when the business processing of the base request interacts with multiple third-party services, creating multiple derived requests in the callback function of the base request; sending the derived requests to a business server so that the business server performs business interaction processing in parallel through the multiple derived requests and returns the response results of the derived requests; extracting the response results of the derived requests according to the callback function of the derived requests and placing the response results of the derived requests in a preset shared cache area; extracting the pointer of the base request from the shared cache area to activate the callback function of the base request; aggregating the response results of the derived requests according to the callback function of the base request, and determining whether to release or block the base request to an application server according to the aggregation result. The present disclosure can improve concurrency performance and business processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.

[0047] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0048] Figure 1 It is a schematic diagram of the interaction between threads and queues according to an embodiment of the present disclosure;

[0049] Figure 2 It is a schematic diagram of a defect state according to an embodiment of the present disclosure;

[0050] Figure 3 It is a schematic diagram of the interaction of a thread pool according to an embodiment of the present disclosure;

[0051] Figure 4 It is a schematic diagram of another defect state according to an embodiment of the present disclosure;

[0052] Figure 5 It is a flowchart of the request derivation control method according to an embodiment of the present disclosure;

[0053] Figure 6 It is a schematic diagram of the request derivation control process according to an embodiment of the present disclosure;

[0054] Figure 7 It is a block diagram of the structure of the request derivation control apparatus according to an embodiment of the present disclosure.

[0055] Figure 8 It is a schematic diagram of the structure of the electronic device according to an embodiment of the present disclosure. Detailed Implementation Manner

[0056] In order to more clearly understand the above-mentioned objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0057] Many specific details are set forth in the following description in order to provide a thorough understanding of the present disclosure, but the present disclosure may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.

[0058] As an access control device between different domains, the zero-trust gateway checks and controls all data requests. The zero-trust gateway bears all the access traffic of users. One of the primary characteristics it must possess is high concurrency; achieving high concurrency often requires non-blocking processing in a single request. When the gateway performs single-machine service processing, the concurrency can be simply and quickly improved. However, as the entry between different domains, the inspection services processed by the zero-trust gateway are complex and diversified. In order to complete the security inspection of a single request, it often needs to interact with various services. In order to achieve high concurrency and high efficiency in this non-single-machine and diversified service processing, the zero-trust gateway designs a request derivation control technology. During the processing of each request inspection and interaction with multiple services, it does not block and occupy the CPU (Central Processing Unit), and does not affect the processing of other requests, thereby greatly improving the concurrency performance and service processing efficiency.

[0059] In one embodiment, a request receiving queue is adopted, and a single thread is used to distribute request data to different service queues. Multiple threads process different service queues. The interaction between the thread and the queue is as Figure 1 shown. However, this concurrent solution using a multi-threaded queue model has the phenomenon of business processing thread blocking and waiting when dealing with interactive services. The defect status is as Figure 2 shown, mainly including: (1) Processing thread blocking: When the processing thread processes interactive services and requests other services, there will be a phenomenon of blocking and waiting for service responses; (2) Queue overflow: If the network delay with the interactive service is high, the business process will continuously distribute services to the service queue, eventually resulting in queue overflow; moreover, after the queue overflows, the service distribution thread discards user requests, resulting in a decrease in concurrency.

[0060] In another embodiment, the thread pool technology is adopted. Multiple threads are created during initialization. The main thread places all tasks in the service queue. All threads in the thread pool are blocked in the service queue in a loop. Each thread executes relevant services according to the callback function of each service. The interaction of the thread pool is as Figure 3As shown. In this concurrent solution using a thread pool, when processing interactive services, there is still a phenomenon where the business processing thread is blocked and waiting idly. The defect status is as Figure 4 shown, mainly including: (1) Processing thread blockage: When the processing thread processes interactive services and requests other services, there will also be a phenomenon of blocking and waiting for service responses; (2) Thread pool thread exhaustion: If the network latency with the interactive service is high, the business process will continuously distribute services to the business queue, eventually resulting in the exhaustion of available threads in the thread pool and queue overflow; after the queue overflows, user requests are discarded, causing a decline in concurrency capabilities.

[0061] Based on this, in order to overcome the deficiencies of the prior art, improve the problem of process blocking and waiting for responses in multiple service interactions, and enhance the efficiency of complex interactive services, the present disclosure provides a request derivation control method, apparatus, and device, and this technology can be applied to zero-trust gateway services.

[0062] Figure 5 The flowchart of a request derivation control method provided by an embodiment of the present disclosure. This method can be executed by a request derivation control device configured in a terminal, and this device can be implemented using software and / or hardware. As Figure 5 shown, the request derivation control method may include the following steps:

[0063] Step S101, obtain the user's first service request and use the service request as the base request.

[0064] In one embodiment, reference can be made to Figure 6 to implement the request derivation control method through an event receiving process and an event processing process. The event receiving process is used to monitor all network events. When a readable and writable network event is activated, the network event is placed in the event tree. The event processing process is used to cyclically extract readable and writable network events from the event tree and execute the callback function of the network event, so that relevant service processing can be performed within the callback function.

[0065] An example of the way to obtain a service request in this embodiment is: when the event receiving process that monitors network events monitors the user's first service request, the service request is placed in the event tree; the event processing process extracts the service request from the event tree. The user's first service request is defined as the base request.

[0066] Step S102, in the case where the service processing of the base request interacts with multiple third-party services, create multiple derived requests in the callback function of the base request.

[0067] In this embodiment, the event processing process executes the callback function of the base request. Relevant business processing can be carried out within the callback function of the base request. If the business processing needs to interact with multiple third-party services, multiple derived requests are created in the callback function of the base request. In one possible way, the creation event of the derived request is triggered in the callback function of the base request. For each derived request, the creation event can be referred to as follows:

[0068] Create a derived request object of the derived request class; copy the parameter information in the base request object corresponding to the base request to the derived request object; the parameter information such as the event tree address, the address of the base request object, etc.; that is, copy the parameter information such as the event tree address and the base request object address from the base request object to the derived request object.

[0069] Create a shared cache area, which is used to save the business data extracted from the base request. The business data is, for example, the data in the base request header (request header) or body (request body), as well as the response processing results and statuses corresponding to the derived requests, etc. When initializing the derived request, extract the business data from the shared cache area. Set the business configuration file of the derived request. The business configuration file includes, but is not limited to: request header, request body, URL (Uniform Resource Locator), and callback function. After setting, the creation of the derived request is completed; each created derived request is used for business interaction processing.

[0070] In the embodiment of creating the derived request, the shared cache area is isolated from the base request and does not affect each other, thereby improving the processing efficiency during business interaction.

[0071] Step S103: Send the derived request to the business server so that the business server performs business interaction processing in parallel through multiple derived requests and returns the response result of the derived request.

[0072] After creating multiple derived requests, in this embodiment, multiple derived requests can be sent to the business server by calling a non-blocking interface. After the derived request is sent, the CPU occupancy can be released immediately, and it will not block and occupy the CPU, nor affect the processing of other requests. At the same time, the event receiving process and the event processing process enter a loop to extract the next activated network event under the event tree and perform relevant processing operations; based on this, this method can not only process new business requests but also process the response events of the derived requests, realizing full asynchronous processing of the business, thereby greatly improving the concurrency performance and business processing efficiency.

[0073] The business server responds after processing the derived request, generating a derived request response result. The event receiving process listens for network events. When the event receiving process that listens for network events detects the derived request response result generated by the business server, it places the derived request response result into the event tree.

[0074] In one embodiment, during the period of waiting for the business server to return the derived request response result, the event receiving process and the event processing process can continuously process new network events and suspend the base request, thereby better solving the problem of business process blocking.

[0075] Step S104, extract the derived request response result according to the callback function of the derived request, and place the derived request response result into a preset shared cache area.

[0076] The event processing process activates the callback function of the derived request. According to the callback function of the derived request, it sets the request status flag bit of the derived request in the shared cache area, extracts the derived request response result from the event tree, and places the derived request response result into a preset shared cache area.

[0077] Step S105, extract the pointer of the base request in the shared cache area to activate the callback function of the base request; the callback function of the base request is used to converge and process the derived request response result. Specifically, the event processing process extracts the pointer of the base request in the shared cache area and activates the callback function of the base request.

[0078] Step S106, converge the derived request response result according to the callback function of the base request, and determine whether to allow or block the base request to the application server based on the convergence result.

[0079] In this embodiment, the callback function of the base request can be used to make a comprehensive judgment based on each derived request response result to determine whether to allow or block the user's current request. In implementation, the event processing process uses the callback function of the base request to converge the derived request response result, and then determines whether all the derived request response results are safe based on the convergence result; if so, it means the base request is safe, and in this case, the base request is allowed to the application server; if not, the base request is blocked from reaching the application server.

[0080] As a specific example, a handler linked list including multiple handler nodes is created; each handler node is used to process the security check of one dimension, that is, each handler node is used to process the security check of a derived request response result. The current handler node checks the security of a derived request response result. If it is secure, it releases and proceeds to the next handler node, and the next handler node performs a new dimension check on the next derived request response result until all derived request response results are checked secure, then the base request is released to the application server.

[0081] This embodiment creates multiple derived requests to process complex services in parallel and converges and analyzes all derived request response results, which can improve the processing efficiency and concurrency.

[0082] To facilitate the understanding of the request derivation control method provided in this embodiment, a practical application example of this method is provided here with the zero-trust gateway service as the application scenario.

[0083] In this embodiment, when the zero-trust gateway checks each service request, it needs to perform multiple dimensions of checks. Some of the check items need to interact with third-party services to obtain the check results. After obtaining the security analysis response for each dimension, the service request is released or blocked. The implementation process of this embodiment can be referred to as follows.

[0084] (1) Create a handler linked list including multiple handler nodes; each of the handler nodes is used to process the security check of one dimension.

[0085] (2) Obtain the base request. When the business processing of the base request interacts with multiple third-party services, multiple derived requests are created in the callback function of the base request. The creation process of the derived request includes setting the callback function of the derived request.

[0086] (3) Send the derived request to the business server; after sending the derived request, immediately return the event tree and process the callback of the next network event.

[0087] (4) The business server processes the business interaction in parallel through multiple derived requests and returns the derived request response results. The derived request response results are placed in the event tree, and the event processing process extracts and executes the callback function of the derived request.

[0088] (5) The event processing process extracts the derived request response results according to the callback function of the derived request and places the derived request response results in the shared cache area of the base request and the derived request; activate the callback function of the base request.

[0089] (6) Aggregate the response results of the derived requests according to the callback function of the base request, and determine whether to allow or block the base request to the application server based on the aggregation result. Specifically, if the response result of the derived request corresponding to the current handler node passes the security check, allow it to pass and enter the next handler node. The next handler node performs a new dimension check on the response result of the next derived request until all response results of the derived requests are secure, and then allow the base request to pass.

[0090] The method for request derivation control provided in this embodiment based on the zero-trust gateway product can better achieve concurrency and improve processing efficiency.

[0091] In summary, the request derivation control method provided in the embodiments of the present disclosure includes: obtaining the first service request of the user and using the service request as the base request; when the service processing of the base request interacts with multiple third-party services, creating multiple derived requests in the callback function of the base request; sending the derived requests to the service server so that the service server performs parallel service interaction processing through the multiple derived requests and returns the response results of the derived requests; extracting the response results of the derived requests according to the callback function of the derived requests and placing the response results of the derived requests in a preset shared cache area; extracting the pointer of the base request in the shared cache area to activate the callback function of the base request; the callback function of the base request is used to aggregate and process the response results of the derived requests; aggregating the response results of the derived requests according to the callback function of the base request, and determining whether to allow or block the base request to the application server based on the aggregation result.

[0092] The above technical solution adopts the request derivation control technology. In the processing of a network event request such as a base request, it supports creating multiple derived requests for parallel processing of complex services, and aggregating and analyzing the results of all derived requests, thereby improving the service concurrency performance and the processing efficiency of complex interaction services.

[0093] Figure 7 The following is a structural block diagram of a request derivation control device provided in the embodiments of the present disclosure. This device is used for the above request derivation control method, and the device can be implemented by software and / or hardware. As Figure 7 shown, the request derivation control device may include:

[0094] A base request acquisition module 701, configured to obtain the first service request of the user and use the service request as the base request;

[0095] A request creation module 702, configured to create multiple derived requests in the callback function of the base request when the service processing of the base request interacts with multiple third-party services;

[0096] A request sending module 703, configured to send a derivation request to a service server, so that the service server performs service interaction processing in parallel through multiple derivation requests and returns a derivation request response result;

[0097] A result extraction module 704, configured to extract a derivation request response result according to a callback function of the derivation request and place the derivation request response result in a preset shared cache area;

[0098] A function activation module 705, configured to extract a pointer of a base request from the shared cache area to activate a callback function of the base request; the callback function of the base request is used to converge and process the derivation request response result;

[0099] A result processing module 706, configured to converge the derivation request response results according to the callback function of the base request, and determine whether to release or block the base request to the application server according to the convergence result.

[0100] For the device provided in this embodiment, the implementation principle and the technical effects produced are the same as those of the foregoing method embodiment. For a brief description, for parts not mentioned in the device embodiment, reference may be made to the corresponding content in the foregoing method embodiment.

[0101] Figure 8 The following is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. As Figure 8 shown, the electronic device 800 includes one or more processors 801 and a memory 802.

[0102] The processor 801 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 800 to perform desired functions.

[0103] The memory 802 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 801 may run the program instructions to implement the request derivation control method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0104] In one example, the electronic device 800 may further include: an input device 803 and an output device 804, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0105] In addition, the input device 803 may further include, for example, a keyboard, a mouse, and so on.

[0106] The output device 804 may output various information to the outside, including the determined distance information, direction information, etc. The output device 804 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.

[0107] Of course, for simplicity, Figure 8 only some of the components related to the present disclosure in the electronic device 800 are shown, and components such as a bus, an input / output interface, and so on are omitted. In addition, according to specific application scenarios, the electronic device 800 may further include any other appropriate components.

[0108] Furthermore, this embodiment also provides a computer-readable storage medium, and the storage medium stores a computer program, and the computer program is used to execute the above-mentioned request derivation control method.

[0109] A computer program product of a request derivation control method, device, electronic device, and medium provided by an embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments, and details are not described herein again.

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

[0111] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A request derivation control method, characterized in that, it includes: Obtain the user's first service request and use the service request as the base request; When the service processing of the base request interacts with multiple third-party services, create multiple derived requests in the callback function of the base request; Send the multiple derived requests to the service server so that the service server performs service interaction processing in parallel through the multiple derived requests and returns the derived request response result; Extract the derived request response result according to the callback function of the derived request and place the derived request response result in a preset shared cache area; Extract the pointer of the base request from the shared cache area to activate the callback function of the base request; the callback function of the base request is used to converge and process the derived request response result; Converge the derived request response results according to the callback function of the base request, and determine whether to release or block the base request to the application server according to the convergence result; The sending the multiple derived requests to the service server includes: Send the multiple derived requests to the service server by calling a non-blocking interface; The method further includes: During the period of waiting for the service server to return the derived request response result, continuously process new network events and suspend the base request.

2. The method according to claim 1, characterized in that, The obtaining the user's first service request includes: When the event receiving process that monitors network events monitors the first service request sent by the user, put the service request into the event tree; Extract the service request from the event tree through the event processing process.

3. The method according to claim 1, characterized in that, The creating multiple derived requests in the callback function of the base request includes: Trigger the creation event of the derived request in the callback function of the base request. For each derived request, the creation event includes: Create a derived request object of the derived request class; Copy the parameter information in the base request object corresponding to the base request into the derived request object; Create a shared cache area, which is used to save the service data extracted from the base request; When initializing the derived request, extract the service data from the shared cache area; Set the service configuration file of the derived request, and the service configuration file includes: request header, request body, uniform resource locator URL and callback function.

4. The method according to claim 1, characterized in that, The method further includes: When the event receiving process that monitors network events monitors the derived request response result generated by the service server, put the derived request response result into the event tree.

5. The method according to claim 1, characterized in that, The determining whether to release or block the base request to the application server according to the convergence result includes: Judge whether all the derived request response results are safe according to the convergence result; If so, release the base request to the application server; If not, block the base request to the application server.

6. The method according to any one of claims 1-5, wherein, the method further comprises: creating a handler linked list including a plurality of handler nodes, each of the handler nodes being used to process security checks for one dimension.

7. A request derivation control device, wherein, it comprises: a base request acquisition module, configured to acquire a user's first service request and use the service request as a base request; a request creation module, configured to create a plurality of derived requests in a callback function of the base request when the service processing of the base request interacts with a plurality of third-party services; a request sending module, configured to send the plurality of derived requests to a service server, so that the service server performs service interaction processing in parallel through the plurality of derived requests and returns a derived request response result; wherein, during the period of waiting for the service server to return the derived request response result, new network events are continuously processed and the base request is suspended; a result extraction module, configured to extract the derived request response result according to the callback function of the derived request and place the derived request response result in a preset shared cache area; a function activation module, configured to extract a pointer of the base request from the shared cache area to activate a callback function of the base request; the callback function of the base request is used to converge and process the derived request response result; a result processing module, configured to converge the derived request response results according to the callback function of the base request, and determine whether to release or block the base request to an application server according to the convergence result; the request sending module includes: sending the plurality of derived requests to the service server by calling a non-blocking interface.

8. An electronic device, wherein, the electronic device includes: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the request derivation control method according to any one of claims 1-6 above.

Citation Information

Patent Citations

  • Method for improving performance of web application and client

    CN108243233A

  • Message processing method and device, server and storage medium

    CN111555950A