Method, apparatus, storage medium and electronic device for controlling service access

By detecting the status of service nodes and intercepting and sending simulated access requests to determine the interception time threshold, the problem of low business access efficiency when service nodes are overloaded is solved, and efficient recovery of business access is achieved.

CN118250339BActive Publication Date: 2025-12-05INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410379992.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-12-05
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In existing technologies, when service nodes are overloaded, business access efficiency is low and recovery time cannot be accurately predicted, leading to increased system access pressure.

Method used

By detecting the status of service nodes, actual access requests are intercepted and simulated access requests are sent. The success rate is monitored to determine the interception time threshold, and then the actual access requests are restored.

Benefits of technology

This improves the efficiency of business access, ensuring that actual access requests can be restored in a timely manner when service nodes recover, thus avoiding system overload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118250339B_ABST
    Figure CN118250339B_ABST
Patent Text Reader

Abstract

The application discloses a control method and device for business access, a storage medium and an electronic device. It relates to the field of financial technology. The method comprises the following steps: detecting the service state of a service node, wherein the service state is used to indicate the access state of the access node to the business service; in the case that the service node is in an access overload state, intercepting an actual access request sent from the access node to the service node, and the access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously in the case that the service node is in the access overload state; detecting the access success rate of the simulated access request on the service node; determining the interception time threshold of the actual access request according to the access success rate; and intercepting the actual access request when the interception time of the actual access request reaches the interception time threshold. Through the application, the problem of low efficiency of business access in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and more specifically, to a method, apparatus, storage medium, and electronic device for controlling business access. Background Technology

[0002] Currently, when an access node experiences continuous timeouts or access errors reach a predetermined threshold, the system typically temporarily disconnects the current service resource and attempts to restore it after a certain period. In related technologies, a pre-set time for disconnecting the service resource is usually used, and the system attempts to restore it once the time is up. However, this approach fails to consider that in complex business scenarios, the actual recovery time may exceed the pre-set time. This puts more pressure on the system, leading to an inability to accurately predict service recovery time and resulting in unreasonable time settings, thus reducing the efficiency of business access.

[0003] There is currently no effective solution to the problem of low efficiency in business access in related technologies. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, storage medium, and electronic device for controlling business access, in order to solve the problem of low efficiency in business access in related technologies.

[0005] To achieve the above objectives, according to one aspect of this application, a method for controlling business access is provided. Applied to a target business system, the target business system is a system in which a service node provides business services to an access node. The access node is configured to request access to the business service by simultaneously sending an actual access request and a simulated access request to the service node. The service node is configured to allow feedback of the actual access result of the actual access request to the access node but prohibit feedback of the simulated access result of the simulated access request to the access node. The method includes:

[0006] Detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0007] If the service node is detected to be in an access overload state, the actual access request sent from the access node to the service node is intercepted. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to the failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0008] Detect the success rate of the simulated access request on the service node;

[0009] The interception time threshold for the actual access request is determined based on the access success rate;

[0010] If the interception time of the actual access request reaches the interception time threshold, the actual access request sent from the access node to the service node is resumed.

[0011] Optionally, determining the interception time threshold for the actual access request based on the access success rate includes: extracting N historical success rates from the database for the access node to access the business service on the service node through the actual access request, wherein the database is used to record the success rate of the access node to access the business service on the service node through the actual access request in each period, and the N historical success rates are the success rates of the access node to access the business service on the service node through the actual access request in the N periods before the service node is in the access overload state, where N is a positive integer greater than or equal to 1; determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and the N historical success rates; and determining the interception time threshold based on the recovery time.

[0012] Optionally, determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and N historical success rates includes: calculating the standard deviation between the access success rate and the N historical success rates; obtaining the moment when the target access success rate is detected as the recovery moment, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; and calculating the difference between the recovery moment and the overload moment when the service node is detected to be in the access overload state as the recovery time.

[0013] Optionally, obtaining the moment when the target access success rate is detected as the recovery moment includes: detecting whether the service node is in the access overload state for the first time; if the service node is not in the access overload state for the first time, detecting whether the time interval between the first time when the service node is currently in the access overload state and the second time when it was previously in the access overload state is less than or equal to an interval threshold; if the time interval between the first time and the second time is less than or equal to the interval threshold, determining the last access success rate among the M consecutively detected access success rates whose standard deviation is greater than 0 and less than 1 as the target access success rate; and determining the moment when the target access success rate is detected as the recovery moment.

[0014] Optionally, after detecting whether the service node is in the access overload state for the first time, the method further includes: if the service node is detected to be in the access overload state for the first time, or if the time interval between the first time and the second time is greater than the interval threshold, determining the moment when the standard deviation corresponding to the access success rate is first detected to be greater than 0 and less than 1 as the recovery moment.

