Cut-flow control method, device and equipment under high concurrency and storage medium
By configuring flow-switching switches and control parameters in the banking system, concurrent request traffic is monitored and diverted to other services, thus solving the performance bottleneck problem of the banking system under high concurrency and improving traffic processing efficiency and business response capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-06-13
- Publication Date
- 2026-06-05
AI Technical Summary
Banking systems are prone to performance bottlenecks, resource contention, and uneven business requests under high concurrency, leading to slow response times or system crashes. Current rate limiting methods require modification of source code or configuration files, which is inefficient.
By monitoring concurrent request traffic and utilizing pre-configured flow-switching switches and control parameters, some request traffic can be diverted to other services within the banking system, avoiding the need to modify source code and configuration files.
It achieves flow control without modifying source code and configuration files under high concurrency, improving the efficiency of business traffic processing and enabling fine-grained traffic management.
Smart Images

Figure CN116743659B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer application technology, and in particular to a multi-service high-concurrency flow control method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] As a crucial component of the financial industry, the security and stability of banking systems are of paramount importance. However, with the increasing number of customers and transaction volumes, and the parallel operation of both new and old systems on the mainframe of a banking system, many back-end systems need to support a large number of high-concurrency requests. The system may encounter the following problems: when the request volume increases, performance bottlenecks, resource contention, and uneven distribution of business requests may occur, leading to slower or unresponsive systems, or even system crashes.
[0003] In existing technical solutions, a threshold is set to monitor whether the data traffic of user requests exceeds the threshold, thereby increasing the number of sub-threads to process user requests; or the traffic exceeding the load is stored and processed later.
[0004] However, existing rate limiting solutions require modifications to source code or configuration files, resulting in low efficiency in processing business traffic. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for controlling high-concurrency multi-service switching flow that can avoid modifying source code or configuration files and improve the efficiency of business traffic processing, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a multi-service high-concurrency flow control method. The method includes:
[0007] Monitor real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0008] If the real-time concurrent request traffic exceeds the concurrency limit of the target service, determine the flow-switching switch for the target service and the control parameters for the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system.
[0009] In one embodiment, any request traffic in the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier; the step of diverting a portion of the request traffic in the real-time concurrent request traffic to other services under the banking system based on the diversion switch and the control parameters includes:
[0010] From the real-time concurrent request traffic, determine the target request corresponding to the request information and the control parameters of the flow switching switch, and flow the target request traffic to other services under the banking system;
[0011] In one embodiment, the banking system includes at least two levels of service, and the flow switching switches corresponding to different service levels have different control parameters;
[0012] The target requests that correspond to the request information and the control parameters of the flow cutter switch, determined from the real-time concurrent request traffic, include:
[0013] When the target service is a first-level service, the target request corresponding to the request information and the first-level control parameters is determined from the real-time concurrent request traffic. The first-level control parameters are at least one of the following: region parameters, branch parameters, and outlet parameters.
[0014] When the target service is a second-level service, the target request corresponding to the request information and the second-level control parameters is determined from the real-time concurrent request traffic. The second-level control parameters are service dimension parameters.
[0015] The first-level service is of a higher level than the second-level service.
[0016] In one embodiment, the method further includes:
[0017] For each target service under the aforementioned banking system, determine the level of the target service;
[0018] Based on the level, configure the flow switching switch corresponding to the target service, and configure the first-level control parameters or the second-level control parameters corresponding to the flow switching switch.
[0019] In one embodiment, before diverting a portion of the real-time concurrent request traffic to other services under the banking system when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, the method further includes:
[0020] Based on the difference between the real-time concurrent request traffic and the concurrency limit corresponding to the target service, determine the specific proportion of traffic that will be diverted from the real-time concurrent request traffic to other services under the banking system.
[0021] In one embodiment, after diverting a portion of the real-time concurrent request traffic to other services under the banking system, the method further includes:
[0022] Monitor the changes in real-time concurrent request traffic of the target service;
[0023] If the real-time concurrent request traffic of the target service is detected to drop below the corresponding concurrent limit of the target service, the concurrent request traffic that was diverted to other services will be diverted back to the target service for processing.
[0024] In one embodiment, the method further includes:
[0025] Obtain historical concurrent request traffic data for each service under the aforementioned banking system;
[0026] Based on the historical concurrent request traffic data, identify the target service from multiple services whose overload count exceeds the target count, and configure corresponding concurrency limits and flow switching switches for it.
[0027] Secondly, this application also provides a multi-service high-concurrency flow control device. The device includes:
[0028] The monitoring module is used to monitor the real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0029] The flow-switching module is used to determine the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service. Based on the flow-switching switch and the control parameters, the portion of the concurrent request traffic of the target service that exceeds its corresponding concurrency limit is diverted to other services under the banking system.
[0030] In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters.
[0031] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0032] Monitor real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0033] If the real-time concurrent request traffic exceeds the concurrency limit of the target service, determine the flow-switching switch for the target service and the control parameters for the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system.
[0034] In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters.
[0035] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0036] Monitor real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0037] If the real-time concurrent request traffic exceeds the concurrency limit of the target service, determine the flow-switching switch for the target service and the control parameters for the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system.
[0038] In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters.
[0039] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0040] Monitor real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0041] If the real-time concurrent request traffic exceeds the concurrency limit of the target service, determine the flow-switching switch for the target service and the control parameters for the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system.
[0042] In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters.
[0043] The aforementioned high-concurrency flow control method, apparatus, computer equipment, storage medium, and computer program products pre-configure corresponding control parameters, concurrency limits, and flow-switching switches for target services within the banking system. By monitoring the concurrent request traffic data of the target services within the banking system in real time, if the real-time concurrent request traffic exceeds the preset concurrency limit, a portion of the real-time concurrent request traffic is diverted to other services within the banking system using the corresponding flow-switching switch and the control parameters. This achieves flow control under high concurrency across multiple services without modifying the original source code and configuration files of the banking system, thereby improving the processing efficiency of business traffic. Attached Figure Description
[0044] Figure 1 This is a diagram illustrating the application environment of a high-concurrency flow control method in one embodiment.
[0045] Figure 2 This is a flowchart illustrating a high-concurrency flow control method in one embodiment;
[0046] Figure 3 This is a flowchart illustrating the flow control steps in one embodiment;
[0047] Figure 4 This is a flowchart illustrating a high-concurrency flow control method for a banking system in another embodiment;
[0048] Figure 5 This is a structural block diagram of a high-concurrency flow control device in one embodiment;
[0049] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] This application provides a high-concurrency flow control method for down-cutting, which can be applied to, for example... Figure 1The application environment shown includes a terminal 102 and a banking system. The banking system includes multiple services 106 for responding to banking transaction traffic, multiple flow-switching switches 104, and may also include a flow control service. The terminal 102 can send request traffic to each service 106 within the banking system. The flow control service monitors the concurrent request traffic of a target service in real time. When the concurrent request traffic exceeds the concurrency limit of the target service, it uses the flow-switching switch 104 corresponding to the target service and its corresponding control parameters to divert at least a portion of the concurrent request traffic to other services within the banking system. The terminal 102 can be, but is not limited to, various personal computers, mobile phones, and laptops. The flow-switching switches 104 can be implemented via software, hardware + software, or hardware. The services 106 and the flow control service within the banking system can be implemented using independent servers or multiple server clusters.
[0052] In one embodiment, such as Figure 2 As shown, a high-concurrency flow control method is provided. Taking the application of this method to the flow control service in a banking system as an example, the method includes the following steps:
[0053] Step S202: Monitor the real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system.
[0054] Among them, the target service is the service under the banking system used to respond to request traffic related to banking business; the traffic can be request traffic from multiple users under the banking system; concurrent request traffic refers to the request traffic from multiple users that the various services of the banking system need to respond to within a short period of time.
[0055] Optionally, for one or more target services within the banking system, a traffic monitoring system can be used to monitor the real-time concurrent request traffic targeting the target service. The monitoring can take the form of periodic monitoring at set intervals or intensive real-time monitoring to obtain concurrent request traffic data on the target service load. 。
[0056] Step S204: If the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, determine the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system.
[0057] The flow-cutting switch is used to control the flow-cutting of concurrent request traffic for a service. The control parameters corresponding to the flow-cutting switch can be pre-configured. The control parameters are used to match the traffic that needs to be cut from the current concurrent request traffic of the target service. Specifically, the control parameters can include region identifier, branch identifier, outlet identifier, service dimension identifier, etc. Thus, the traffic carrying the corresponding region identifier, branch identifier, outlet identifier, or service dimension identifier can be matched from the current concurrent request traffic of the target service as the traffic that needs to be cut. At least part of the traffic can include the part of the traffic that exceeds the concurrency limit, or a part of the traffic determined from the real-time concurrent request traffic according to other proportions.
[0058] Optionally, there can be multiple target services within the banking system, and multiple corresponding flow-switching switches. Different flow-switching switches are configured with different control parameters. The system determines the flow-switching switch corresponding to the target service and reads the control parameters of that switch. When the system detects overload of concurrent request traffic to the target service, it matches the request information carried in the concurrent request traffic with the control parameters of the flow-switching switch. This redirects a portion of the request traffic from the target service to other services within the banking system.
[0059] In the aforementioned high-concurrency flow control method, a concurrency limit and flow-switching switch are pre-configured for the target service, corresponding control parameters. By monitoring the concurrent request traffic data of the target service under the banking system in real time, if the real-time concurrent request traffic exceeds the concurrency limit, a portion of the real-time concurrent request traffic is diverted to other services under the banking system by matching the request information carried in the concurrent request traffic with the control parameters of the corresponding flow-switching switch. This avoids modifying the source code and configuration files of the services responding to banking business-related requests under the banking system, completing flow control under high concurrency of multiple services under the banking system, and improving the processing efficiency of business traffic.
[0060] In one embodiment, any request traffic in the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier. Correspondingly, in the case where the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, step S204 determines the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch. Based on the flow-switching switch and the control parameters, a portion of the request traffic in the real-time concurrent request traffic is diverted to other services under the banking system, including:
[0061] From the real-time concurrent request traffic, the target request corresponding to the request information in the request traffic and the control parameters of the flow-cutting switch is determined, and the target request traffic is flow-cut to other services under the banking system. The other services are services different from the target service that have the ability to respond to the target request traffic, and the target request traffic is request traffic carrying parameters that match the control parameters of the flow-cutting switch corresponding to the target service.
[0062] For example, when the control parameter of the flow cutter is set to region, the request information carried by the target request traffic must also be a region identifier to complete the match. Then, the flow cutter will cut the matching traffic to other regional services under the banking system.
[0063] In this embodiment, by matching the request information carried in the concurrent request traffic with the flow-cutting switch control parameters, it is possible to effectively filter out at least a portion of the target request traffic that needs to be cut. Furthermore, since different switches have different control parameters, flow-cutting control can be flexibly implemented.
[0064] In one embodiment, the banking system includes at least two levels of services; the flow-cutting switches for different service levels have different control parameters; the first-level service has a higher priority than the second-level service. For example, the first-level service can be understood as the service handled by the provincial branch, and the second-level service is the service handled by the municipal branch. Alternatively, the first-level service can be understood as the service that the flow-cutting switch needs to respond to first, and the second-level service has a lower priority than the first-level service.
[0065] Correspondingly, the above-mentioned determination of the target request corresponding to the request traffic and the control parameters of the flow-cutting switch, and the flow-cutting of the target request traffic to other services under the banking system includes:
[0066] Step 1: If the target service is a Level 1 service, determine the target request corresponding to the request information and the Level 1 control parameters from the real-time concurrent request traffic. The Level 1 control parameters are the control parameters of the flow-cutting switch corresponding to the Level 1 service, and can be at least one of the following: region parameters, branch parameters, outlet parameters, or business department parameters.
[0067] Optionally, if the banking system confirms that the target service is a first-level service, it can determine the target request traffic from the real-time concurrent request traffic of the target service load according to the range of the location information from which the request traffic originates, and then match the target request traffic carrying information with the control parameters of the corresponding flow-cutting switch. For example, the flow-cutting switch first cuts traffic according to administrative region. If the concurrent request traffic of the first-level target service still exceeds the concurrency limit, it then cuts traffic according to branch. If the concurrent request traffic of the first-level target service still exceeds the concurrency limit, it then cuts traffic according to outlet. Understandably, depending on actual needs, the flow-cutting process can also be carried out in the order of outlet, branch, and administrative region.
[0068] Step 2: If the target service is a second-level service, determine the target request corresponding to the request information and the second-level control parameters from the real-time concurrent request traffic. The second-level control parameters are service dimension parameters.
[0069] Among them, the second-level control parameters are the control parameters of the flow switching switch corresponding to the second-level service. These can be service dimension parameters of the bank, such as service name, service type, service priority, etc.
[0070] Optionally, if the banking system confirms that the target service is a second-level service, it determines the target request traffic from the real-time concurrent request traffic of the target service load that matches the request information carried by the service load request traffic with the control parameters of the corresponding flow-switching switch. For example, if the second-level control parameter is a service name, a match can be completed only if the request information carried by the request traffic also has the same service name; if the second-level control parameter is a service type, a match can be completed only if the request information carried by the request traffic also has the same service type; and if the second-level control parameter is a service priority, a match can be completed only if the request information carried by the request traffic also has the same service priority.
[0071] In this embodiment, by classifying each service and its corresponding flow control parameters, different levels of services have different flow control standards, thereby achieving fine-grained management and improving the speed of business deployment and work efficiency.
[0072] In one embodiment, before determining the target request corresponding to the first-level control parameters from the real-time concurrent request traffic when the target service is a first-level service, the method further includes:
[0073] Step 1: For each target service under the banking system, determine the level of the target service. The level of the target service can be Level 1, Level 2, etc., or different level standards can be defined according to actual needs.
[0074] Optionally, the flow control service under the banking system determines the level of the target service that requires flow control under the banking system as Level 1, Level 2, etc., with Level 1 service being of a higher level than Level 2 service. For example, Level 1 service is the core business processed by the regional head office, while Level 2 service is credit management in the banking service dimension.
[0075] Step 2: Based on the level, configure the flow switching switch corresponding to the target service, and configure the first-level control parameter or the second-level control parameter corresponding to the flow switching switch.
[0076] The configuration control parameters can be written in Java. The first-level control parameters can be region parameters, branch parameters, and outlet parameters, which are defined as zones. The second-level control parameters can be the requested service dimension, which are defined as Brno.
[0077] Optionally, the flow control service under the banking system configures the flow switching switch corresponding to the target service based on the level of the target service. The control parameters of the flow switching switch are assigned according to the corresponding service, such as zone:'200', Brno:'998'.
[0078] In this embodiment, by configuring control parameters of corresponding levels for the flow cutter switch, precise flow control with different granularities is achieved for different service levels through the flow cutter switch, and the control parameters are visualized and can be flexibly adjusted.
[0079] In another embodiment, step S204, when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, determines the flow-cutting switch corresponding to the target service and the control parameters corresponding to the flow-cutting switch. Before diverting a portion of the real-time concurrent request traffic to other services under the banking system based on the flow-cutting switch and the control parameters, step S204 further includes:
[0080] Based on the difference between the real-time concurrent request traffic and the concurrency limit corresponding to the target service, determine the specific proportion of traffic that will be diverted from the real-time concurrent request traffic to other services under the banking system.
[0081] The difference between the real-time concurrent request traffic and the concurrency limit corresponding to the target service is the result obtained by subtracting the concurrency limit corresponding to the target service from the concurrent request traffic of the target service load. The specific proportion of traffic to be switched can be determined by the difference, and the switching proportion is proportional to the difference.
[0082] Optionally, the traffic monitoring system obtains the difference between the real-time concurrent request traffic and the concurrent upper limit corresponding to the target service, and feeds the difference back to the traffic control service under the banking system. The flow switching switch controls the specific proportion of traffic switched to other services under the banking system.
[0083] Furthermore, there are other ways to dynamically determine the specific proportion of traffic that is diverted to at least a portion of the traffic to other services under the banking system. For example, the average concurrent request traffic of the target service over a short period of time can be obtained, and the corresponding diversion ratio can be determined based on the extent to which the real-time concurrent request traffic exceeds the average concurrent request traffic. The diversion ratio is proportional to the extent of the exceedance.
[0084] In this embodiment, by monitoring the difference between the concurrent request traffic of the target service load and its corresponding concurrent upper limit, or by obtaining the difference between the concurrent request traffic and the average concurrent request traffic of the target service in the past set time period, the traffic switching ratio is adjusted, thereby achieving the effect of dynamically switching traffic to other services under the banking system for processing and enabling efficient collaborative work among various services.
[0085] In one embodiment, such as Figure 3 As shown, step S204, when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, determines the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch. Before diverting a portion of the real-time concurrent request traffic to other services under the banking system based on the flow-switching switch and the control parameters, the step further includes:
[0086] Step S302: When the concurrent request traffic of the target service reaches the concurrency limit, detect the on / off state of the flow switching switch corresponding to the target service.
[0087] The switching state of the corresponding current cut-off switch is divided into two states: open and closed.
[0088] Specifically, when the traffic monitoring system detects that the concurrent request traffic of a target service under the banking system has reached its configured concurrency limit, the traffic control service detects the on / off state of the flow-cutting switch corresponding to the target service. The on / off state can be represented by a set parameter, for example, the on / off state parameter is defined as decouple. When the parameter value is 1, the switch is in the on state, and when the parameter value is 0, the switch is in the off state.
[0089] Step S304: If the switch is in the open state, perform the step of diverting some concurrent request traffic to other services under the bank system.
[0090] Specifically, flow switching can be performed when the flow switching switch is in the open state, but not when it is in the closed state. Optionally, the flow control service under the bank system detects that the flow switching switch is in the open state. If the switch is in the closed state, it can send a confirmation message to the administrator to confirm whether to open it. After the flow control service under the bank system opens the flow switching switch, the flow switching operation is then performed. Optionally, the flow control service under the bank system initially sets the switch to the closed state.
[0091] In this embodiment, by detecting the state of the flow switching switch before executing the flow switching step, the exclusivity of some target services is guaranteed, i.e., the situation where flow switching is not allowed, thus achieving a more precise control effect on the system.
[0092] In one embodiment, step S204, when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, determines the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch. Based on the flow-switching switch and the control parameters, after diverting a portion of the real-time concurrent request traffic to other services under the banking system, further includes:
[0093] Step 1: Monitor the changes in real-time concurrent request traffic of the target service.
[0094] The changes in the real-time concurrent request traffic of the target service can be an increase, a constant, or a decrease.
[0095] Optionally, the traffic monitoring system periodically monitors the changes in concurrent request traffic of the target service load and takes further action based on the different changes.
[0096] Step 2: If the real-time concurrent request traffic of the target service is detected to drop below the corresponding concurrent limit of the target service, the concurrent request traffic that was diverted to other services will be diverted back to the target service for processing.
[0097] Where the change in the real-time concurrent request traffic of the target service is not below the concurrency limit of the target service, the flow switching switch continues to control the flow of concurrent request traffic of the target service.
[0098] Optionally, when the traffic monitoring system detects that the real-time concurrent request traffic of the target service drops below the corresponding concurrent limit of the target service, it can send feedback to the traffic control service under the bank system to switch the concurrent request traffic that was diverted to other services back to the target service for processing.
[0099] In this embodiment, the target service is continuously monitored and further processed after the traffic switching is completed, thus tracking the subsequent process of the target service traffic switching and improving the flexibility of traffic splitting.
[0100] In one embodiment, before step S202 monitors the real-time concurrent request traffic initiated by the target service, the method further includes:
[0101] Step 1: Obtain historical concurrent request traffic data for each service under the banking system.
[0102] Among them, the historical concurrent request traffic data of each service can be the peak load traffic that each service can reach since it started working, or the average load traffic data of each service at multiple historical time points.
[0103] Optionally, the flow control service under the banking system obtains historical concurrent request flow data for each service location from the flow monitoring system.
[0104] Step 2: Based on the historical concurrent request traffic data, identify the target service from multiple services whose overload count exceeds the target count, and configure the corresponding concurrency limit, flow switching switch, and flow switching switch control parameters for it.
[0105] Overload refers to the load of each service in the banking system exceeding the maximum request traffic it can handle. The target number of times can be once, twice, etc. The concurrency limit can be the maximum request traffic that each service in the banking system can handle or a traffic value slightly lower than the maximum request traffic it can handle.
[0106] Optionally, the flow control service under the banking system filters out target services whose overload counts exceed the target count based on the historical concurrent request flow data of each service, and configures corresponding concurrency limits and flow switching switches for them, with the flow switching switches configured with corresponding control parameters.
[0107] In this embodiment, target services with overload counts exceeding a target number are selected, and corresponding concurrency limits, flow-switching switches, and control parameters for these switches are configured for them. Because flow-switching switches do not need to be configured for every service after selection, the system resource waste is reduced, and the flow-switching service is precisely controlled.
[0108] In one embodiment, such as Figure 4 As shown, a detailed method for flow control under high concurrency in a multi-service banking system is provided, comprising the following steps:
[0109] Step S402: Obtain historical concurrent request traffic data for each service under the banking system.
[0110] The real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier; the banking system may include at least two levels of service.
[0111] Specifically, the flow control service under the banking system obtains historical concurrent request flow data for each service from the flow monitoring system, and each service includes at least two levels.
[0112] Step S404: Based on the historical concurrent request traffic data, identify the target service from multiple services whose overload count exceeds the target count, and configure corresponding concurrency limits, flow switching switches, and control parameters for it.
[0113] The flow switching switches for different service levels have different control parameters. The first-level control parameter for the flow switching switch for the first-level service can be at least one of the following: region parameter, branch parameter, or outlet parameter. The second-level control parameter for the flow switching switch for the second-level service is the service dimension parameter.
[0114] Specifically, the flow control service in the banking system filters out target services whose overload counts exceed the target count based on the historical concurrent request flow data of each service, and configures corresponding levels of concurrency limits and flow switching switches for them. The flow switching switches are configured with corresponding levels of control parameters.
[0115] Step S406: Monitor the real-time concurrent request traffic initiated against the target service.
[0116] Optionally, after selecting the target service among the various services under the banking system, the target service is monitored through a traffic monitoring system. The monitoring method is either periodic monitoring at a set time or intensive real-time monitoring, and the concurrent request traffic data of the target service load is obtained. The obtained concurrent request traffic data is then fed back to the banking system.
[0117] Step S408: When the traffic monitoring system detects that the concurrent request traffic of the target service exceeds the concurrency limit, it determines the specific proportion of at least a portion of the traffic to be diverted from the real-time concurrent request traffic to other services under the bank system based on the difference between the real-time concurrent request traffic and the concurrency limit corresponding to the target service, or based on the difference between the real-time concurrent request traffic and the historical average concurrent request traffic corresponding to the target service.
[0118] The difference between the real-time concurrent request traffic and the concurrency limit corresponding to the target service is the result of subtracting the concurrency limit corresponding to the target service from the concurrent request traffic of the target service load under the banking system. The specific proportion of traffic to be cut can be determined by the difference; or the average concurrent request traffic of the target service in the past set time period can be obtained, and the corresponding traffic cutting ratio can be determined according to the degree to which the real-time concurrent request traffic exceeds the average concurrent request traffic. The traffic cutting ratio is proportional to the degree of exceedance.
[0119] Step S410: Based on the specific ratio determined in the above steps, determine the target request corresponding to the request information carried in the concurrent request traffic and the control parameters of the flow-cutting switch, and use it as the flow to be cut.
[0120] Optionally, any request traffic in the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier. The bank system will match the identifier of the real-time concurrent request traffic with the control parameters of the flow switching switch to confirm the real-time concurrent request traffic that can be successfully matched.
[0121] If the real-time concurrent request traffic determined by the control parameters of the flow-cutting switch is lower than the aforementioned specific proportion, the remaining concurrent request traffic is compared with the corresponding concurrency limit. If it is lower than the concurrency limit, the concurrent request traffic determined by the control parameters of the flow-cutting switch is flow-cut. Otherwise, other control parameters need to be considered, and a portion of the traffic is matched from the remaining concurrent request traffic. The traffic matched multiple times is used together as the concurrent request traffic to be flow-cut, and then flow-cut to other services.
[0122] If the real-time concurrent request traffic determined by matching the control parameters of the flow cutter is higher than the above-mentioned specific proportion, then according to the above-mentioned specific proportion, a portion of the traffic determined by matching the control parameters of the flow cutter will be selected as the concurrent request traffic to be cut; or the real-time concurrent request traffic determined by matching the control parameters of the flow cutter will be directly selected as the concurrent request traffic to be cut and cut to other services.
[0123] Step S412: Detect the switch status of the flow switching switch corresponding to the target service. If the switch status is in the open state, execute the step of switching part of the concurrent request traffic to other services under the bank system for processing.
[0124] Specifically, when the traffic monitoring system detects that the concurrent request traffic of a target service under the banking system has reached its configured concurrency limit, it determines the specific proportion of concurrent request traffic to be diverted. Then, the traffic control service under the banking system checks the on / off state of the diversion switch corresponding to the target service. It controls the diversion switch to divert a portion of the concurrent request traffic to other services under the banking system. If the switch is in the off state, the traffic control service under the banking system opens the diversion switch before performing the diversion operation.
[0125] Understandably, the step of detecting the on / off state of the flow-cutting switch corresponding to the target service can also be performed after the flow-cutting switch is determined, but before determining the specific proportion of traffic cut to at least a portion of the traffic to other services under the banking system.
[0126] Step 414: After the traffic is switched, monitor the changes in the real-time concurrent request traffic of the target service. If the real-time concurrent request traffic of the target service drops below the corresponding concurrency limit of the target service, switch the concurrent request traffic switched to other services back to the target service for processing.
[0127] The real-time concurrent request traffic of the target service can increase, remain unchanged, or decrease. The traffic switching switch cannot switch traffic back to the target service for processing unless the real-time concurrent request traffic of the target service decreases below its concurrency limit.
[0128] Specifically, when the traffic monitoring system detects that the real-time concurrent request traffic of the target service drops below the corresponding concurrent limit of the target service, it can send feedback to the traffic control service under the bank system to switch the concurrent request traffic that was diverted to other services back to the target service for processing.
[0129] In this embodiment, by pre-configuring the target service with corresponding control parameters for a concurrency limit and a flow-switching switch, the concurrent request traffic data of the target service under the banking system is monitored in real time. If the real-time concurrent request traffic exceeds the concurrency limit, a portion of the real-time concurrent request traffic is diverted to other services under the banking system using the corresponding flow-switching switch and its control parameters. This avoids modifying the source code and configuration files of the services responding to banking business-related requests under the banking system, enabling flow-switching control under high concurrency of multiple services and improving the processing efficiency of business traffic.
[0130] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0131] Based on the same inventive concept, this application also provides a high-concurrency flow control device for implementing the high-concurrency flow control method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the high-concurrency flow control device provided below can be found in the limitations of the high-concurrency flow control method described above, and will not be repeated here.
[0132] In one embodiment, such as Figure 5 As shown, a high-concurrency flow control device 500 is provided, including: a monitoring module 502 and a flow control module 504, wherein:
[0133] The monitoring module 502 is used to monitor the real-time concurrent request traffic initiated against the target service and to feed back the real-time traffic data to the control module. The target service is a service under the banking system.
[0134] The flow-cutting module 504 is used to determine the flow-cutting switch corresponding to the target service and the control parameters corresponding to the flow-cutting switch when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service. Based on the flow-cutting switch and the control parameters, the portion of the concurrent request traffic of the target service that exceeds its corresponding concurrency limit is flow-cut to other services under the banking system.
[0135] Furthermore, in one embodiment, any request traffic in the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier. The aforementioned flow-cutting module 504 is also used to determine the target request corresponding to the request information and the control parameters of the flow-cutting switch from the real-time concurrent request traffic of the target service load.
[0136] Furthermore, in another embodiment, the high-concurrency flow control device 500 also provides a flow-cutting ratio determination module, used for: when the target service is a first-level service, determining from the real-time concurrent request traffic the target request corresponding to the request information and the first-level control parameters, wherein the first-level control parameters are at least one of region parameters, branch parameters, and outlet parameters; when the target service is a second-level service, determining from the real-time concurrent request traffic the target request corresponding to the request information and the second-level control parameters, wherein the second-level control parameters are service dimension parameters. Wherein, the first-level service is of a higher level than the second-level service.
[0137] Furthermore, in another embodiment, the high-concurrency flow control device 500 also provides a system configuration module for: determining the level of each target service under the banking system; configuring the flow switching switch corresponding to the target service based on the level, and configuring the first-level control parameter or the second-level control parameter corresponding to the flow switching switch.
[0138] Furthermore, in one embodiment, the aforementioned traffic cut-off ratio determination module is further configured to determine, based on the difference between the real-time concurrent request traffic and the concurrent upper limit corresponding to the target service or to obtain the average concurrent request traffic of the target service, at least a portion of the traffic cut off from the real-time concurrent request traffic to other services under the banking system, according to the degree to which the real-time concurrent request traffic exceeds the average concurrent request traffic.
[0139] Furthermore, in one embodiment, the high-concurrency flow control device 500 also provides a switch management module for detecting the switch status of the flow switching switch corresponding to the target service. If the flow switching switch is detected to be in the open state, a signal to execute the flow switching step is sent to the flow switching module; if the flow switching switch is detected to be in the closed state, a signal to confirm whether to open the switch is sent to the monitoring system. If the switch is confirmed to be open, the step of opening the flow switching switch is executed.
[0140] Furthermore, in another embodiment, the monitoring module 502 is also used to monitor the changes in the real-time concurrent request traffic of the target service; if it is detected that the real-time concurrent request traffic for the target service drops below the corresponding concurrency limit of the target service, a feedback signal is sent to the flow-switching module to remind the flow-switching module to switch the concurrent request traffic switched to the other service back to the target service for processing.
[0141] Furthermore, in another embodiment, the system configuration module provided above is also used to acquire historical concurrent request traffic data for each service location, and based on the historical concurrent request traffic data, determine the target service from multiple services whose overload count exceeds a target count, and configure corresponding concurrency limits, flow switching switches, and control parameters for the flow switching switches for it. Here, overload refers to the load of each service under the banking system exceeding its maximum processing request traffic value; the target count can be one, two, etc.; the concurrency limit can be the maximum processing request traffic value of each service under the banking system or a traffic value slightly lower than the maximum processing request traffic value.
[0142] Each module in the aforementioned high-concurrency flow control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0143] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the high-concurrency flow control method described above, such as concurrent request traffic data for a target service in a banking system. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a high-concurrency flow control method.
[0144] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0145] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments. 。
[0146] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0147] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0149] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0150] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A high-concurrency flow control method, characterized in that, The method includes: Monitor real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system. If the real-time concurrent request traffic exceeds the concurrency limit of the target service, determine the flow-switching switch for the target service and the control parameters for the flow-switching switch. Based on the flow-switching switch and the control parameters, divert a portion of the real-time concurrent request traffic to other services under the banking system. In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters. Each request traffic in the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier. Based on the flow-cutting switch and the control parameters, a portion of the request traffic in the real-time concurrent request traffic is diverted to other services under the bank system, including: determining, from the real-time concurrent request traffic, the target request traffic corresponding to the request information and the control parameters of the flow-cutting switch; and diverting the target request traffic to other services under the bank system; wherein, the other services are services different from the target service and have the ability to respond to the target request traffic. The banking system includes at least two service levels, with different control parameters for the flow switching switches corresponding to different service levels. Determining the target request traffic corresponding to the request information and the control parameters of the flow switching switches from the real-time concurrent request traffic includes: if the target service is a first-level service, determining the target request traffic corresponding to the request information and first-level control parameters from the real-time concurrent request traffic, where the first-level control parameters are at least one of region parameters, branch parameters, and outlet parameters; if the target service is a second-level service, determining the target request traffic corresponding to the request information and second-level control parameters from the real-time concurrent request traffic, where the second-level control parameters are service dimension parameters; wherein, the first-level service is of a higher level than the second-level service. For each target service under the banking system, determine the level of the target service; based on the level, configure the flow switching switch corresponding to the target service, and configure the first-level control parameter or the second-level control parameter corresponding to the flow switching switch.
2. The method according to claim 1, characterized in that, Before diverting a portion of the real-time concurrent request traffic to other services within the banking system when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service, the method further includes: Based on the difference between the real-time concurrent request traffic and the concurrent upper limit corresponding to the target service, or based on the difference between the real-time concurrent request traffic and the historical average concurrent request traffic corresponding to the target service, determine the specific proportion of the request traffic that will be diverted from the real-time concurrent request traffic to other services under the banking system.
3. The method according to claim 1, characterized in that, Before diverting a portion of the real-time concurrent request traffic to other services within the banking system, the process also includes: When the concurrent request traffic of the target service reaches the concurrency limit, the on / off state of the corresponding flow switching switch of the target service is detected; If the switch is in the open state, the step of diverting some concurrent request traffic to other services under the bank system is executed.
4. The method according to claim 1, characterized in that, After diverting a portion of the real-time concurrent request traffic to other services within the banking system, the method further includes: Monitor the changes in real-time concurrent request traffic of the target service; If the real-time concurrent request traffic to the target service is detected to drop below the corresponding concurrent limit of the target service, the concurrent request traffic that was diverted to other services will be diverted back to the target service for processing.
5. The method according to claim 1, characterized in that, The method further includes: Obtain historical concurrent request traffic data for each service under the aforementioned banking system; Based on the historical concurrent request traffic data, the target service with an overload count greater than the target count is identified from multiple services, and a corresponding concurrency limit and flow switching switch are configured for it, along with corresponding control parameters for the flow switching switch.
6. A multi-service high-concurrency flow control device, characterized in that, The device includes: The monitoring module is used to monitor the real-time concurrent request traffic initiated against the target service; the target service is a service under the banking system. The flow-switching module is used to determine the flow-switching switch corresponding to the target service and the control parameters corresponding to the flow-switching switch when the real-time concurrent request traffic exceeds the concurrency limit corresponding to the target service. Based on the flow-switching switch and the control parameters, the portion of the concurrent request traffic of the target service that exceeds its corresponding concurrency limit is diverted to other services under the banking system. In this system, at least some services correspond to flow switching switches, and different flow switching switches are configured with their own control parameters. Each of the real-time concurrent request traffic carries at least one of the following request information: region identifier, branch identifier, outlet identifier, and service dimension identifier; the flow-switching module is further configured to: determine the target request traffic corresponding to the request information and the control parameters of the flow-switching switch from the real-time concurrent request traffic; and switch the target request traffic to other services under the bank system; wherein, the other services are services different from the target service and have the ability to respond to the target request traffic; The banking system includes at least two service levels, and the traffic switching switches for different service levels have different control parameters. The traffic switching ratio determination module is used to: when the target service is a first-level service, determine the target request traffic corresponding to the request information and the first-level control parameters from the real-time concurrent request traffic, where the first-level control parameters are at least one of region parameters, branch parameters, and outlet parameters; when the target service is a second-level service, determine the target request traffic corresponding to the request information and the second-level control parameters from the real-time concurrent request traffic, where the second-level control parameters are service dimension parameters; wherein, the first-level service is of a higher level than the second-level service. The system configuration module is used to: determine the level of each target service under the banking system; configure the flow switching switch corresponding to the target service based on the level, and configure the first-level control parameter or the second-level control parameter corresponding to the flow switching switch.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.