Flow control method, device, equipment, medium and product

By acquiring system status monitoring data and transaction service information and dynamically adjusting the current limiting threshold, the problem that the existing current limiting control method cannot be adjusted in time during transaction peaks is solved, and the best match between system stability and service capabilities is achieved.

CN120658631APending Publication Date: 2025-09-16AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511101478.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing flow control methods are unable to adjust the flow control threshold in time during transaction peaks, resulting in system performance degradation and possible crash, affecting the execution of important transactions.

Method used

By acquiring system status monitoring data and transaction service information, dynamically adjusting the flow limit threshold, and combining transaction attributes and system status, real-time flow control is achieved.

Benefits of technology

It achieves the best match between the system current limiting control threshold and the system status, ensures system stability and service capabilities, avoids system crashes, and improves system robustness and service efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658631A_ABST
    Figure CN120658631A_ABST
Patent Text Reader

Abstract

The invention discloses a flow control method, device and equipment, a medium and a product, and the method comprises the steps: obtaining system state monitoring data and transaction service; and according to the transaction attribute information of the transaction service and the system state monitoring data, determining flow limiting threshold adjustment information and controlling the flow of each transaction service. Software and hardware states of the system and states of associated transaction services of upstream and downstream systems are monitored in real time, and the current-limiting control threshold of the system is dynamically adjusted in real time according to a monitoring result, so that the current-limiting control threshold of the system is optimally matched with the state of the system, and the stability of system operation is guaranteed to the greatest extent; and meanwhile, the service capability of the system is guaranteed to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of flow control technology, and in particular to a flow control method, device, equipment, medium and product. Background Art

[0002] In high-concurrency scenarios and with limited resources, the trading system has a maximum transaction capacity. Exceeding this capacity can lead to abnormalities such as decreased transaction success rates or increased transaction response times. To prevent the system from accepting transactions exceeding the maximum transaction capacity, the system introduces a rate limiting control module to limit the number of transactions per unit time, thereby ensuring stable system operation.

[0003] Conventional rate limiting often simply sets a maximum permissible traffic threshold, limiting transaction volume to that value during peak trading hours. Alternatively, the system can monitor transaction volume, success rate, and response time, alerting system operators when these thresholds are exceeded. These operators can then reset the rate limiting threshold.

[0004] However, this approach of simply setting a maximum permissible traffic threshold often impacts critical system transactions during peak trading hours. Because the traffic limit threshold is fixed or can only be adjusted manually, when an internal system anomaly causes service performance degradation, the threshold cannot be lowered in a timely manner, potentially leading to further system overload and eventual partial or complete system failure. Summary of the Invention

[0005] The present invention provides a flow control method, apparatus, device, medium and product to achieve dynamic determination and control of flow control thresholds for different transaction services.

[0006] According to a first aspect of the present invention, there is provided a flow control method, comprising:

[0007] Obtain system status monitoring data and transaction services;

[0008] According to the transaction attribute information of the transaction service and the system status monitoring data, the flow limiting threshold adjustment information is determined and the flow of each transaction service is controlled.

[0009] According to a second aspect of the present invention, there is provided a flow control device comprising:

[0010] Data acquisition module, used to obtain system status monitoring data and transaction services;

[0011] The flow control module is used to determine the flow limit threshold adjustment information and control the flow of each transaction service according to the transaction attribute information of the transaction service and the system status monitoring data.

[0012] According to a third aspect of the present invention, there is provided an electronic device, comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the flow control method described in any embodiment of the present invention.

[0016] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flow control method described in any embodiment of the present invention when executed.

[0017] According to a fifth aspect of the present invention, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the flow control method of any embodiment of the present invention.

[0018] The technical solution of the embodiments of the present invention obtains system status monitoring data and transaction services; based on the transaction attribute information of the transaction services and the system status monitoring data, it determines the flow control threshold adjustment information and controls the flow of each transaction service. By monitoring the status of the system hardware and software and the status of the transaction services of upstream and downstream systems in real time, the system flow control threshold is dynamically adjusted in real time based on the monitoring results, achieving an optimal match between the system flow control threshold and the system status, thereby maximizing the stability of system operation and the service capacity of the system.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 This is a flow chart of a flow control method provided according to the first embodiment of the present invention;

