Dynamic current limiting method and device, electronic equipment, storage medium and program product

By acquiring and analyzing user behavior data and load data from multiple business channels, the current limiting threshold is dynamically adjusted to solve the problem of inaccurate current limiting strategies in existing technologies, achieve more efficient current limiting processing, and ensure system stability.

CN119336581APending Publication Date: 2025-01-21中国移动通信有限公司销售分公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The current limiting strategy in the prior art is not accurate enough to fully reflect the actual operating status of the system, which makes it difficult to ensure system stability under high load conditions.

Method used

By obtaining user behavior data and load data from multiple business channels within a preset period, the total amount of data, abnormal data amount and current limiting threshold for each business channel are determined, and dynamic current limiting processing is performed based on these data.

Benefits of technology

Through the comprehensive consideration of multi -dimensional data, the current limit threshold of each business channel is accurately adjusted, the effect of the current limit is improved, and the stable operation of the system is guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336581A_ABST
    Figure CN119336581A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic current limiting method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring respective user behavior data of a plurality of business channels in a preset time period, and load data of systems to which the plurality of business channels belong in the preset time period; based on the user behavior data, determining the total data amount and the abnormal data amount of each business channel; according to the total data amount and the abnormal data amount of each service channel and the load data, determining a current limiting threshold value of each service channel; and performing flow limiting processing on the data volume of each business channel based on the flow limiting threshold. According to the invention, dynamic current limiting can be accurately carried out on each business channel, so that the current limiting effect can be improved, and stable operation of the system is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of current limiting control technology, and in particular to a dynamic current limiting method, device, electronic equipment, storage medium and program product. Background Art

[0002] In related technologies, load data is monitored and the current limiting threshold is dynamically adjusted based on the load data according to preset algorithms (such as token buckets, leaky buckets, counters, etc.) to ensure that the system can maintain stable operation under high load conditions. However, data based on a single dimension may not fully reflect the actual operating status of the system, so the current limiting strategy may not be accurate enough. Summary of the invention

[0003] The embodiments of the present invention provide a dynamic current limiting method, device, electronic device, storage medium and program product, which are used to solve the problem that the current limiting strategy in the prior art is not accurate enough and improve the system stability.

[0004] In a first aspect, an embodiment of the present invention provides a dynamic flow limiting method, comprising: obtaining user behavior data of multiple business channels in a preset time period, and load data of the system to which the multiple business channels belong in the preset time period; determining the total amount of data and the amount of abnormal data for each of the business channels based on the user behavior data; determining the flow limiting threshold of each of the business channels according to the total amount of data and the amount of abnormal data for each of the business channels, and the load data; and performing flow limiting processing on the data amount of each of the business channels based on the flow limiting threshold.

[0005] In some embodiments, determining the flow limiting threshold of each of the business channels based on the total amount of data and the amount of abnormal data in each of the business channels, as well as the load data, includes: determining a system performance adjustment factor based on the load data; wherein the system performance adjustment factor is used to characterize the degree of influence of the actual system load level on the flow limiting threshold adjustment; determining the data volume of each of the business channels based on the total amount of data and the amount of abnormal data in each of the business channels; determining the importance weight value of each of the business channels; and determining the flow limiting threshold of each of the business channels based on the data volume and the importance weight value of each of the business channels, as well as the system performance adjustment factor.

[0006] In some embodiments, determining the system performance adjustment factor based on the load data includes: determining the actual load level of the system based on the load data; determining the load difference between the actual load level of the system and the optimal load level of the system; and determining the system performance adjustment factor based on the load difference.

[0007] In some embodiments, the user behavior data includes the online time of each of the business channels; the determining the flow limiting threshold of each of the business channels based on the data volume and importance weight value of each of the business channels, and the system performance adjustment factor includes: determining the flow limiting threshold of each of the business channels based on the data volume, importance weight value and online time of each of the business channels, and the system performance adjustment factor.

[0008] In some embodiments, the flow limiting threshold of each business channel is determined based on the data volume, importance weight value and online time of each business channel, and the system performance adjustment factor, including: determining the time increment factor of each business channel based on the online time of each business channel; wherein the time increment factor is used to characterize the degree of influence of the online time of the business channel on the adjustment of the flow limiting threshold; determining the flow limiting threshold of each business channel based on the data volume, importance weight value and time increment factor of each business channel, and the system performance adjustment factor.

