Service request monitoring method and device, equipment, medium and program product

When the user device sends service request information to the server, the probe interception and the information library are used to synthesize the target service request information, identify and eliminate unauthorized requests, solve the problem of request failure when tracking service requests in the existing technology, and realize the service Proper functioning and accurate tracking of requests.

CN118748623APending Publication Date: 2024-10-08CHINA MOBILE GROUP ANHUI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411054075.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

The existing technology cannot simultaneously ensure accurate tracking and normal operation of the business request when tracking business requests, especially when the server is not configured with a cross-domain policy that allows custom header fields, causing the request to fail.

Method used

By using probes to intercept the information when the user device sends business request information to the server, and synthesizing the target business request information in the preset information library, unauthorized requests are identified and eliminated, and inappropriate tracking header fields are avoided to ensure that the request normal operation and accurate tracking.

Benefits of technology

It achieves accurate identification of unauthorized and suspected unauthorized requests, avoids request failures, and ensures the normal operation of business requests and the accurate tracking of flow paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748623A_ABST
    Figure CN118748623A_ABST
Patent Text Reader

Abstract

The invention discloses a service request monitoring method and device, equipment, a medium and a program product. When the user equipment sends service request information to the server, intercepting the service request information by using the probe; under the condition that neither a preset first information base nor a preset second information base contains the service request information, sending target service request information to a server; when a first response result returned by the server is access rejection, service request information is sent to the server, and the first response result is generated by the server based on the target service request information; and under the condition that a second response result returned by the server is access permission, the service request information is determined to be suspected unauthorized second type of service request information and is input into a second information base, and the second response result is generated by the server based on the service request information. According to the embodiment of the invention, when the service request is tracked, the normal operation of the service request can be ensured while the service request is accurately tracked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer science and information technology, and in particular, relates to a method, device, equipment, medium and program product for monitoring a business request. Background Art

[0002] Microservice architecture can split large applications into a series of small, independent services. In a microservice architecture, a business request may span multiple service instances and go through a complex call chain to complete.

[0003] Existing technologies often build a complete request call chain diagram by adding preset header fields in each service request, such as trace_id (unique identifier of the entire request chain), span_id (unique identifier of the request processed by the current service instance), and parent_span_id (request identifier of the upstream service instance), so as to accurately track and record the flow path of the service request, and quickly locate and troubleshoot the fault. However, if the server is not configured with a cross-domain policy that allows custom header fields, the service request containing the custom header field sent by the user device will be rejected by the server, resulting in the failure of the service request, affecting the normal operation of the service request.

[0004] Therefore, when tracking business requests, the existing technology faces the problem of being unable to simultaneously ensure accurate tracking and normal operation of business requests. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, medium and program product for monitoring a business request, which can solve the problem that the prior art cannot simultaneously ensure accurate tracking and normal operation of the business request when tracking the business request.

[0006] In a first aspect, an embodiment of the present application provides a method for monitoring a service request, comprising:

[0007] When the user equipment sends service request information to the server, the service request information is intercepted by using a probe;

[0008] In the case that neither the preset first information base nor the preset second information base includes the service request information, sending target service request information to the server, wherein the target service request information is synthesized based on the service request information and the preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information;

[0009] When the first response result returned by the server is access denial, sending service request information to the server, wherein the first response result is generated by the server based on the target service request information;

[0010] When the second response result returned by the server indicates that access is allowed, the service request information is determined to be second-category service request information suspected of being unauthorized and is entered into the second information database, wherein the second response result is generated by the server based on the service request information.

[0011] In a possible embodiment of the first aspect, the service request information includes a uniform resource locator.

[0012] In a possible embodiment of the first aspect, when neither the preset first information library nor the preset second information library includes the service request information, before sending the target service request information to the server, the method further includes:

[0013] Obtaining the time at which the second type of service request information is entered into the second information database;

[0014] Based on each entry time and the second type of service request information corresponding thereto, respectively, information of an entry combination of the entry time and the second type of service request information is generated;

[0015] Replacing the second type of business request information in the second information database with the corresponding input combination information;

[0016] In the second information database, the information of the entry combination whose entry time is not within the preset entry validity period is deleted.