[0015] Optionally, detecting the access success rate of the simulated access request on the service node includes: obtaining the number of times the access node requests to access the business service through the simulated access request, and the number of times the service node responds to the simulated access request; calculating the ratio between the number of requests and the number of responses to obtain the access success rate of the simulated access request on the service node.

[0016] Optionally, intercepting the actual access request sent from the access node to the service node includes: closing the link communication of the actual access link established between the access node and the service node, wherein the actual access link and the simulated access link are established between the access node and the service node, and the access node is configured to send the actual access request through the actual access link and the simulated access request through the simulated access link.

[0017] To achieve the above objectives, according to another aspect of this application, a control device for service access is provided. Applied to a target service system, the target service system is a system in which a service node provides service to an access node. The access node is configured to request access to the service by simultaneously sending an actual access request and a simulated access request to the service node. The service node is configured to allow feedback of the actual access result of the actual access request to the access node but prohibit feedback of the simulated access result of the simulated access request to the access node. The device includes:

[0018] The first detection module is used to detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0019] An interception module is used to intercept the actual access request sent from the access node to the service node when the service node is detected to be in an access overload state. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to a failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0020] The second detection module is used to detect the success rate of the simulated access request on the service node;

[0021] The first determining module is used to determine the interception time threshold of the actual access request based on the access success rate;

[0022] The recovery module is used to recover the actual access request sent from the access node to the service node when the interception time of the actual access request reaches the interception time threshold.

[0023] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0024] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0025] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0026] This application employs the following steps: detecting the service status of a service node, where the service status indicates the access status of the access node to the business service; when the service node is detected to be in an access overload state, intercepting actual access requests sent from the access node to the service node, where the access overload state indicates that the failure rate of the access node to access the business service is greater than or equal to a failure threshold, and the access node is allowed to continue sending both actual access requests and simulated access requests to the service node simultaneously while the service node is in an access overload state; detecting the success rate of simulated access requests on the service node; determining an interception time threshold for actual access requests based on the access success rate; and resuming actual access requests sent from the access node to the service node when the interception time for actual access requests reaches the interception time threshold. After intercepting actual access requests sent from the access node to the service node, the interception time threshold for actual access requests is determined based on the success rate of simulated access requests on the service node, thereby determining the time for resuming actual access requests sent from the access node to the service node. This ensures that resuming actual access requests can restore business operations, solving the problem of low efficiency in business access in related technologies. This ultimately improves the efficiency of business access. Attached Figure Description

[0027] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0028] Figure 1 This is a flowchart of a service access control method provided according to an embodiment of this application;

[0029] Figure 2 This is a schematic diagram of a method for determining an interception time threshold according to an embodiment of this application;

[0030] Figure 3 This is a schematic diagram of the control process for service access according to an embodiment of this application;

[0031] Figure 4 This is a schematic diagram of a control device for service access according to an embodiment of this application;

[0032] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) disclosed herein are information and data authorized by the user or fully authorized by all parties. For example, this system has interfaces with relevant users or organizations, providing users with corresponding operation entry points before obtaining relevant information, allowing users to choose to agree to or reject the automated decision results; if the user chooses to reject, the process proceeds to the expert decision-making process.

[0037] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a service access control method provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0038] Step S101: Detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0039] Step S102: When the service node is detected to be in an access overload state, the actual access request sent from the access node to the service node is intercepted. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to the failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0040] Step S103: Detect the success rate of the simulated access request on the service node;

[0041] Step S104: Determine the interception time threshold for the actual access request based on the access success rate;

[0042] Step S105: If the interception time of the actual access request reaches the interception time threshold, the actual access request sent from the access node to the service node is restored.

[0043] Optionally, in this embodiment, the target business system includes a service node and an access node. The service node is used to provide business services to the access node. The access node requests access to the business service by simultaneously sending an actual access request and a simulated access request to the service node. The service node can respond to the actual access request and provide feedback on the actual access result to the access node.

[0044] Optionally, in this embodiment, for simulated access requests, the service node may be set to allow responding to simulated access requests but not to provide feedback on the access results of the simulated access requests to the access node. Alternatively, the service node may be set to only allow receiving simulated access requests but not to respond to them.

[0045] In the technical solution provided in step S101 above, the service status of the service node can be determined based on the response of the access node to the service node, for example: when the access node experiences continuous access timeouts or access errors reach a predetermined threshold, the service node is determined to be in an access overload state.

[0046] Optionally, in this embodiment, the access node can, but is not limited to, send actual access requests and simulated access requests by establishing a communication link with the service node. For example, a single communication link can be established between the access node and the service node, and the single communication link can be used to send actual access requests and simulated access requests. Alternatively, two communication links can be established between the access node and the service node, respectively, for sending actual access requests and simulated access requests.