[0009] In some embodiments, the flow limiting threshold of each of the business channels is determined based on the data volume, importance weight value and time increment factor of each of the business channels, and the system performance adjustment factor, including: for each of the business channels, based on the data volume of the business channel, determining the corresponding data volume marginal value; multiplying the data volume marginal value, importance weight value and time increment factor of the business channel, and the system performance adjustment factor, and determining the flow limiting threshold of the business channel based on the multiplication result.

[0010] In the second aspect, an embodiment of the present invention provides a dynamic flow limiting device, including: a first acquisition module, used to obtain user behavior data of each of multiple business channels within a preset time period, and load data of the system to which the multiple business channels belong within the preset time period; a first determination module, used to determine the total data volume and abnormal data volume of each business channel based on the user behavior data; a second determination module, used to determine the flow limiting threshold of each of the business channels based on the total data volume and abnormal data volume of each of the business channels, and the load data; a flow limiting module, used to perform flow limiting processing on the data volume of each of the business channels based on the flow limiting threshold.

[0011] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory storing a computer program, wherein the processor implements the dynamic current limiting method described in the first aspect when executing the program.

[0012] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the dynamic current limiting method described in the first aspect.

[0013] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the dynamic current limiting method described in the first aspect when executed by a processor.

[0014] According to the dynamic current limiting method, device, electronic device, storage medium and program product of the embodiment of the present invention, the user behavior data of each of the multiple business channels within a preset time period and the load data of the system to which the multiple business channels belong within the preset time period are obtained; based on the user behavior data, the total amount of data and the amount of abnormal data of each business channel are determined; according to the total amount of data and the amount of abnormal data of each business channel, as well as the load data, the current limiting threshold of each business channel is determined; and the data volume of each business channel is current limited based on the current limiting threshold. Since the multi-dimensional data of user behavior data and load data can more comprehensively reflect the actual operating status of the system, by adjusting the current limiting threshold of each business channel based on user behavior data and load data, each business channel can be dynamically current limited accurately, thereby improving the effect of current limiting and ensuring the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 One of the flow charts of the dynamic current limiting method provided in the embodiment of the present invention; Figure 2 A second flow chart of a dynamic current limiting method provided in an embodiment of the present invention; Figure 3 A third flow chart of a dynamic current limiting method provided in an embodiment of the present invention; Figure 4 A fourth flow chart of a dynamic current limiting method provided in an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a dynamic current limiting device provided in an embodiment of the present invention; Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0018] With the rapid development of Internet services, the growth of user behavior data has put forward higher requirements on the stability and security of the system. The traditional fixed threshold current limiting method can no longer meet the needs of dynamic changes. Therefore, it is particularly important to develop a current limiting method that can be dynamically adjusted according to multiple key indicators.

[0019] In related technologies, load data is monitored and the current limiting threshold is dynamically adjusted based on the load data according to preset algorithms (such as token buckets, leaky buckets, counters, etc.) to ensure that the system can maintain stable operation under high load conditions. However, data based on a single dimension may not fully reflect the actual operating status of the system, so the current limiting strategy may not be accurate enough.

[0020] In order to solve the above problems, embodiments of the present invention provide a dynamic current limiting method, device, electronic device, storage medium and program product.

[0021] Figure 1 This is a flow chart of a dynamic current limiting method provided by an embodiment of the present invention. Figure 1 As shown, the method may include the following steps.

[0022] Step 101, obtaining user behavior data of each of a plurality of business channels within a preset period of time, and load data of a system to which the plurality of business channels belong within a preset period of time.

[0023] Among them, multiple business channels rely on the same hardware service system. Each business channel can be an application corresponding to a business, or a web page under the corresponding business.

[0024] In some embodiments, data can be buried for each business channel, and user behavior data of each business channel can be obtained through the corresponding API interface. User behavior data refers to the operation behavior data of users in the application of each business channel, such as user click events, user browsing events, etc.

[0025] In some embodiments, the preset time period may be a continuous period of time including the current time and before the current time, such as a continuous 5-minute period including the current time and before the current time. As an example, if the current time is 8:05, the period from 8:01 to 8:05 may be used as the preset time period.

[0026] The load data of the system to which the multiple business channels belong within the preset period may be the load data of the system at each moment within the preset period. As an example, the load data may be CPU utilization, memory utilization, disk I / O speed, network bandwidth utilization, service response time, etc.

[0027] Step 102, based on the user behavior data, determine the total amount of data and the amount of abnormal data for each business channel.