[0017] In a possible embodiment of the first aspect, the method further includes:

[0018] In the second information database, the number of input combinations corresponding to the same second-category business request information within the input validity period is obtained;

[0019] When the number is greater than a preset number threshold, determining the same second-category service request information as unauthorized first-category service request information and adding it to the first information database;

[0020] The entry combination corresponding to the same second-category business request information is deleted from the second information database.

[0021] In a possible embodiment of the first aspect, the method further includes:

[0022] In the case that the preset first information base or the preset second information base includes the service request information, the service request information is sent to the server.

[0023] In a possible embodiment of the first aspect, the method further includes:

[0024] When the second response result returned by the server is access denial, it is determined that the reason why the service request information is denied access is a reason other than adding a tracking header field.

[0025] Based on the same inventive concept, in a second aspect, an embodiment of the present application further provides a monitoring device for a service request, including:

[0026] An acquisition module, used to intercept the service request information by using a probe when the user equipment sends the service request information to the server;

[0027] a sending module, configured to send target service request information to a server when neither a preset first information base nor a preset second information base includes service request information, wherein the target service request information is synthesized based on the service request information and a preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information;

[0028] The sending module is further used to send service request information to the server when the first response result returned by the server is access denial, wherein the first response result is generated by the server based on the target service request information;

[0029] The entry module is used to determine that the service request information is a second type of suspected unauthorized service request information and enter it into a second information base when the second response result returned by the server is that access is allowed, wherein the second response result is generated by the server based on the service request information.

[0030] Based on the same inventive concept, in the third aspect, an embodiment of the present application also provides a monitoring device for business requests, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the first aspect, or the method for monitoring business requests in any embodiment of the first aspect.

[0031] Based on the same inventive concept, in the fourth aspect, an embodiment of the present application further provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the first aspect or a method for monitoring business requests in any embodiment of the first aspect is implemented.

[0032] Based on the same inventive concept, in the fifth aspect, an embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the device, the device can execute the monitoring method of the business request in the first aspect, or any embodiment of the first aspect.

[0033] The monitoring method, apparatus, device, medium and program product of the service request of the embodiment of the present application intercepts the service request information by using a probe when the user device sends the service request information to the server, and then, when the service request information is not included in the preset first information library (storing the determined unauthorized first category service request information) and the preset second information library (storing the potential suspected unauthorized second category service request information), it is indicated that the service request information is neither the unauthorized first category nor the suspected unauthorized second category. Therefore, the target service request information can be synthesized based on the service request information and the preset tracking header field, and the target service request information is sent to the server. Next, when the first response result generated by the server based on the target service request information is access denied, the service request information without the preset tracking header field is sent to the server, and when the second response result generated by the server based on the service request information is access allowed, the service request information is determined to be the suspected unauthorized second category service request information and is entered into the second information library. In the embodiments of the present application, by setting up a first information database and a second information database, unauthorized and suspected unauthorized business request information can be accurately identified, and confirmed unauthorized requests and potentially suspected unauthorized requests can be accurately identified, so that requests that do not allow cross-domain custom header fields can be automatically identified and excluded, thereby avoiding adding preset tracking header fields to these inappropriate requests, thereby reducing request failures caused by server-side policies, and being able to accurately track the business request flow path while ensuring the normal operation of the business request. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Other features, objects and advantages of the present application will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings, in which the same or similar reference numerals represent the same or similar features and the accompanying drawings are not drawn to scale.

[0035] Figure 1 This is a flow chart of a method for monitoring a service request provided in an embodiment of the present application;

[0036] Figure 2 This is another flow chart of the method for monitoring a service request provided in an embodiment of the present application;

[0037] Figure 3 This is another flow chart of the method for monitoring a service request provided in an embodiment of the present application;

[0038] Figure 4 This is another flow chart of the method for monitoring a service request provided in an embodiment of the present application;

[0039] Figure 5This is another flow chart of the method for monitoring a service request provided in an embodiment of the present application;

[0040] Figure 6 This is a structural diagram of a device for monitoring service requests provided in an embodiment of the present application;