[0022] Figure 2 This is a structural diagram of a flow control device provided according to a second embodiment of the present invention;

[0023] Figure 3 It is a schematic structural diagram of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Example 1

[0027] Figure 1 A flow chart of a flow control method is provided for the first embodiment of the present invention. This embodiment is applicable to dynamic flow limiting of different transaction services. The method can be executed by a flow control device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0028] S110. Obtain system status monitoring data and transaction services.

[0029] In this embodiment, system status monitoring data can be understood as the results obtained from testing the system's software and hardware. For example, it may include the CPU utilization, memory utilization, and disk utilization of different servers in the system, such as application servers and database servers. Transaction services can be understood as transaction processing-related data received by the system. For example, it may include system transaction volume, transaction response time, and upstream system transaction volume and response time.

[0030] Specifically, the processor can detect the system software and hardware status and the transaction status of upstream and downstream systems in real time to obtain system status monitoring data and transaction services.

[0031] S120: Determine flow limit threshold adjustment information and control the flow of each transaction service based on the transaction attribute information of the transaction service and the system status monitoring data.

[0032] In this embodiment, the transaction attribute information can be understood as the attributes of each transaction, such as the system performance consumption corresponding to different transaction types. The flow limit threshold adjustment information can be understood as the flow adjustment parameter value that should be set for different transactions.

[0033] Specifically, the processor can determine whether the current system state is abnormal based on system status monitoring data and adjust the current limit when an anomaly exists. The processor can combine the resource anomaly indicator with the transaction attribute information of the transaction service to calculate the current current limit control threshold for the relevant transaction and provide the current limit control threshold to the current limit control module in the system.

[0034] The technical solution of the embodiments of the present invention obtains system status monitoring data and transaction services; based on the transaction attribute information of the transaction services and the system status monitoring data, it determines the flow control threshold adjustment information and controls the flow of each transaction service. By monitoring the status of the system hardware and software and the status of the transaction services of upstream and downstream systems in real time, the system flow control threshold is dynamically adjusted in real time based on the monitoring results, achieving an optimal match between the system flow control threshold and the system status, thereby maximizing the stability of system operation and the service capacity of the system.

[0035] Furthermore, based on the above embodiment, the steps of determining flow limit threshold adjustment information and controlling the flow of each transaction service according to the transaction attribute information of the transaction service and the system status monitoring data specifically include:

[0036] Determine the adjustment range of the flow limiting threshold based on the system status monitoring data and the status threshold set; determine the flow limiting configuration items of the transaction service based on the transaction attribute information of the transaction service; determine the flow limiting threshold adjustment information and control the traffic of each transaction service based on the threshold adjustment mode, the flow limiting threshold adjustment range and the flow limiting configuration items.

[0037] In this embodiment, the state threshold set can be understood as a set of upper threshold values ​​allowed for recording different system monitoring data. The rate limit threshold adjustment range can be understood as a value reflecting the speed of adjustment to the threshold. The rate limit configuration item can be understood as data used to determine the rate limit adjustment value for each transaction. The threshold adjustment mode can be understood as the method used to specify how the rate limit threshold is adjusted.

[0038] Specifically, the processor can first determine whether the system currently has abnormal monitoring data based on the system status monitoring data and the status threshold set, and then determine the adjustment range of the flow control threshold based on the abnormal monitoring data. Based on the transaction attribute information of the transaction service, the processor can group related transactions and determine the flow control configuration items for each transaction service belonging to the different groups based on the attributes of each transaction group. Based on the threshold adjustment mode, the flow control threshold adjustment range, and the flow control configuration items, the processor can determine the flow control threshold adjustment information and control the flow of each transaction service.

[0039] For example, the status thresholds centrally record the upper and lower limits allowed for different system status monitoring data, as well as the minimum duration. For example, the upper limit allowed for the local machine's CPU usage is 80%, and the minimum duration is 30 seconds. If the CPU usage briefly exceeds 80% within 30 seconds, no action is taken. However, if the CPU usage exceeds 80% and persists for more than 30 seconds, an adjustment to the current limiting control threshold is triggered.