[0028] In some embodiments, user behavior data can be grouped and aggregated according to business channels to obtain user behavior data for each business channel, and the total amount of user behavior data for each business channel within a preset period of time is counted as the total amount of data for each business channel. Based on preset abnormal rules, abnormal data in the user behavior data of each business channel is identified, and the amount of abnormal data for each business channel within the preset period of time is counted.

[0029] Among them, abnormal data can be judged based on preset behavior abnormality rules or system logs.

[0030] Step 103, determining the flow limiting threshold of each business channel according to the total amount of data and the amount of abnormal data of each business channel, as well as the load data.

[0031] Since the importance of each business channel is different, the flow limiting strategy adopted by each business channel is different. In order to make the flow limiting method of the embodiment of the present invention applicable to different scenarios and improve the flexibility of the flow limiting strategy, the flow limiting threshold of each business channel can be determined according to the total amount of data and abnormal data of each business channel, as well as the load data, so that the flow limiting threshold can be calculated separately for each business channel, so that the data of each business channel can be flow limited separately, realizing the precision of the flow limiting strategy.

[0032] In some embodiments, the implementation process of determining the flow limiting threshold of each business channel based on the total amount of data and the amount of abnormal data, as well as the load data of each business channel may include: determining the amount of data of each business channel within the preset period based on the total amount of data and the amount of abnormal data of each business channel within the preset period, that is, the difference between the total amount of data and the amount of abnormal data of each business channel within the preset period; determining the ratio between the optimal load level and the actual load level of the system within the preset period based on the load data within the preset period; and for each business channel, determining the product of the amount of data of the business channel within the preset period and the above ratio as the flow limiting threshold of the business channel.

[0033] In some embodiments, since the importance of each business channel is different, the flow limiting strategy is also different. In the process of determining the flow limiting threshold of each business channel, the importance weight value of each business channel can be introduced. For each business channel, the product of the importance weight value of the business channel, the data volume and the above ratio is determined as the flow limiting threshold of the business channel. Among them, the larger the importance weight value, the larger the flow limiting threshold of the corresponding business channel, that is, the larger the amount of data that can be allowed.

[0034] Step 104: Perform flow limiting processing on the data volume of each service channel based on the flow limiting threshold.

[0035] In some embodiments, the data volume of each business channel within a preset time period can be compared with the corresponding flow limiting threshold. If the data volume of a business channel is greater than or equal to the flow limiting threshold of the business channel, the data exceeding the flow limiting threshold is flow limited.

[0036] It should be noted that the current limiting method of the embodiment of the present invention can be executed in real time or at intervals. As an example, in order to reduce the amount of calculation and ensure the accuracy of the calculation, the embodiment of the present invention can be executed every 5 minutes, and the data of the previous 5 minutes is obtained each time it is executed, that is, the preset time period is a continuous 5-minute period including the current moment and the previous moment, which is equivalent to updating the current limiting threshold every 5 minutes. When the current limiting process is performed, the current limiting is performed based on the current latest current limiting threshold.

[0037] According to the dynamic current limiting method of the embodiment of the present invention, the user behavior data of each of the multiple business channels within a preset time period and the load data of the systems to which the multiple business channels belong within the preset time period are obtained; based on the user behavior data, the total amount of data and the amount of abnormal data of each business channel are determined; according to the total amount of data and the amount of abnormal data of each business channel, as well as the load data, the current limiting threshold of each business channel is determined; and the data volume of each business channel is current limited based on the current limiting threshold. Since the multi-dimensional data of user behavior data and load data can more comprehensively reflect the actual operating status of the system, by adjusting the current limiting threshold of each business channel based on user behavior data and load data, each business channel can be accurately and dynamically current limited, thereby improving the effect of current limiting and ensuring the stable operation of the system.

[0038] Figure 2 The second flow chart of the dynamic current limiting method provided by the embodiment of the present invention. Figure 2 As shown, based on the above embodiments, Figure 1 The implementation process of step 103 in may include the following steps.

[0039] Step 201, determining a system performance adjustment factor according to load data; wherein the system performance adjustment factor is used to characterize the degree of influence of the actual system load level on the current limiting threshold adjustment.

[0040] In some embodiments, the actual load level of the system within a preset period can be determined based on the load data, and the ratio of the optimal load level of the system to the actual load level of the system can be determined as the system performance adjustment factor, wherein the optimal load level of the system is the load level of the system in the optimal working state.