[0041] Figure 7 It is a structural diagram of a monitoring device for business requests provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0043] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0044] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0045] It is obvious to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit or scope of the present application. Therefore, the present application is intended to cover modifications and changes of the present application that fall within the scope of the corresponding claims (technical solutions for protection) and their equivalents. It should be noted that the implementation methods provided in the embodiments of the present application can be combined with each other without contradiction.

[0046] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:

[0047] With the rapid development of Internet technology, microservice architecture has become the mainstream choice for building large and complex applications. Microservice architecture significantly improves the scalability, flexibility and maintainability of the system by splitting large applications into a series of small and independent services. However, the complexity of this architecture also brings new challenges, especially in the tracking and monitoring of business requests.

[0048] In a microservice architecture, a business request may span multiple service instances and go through a complex call chain before it can be finally completed. This distributed feature makes request tracking particularly difficult. Therefore, distributed tracing technology came into being and became the key to solving this problem.

[0049] Distributed tracing technology achieves accurate tracking and recording of request flow paths by adding custom header fields (such as trace_id, span_id, parent_span_id) to each business request. Among them, trace_id is used to uniquely identify the entire request chain, ensuring that all relevant information of the request can be traced in the entire distributed system; span_id is used to identify the uniqueness of the request processed by the current service instance, so as to perform fine-grained tracking within a single service; and parent_span_id is used to associate requests between upstream and downstream services to ensure the continuity of the entire call chain.

[0050] However, when processing cross-domain requests, if the server is not configured with a cross-domain policy that allows custom header fields, the request containing the custom header field sent by the client (user device) will be rejected by the server, resulting in the failure of the service request and affecting the normal operation of the service request. Therefore, when tracking service requests, the relevant technology cannot intelligently identify which service request custom header fields the server allows for path tracking, and cannot add the necessary custom header fields differently, thus facing the problem of being unable to simultaneously ensure accurate tracking and normal operation of service requests.

[0051] Based on this, the embodiments of the present application provide a method, apparatus, device, medium and program product for monitoring business requests, which can intelligently identify which business request custom header fields the server allows for path tracking, thereby differentially adding necessary custom header fields, thereby ensuring accurate tracking while guaranteeing the normal operation of business requests.

[0052] The following is a detailed description of the method for monitoring service requests provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0053] Figure 1 is a flow chart of a method for monitoring a service request provided in an embodiment of the present application, such as Figure 1 As shown, the method may include steps S110 to S140.

[0054] S110: When a user device sends service request information to a server, the service request information is intercepted by using a probe.

[0055] Among them, user devices are terminal devices used by users to access resources or services, such as personal computers, smart phones, tablets, etc.

[0056] A server is a computer device that provides computing services, application services, or data management services. It uses a microservice architecture and can be used to process requests from user devices and return corresponding responses.

[0057] Service request information is information sent by a user device to a server to request a certain service or data, such as the URL, request header, and request body in an HTTP request.

[0058] A probe is usually a device or software that can actively send or receive data packets. Network probe devices or software can be deployed at key locations on the network (such as in front of the server) to ensure that the probe can monitor the network communication between the user device and the server.

[0059] Specifically, when the user equipment sends service request information to the server, a probe may be used to intercept the service request information, so that during the data transmission process of the service request information, the probe device or software can actively intervene and control the flow of the service request information.

[0060] S120, when neither the preset first information base nor the preset second information base includes the service request information, sending target service request information to the server, wherein the target service request information is synthesized based on the service request information and the preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information.

[0061] The preset first information database is a database or list that is pre-established and stores specific information, and mainly includes unauthorized first-category service request information.

[0062] The preset second information base is also a pre-established database or list, but stores suspected unauthorized second-category service request information. The second-category service request information has characteristics related to the unauthorized first-category service request information, but has not yet been clearly confirmed as unauthorized first-category service request information.

[0063] The preset tracking header field is a predefined HTTP request header field used to add additional tracking identifiers to the business request information, such as trace_id (unique identifier of the entire request chain), span_id (unique identifier of the request processed by the current service instance), and parent_span_id (the request identifier of the upstream service instance), which are used to accurately track and record the flow path of business requests.

[0064] The target service request information is new request information synthesized by combining the service request information and a preset tracking header field after checking that the service request information is not in the first information base or the second information base.