[0040] Furthermore, based on the above embodiment, the steps of determining the flow limiting configuration items of the transaction service according to the transaction attribute information of the transaction service can be refined as follows:

[0041] Transaction services are grouped to obtain transaction groups; the group rate limiting configuration items of the transaction group are determined based on the group importance level and the group resource occupancy type mask of the transaction group; the step rate limiting threshold of the transaction service is determined based on the importance level of the transaction service and the transaction group to which it belongs; the rate limiting configuration items of the transaction service are determined based on the step rate limiting threshold and the group rate limiting configuration items.

[0042] In this embodiment, a transaction group can be understood as a grouping used to group related transactions into the same group for threshold adjustment. A group importance level can be understood as a representation of the importance of related transactions in different transaction groups to the entire system. For example, it can be represented by a number, with larger numbers indicating greater importance to the system and smaller numbers indicating lesser importance. A group resource usage type mask can be understood as a representation of the utilization of different system resources by each transaction group. For example, if transaction group 1 utilizes more CPU, less local memory, and more local hard disk, the CPU resource usage type mask for transaction group 1 can be 100, the local memory resource usage type mask can be 30, and the local hard disk resource usage type mask can be 100. The resource usage type mask can be determined by pre-performance testing before the system is officially operational. For example, setting the system to process n transactions per second belonging to the transaction group and determining the system status and consumption after the system transactions stabilize. A stepped rate limiting threshold can be understood as different rate limiting thresholds for the same transaction. Group throttling configuration items reflect the throttling settings for different transaction groups. For example, they may include the maximum and minimum traffic allowed for each transaction group, the corresponding transaction list, and the transaction ratios for different transaction services within the list. For example, the list contains one or more transactions configured within a group, along with the traffic ratios for each transaction. For example, if a transaction list contains transactions T1 and T2 with ratios of 1 and 2, respectively, and the current throttling threshold for the group is 100 transactions per time unit, then the throttling threshold for transaction T1 is 100 * 1 = 100 transactions per time unit, and the throttling threshold for transaction T2 is 100 * 2 = 200 transactions per time unit. Ratios can be decimals but must be positive. The calculation formula in this example is for illustrative purposes only; different formulas and coefficients can be used.

[0043] Specifically, the processor can group transaction services to obtain transaction groups, and different transaction groups are distinguished by group IDs and names. The processor can determine the order of transaction groups for adjusting the flow limiting threshold according to the group importance level of the transaction group, that is, give priority to adjusting the flow limiting value of the transaction corresponding to the group with a low importance level. The processor can determine the flow limiting amplitude and maximum traffic value of the transaction group relative to different system states through the group resource occupancy type mask, and use the order, flow limiting amplitude and target value of the transaction group adjustment as the group flow limiting configuration item for each transaction. The processor can determine the different importance levels and corresponding maximum traffic values ​​of the transaction service in different transaction groups according to the importance level of the transaction service and the transaction group to which it belongs, and use the order and different maximum traffic values ​​as the step flow limiting threshold. The processor can determine the flow limiting configuration item of the transaction service according to the step flow limiting threshold and the group flow limiting configuration item.