[0047] In the technical solution provided in step S102 above, intercepting the actual access request sent from the access node to the service node may include, but is not limited to: using a third-party node to receive the actual access request sent from the access node to the service node, thus preventing the actual access request from being sent to the service node. Alternatively, disconnecting the communication connection between the access node and the service node. Or, other methods may be used to block the sending of the actual access request.

[0048] Optionally, in this embodiment, during the process of intercepting the actual access request sent from the access node to the service node, the access node may, but is not limited to, continue to send the actual access request and the simulated access request to the service node simultaneously. However, the actual access request cannot be transmitted to the service node, while the simulated access request can be transmitted to the service node normally. However, the service node still does not provide feedback on the simulated access result of the simulated access request to the access node.

[0049] It is important to note that the fact that the service node does not return the simulated access request result to the access node does not mean that the service node cannot respond to the simulated access request. The simulated access request can be a request that is exactly the same as the actual access request. However, since the service node can provide business services to the access node by responding to a single request, the simulated access request can be set up so that when the service node receives the simulated access request, it can use the simulated access request to test whether it can respond, thereby enabling testing of the service node through the simulated access request.

[0050] In one exemplary embodiment, the actual access request sent from the access node to the service node may be intercepted in the following manner, but is not limited to: closing the link communication of the actual access link established between the access node and the service node, wherein the actual access link and the simulated access link are established between the access node and the service node, and the access node is configured to send the actual access request through the actual access link and the simulated access request through the simulated access link.

[0051] Optionally, in this embodiment, the access node may, but is not limited to, send actual access requests and simulated access requests respectively by establishing actual access links and simulated access links with the service node, and intercept the actual access requests sent from the access node to the service node by disconnecting the actual access links.

[0052] In the technical solution provided in step S103 above, the access success rate can be used, but is not limited to, to indicate the probability that a service node can respond to a simulated access request. For example, it can be used to obtain the number of times a simulated access request is sent by the access node and the number of times a simulated access request is received by the service node within a target time period, and calculate the ratio of the number of received requests to the number of sent requests as the access success rate. Alternatively, it can be used to obtain the number of times a simulated access request is received by the service node within a target time period and the number of times a service node can respond to a simulated access request, and calculate the ratio of the number of responses to the number of responses to the number of responses as the access success rate, etc.

[0053] In one exemplary embodiment, the access success rate of the simulated access request on the service node can be detected in the following manner, but is not limited to: obtaining the number of times the access node requests to access the business service through the simulated access request, and the number of times the service node responds to the simulated access request; calculating the ratio between the number of requests and the number of responses to obtain the access success rate of the simulated access request on the service node.

[0054] Optionally, in this embodiment, the number of times the access node requests access to the business service through simulated access requests may include, but is not limited to, the number of times the simulated access requests are invoked by the service node to request access to the business service through interface calls. The number of times the service node responds to the simulated access requests may include, but is not limited to, the number of times the service node attempts to execute the business service in response to the simulated access request calls.

[0055] In the technical solution provided in step S104 above, it is possible, but not limited to, to detect whether the access success rate has recovered to the success rate before the service node was in the access overload state, thereby determining the interception time threshold for restoring the actual access request sent from the access node to the service node.

[0056] In one exemplary embodiment, the interception time threshold for the actual access request can be determined based on the access success rate in the following manner, but is not limited to: extracting N historical success rates of the access node requesting access to the business service on the service node through the actual access request from a database, wherein the database is used to record the success rate of the access node requesting access to the business service on the service node through the actual access request in each period, and the N historical success rates are the success rates of the access node requesting access to the business service on the service node through the actual access request in the N periods before the service node is in the access overload state, where N is a positive integer greater than or equal to 1; determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and the N historical success rates; and determining the interception time threshold based on the recovery time.

[0057] Optionally, in this embodiment, the success rate of access nodes requesting business services on service nodes through actual access requests and simulated access requests can be calculated according to the target period and stored in the database. For example, transaction success rate data can be collected and stored in the database on a per-minute basis.

[0058] Optionally, in this embodiment, the success rate of the access node accessing the service node through actual access requests within N periods before the service node was in an access overload state can be obtained from the database as N historical success rates.

[0059] Optionally, in this embodiment, the access success rate can be continuously acquired, and the difference between the acquired access success rate and N historical success rates can be calculated. The difference between the access success rate and N historical success rates can be compared with a success rate threshold. If the access success rate gradually approaches the N historical success rates, it can be determined that the access success rate has recovered to the success rate threshold. The time when the access success rate gradually approaches the N historical success rates is determined as the recovery time.