[0065] Specifically, after confirming that the service request information issued by the user device belongs to neither the first type of request that is clearly unauthorized (stored in the first information database) nor the second type of request that is suspected to be unauthorized (stored in the second information database), a specific tracking header field can be added to the service request information, and a new request (i.e., the target service request information) can be synthesized and sent to the server.

[0066] S130: When the first response result returned by the server is access denial, send service request information to the server, wherein the first response result is generated by the server based on the target service request information.

[0067] The first response result is a response result generated by the server according to its own business logic and security policy after receiving the target business request information. For example, the first response result of 401 / 403 indicates that access is denied, and the first response result of OK indicates that access is allowed.

[0068] Specifically, after the server responds with access denial to the target service request information, the original service request information without the tracking header field added thereto may be sent to the server again.

[0069] S140, when the second response result returned by the server is that access is allowed, determine that the service request information is the second type of service request information suspected of being unauthorized and enter it into the second information database, wherein the second response result is generated by the server based on the service request information.

[0070] Among them, the second response result is the response result generated by the server according to its own business logic and security policy after sending the business request information to the server.

[0071] Specifically, when it is monitored that the server returns a "access allowed" response based on the received business request information, it can be determined that the reason why the business request information was denied access for the first time was due to the reason for adding the tracking header field. Therefore, the business request information can be treated as a suspected unauthorized second-class request and recorded in a second information database specifically used to store such information.

[0072] The monitoring method for service requests provided in the embodiment of the present application uses a probe to intercept the service request information when a user device sends the service request information to a server. Then, when the service request information is not included in a preset first information library (storing determined unauthorized first-category service request information) and a preset second information library (storing potential suspected unauthorized second-category service request information), it is explained that the service request information is neither unauthorized first-category nor suspected unauthorized second-category. Therefore, the target service request information can be synthesized based on the service request information and the preset tracking header field, and the target service request information is sent to the server. Next, when the first response result generated by the server based on the target service request information is access denied, the service request information without the preset tracking header field is sent to the server. When the second response result generated by the server based on the service request information is access allowed, it can be determined that the reason why the service request information was denied access for the first time is the reason for adding the tracking header field. Therefore, the service request information can be regarded as suspected unauthorized second-category service request information and entered into the second information library. In the embodiments of the present application, by setting up a first information database and a second information database, unauthorized and suspected unauthorized business request information can be accurately identified, and confirmed unauthorized requests and potentially suspected unauthorized requests can be accurately identified, so that requests that do not allow cross-domain custom header fields can be automatically identified and excluded, thereby avoiding adding preset tracking header fields to these inappropriate requests, thereby reducing request failures caused by server-side policies, and being able to accurately track the business request flow path while ensuring the normal operation of the business request.

[0073] In some embodiments, the service request information includes a uniform resource locator.

[0074] Among them, the Uniform Resource Locator (URL) contains all the necessary information required to access the microservice resources in the server, such as protocol, server address, port number, path, query string, and fragment identifier, etc. By parsing this information, the server can accurately find and return the resources requested by the user.

[0075] Specifically, the service request information may include a Uniform Resource Locator (URL), and the effectiveness and accuracy of monitoring can be ensured by monitoring the Uniform Resource Locator (URL).

[0076] Combine the following Figure 2 The present invention introduces the process of collecting and entering the information stored in the second information database.

[0077] Figure 2 This is a flowchart of another method for monitoring business requests provided in an embodiment of the present application.

[0078] In some embodiments, Figure 2 As shown, when neither the preset first information base nor the preset second information base includes the service request information in step S120, before sending the target service request information to the server, the method further includes steps S151 to S154.

[0079] S151, obtaining the time at which the second type of service request information is entered into the second information database.

[0080] The entry time is the specific time point when the second type of service request information is entered into the second information database.

[0081] Specifically, when the second type of service request information is entered into the second information database, the system will record the specific entry time point.

[0082] S152: Generate information of an entry combination of the entry time and the second-type service request information based on each entry time and its corresponding second-type service request information.

[0083] Specifically, each entry time corresponds to a second-category business request information, so each entry time can generate an entry combination information with its corresponding second-category business request information, for example, (entry time 1, URL1), (entry time 2, URL2),..., (entry time 3, URL1) and other entry combinations can be generated.