[0044] For example, each transaction group pre-sets the maximum allowed flow rate for the group and the minimum allowed flow rate for the group. These two configuration items determine the upper and lower limits of the current flow control threshold of the transaction group. Usually, when resources are sufficient and the system is operating normally, the current flow control threshold of the transaction group = the maximum allowed flow rate of the group. When system resources are tight, the current flow control threshold of the transaction group will be reduced to the minimum allowed flow rate setting value of the group. The maximum allowed flow rate of the group ≧ the minimum allowed flow rate of the group ≧ 0. Taking the settings in Table 1 below as an example, you can see that the transactions in groups ID01 and ID03 are the same, but the importance level and minimum allowed flow rate are different. This configuration can achieve step-by-step flow control for specific transactions. When system resources are tight, the processor will give priority to lowering the flow control threshold of transaction T1 in group ID03 until it is reduced to 20. During this process, the processor can calculate that the traffic value for transaction T1 corresponding to ID01 is 100, the traffic value for transaction T2 corresponding to ID02 is 100, and the traffic value v for transaction T1 corresponding to ID03 is less than 100 but greater than or equal to 20. Since there are multiple traffic values ​​for T1, the processor will take the minimum value. If the traffic for transaction T1 drops to 20 but system resources are still limited, the processor will further reduce the traffic for transaction T2 corresponding to group ID02. If the traffic for transaction T2 drops to 20 but system resources are still limited, the processor will further reduce the traffic for transaction T1 corresponding to group ID01 until the traffic is reduced to 0.

[0045] Table 1 Example of group current limiting configuration items

[0046]

[0047]

[0048] Furthermore, based on the above embodiment, the steps of determining the current limiting threshold adjustment information and controlling the traffic of each transaction service according to the threshold adjustment mode, the current limiting threshold adjustment range, and the current limiting configuration items can be further refined as follows:

[0049] When the threshold adjustment mode is the first mode, the current limiting threshold in the current limiting configuration item is used as the current limiting threshold adjustment information and the traffic of each transaction service is controlled; when the threshold adjustment mode is the second mode, the adjustment unit for each adjustment is determined according to the set number of adjustments and the current limiting configuration item and used as the current limiting threshold adjustment information and the traffic of each transaction service is controlled; when the threshold adjustment mode is the third mode, the current limiting threshold adjustment information is determined according to the set fixed adjustment value and the current limiting configuration item and the traffic of each transaction service is controlled; when the threshold adjustment mode is the fourth mode, the current adjustment range is determined according to the current limiting threshold adjustment range and the current limiting configuration item and used as the current limiting threshold adjustment information and the traffic of each transaction service is controlled.

[0050] In this embodiment, the first mode can be understood as a mode in which the flow rate is directly adjusted to the flow limit threshold. The flow limit threshold can be understood as the minimum allowable flow rate for different transaction services. The second mode can be understood as a fixed-number adjustment mode, where the set number of adjustments is the number of times the flow rate is adjusted to the flow limit threshold. The adjustment unit can be understood as the unit value of the flow rate adjusted each time. The third mode can be understood as a fixed-interval mode, where the flow rate adjusted each time is set by setting a fixed adjustment value. The fourth mode can be understood as a mode in which adjustments are made based on the variation range of different monitoring data. The current adjustment range can be understood as the range of each adjustment.

[0051] Specifically, when the threshold adjustment mode is the first mode, and it is detected that the flow control threshold of the transaction needs to be lowered, the processor can use the flow control threshold in the flow control configuration item as the flow control threshold adjustment information, that is, the processor can directly take the minimum value that can be adjusted for adjustment. When the flow control threshold of the transaction needs to be restored, the maximum value that can be adjusted is directly taken for adjustment. When the threshold adjustment mode is the second mode, the processor can determine the adjustment unit for each adjustment based on the set number of adjustments and the flow control configuration item and use it as the flow control threshold adjustment information to control the flow of each transaction service. For example, if the maximum allowed flow is 100, the minimum allowed flow is 0, and the number of adjustments is 5, then each adjustment is (100-0) / 5=20 units. When the threshold adjustment mode is the third mode, the processor can determine the flow control threshold adjustment information and control the flow of each transaction service according to the set fixed adjustment value combined with the resource occupancy type mask in the flow control configuration item. When the threshold adjustment mode is the fourth mode, the processor can determine the current adjustment range according to the current limiting threshold adjustment range and the current limiting configuration item and use it as the current limiting threshold adjustment information to control the flow of each transaction service, and continue to monitor the current system status monitoring data after control to determine whether the target value in the current limiting configuration item is reached, and then determine the current adjustment range of the second adjustment and use it as the current limiting threshold adjustment information to control the flow of each transaction service, and so on until the target value is reached. Among them, the threshold adjustment mode can also limit the flow of related transactions according to specific dimensions, such as provincial and municipal dimensions, transaction channels (mobile banking, online banking and outlets, etc.) dimensions. When processing, transactions of different dimensions are processed as different transactions. In this case, this solution is still applicable. The corresponding transaction identification and differentiation components can be designed during program development, and the same transaction of different dimensions can be mapped into different transactions. Transaction grouping can be configured for the mapped transactions, and then loaded and called by the status monitoring module to support it.