[0041] In other embodiments, the implementation process of determining the system performance adjustment factor based on load data may include: determining the actual load level of the system based on the load data; determining the load difference between the actual load level of the system and the optimal load level of the system; and determining the system performance adjustment factor based on the load difference.

[0042] The process of determining the actual load level of the system according to the load data may be to calculate an average value based on the load data of each period within a preset period to obtain the actual load level of the system.

[0043] As an example, if the load data includes CPU utilization, the actual load level of the system may be the average value of the CPU utilization at each moment; if the system load data includes CPU utilization, memory utilization and network width utilization, the actual load level of the system may be the weighted average value of the CPU utilization, memory utilization and network width utilization in each period within the preset period. The optimal load level may be determined based on the load data of the system in the optimal working state, which may be an indicator value or a weighted average value of multiple load indicator values. The optimal load level is consistent with the indicators included in the actual load level of the system. The actual load level of the system is the weighted average value of the CPU utilization, memory utilization and network width utilization in each period within the preset period, and the optimal load level is the weighted average value of the CPU utilization, memory utilization and network width utilization in the optimal working state.

[0044] As an example, based on the load difference, determining the system performance adjustment factor may be implemented based on the following formula (1).

[0045] ) (1); in, is the system performance adjustment factor at the current time t; To adjust the parameters, it can be a preset value; is the actual load level of the system within the preset time period corresponding to the current time t; is the optimal load level.

[0046] Step 202: Determine the data volume of each business channel according to the total data volume and the abnormal data volume of each business channel.

[0047] That is to say, for each business channel, the difference between the total amount of data of the business channel and the amount of abnormal data of the business channel is determined as the data amount of the business channel.

[0048] Step 203: Determine the importance weight value of each business channel.

[0049] It is understandable that, based on actual needs, the importance of each business channel is different. A larger data volume can be allowed for important business channels, while a smaller flow limit threshold can be set for unimportant business channels.

[0050] In some embodiments, the importance weight value of each business channel can be pre-set to characterize the importance of each business channel. As an example, the importance levels of multiple business channels can be pre-set, such as including four levels of critical, important, general, and secondary, and a mapping relationship table of the importance level of each business channel, the mapping relationship table includes the importance set for each business channel; a mapping relationship table of importance level and importance weight is pre-set, the mapping relationship table includes the importance weight value of each importance level, such as the critical weight of a business channel of the critical level is 1.5, the critical weight of a business channel of the important level is 1.2, the critical weight of a business channel of the general level is 1.0, and the critical weight of a business channel of the secondary level is 0.8.

[0051] Step 204: Determine the flow limiting threshold of each service channel based on the data volume and importance weight value of each service channel and the system performance adjustment factor.

[0052] In some embodiments, for each business channel, the data volume, importance weight value, and system performance adjustment factor of the business channel may be multiplied together, and the multiplication result may be determined as the flow limiting threshold of the business channel.

[0053] According to the current limiting method of an embodiment of the present invention, a system performance adjustment factor is determined based on load data; wherein the system performance adjustment factor is used to characterize the degree of influence of the actual load level of the system on the adjustment of the current limiting threshold; the data volume of each business channel is determined based on the total amount of data and the amount of abnormal data of each business channel; the importance weight value of each business channel is determined; based on the data volume and importance weight value of each business channel, and the system performance adjustment factor, the current limiting threshold of each business channel is determined. By introducing the importance weight value of each business channel, the present invention can determine the current limiting threshold of each business channel based on the importance of each business channel, the data volume of each business channel, and the system performance adjustment factor, thereby not only providing flexibility of the current limiting strategy, but also providing rationality of resource allocation.

[0054] As the online time of each service channel increases, the corresponding service becomes more and more stable, so the corresponding current limiting threshold should be gradually increased. Therefore, in order to improve the accuracy of the current limiting threshold, the present invention proposes another embodiment.

[0055] Figure 3 The third flowchart of the dynamic current limiting method provided by the embodiment of the present invention. In some embodiments, the user behavior data includes the online duration of each business channel. The online duration of each business channel can be the duration from the online start time of each business channel to the current time when the method is currently executed. Figure 3 As shown, based on the above embodiments, Figure 1 The implementation process of step 103 may include the following steps.

[0056] Step 301, determining a system performance adjustment factor according to load data; wherein the system performance adjustment factor is used to characterize the influence of the actual system load level on the current limiting threshold adjustment.