[0084] S153, replacing the second type of business request information in the second information database with the corresponding input combination information.

[0085] Specifically, the original second-category service request information in the second information database is updated to the information of the input combination.

[0086] S154, deleting, in the second information database, information of the entry combination whose entry time is not within the preset entry validity period.

[0087] The time difference between the end time and the start time of the entry validity period is a preset value, such as 10 minutes. The entry validity period can be set as needed, and is not limited in the embodiment of the present application.

[0088] Specifically, according to the preset entry validity period, the information of the entry combination in the second information database can be checked regularly, and the information of the entry combination that is not within the entry validity period can be deleted, so as to maintain the timeliness and accuracy of the second type of business request information in the second information database.

[0089] In an embodiment of the present application, the entry time is combined with the corresponding second-category business request information to form an entry combination as the information stored in the second information base, and the expired entry combination information is cleared. This can ensure the timeliness and accuracy of the second-category business request information stored in the second information base, and provide a solid data foundation for the subsequent monitoring of business request information.

[0090] Combine the following Figure 3 The present invention introduces the process of collecting and entering the information stored in the first information database.

[0091] Figure 3 This is a flowchart of another method for monitoring business requests provided in an embodiment of the present application.

[0092] In some embodiments, Figure 3 As shown, the method also includes steps S161 to S163.

[0093] S161, in the second information database, obtaining the number of entry combinations within the entry validity period corresponding to the same second-category service request information.

[0094] Specifically, in the second information database, for the same second-category service request information, the number of all entry combinations within the entry validity period at the entry time can be obtained and calculated.

[0095] S162: When the number is greater than the preset number threshold, determine that the same second-category service request information is unauthorized first-category service request information and add it to the first information database.

[0096] The preset quantity threshold is a pre-set numerical limit used to determine whether the activity level or potential risk of a second-category business request information has reached a certain level. If the number of input combinations of a business request information exceeds this threshold, it is considered that there is a risk of unauthorized access.

[0097] Specifically, if the number of entry combinations corresponding to a certain second-category service request information exceeds a preset threshold within the entry validity period, the service request information may be regarded as unauthorized first-category service request information and may be added to the first information database.

[0098] S163, deleting the entry combination corresponding to the same second-category business request information from the second information database.

[0099] Specifically, after processing the second-category business request information that meets specific conditions (such as the number of entry combinations within the entry validity period exceeds a preset threshold) from the second information database, and determining that it is unauthorized first-category business request information and adding it to the first information database, the system will perform a cleanup step, namely deleting all entry combination information associated with the second-category business request information in the second information database, so as to ensure that the information in the second information database is kept up to date and only contains the suspected unauthorized second-category business request information of current concern.

[0100] In an embodiment of the present application, by monitoring the number of entry combinations of the same second-category business request information within the entry validity period in the second information database, when the number exceeds a preset threshold, it is automatically identified as unauthorized first-category business request information and migrated to the first information database, and then the relevant entry combinations are cleaned up from the second information database, thereby effectively improving the system's recognition efficiency and accuracy of unauthorized first-category business requests, while maintaining the timeliness and pertinence of the information database.

[0101] Figure 4 It is a flowchart of another method for monitoring business requests provided in an embodiment of the present application.

[0102] In some embodiments, Figure 4 As shown, the method further includes step S170.

[0103] S170: When the preset first information base or the preset second information base includes the service request information, send the service request information to the server.

[0104] In an embodiment of the present application, a probe is used to intercept the service request information sent by a user device to a server, and then confirm whether the service request information is in the preset first information library and the second information library. 1) When the service request information is not recorded in the preset first information library and the second information library, the system first sends the target service request information with an additional tracking header field to the server to test the access rights. If the server rejects the target service request information but allows the original service request information, the original service request information is determined to be suspected unauthorized second-category service request information and recorded in the second information library, which can enhance the identification and monitoring of potential unauthorized access to the second-category service requests. 2) If the service request information already exists in the preset first information library (containing unauthorized first-category service request information) or the preset second information library (containing suspected unauthorized second-category service request information), the system can directly send the service request information to the server without performing additional processing to add the tracking header field, thereby ensuring the normal operation of service requests that are not allowed to add custom header fields.