[0052] Among them, based on the above embodiment, the steps of determining the current adjustment range and the flow of each transaction service as the flow control threshold adjustment information based on the flow control threshold adjustment range and the flow control configuration items can be refined as follows:

[0053] According to the adjustment range of the current limiting threshold and the resource occupancy type mask in the current limiting configuration item, the current adjustment threshold is determined as the current limiting threshold adjustment information and controlled; when adjustment is made according to the current adjustment threshold and the set interval condition is met, the current system status monitoring data is obtained; if the current system status monitoring data does not reach the target monitoring indicator value in the current limiting threshold adjustment information, the current adjustment threshold is determined as the current limiting threshold adjustment information for control according to the current system status monitoring data, the previous adjustment threshold, the resource occupancy type mask and the target monitoring indicator value, and the step of obtaining the current system status monitoring data is returned; otherwise, the adjustment is ended.

[0054] In this embodiment, the set interval condition can be understood as a condition for determining whether to perform the next adjustment, such as a set time interval or a set system status reduction value. The target monitoring indicator value can be understood as an indicator value set by the system without current limiting adjustment. For example, if the current abnormal indicator is CPU usage, the target monitoring indicator value is 70% CPU usage. The previous adjustment threshold can be understood as the adjustment threshold set during the previous adjustment.

[0055] Specifically, the processor can determine the current adjustment threshold as the current limiting threshold adjustment information and control it based on the current limiting threshold adjustment range and the resource occupancy type mask in the current limiting configuration item; when adjustment is made based on the current adjustment threshold and the set interval condition is met, the current system status monitoring data is obtained; if the current system status monitoring data does not reach the target monitoring indicator value in the current limiting threshold adjustment information, the current adjustment threshold is determined as the current limiting threshold adjustment information for control based on the current system status monitoring data, the previous adjustment threshold, the resource occupancy type mask and the target monitoring indicator value, and the step of obtaining the current system status monitoring data is returned; otherwise, the adjustment is ended.

[0056] For example, the target monitoring indicator is set to 70% CPU usage, the upper limit is allowed to be 90%, the allowable deviation is adjusted to 2%, the maximum allowable flow is 100, the minimum allowable flow is 0, and the first adjustment amplitude coefficient is 0.4. When the CPU usage exceeds 90%, the first flow control threshold is reduced by (100-0)*0.4=40. After the first adjustment, the CPU usage is reduced to 74%. Based on the first indicator change amplitude and the amplitude of the distance from the indicator target value, the second flow control threshold is reduced by 40*((74%-70%) / (90%-74%))=10. After the second adjustment, the CPU usage is reduced to 66%. Based on the second indicator change amplitude and the amplitude of the distance from the indicator target value, the third flow control threshold is reduced by 10*((66%-70%) / (74%-66%))=-5, which is a callback of 5 units. After the third adjustment, the CPU usage returns to 72%, which is within the allowable range of 70%±2%, and no further adjustment is made. The calculation formula in the example is only an example. Different calculation formulas can be used and different calculation coefficients can be introduced.