[0060] In one exemplary embodiment, the recovery time for the access success rate to recover to a success rate threshold can be determined, but is not limited to, in the following manner based on the access success rate and N historical success rates: calculating the standard deviation between the access success rate and the N historical success rates; obtaining the moment when the target access success rate is detected as the recovery moment, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; and calculating the difference between the recovery moment and the overload moment when the service node is detected to be in the access overload state as the recovery time.

[0061] Optionally, in this embodiment, if the standard deviation is detected to be greater than 0 and less than 1, the access success rate is determined as the target access success rate, and the moment when the target access success rate is detected is determined as the recovery moment.

[0062] Optionally, in this embodiment, the time length between the overload moment when the service node is in an access overload state and the recovery moment is obtained is used as the recovery time.

[0063] In one exemplary embodiment, the moment when the target access success rate is detected can be obtained as the recovery moment in the following manner, but is not limited to: detecting whether the service node is in the access overload state for the first time; if the service node is not in the access overload state for the first time, detecting whether the time interval between the first time when the service node is currently in the access overload state and the second time when it was last in the access overload state is less than or equal to an interval threshold; if the time interval between the first time and the second time is less than or equal to the interval threshold, determining the last access success rate among the M consecutive times the standard deviation corresponding to the access success rate is greater than 0 and less than 1 as the target access success rate; and determining the moment when the target access success rate is detected as the recovery moment.

[0064] Optionally, in this embodiment, the interval threshold may be, but is not limited to, a preset value, or may be adaptively adjusted according to the operating status of the target business system.

[0065] In an exemplary embodiment, after detecting whether the service node is in the access overload state for the first time, the following operations may be performed, but are not limited to: if the service node is detected to be in the access overload state for the first time, or if the time interval between the first time and the second time is greater than the interval threshold, the moment when the standard deviation corresponding to the access success rate is first detected to be greater than 0 and less than 1 is determined as the recovery moment.

[0066] In one exemplary embodiment, an example of a method for determining an interception time threshold is provided. Figure 2 This is a schematic diagram of a method for determining an interception time threshold according to an embodiment of this application, as shown below. Figure 2 As shown, when the service node is detected to be in an overloaded state at time T5, the actual access request sent from the access node to the service node is intercepted, and the historical success rate of the access node requesting access to the business service on the service node at times T1, T2, T3, and T4 is extracted from the database.

[0067] You can set a cooldown period, for example, allowing the accessing node to wait for a certain time before sending a simulated access request to the service node. Alternatively, you can continue sending simulated access requests even if the service node is detected to be in an overloaded state at time T5.

[0068] Taking sending a simulated access request to the service node at time T6 as an example, the success rate of the simulated access request on the service node is continuously obtained.

[0069] Taking the example of the standard deviation between the success rate of the first detection at time Ta and the historical success rate being greater than 0 and less than 1, the interception time threshold is determined through the following operations:

[0070] Detect whether the service node is experiencing an overloaded state for the first time.

[0071] If a service node is detected to be in an access overload state for the first time, Ta is determined as the recovery time, and the interception time threshold is the time period (Ta-T5); and if a service node is detected to be in an access overload state for the first time, and the time interval between the service node's access overload state at time T5 and the service node's last access overload state is greater than the interval threshold, Ta is determined as the recovery time, and the interception time threshold is the time period (Ta-T5).

[0072] If a service node is not experiencing an access overload state for the first time, and the time interval between the time T5 when the service node is in an access overload state ...

[0073] In the technical solution provided in step S105 above, if the interception time of the actual access request reaches the interception time threshold, the access node may, but is not limited to, be allowed to send the actual access request to the service node. Alternatively, the actual access request sent from the access node to the service node can be restored by restoring the communication link between the access node and the service node.

[0074] Optionally, in this embodiment, in order to better understand the process of controlling the business access in the business access control method proposed in this application, the above process will be described in conjunction with optional embodiments below, but it is not intended to limit the technical solution of the embodiments of this application.

[0075] In an exemplary embodiment, an example of a control process for service access is provided. Figure 3 It is a schematic diagram of the control process for service access according to an embodiment of the present application. Taking the business service as a transaction and the access success rate as the transaction success rate as an example, the target business system includes a flow-limiting processing node, an information collection node, a database, a computing node, a service node, and an access node. The functions of each node are as follows: The flow-limiting processing node: Its main function is to provide a flow-limiting processing function when a transaction is abnormal; The information collection node: Its main function is to collect transaction success rate data information; The database: Responsible for storing the collected data; The computing node: Calculates the interception time threshold based on the collected transaction success rate data and notifies the flow-limiting processing node of the latest information. The target business system can control the service access between the service node and the access node in the following ways, but is not limited to:

[0076] The information collection node collects transaction success rate data every minute and stores it in the database. When it is monitored that the transaction has an abnormal timeout ratio, the flow-limiting processing node implements relevant fusing measures. Taking the moment when the transaction abnormality triggers fusing as the demarcation point, query the transaction success rate values of the four nodes in the real transaction link before the demarcation point in the database and define them as X1, X2, X3, X4, and query the transaction success rate value in the simulated transaction link after the demarcation point in the database and define it as X (4+u1+s) (4+u) (4+u)

[0079]

[0078]

[0077] (u is a natural number greater than 1), compare the transaction success rates at the four normal transaction time points with the success rate of the simulated transaction collected after the abnormal demarcation point. The comparison is carried out one by one by calculating the standard deviation Q of the data of X1, X2, X3, X4, and X (4+u) until the success rate collected after the abnormality returns to the previous level, then it is considered that the service has recovered, that is, when 0 < Q < 1.

[0077] When the value of Q first appears as Q < 1, then (u - 1) at this time is assigned to the interception time threshold, triggering the flow-limiting node to recover the service.

[0078] If a fusing phenomenon occurs again within a short period of time, then the next 15 minutes is defined as a sensitive period. During the sensitive period, the service is allowed to be accessed again only after it has recovered normally continuously twice, that is, starting from the time when the service node is in the access overload state again, the two points where Q < 1 are satisfied continuously are X (4+u1+s) (s is a natural number greater than 1), then s is the interception time threshold after the second access overload state.

[0079] This application introduces a method for flexibly adjusting the interception time threshold. The interception time threshold is not a fixed value, but a flexible value that can be automatically adjusted according to the system's transaction status. After the system implements interception based on the set service anomaly ratio threshold, the current service status of the system is judged based on the application system's transaction success rate index. When it is detected that the service has returned to normal, the service recovery time is the interception time threshold, and then the service interception ends, restoring the system's service capability.

[0080] The service access control method provided in this application detects the service status of a service node, where the service status indicates the access status of the access node to the service. When the service node is detected to be in an access overload state, the method intercepts actual access requests sent from the access node to the service node. The access overload state indicates that the failure rate of the access node to access the service is greater than or equal to a failure threshold. The access node is allowed to continue sending both actual and simulated access requests to the service node simultaneously even when the service node is in an access overload state. The method detects the success rate of simulated access requests on the service node. Based on the success rate, it determines a threshold for intercepting actual access requests. If the interception time for actual access requests reaches the threshold, the method resumes the transmission of actual access requests from the access node to the service node. By intercepting actual access requests from the access node to the service node and determining the threshold for intercepting actual access requests based on the success rate of simulated access requests on the service node, the method determines the time to resume actual access requests from the access node to the service node, ensuring that the resumption of actual access requests allows for the resumption of service, thus solving the problem of low efficiency in service access in related technologies. This ultimately improves the efficiency of service access.

[0081] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0082] This application also provides a service access control device applied to a target service system. The target service system is a system where a service node provides service to an access node. The access node is configured to request access to the service by simultaneously sending an actual access request and a simulated access request to the service node. The service node is configured to allow feedback of the actual access result of the actual access request to the access node, but prohibit feedback of the simulated access result of the simulated access request to the access node. It should be noted that the service access control device of this application embodiment can be used to execute the service access control method provided in this application embodiment. The following describes the service access control device provided in this application embodiment.

[0083] Figure 4 This is a schematic diagram of a control device for service access according to an embodiment of this application. Figure 4 As shown, the device includes:

[0084] The first detection module 41 is used to detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0085] The interception module 42 is used to intercept the actual access request sent from the access node to the service node when the service node is detected to be in an access overload state. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to the failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0086] The second detection module 43 is used to detect the success rate of the simulated access request on the service node;

[0087] The first determining module 44 is used to determine the interception time threshold of the actual access request based on the access success rate;

[0088] The recovery module 45 is used to recover the actual access request sent from the access node to the service node when the interception time of the actual access request reaches the interception time threshold.

[0089] Optionally, in the service access control device provided in the embodiments of this application, the first determining module includes:

[0090] An extraction unit is used to extract N historical success rates from the database for the access node to access the business service on the service node through the actual access request. The database is used to record the success rate of the access node to access the business service on the service node through the actual access request in each period. The N historical success rates are the success rates of the access node to access the business service on the service node through the actual access request in the N periods before the service node is in the access overload state. N is a positive integer greater than or equal to 1.

[0091] The first determining unit is used to determine the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and N historical success rates;

[0092] The second determining unit is used to determine the interception time threshold based on the recovery time.