[0105] In some embodiments, Figure 4 As shown, the method also includes step S180.

[0106] S180: When the second response result returned by the server is access denial, determine that the reason why the service request information is denied access is not a reason for adding a tracking header field.

[0107] In an embodiment of the present application, when the server returns a first response result of access denial to the received target business request information (with the tracking header field added), and returns a second response result of access denial to the received business request information (without the tracking header field added), the system determines that the reason for the access denial is not due to the addition of the tracking header field that may have been taken before, but is based on the business request information itself or other factors, thereby helping the system to locate the problem more accurately and take corresponding processing measures.

[0108] Figure 5 This is a flowchart of another method for monitoring business requests provided in an embodiment of the present application.

[0109] In one example, if Figure 5 As shown, the method for monitoring a business request executed by a business request monitoring system may include steps S01 to S13.

[0110] S01, using a probe to intercept business request information and pull information from a first information base and a second information base.

[0111] The information in the second information database is information within the validity period. For example, the data in the second information database saves the information of the last 10 minutes (validity period) by default, and deletes the timed information.

[0112] It should be noted that the information of each entry combination in the second information database, in addition to the entry time and the second-category business request information, may also include detailed information such as the probe identifier and the error code returned by the server, so as to accurately record all the information each time the second-category business request information is entered into the second information database, thereby achieving a comprehensive and accurate record of each entry process of the second-category business request, and enhancing the system's audit capabilities and the accuracy of problem tracing.

[0113] S02, judging whether the service request information is in the first information base or the second information base. The probe intercepts the service request initiated by the user equipment and determines whether to add a custom header field according to the first information base and the second information base.

[0114] It should be noted that, when the service request information is in the first information base or the second information base, step S03 is executed. When the service request information is not in the first information base or the second information base, steps S04 to S13 are executed.

[0115] S03, sending service request information to the server.

[0116] S04: When the service request information is not in the first information base or the second information base, target service request information synthesized based on the service request information and a preset tracking header field is sent to the server.

[0117] S05: The server generates a first response result based on the target service request information.

[0118] S06: When the first response result is access denial, send service request information to the server.

[0119] For example, when the first response result returned by the probe interception server is 401 / 403 error, it sends business request information to the server.

[0120] S07, obtaining a second response result generated by the server based on the service request information.

[0121] It should be noted that when the second response result is access denied, step S08 is executed. When the second response result is access allowed, steps S09 to S13 are executed.

[0122] S08: When the second response result is access denial, determine that the reason why the service request information is denied access is not a reason for adding a tracking header field.

[0123] For example, if the first response result returned by the server is a 401 / 403 error, and the second response result is also a 401 / 403 error, it means that the cause of the error is not related to the probe adding a request header.

[0124] S09, when the second response result is that access is allowed, determine that the service request information is suspected unauthorized second-category service request information and enter it into the second information base, and record the entry time, so that the second information base includes information on the entry time and the entry combination of the second-category service request information.

[0125] S10, in the second information database, deleting the information of the entry combination whose entry time is not within the preset entry validity period.

[0126] S11, in the second information database, obtaining the number of entry combinations within the entry validity period corresponding to the same second-category service request information.

[0127] S12: When the number is greater than a preset number threshold, determine that the same second-category service request information is unauthorized first-category service request information and add it to the first information database.

[0128] S13, deleting the entry combination corresponding to the same second-category business request information from the second information database.

[0129] In the embodiment of the present application, authorized, unauthorized or suspected unauthorized business requests can be effectively distinguished by intelligently intercepting and analyzing business request information. When an authorized request is detected (not in the first information library and the second information library), the tracking header field is added for verification to obtain a first response result. If the first response result is access denied, the tracking header field is not added for verification again to obtain a second response result. If the second response result is access allowed, it is confirmed that it is caused by the tracking header field, and such requests are recorded in the second information library. Through continuous monitoring and evaluation, the suspected unauthorized requests that appear frequently in the second information library can be automatically upgraded to clear unauthorized requests and updated to the gray list (first information library). At the same time, the expired records in the second information library are cleaned up to optimize the information library management. There is no need to manually add the affected business request URL to the gray list, which can avoid affecting the normal business of the monitored application and reduce the pressure of system operation and maintenance.