[0057] Exemplarily, taking the settings in Table 2 as an example, transaction groups ID01, ID02 and ID03 have the same importance level. When the processor detects that the database CPU usage exceeds the limit, it will try to adjust the current limiting control thresholds of ID01, ID02 and ID03. If the "resource occupancy type mask" is not considered, the processor calculates that the current limiting control threshold of each group needs to be reduced by 20 units. Then, based on the trigger condition of the database CPU usage exceeding the limit, the "database CPU" mask value in the "resource occupancy type mask" is comprehensively considered to obtain the final current limiting control threshold reduction value of each group: ID01 group is 20*100 mask value (%) = 20 units; ID02 group is 20*30 (%) = 6 units; ID03 group is 20*0 (%) = 0 unit. If both the database CPU usage and local memory usage exceed the limit, the "Database CPU" mask value and the "Local Memory" mask value in the "Resource Usage Type Mask" are considered together to determine the final rate limiting control threshold reduction for each group: 20*(100+30)(%)=26 units for group ID01; 20*(30+70)(%)=20 units for group ID02; and 20*(0+100)(%)=20 units for group ID03. The calculation formula in this example is for reference only; different calculation formulas and coefficients can be used.

[0058] Table 2 Resource occupancy type mask example table

[0059]

[0060] The technical solution of the embodiment of the present invention can achieve dynamic adjustment of system transaction traffic without manual intervention through real-time monitoring of the system resource usage status. When the system resource usage rate is abnormal, the system resource usage rate can be automatically restored to the normal range by reducing the traffic of system-related transactions in a targeted manner. Through the transaction grouping method, on the one hand, differentiated configuration of different transactions can be achieved, thereby achieving precise transaction traffic control. On the other hand, the configuration of similar transactions can be simplified, and repeated configuration of the same transaction can be supported, and step-by-step traffic adjustment can be achieved to cope with more complex system external service requirements. By introducing resource occupancy type masks, targeted flow control of specific resource anomalies can be achieved, thereby achieving precise resource occupancy release and ensuring the service efficiency of the system to a greater extent (allowing more transaction traffic under the premise of ensuring that the system resource usage does not exceed the limit). Adaptive matching of transaction traffic and system status is achieved, thereby further improving the robustness of the system.

[0061] As a first optional embodiment of the first embodiment, after controlling the flow of each transaction service according to the flow limiting threshold adjustment information, the following further comprises:

[0062] When the threshold recovery conditions are reached, recovery adjustment information is determined and adjusted based on the current system status monitoring data and transaction services.

[0063] In this embodiment, the threshold restoration condition can be understood as a condition for determining whether the threshold restoration can be performed, such as the system status is normal and the set cooling time has been reached, etc. The restoration adjustment information can be understood as a method for controlling how to perform current limiting restoration.

[0064] Specifically, when threshold recovery conditions are met (e.g., when current system status monitoring data is within the normal range and remains within the normal range for a period of time), the processor can perform flow control recovery based on the attributes of the transaction service and the set threshold adjustment mode. For example, in the first mode, the transaction service flow rate is directly adjusted to the maximum value that can be achieved, while in the second mode, multiple adjustments are made based on the number of adjustments and the maximum allowable flow rate.

[0065] In a first optional embodiment of the first embodiment, by setting a threshold recovery mode, automatic recovery of the system transaction flow after being restricted can be achieved without manual intervention.

[0066] Example 2

[0067] Figure 2 This is a structural diagram of a flow control device provided in Example 2 of the present invention. Figure 2 As shown, the device includes: a data acquisition module 21 and a flow control module 22.

[0068] Data acquisition module 21, used to obtain system status monitoring data and transaction services;

[0069] The flow control module 22 is configured to determine flow limiting threshold adjustment information and control the flow of each transaction service according to the transaction attribute information of the transaction service and the system status monitoring data.

[0070] The technical solution of the embodiments of the present invention obtains system status monitoring data and transaction services; based on the transaction attribute information of the transaction services and the system status monitoring data, it determines the flow control threshold adjustment information and controls the flow of each transaction service. By monitoring the status of the system hardware and software and the status of the transaction services of upstream and downstream systems in real time, the system flow control threshold is dynamically adjusted in real time based on the monitoring results, achieving an optimal match between the system flow control threshold and the system status, thereby maximizing the stability of system operation and the service capacity of the system.

[0071] Furthermore, the flow control module 22 includes:

[0072] A first determining unit, configured to determine a current limiting threshold adjustment range based on the system state monitoring data and the state threshold set;

[0073] a second determining unit, configured to determine a flow limiting configuration item of the transaction service according to the transaction attribute information of the transaction service;