[0093] Optionally, in the service access control device provided in this application embodiment, the first determining unit is configured to: calculate the standard deviation between the access success rate and N historical success rates; obtain the time when the target access success rate is detected as the recovery time, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; and calculate the difference between the recovery time and the overload time when the service node is detected to be in the access overload state as the recovery time.

[0094] Optionally, in the service access control device provided in this application embodiment, the first determining unit is further configured to: detect whether the service node is in the access overload state for the first time; if the service node is not in the access overload state for the first time, detect whether the time interval between the first time when the service node is currently in the access overload state and the second time when it was last in the access overload state is less than or equal to an interval threshold; if the time interval between the first time and the second time is less than or equal to the interval threshold, determine the last access success rate among the M consecutive access success rates corresponding to the standard deviation being greater than 0 and less than 1 as the target access success rate; and determine the time when the target access success rate is detected as the recovery time.

[0095] Optionally, in the service access control device provided in the embodiments of this application, the device further includes:

[0096] The second determining module is used to determine the recovery time when the service node is first detected to be in the access overload state, or when the time interval between the first time and the second time is greater than the interval threshold, the time when the standard deviation corresponding to the first detection of the access success rate is greater than 0 and less than 1.

[0097] Optionally, in the service access control device provided in the embodiments of this application, the second detection module includes:

[0098] The acquisition unit is used to acquire the number of times the access node requests to access the business service through the simulated access request, and the number of times the service node responds to the simulated access request;

[0099] The calculation unit is used to calculate the ratio between the number of requests and the number of responses to obtain the access success rate of the simulated access request on the service node.

[0100] Optionally, in the service access control device provided in this application embodiment, the interception module includes:

[0101] The shutdown unit is used to shut down the link communication of the actual access link established between the access node and the service node, wherein the actual access link and the simulated access link are established between the access node and the service node, and the access node is configured to send the actual access request through the actual access link and the simulated access request through the simulated access link.

[0102] The service access control device provided in this application embodiment detects the service status of a service node, where the service status indicates the access status of the access node to the service. When the service node is detected to be in an access overload state, the device intercepts actual access requests sent from the access node to the service node. The access overload state indicates that the failure rate of the access node to access the service is greater than or equal to a failure threshold. The access node is allowed to continue sending both actual and simulated access requests to the service node simultaneously while the service node is in an access overload state. The device detects the success rate of simulated access requests on the service node. Based on the success rate, it determines a threshold for intercepting actual access requests. If the interception time for actual access requests reaches the threshold, the device resumes sending actual access requests from the access node to the service node. After intercepting actual access requests from the access node to the service node, the device determines the threshold for intercepting actual access requests based on the success rate of simulated access requests on the service node, thereby determining the time to resume sending actual access requests from the access node to the service node. This ensures that resuming actual access requests allows for the resumption of service, solving the problem of low efficiency in service access in related technologies. This ultimately improves the efficiency of service access.

[0103] The control device for accessing services includes a processor and a memory. The aforementioned modules and units are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to implement the corresponding functions.

[0104] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and the efficiency of business access can be improved by adjusting kernel parameters.

[0105] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0106] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a control method for accessing the service.

[0107] This invention provides a processor for running a program, wherein the program executes the control method for accessing the service during runtime.

[0108] like Figure 5 As shown, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps:

[0109] Detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0110] If the service node is detected to be in an access overload state, the actual access request sent from the access node to the service node is intercepted. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to the failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0111] Detect the success rate of the simulated access request on the service node;

[0112] The interception time threshold for the actual access request is determined based on the access success rate;

[0113] If the interception time of the actual access request reaches the interception time threshold, the actual access request sent from the access node to the service node is resumed.

[0114] Optionally, determining the interception time threshold for the actual access request based on the access success rate includes: extracting N historical success rates from the database for the access node to access the business service on the service node through the actual access request, wherein the database is used to record the success rate of the access node to access the business service on the service node through the actual access request in each period, and the N historical success rates are the success rates of the access node to access the business service on the service node through the actual access request in the N periods before the service node is in the access overload state, where N is a positive integer greater than or equal to 1; determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and the N historical success rates; and determining the interception time threshold based on the recovery time.

[0115] Optionally, determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and N historical success rates includes: calculating the standard deviation between the access success rate and the N historical success rates; obtaining the moment when the target access success rate is detected as the recovery moment, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; and calculating the difference between the recovery moment and the overload moment when the service node is detected to be in the access overload state as the recovery time.