[0130] In another example, the first information library (grey list) has a version number version. When the version number changes (such as version+1), if Figure 5 If the process is not completed, step S02 may be verified again to ensure that the information in the first information base compared with the service request information is the latest, thereby effectively preventing unauthorized service requests from being missed.

[0131] Based on the same inventive concept, the embodiment of the present application also provides a monitoring device for a service request, such as Figure 6 As shown, the apparatus 600 may include:

[0132] The acquisition module 610 is used to intercept the service request information by using a probe when the user equipment sends the service request information to the server;

[0133] A sending module 620 is configured to send target service request information to a server when neither the preset first information base nor the preset second information base includes the service request information, wherein the target service request information is synthesized based on the service request information and a preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information;

[0134] The sending module 620 is further configured to send service request information to the server when the first response result returned by the server is access denial, wherein the first response result is generated by the server based on the target service request information;

[0135] The entry module 630 is used to determine that the service request information is a second type of suspected unauthorized service request information and enter it into the second information base when the second response result returned by the server is that access is allowed, wherein the second response result is generated by the server based on the service request information.

[0136] According to the monitoring device for service requests provided in the embodiment of the present application, when a user device sends service request information to a server, a probe is used to intercept the service request information. Then, when the service request information is not included in a preset first information base (storing determined unauthorized first-category service request information) and a preset second information base (storing potentially suspected unauthorized second-category service request information), it is indicated that the service request information is neither unauthorized first-category nor suspected unauthorized second-category. Therefore, the target service request information can be synthesized based on the service request information and the preset tracking header field, and the target service request information is sent to the server. Next, when the first response result generated by the server based on the target service request information is access denied, service request information without the preset tracking header field is sent to the server. When the second response result generated by the server based on the service request information is access allowed, the service request information is determined to be suspected unauthorized second-category service request information and is entered into the second information base. In the embodiments of the present application, by setting up a first information database and a second information database, unauthorized and suspected unauthorized business request information can be accurately identified, and confirmed unauthorized requests and potentially suspected unauthorized requests can be accurately identified, so that requests that do not allow cross-domain custom header fields can be automatically identified and excluded, thereby avoiding adding preset tracking header fields to these inappropriate requests, thereby reducing request failures caused by server-side policies, and being able to accurately track the business request flow path while ensuring the normal operation of the business request.

[0137] In some embodiments, the service request information includes a uniform resource locator.

[0138] In some embodiments, the sending module is used to send the target service request information to the server when neither the preset first information library nor the preset second information library includes the service request information. The device also includes a generating module, a replacing module and a deleting module:

[0139] The acquisition module is further used to obtain the time when the second type of service request information is entered into the second information database;

[0140] A generating module, used for generating information of an entry combination of an entry time and the second type of service request information based on each entry time and its corresponding second type of service request information;

[0141] A replacement module, used to replace the second type of business request information in the second information database with the corresponding input combination information;

[0142] The deletion module is used to delete, in the second information database, information of the entry combination whose entry time is not within the preset entry validity period.

[0143] In some embodiments, the apparatus further comprises a determining module:

[0144] An acquisition module, used for acquiring, in the second information database, the number of entry combinations within the entry validity period corresponding to the same second-category business request information;

[0145] A determination module, configured to determine, when the number is greater than a preset number threshold, that the same second-category service request information is unauthorized first-category service request information and add it to the first information database;

[0146] The deletion module is used to delete the entry combination corresponding to the same second-category business request information from the second information database.

[0147] In some embodiments, the apparatus further comprises:

[0148] The sending module is further used to send the service request information to the server when the preset first information base or the preset second information base includes the service request information.

[0149] In some embodiments, the apparatus further comprises:

[0150] The determination module is further used to determine that the reason why the service request information is denied access is not a reason for adding a tracking header field when the second response result returned by the server is access denial.

[0151] Each module in the monitoring device for service requests provided in the embodiment of the present application can realize Figures 1 to 5The functions of each step of the provided business request monitoring method and the ability to achieve its corresponding technical effects are described briefly and will not be repeated here.