[0074] The third determining unit is configured to determine the flow limiting threshold adjustment information and control the flow of each of the transaction services according to the threshold adjustment mode, the flow limiting threshold adjustment range and the flow limiting configuration item.

[0075] The second determining unit is specifically configured to:

[0076] Grouping the transaction services to obtain transaction groups;

[0077] Determining a group current limiting configuration item for the transaction group according to the group importance level and the group resource occupation type mask of the transaction group;

[0078] Determine the tiered flow limiting threshold of the transaction service according to the importance level of the transaction service and the transaction group to which it belongs;

[0079] Determine the current limiting configuration item of the transaction service according to the step current limiting threshold and the group current limiting configuration item.

[0080] Furthermore, the third determining unit includes:

[0081] a first control subunit, configured to, when the threshold adjustment mode is the first mode, use the current limiting threshold in the current limiting configuration item as current limiting threshold adjustment information and control the flow of each of the transaction services;

[0082] a second control subunit, configured to, when the threshold adjustment mode is the second mode, determine an adjustment unit for each adjustment based on the set number of adjustments and the current limiting configuration item, and use the adjustment unit as the current limiting threshold adjustment information to control the flow of each of the transaction services;

[0083] a third control subunit, configured to, when the threshold adjustment mode is the third mode, determine the flow limiting threshold adjustment information and control the flow of each of the transaction services according to the set fixed adjustment value and the flow limiting configuration item;

[0084] The fourth control subunit is used to determine the current adjustment range as the current limiting threshold adjustment information and control the flow of each transaction service according to the current limiting threshold adjustment range and the current limiting configuration item when the threshold adjustment mode is the fourth mode.

[0085] The fourth control subunit is specifically configured to:

[0086] Determine, according to the current limiting threshold adjustment range and the resource occupation type mask in the current limiting configuration item, a current adjustment threshold as the current limiting threshold adjustment information and perform control;

[0087] When adjustment is performed according to the current adjustment threshold and a set interval condition is reached, obtaining current system status monitoring data;

[0088] If the current system status monitoring data does not reach the target monitoring indicator value in the current limiting threshold adjustment information, then according to the current system status monitoring data, the previous adjustment threshold, the resource occupancy type mask and the target monitoring indicator value, determine the current adjustment threshold as the current limiting threshold adjustment information for control, and return to the step of obtaining the current system status monitoring data;

[0089] Otherwise, the adjustment is finished.

[0090] Optionally, the device further comprises:

[0091] The threshold recovery module is used to control the flow of each transaction service according to the flow limiting threshold adjustment information, and when the threshold recovery condition is reached, determine the recovery adjustment information and make adjustments based on the current system status monitoring data and transaction service.

[0092] The flow control device provided in the embodiment of the present invention can execute the flow control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0093] Example 3

[0094] Figure 3A schematic diagram of the structure of an electronic device 30 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0095] like Figure 3 As shown, the electronic device 30 includes at least one processor 31 and a memory, such as a read-only memory (ROM) 32, a random access memory (RAM) 33, etc., which is communicatively connected to the at least one processor 31. The memory stores a computer program that can be executed by the at least one processor. The processor 31 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 32 or the computer program loaded from the storage unit 38 into the random access memory (RAM) 33. Various programs and data required for the operation of the electronic device 30 can also be stored in the RAM 33. The processor 31, ROM 32, and RAM 33 are connected to each other via a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.

[0096] Multiple components in the electronic device 30 are connected to the I / O interface 35, including an input unit 36, such as a keyboard, a mouse, etc.; an output unit 37, such as various types of displays, speakers, etc.; a storage unit 38, such as a magnetic disk, an optical disk, etc.; and a communication unit 39, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 39 allows the electronic device 30 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0097] The processor 31 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 31 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors for running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 31 executes the various methods and processes described above, such as the flow control method.

[0098] In some embodiments, the flow control method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as the storage unit 38. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 30 via the ROM 32 and / or the communication unit 39. When the computer program is loaded into the RAM 33 and executed by the processor 31, one or more steps of the flow control method described above can be performed. Alternatively, in other embodiments, the processor 31 can be configured to perform the flow control method in any other suitable manner (e.g., by means of firmware).