[0116] Optionally, obtaining the moment when the target access success rate is detected as the recovery moment includes: detecting whether the service node is in the access overload state for the first time; if the service node is not in the access overload state for the first time, detecting whether the time interval between the first time when the service node is currently in the access overload state and the second time when it was previously in the access overload state is less than or equal to an interval threshold; if the time interval between the first time and the second time is less than or equal to the interval threshold, determining the last access success rate among the M consecutively detected access success rates whose standard deviation is greater than 0 and less than 1 as the target access success rate; and determining the moment when the target access success rate is detected as the recovery moment.

[0117] Optionally, after detecting whether the service node is in the access overload state for the first time, the method further includes: if the service node is detected to be in the access overload state for the first time, or if the time interval between the first time and the second time is greater than the interval threshold, determining the moment when the standard deviation corresponding to the access success rate is first detected to be greater than 0 and less than 1 as the recovery moment.

[0118] Optionally, detecting the access success rate of the simulated access request on the service node includes: obtaining the number of times the access node requests to access the business service through the simulated access request, and the number of times the service node responds to the simulated access request; calculating the ratio between the number of requests and the number of responses to obtain the access success rate of the simulated access request on the service node.

[0119] Optionally, intercepting the actual access request sent from the access node to the service node includes: closing the link communication of the actual access link established between the access node and the service node, wherein the actual access link and the simulated access link are established between the access node and the service node, and the access node is configured to send the actual access request through the actual access link and the simulated access request through the simulated access link.

[0120] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0121] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps:

[0122] Detect the service status of the service node, wherein the service status is used to indicate the access status of the access node to the business service;

[0123] If the service node is detected to be in an access overload state, the actual access request sent from the access node to the service node is intercepted. The access overload state is used to indicate that the failure rate of the access node to access the business service is greater than or equal to the failure threshold. The access node is allowed to continue to send the actual access request and the simulated access request to the service node simultaneously when the service node is in the access overload state.

[0124] Detect the success rate of the simulated access request on the service node;

[0125] The interception time threshold for the actual access request is determined based on the access success rate;

[0126] If the interception time of the actual access request reaches the interception time threshold, the actual access request sent from the access node to the service node is resumed.

[0127] Optionally, determining the interception time threshold for the actual access request based on the access success rate includes: extracting N historical success rates from the database for the access node to access the business service on the service node through the actual access request, wherein the database is used to record the success rate of the access node to access the business service on the service node through the actual access request in each period, and the N historical success rates are the success rates of the access node to access the business service on the service node through the actual access request in the N periods before the service node is in the access overload state, where N is a positive integer greater than or equal to 1; determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and the N historical success rates; and determining the interception time threshold based on the recovery time.

[0128] Optionally, determining the recovery time for the access success rate to recover to the success rate threshold based on the access success rate and N historical success rates includes: calculating the standard deviation between the access success rate and the N historical success rates; obtaining the moment when the target access success rate is detected as the recovery moment, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; and calculating the difference between the recovery moment and the overload moment when the service node is detected to be in the access overload state as the recovery time.

[0129] Optionally, obtaining the moment when the target access success rate is detected as the recovery moment includes: detecting whether the service node is in the access overload state for the first time; if the service node is not in the access overload state for the first time, detecting whether the time interval between the first time when the service node is currently in the access overload state and the second time when it was previously in the access overload state is less than or equal to an interval threshold; if the time interval between the first time and the second time is less than or equal to the interval threshold, determining the last access success rate among the M consecutively detected access success rates whose standard deviation is greater than 0 and less than 1 as the target access success rate; and determining the moment when the target access success rate is detected as the recovery moment.

[0130] Optionally, after detecting whether the service node is in the access overload state for the first time, the method further includes: if the service node is detected to be in the access overload state for the first time, or if the time interval between the first time and the second time is greater than the interval threshold, determining the moment when the standard deviation corresponding to the access success rate is first detected to be greater than 0 and less than 1 as the recovery moment.

[0131] Optionally, detecting the access success rate of the simulated access request on the service node includes: obtaining the number of times the access node requests to access the business service through the simulated access request, and the number of times the service node responds to the simulated access request; calculating the ratio between the number of requests and the number of responses to obtain the access success rate of the simulated access request on the service node.

[0132] Optionally, intercepting the actual access request sent from the access node to the service node includes: closing the link communication of the actual access link established between the access node and the service node, wherein the actual access link and the simulated access link are established between the access node and the service node, and the access node is configured to send the actual access request through the actual access link and the simulated access request through the simulated access link.