[0152] Figure 7 A schematic diagram of the hardware structure of a monitoring device for service requests provided in an embodiment of the present application is shown.

[0153] The service request monitoring device may include a processor 701 and a memory 702 storing computer program instructions.

[0154] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0155] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the monitoring device of the business request. In a particular embodiment, the memory 702 is a non-volatile solid-state memory.

[0156] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0157] The processor 701 implements any one of the service request monitoring methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .

[0158] In one example, the monitoring device for service requests may further include a communication interface 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.

[0159] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0160] Bus 704 includes hardware, software or both, and couples the components of the monitoring device of the business request to each other. For example, but not limitation, the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), Hyper Transport (HT) interconnection, Industry Standard Architecture (ISA) bus, InfiniBand interconnection, Linear Predictive Coding (LPC) bus, memory bus, MicroChannel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VESA Local Bus, VLB) bus or other suitable bus or two or more of these combinations. Where appropriate, bus 704 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0161] The device can execute the monitoring method of the service request in the embodiment of the present application based on each unit / component in the monitoring device of the service request, thereby realizing the combination of Figures 1 to 5 Describes the monitoring method for business requests.

[0162] In addition, in combination with the monitoring method of the service request in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the monitoring methods of the service request in the above embodiment is implemented.

[0163] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of an embodiment of a monitoring method for implementing any of the above-mentioned service requests.

[0164] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0165] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable Read Only Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0166] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0167] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0168] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for monitoring a service request, characterized in that: include: When the user equipment sends service request information to the server, intercepting the service request information by using a probe; In a case where neither the preset first information base nor the preset second information base includes the service request information, sending target service request information to the server, wherein the target service request information is synthesized based on the service request information and a preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information; When the first response result returned by the server is access denial, sending the service request information to the server, wherein the first response result is generated by the server based on the target service request information; When the second response result returned by the server is that access is allowed, the service request information is determined to be a second type of suspected unauthorized service request information and is entered into the second information base, wherein the second response result is generated by the server based on the service request information.

2. The method according to claim 1, characterized in that The service request information includes a uniform resource locator.

3. The method according to claim 1, characterized in that In the case that the service request information is not included in the preset first information base and the preset second information base, before sending the target service request information to the server, the method further includes: Obtaining the time at which the second type of service request information is entered into the second information database; Based on each of the entry moments and the corresponding second-category service request information, respectively, generating information of an entry combination of the entry moment and the second-category service request information; Replacing the second type of service request information in the second information database with the corresponding information of the input combination; In the second information database, the information of the entry combination whose entry time is not within the preset entry validity period is deleted.

4. The method according to claim 3, characterized in that Also includes: In the second information database, the number of the input combinations corresponding to the same second-category service request information within the input validity period is obtained; When the number is greater than a preset number threshold, determining that the same second-category service request information is unauthorized first-category service request information and adding it to the first information database; The entry combination corresponding to the same second-category service request information is deleted from the second information database.

5. The method according to claim 1, characterized in that Also includes: In a case where the service request information is included in the preset first information base or the preset second information base, the service request information is sent to the server.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: When the second response result returned by the server is access denial, it is determined that the reason why the service request information is denied access is a reason other than adding a tracking header field.

7. A monitoring device for service requests, characterized in that: include: An acquisition module, configured to intercept the service request information by using a probe when the user equipment sends the service request information to the server; a sending module, configured to send target service request information to the server when neither the preset first information base nor the preset second information base includes the service request information, wherein the target service request information is synthesized based on the service request information and a preset tracking header field, the first information base includes unauthorized first-category service request information, and the second information base includes suspected unauthorized second-category service request information; The sending module is further used to send the service request information to the server when the first response result returned by the server is access denial, wherein the first response result is generated by the server based on the target service request information; An entry module is used to determine that the service request information is a second type of suspected unauthorized service request information and enter it into the second information base when the second response result returned by the server is that access is allowed, wherein the second response result is generated by the server based on the service request information.

8. A monitoring device for service requests, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for monitoring the service request according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for monitoring service requests according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of a device, the device is enabled to execute the method for monitoring service requests as described in any one of claims 1 to 6.