[0057] Step 302: Determine the data volume of each business channel according to the total data volume and the abnormal data volume of each business channel.

[0058] Step 303: Determine the importance weight value of each business channel.

[0059] Step 304, based on the data volume, importance weight value and online time of each business channel, and the system performance adjustment factor, determine the flow limiting threshold of each business channel.

[0060] It is understandable that the longer the online time is, the more stable the business is, so the corresponding current limiting threshold should also be gradually increased.

[0061] In some embodiments, multiple online duration levels can be preset, each online duration level corresponds to an online duration interval, each online duration level corresponds to an online duration weight value, and the longer the online duration, the greater the online duration level, and the greater the online duration weight value. Based on the online duration of each business channel, the online duration weight value of each business channel can be determined. For each business channel, the data volume, importance weight value, online duration weight, and system performance adjustment factor of the business channel are multiplied, and the multiplied result is determined as the flow limiting threshold of the business channel.

[0062] In another embodiment, based on the data volume, importance weight value and online time of each business channel, and the system performance adjustment factor, the implementation process of determining the flow limiting threshold of each business channel may include: determining the time increment factor of each business channel based on the online time of each business channel; wherein the time increment factor is used to characterize the degree of influence of the online time of the business channel on the adjustment of the flow limiting threshold; determining the flow limiting threshold of each business channel based on the data volume, importance weight value and time increment factor of each business channel, and the system performance adjustment factor.

[0063] As an example, the implementation process of determining the time increment factor of each business channel based on the online time of each business channel may include: determining the online weeks of each business channel based on the online time of each business channel; and determining the time increment factor of each business channel based on the online weeks of each business channel. The implementation process of determining the time increment factor of each business channel based on the online weeks of each business channel may be shown in the following formulas (2) and (3).

[0064] (2); (3); in, is the time increment factor of business channel c at the current time t; is the percentage of business channel c increasing with the number of weeks online; is the number of weeks that business channel c has been online at the current time t; is the time when the business channel c starts to go online. is 0.05, is 4, then the incremental factor of the business channel 4 weeks after it goes online is 1 / (1- 0.05)^4=1.2277.

[0065] In some embodiments, based on the data volume, importance weight value and time increment factor of each business channel, and the system performance adjustment factor, the implementation process of determining the flow limiting threshold of each business channel includes: for each business channel, based on the data volume of the business channel, determining the corresponding data volume marginal value; multiplying the data volume marginal value, importance weight value and time increment factor of the business channel, and the system performance adjustment factor, and determining the flow limiting threshold of the business channel based on the multiplication result.

[0066] The data volume margin value of each business channel may be determined by summing the data volume of each business channel and a safety margin threshold value set for each business channel.

[0067] As an example, based on the data volume, importance weight value and time increment factor of each service channel, and the system performance adjustment factor, the flow limiting threshold of each service channel can be determined based on the following formula (4).

[0068] (4); in, is the flow limiting threshold calculated by the service channel c based on the data of the preset time period corresponding to the current time t; is the time increment factor of business channel c at the current time t; is the importance weight value of business channel c; is the data volume of the business channel c in the preset time period corresponding to the current time t, that is, the difference between the total data volume of the business channel c in the preset time period corresponding to the current time t and the abnormal data volume; is the safety margin threshold of business channel c; is the system performance adjustment factor at the current time t.

[0069] Take business channel A as an example. The current online cycle of this business channel is 4 weeks. The time increment factor of business channel A is 1 / (1 - 0.05)^4=1.2277. The total amount of data in the preset time period is 200,000, and the amount of abnormal data is 1,000. Then the amount of data in the preset time period of business channel A is 200,000-1,000=199,000. The importance weight value of business channel A is 1.5. is 50000, the actual system load level in the preset period is the weighted average CPU utilization of 80%, the optimal system load level CPU utilization is 70%, and the system performance adjustment factor is 2 / 3. Based on the above parameters, the flow limiting threshold of business channel A is 277645, that is, when the data volume of business channel A exceeds 277645, flow limiting processing is implemented.

[0070] According to the dynamic flow limiting method of an embodiment of the present invention, by introducing the online time of each business channel, the flow limiting threshold of each business channel is determined based on the data volume, importance weight value and online time of each business channel, and the system performance adjustment factor, so as to improve the accuracy of the flow limiting threshold calculation of each business channel, thereby improving the rationality of resource allocation and the stability of the system.