[0099] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0101] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0105] In one embodiment, the present invention further includes a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the flow control method of any embodiment of the present invention.

[0106] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0107] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0108] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A flow control method, characterized in that: include: Obtain system status monitoring data and transaction services; According to the transaction attribute information of the transaction service and the system status monitoring data, the flow limiting threshold adjustment information is determined and the flow of each transaction service is controlled.

2. The method according to claim 1, characterized in that The determining, based on the transaction attribute information of the transaction service and the system status monitoring data, the flow rate adjustment information of the flow rate of each transaction service and controlling the flow rate of each transaction service includes: Determining a current limiting threshold adjustment range based on the system status monitoring data and the status threshold set; Determining a flow limiting configuration item of the transaction service according to the transaction attribute information of the transaction service; According to the threshold adjustment mode, the current limiting threshold adjustment range and the current limiting configuration item, the current limiting threshold adjustment information is determined and the flow of each transaction service is controlled.

3. The method according to claim 2, characterized in that The determining, based on the transaction attribute information of the transaction service, a flow limiting configuration item of the transaction service includes: Grouping the transaction services to obtain transaction groups; Determining a group current limiting configuration item for the transaction group according to the group importance level and the group resource occupation type mask of the transaction group; Determine the tiered flow limiting threshold of the transaction service according to the importance level of the transaction service and the transaction group to which it belongs; Determine the current limiting configuration item of the transaction service according to the step current limiting threshold and the group current limiting configuration item.

4. The method according to claim 2, characterized in that The determining of the current limiting threshold adjustment information and controlling the flow of each of the transaction services according to the threshold adjustment mode, the current limiting threshold adjustment range, and the current limiting configuration item includes: When the threshold adjustment mode is the first mode, the flow rate of each transaction service is controlled by using the flow rate limiting threshold in the flow rate limiting configuration item as the flow rate limiting threshold adjustment information; When the threshold adjustment mode is the second mode, the adjustment unit for each adjustment is determined according to the set adjustment times and the flow limiting configuration item and used as the flow limiting threshold adjustment information to control the flow of each transaction service; When the threshold adjustment mode is the third mode, the flow limiting threshold adjustment information is determined according to the set fixed adjustment value and the flow limiting configuration item, and the flow of each transaction service is controlled; When the threshold adjustment mode is the fourth mode, the current adjustment range is determined according to the current limiting threshold adjustment range and the current limiting configuration item and is used as the current limiting threshold adjustment information to control the flow of each transaction service.

5. The method according to claim 4, characterized in that The determining, based on the current limiting threshold adjustment range and the current limiting configuration item, the current adjustment range as the current limiting threshold adjustment information and controlling the flow of each of the transaction services includes: Determine, according to the current limiting threshold adjustment range and the resource occupation type mask in the current limiting configuration item, a current adjustment threshold as the current limiting threshold adjustment information and perform control; When adjustment is performed according to the current adjustment threshold and a set interval condition is reached, obtaining current system status monitoring data; If the current system status monitoring data does not reach the target monitoring indicator value in the current limiting threshold adjustment information, then according to the current system status monitoring data, the previous adjustment threshold, the resource occupancy type mask and the target monitoring indicator value, determine the current adjustment threshold as the current limiting threshold adjustment information for control, and return to the step of obtaining the current system status monitoring data; Otherwise, the adjustment is finished.

6. The method according to claim 1, characterized in that After controlling the flow of each transaction service according to the flow limiting threshold adjustment information, the method further includes: When the threshold recovery conditions are reached, recovery adjustment information is determined and adjusted based on the current system status monitoring data and transaction services.

7. A flow control device, characterized in that: include: Data acquisition module, used to obtain system status monitoring data and transaction services; The flow control module is used to determine the flow limit threshold adjustment information and control the flow of each transaction service according to the transaction attribute information of the transaction service and the system status monitoring data.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the flow control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flow control method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the flow control method according to any one of claims 1 to 6.