[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0136] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0137] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0138] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0139] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0140] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A control method of service access, characterized by, The method is applied to a target service system, the target service system is a system in which a service node provides a service to an access node, the access node is configured to request access to the service by simultaneously sending an actual access request and a simulation access request to the service node, the service node is configured to allow the access node to be fed back an actual access result of the actual access request but prohibit the access node to be fed back a simulation access result of the simulation access request, and the method comprises: detecting a service state of the service node, wherein the service state is used to indicate an access situation of the access node to the service; in a case where it is detected that the service node is in an access overload state, intercepting the actual access request sent from the access node to the service node, wherein the access overload state is used to indicate that a failure rate of the access node to access the service is greater than or equal to a failure threshold, and the access node is allowed to continue to simultaneously send the actual access request and the simulation access request to the service node in a case where the service node is in the access overload state; detecting an access success rate of the simulation access request on the service node; determining an interception time threshold of the actual access request according to the access success rate; in a case where an interception time of the actual access request reaches the interception time threshold, resuming the actual access request sent from the access node to the service node.

2. The method of claim 1, wherein, The determining of the interception time threshold of the actual access request according to the access success rate comprises: extracting N historical success rates of the access node to access the service on the service node through the actual access request from a database, wherein the database is used to record a success rate of the access node to access the service on the service node through the actual access request in each period, the N historical success rates are success rates of the access node to access the service on the service node through the actual access request in N periods before the service node is in the access overload state, and N is a positive integer greater than or equal to 1; determining a recovery time in which the access success rate recovers to a success rate threshold according to the access success rate and the N historical success rates; determining the interception time threshold according to the recovery time.

3. The method of claim 2, wherein, The determining of the recovery time in which the access success rate recovers to the success rate threshold according to the access success rate and the N historical success rates comprises: calculating a standard deviation between the access success rate and the N historical success rates; acquiring a moment of detecting a target access success rate as a recovery moment, wherein the standard deviation corresponding to the target access success rate is greater than 0 and less than 1; calculating a difference between the recovery moment and an overload moment of detecting that the service node is in the access overload state as the recovery time.

4. The method of claim 3, wherein, The acquiring of the moment of detecting the target access success rate as the recovery moment comprises: detecting whether the service node is in the access overload state for the first time; in a case that the service node is detected to be in the access overload state for the first time, detecting whether a time interval between a first time when the service node is currently in the access overload state and a second time when the service node is last in the access overload state is less than or equal to an interval threshold value; in a case that the time interval between the first time and the second time is less than or equal to the interval threshold value, determining a last time when the access success rate corresponding to the standard deviation greater than 0 and less than 1 is continuously detected M times as the target access success rate; determining a time when the target access success rate is detected as the recovery time.

5. The method of claim 4, wherein, after detecting whether the service node is in the access overload state for the first time, the method further comprises: in a case that the service node is detected to be in the access overload state for the first time, or the time interval between the first time and the second time is greater than the interval threshold value, determining a time when the access success rate corresponding to the standard deviation greater than 0 and less than 1 is detected for the first time as the recovery time.

6. The method of claim 1, wherein, the detecting the access success rate of the simulation access request on the service node comprises: obtaining a request number of the access node requesting to access the service through the simulation access request, and a response number of the service node responding to the simulation access request; calculating a ratio between the request number and the response number to obtain the access success rate of the simulation access request on the service node.

7. The method of claim 1, wherein, the intercepting the actual access request sent from the access node to the service node comprises: closing link communication of an actual access link established between the access node and the service node, wherein the access node and the service node establish the actual access link and a simulation access link, and the access node is configured to send the actual access request through the actual access link and send the simulation access request through the simulation access link.

8. An apparatus for controlling access to a service, characterized by applied to a target service system, the target service system is a system in which a service node provides a service to an access node, the access node is configured to request to access the service by simultaneously sending an actual access request and a simulation access request to the service node, and the service node is configured to allow an actual access result of the actual access request to be fed back to the access node but prohibit a simulation access result of the simulation access request to be fed back to the access node, the device comprises: a first detection module configured to detect a service state of the service node, wherein the service state is used to indicate an access situation of the access node to the service; intercepting the actual access request sent from the access node to the service node in a case that the service node is in an access overload state, wherein the access overload state is used to indicate that a failure rate of the access node accessing the service is greater than or equal to a failure threshold, and the access node is allowed to continue to send the actual access request and the simulation access request to the service node simultaneously in a case that the service node is in the access overload state; a second detection module, configured to detect an access success rate of the simulation access request on the service node; a first determination module, configured to determine an interception time threshold of the actual access request according to the access success rate; a recovery module, configured to recover the actual access request sent from the access node to the service node in a case that an interception time of the actual access request reaches the interception time threshold.

9. A processor, comprising: The processor is configured to run a program, and the program performs the method in any one of claims 1 to 7 when the program is run.

10. An electronic device, comprising: The apparatus comprises one or more processors and a memory, and the memory is configured to store one or more programs, and the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Application testing method, system and equipment and computer readable storage medium

    CN109656826A

  • Business risk control system processing method, device and system and storage medium

    CN111031000A