[0071] In some embodiments, Figure 4 As shown, the dynamic current limiting method of the embodiment of the present invention can be implemented by a data receiving module, a data processing module, a dynamic threshold calculation module and a current limiting module. Specifically, when user behavior data enters the system through an API or other interface through the nginx soft load, the data receiving module (such as a data processing layer) in the system receives user behavior data from various channels, and each data is marked with important fields such as event type, event name, business channel identifier and other business information, and the above user behavior data information is put into kafka; the data processing module reads the user behavior data in kafka and uses Flink for data processing. Through Flink, grouping and aggregation are performed according to the business channel identifier, and a 5-minute time window is created using timeWindow to ensure that the data is aggregated within the specified time period; WindowFunction is used to traverse the data in the window, calculate the total amount of data and the amount of abnormal data in the time window, and store the above results every 5 minutes in the memory database redis; the dynamic threshold calculation module reads the total amount of data and the amount of abnormal data, the online cycle and other data in redis, and calculates the current limiting threshold of each business channel; the current limiting module implements current limiting through Lua scripts at the nginx soft load level. When the data volume of a channel exceeds its dynamically calculated threshold, flow limiting measures are initiated.

[0072] In some embodiments, the dynamic flow limiting method of the embodiment of the present invention also includes monitoring the amount of abnormal data. When the amount of abnormal data in a certain business channel is greater than a preset ratio, an alarm mechanism is triggered and corresponding measures are taken to reduce the risk, such as adjusting the flow limiting threshold, isolating abnormal data, recording abnormal time, etc.

[0073] In order to implement the above embodiment, the embodiment of the present invention further provides a dynamic current limiting device.

[0074] Figure 5 The structure diagram of the dynamic current limiting device provided by the embodiment of the present invention is shown in FIG. Figure 5As shown, the device includes: a first acquisition module 510, a first determination module 520, a second determination module 530, and a current limiting module 540. The first acquisition module 510 is used to obtain the user behavior data of each of the multiple business channels within a preset period of time, and the load data of the system to which the multiple business channels belong within the preset period of time; the first determination module 520 is used to determine the total amount of data and the amount of abnormal data of each business channel based on the user behavior data; the second determination module 530 is used to determine the current limiting threshold of each business channel according to the total amount of data and the amount of abnormal data of each business channel, as well as the load data; the current limiting module 540 is used to perform current limiting processing on the amount of data of each business channel based on the current limiting threshold.

[0075] In some embodiments, the second determination module 530 is specifically used to: determine a system performance adjustment factor based on load data; wherein the system performance adjustment factor is used to characterize the degree of influence of the actual system load level on the adjustment of the current limiting threshold; determine the data volume of each business channel based on the total data volume and abnormal data volume of each business channel; determine the importance weight value of each business channel; determine the current limiting threshold of each business channel based on the data volume and importance weight value of each business channel, and the system performance adjustment factor.

[0076] In some embodiments, the second determination module 530 is further used to: determine the actual load level of the system according to the load data; determine the load difference between the actual load level of the system and the optimal load level of the system; and determine the system performance adjustment factor based on the load difference.

[0077] In some embodiments, the user behavior data includes the online time of each business channel; the second determination module 530 is also used to determine the flow limiting threshold of each business channel based on the data volume, importance weight value and online time of each business channel, as well as the system performance adjustment factor.

[0078] In some embodiments, the second determination module 530 is also used to: determine the time increment factor of each business channel based on the online time of each business channel; wherein the time increment factor is used to characterize the degree of influence of the online time of the business channel on the adjustment of the flow limiting threshold; determine the flow limiting threshold of each business channel based on the data volume, importance weight value and time increment factor of each business channel, as well as the system performance adjustment factor.

[0079] Specifically, the second determination module 530 is also used to: for each business channel, determine the corresponding data volume marginal value based on the data volume of the business channel; multiply the data volume marginal value, importance weight value and time increment factor of the business channel, and the system performance adjustment factor, and determine the flow limiting threshold of the business channel based on the multiplication result.

[0080] It should be noted that the above explanations and descriptions about the embodiment of the dynamic current limiting method are also applicable to the dynamic current limiting device of the embodiment of the present invention, and will not be repeated here.

[0081] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call a computer program in the memory 630 to execute the steps of the dynamic current limiting method.

[0082] For example, the method includes: obtaining user behavior data of each of multiple business channels within a preset time period, and load data of systems to which the multiple business channels belong within a preset time period; determining the total amount of data and the amount of abnormal data for each business channel based on the user behavior data; determining the flow limiting threshold for each business channel based on the total amount of data and the amount of abnormal data for each business channel, as well as the load data; and performing flow limiting processing on the data volume of each business channel based on the flow limiting threshold.

[0083] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0084] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the dynamic current limiting method provided in the above embodiments.

[0085] The method includes: obtaining user behavior data of each of a plurality of business channels within a preset time period, and load data of a system to which the plurality of business channels belong within a preset time period; determining the total amount of data and the amount of abnormal data of each business channel based on the user behavior data; determining a flow limiting threshold of each business channel based on the total amount of data and the amount of abnormal data of each business channel, as well as the load data; and performing flow limiting processing on the amount of data of each business channel based on the flow limiting threshold.

[0086] On the other hand, an embodiment of the present invention further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the steps of the dynamic current limiting method provided in the above embodiments.

[0087] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0088] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dynamic current limiting method, characterized in that: include: Obtaining user behavior data of each of a plurality of business channels within a preset period of time, and load data of a system to which the plurality of business channels belong within the preset period of time; Based on the user behavior data, determine the total amount of data and the amount of abnormal data for each of the business channels; Determine a flow limiting threshold for each of the service channels according to the total amount of data and the amount of abnormal data in each of the service channels, as well as the load data; The data volume of each of the business channels is limited based on the limit threshold.

2. The method according to claim 1, characterized in that Determining the flow limiting threshold of each of the service channels according to the total amount of data and the amount of abnormal data of each of the service channels and the load data includes: Determine a system performance adjustment factor according to the load data; wherein the system performance adjustment factor is used to characterize the degree of influence of the actual system load level on the current limiting threshold adjustment; Determining the data volume of each of the business channels according to the total data volume and the abnormal data volume of each of the business channels; Determining an importance weight value for each of the business channels; Based on the data volume and importance weight value of each of the business channels, and the system performance adjustment factor, a flow limiting threshold of each of the business channels is determined.

3. The method according to claim 2, characterized in that Determining the system performance adjustment factor according to the load data includes: determining an actual load level of the system according to the load data; determining a load difference between an actual load level of the system and an optimal load level of the system; Based on the load difference, the system performance adjustment factor is determined.

4. The method according to claim 2, characterized in that: The user behavior data includes the online time of each of the business channels; the flow limiting threshold of each of the business channels is determined based on the data volume and importance weight value of each of the business channels and the system performance adjustment factor, including: Based on the data volume, importance weight value and online time of each business channel, and the system performance adjustment factor, the flow limiting threshold of each business channel is determined.

5. The method according to claim 4, characterized in that Determining the flow limiting threshold of each of the business channels based on the data volume, importance weight value and online duration of each of the business channels, and the system performance adjustment factor, includes: Based on the online duration of each of the business channels, determine the time increment factor of each of the business channels; wherein the time increment factor is used to characterize the degree of influence of the online duration of the business channel on the adjustment of the current limiting threshold; Based on the data volume, importance weight value and time increment factor of each business channel, and the system performance adjustment factor, the flow limiting threshold of each business channel is determined.

6. The method according to claim 5, characterized in that The determining of the flow limiting threshold of each of the service channels based on the data volume, importance weight value and time increment factor of each of the service channels, and the system performance adjustment factor, includes: For each of the business channels, based on the data volume of the business channel, determining a corresponding data volume marginal value; The data volume marginal value, the importance weight value and the time increment factor of the business channel and the system performance adjustment factor are multiplied together, and the flow limiting threshold of the business channel is determined based on the multiplication result.

7. A dynamic current limiting device, characterized in that: include: A first acquisition module is used to acquire user behavior data of each of a plurality of business channels within a preset period of time, and load data of a system to which the plurality of business channels belong within the preset period of time; A first determination module, configured to determine the total amount of data and the amount of abnormal data of each business channel based on the user behavior data; A second determination module is used to determine a flow limiting threshold of each of the business channels according to the total amount of data and the amount of abnormal data of each of the business channels and the load data; The flow limiting module is used to perform flow limiting processing on the data volume of each of the business channels based on the flow limiting threshold.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the dynamic current limiting method according to any one of claims 1 to 7 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the dynamic current limiting method according to any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the dynamic current limiting method according to any one of claims 1 to 7 is implemented.