System flow distribution method, device, equipment and computer-readable storage medium

By analyzing the concurrency threshold, stability coefficient, and risk level, calculating the diversion index, and optimizing the traffic distribution of the multi-site active-active system, we solved the node overload problem caused by uneven traffic and ensured the normal operation of the business.

CN114828099BActive Publication Date: 2025-09-19MIGU CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210455284.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2025-09-19
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

In a multi-site active-active system, uneven traffic distribution can lead to excessive requests to certain nodes, increased processing latency, and even node downtime.

Method used

By determining the concurrency threshold possibility, system stability coefficient and risk level of each system, the diversion index is calculated to optimize traffic distribution.

Benefits of technology

It improves the accuracy of system traffic distribution, avoids node overload, and ensures normal business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114828099B_ABST
    Figure CN114828099B_ABST
Patent Text Reader

Abstract

The present invention discloses a system traffic distribution method, apparatus, device, and computer-readable storage medium. The method includes: determining the probability that the concurrent number threshold of each system exceeds a preset concurrent number threshold; determining the system stability coefficient of each system and setting a corresponding risk level based on the system stability coefficient; determining a corresponding diversion index for each system based on the risk level, the probability, and the credibility of the risk level; and allocating the received system traffic to the corresponding system based on the diversion index. This improves the accuracy of system traffic distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet communication technology, and in particular to a system traffic distribution method, device, equipment and computer-readable storage medium. Background Art

[0002] Generally, large-scale systems will be configured with multi-site active-active configurations. Multiple systems will be built in different locations. Multiple systems can carry business traffic simultaneously. When a site fails (hardware problems, power outages in the computer room, or other natural disasters such as earthquakes), it can quickly (in minutes) switch to other remote sites to ensure the normal operation of the system.

[0003] When implementing multi-site active-active, it is necessary to consider the issue of traffic distribution under normal business conditions. This is equivalent to dividing the system into multiple nodes, and the processing performance of each node is only a portion of the total performance. If the traffic is unevenly distributed, it will lead to an increase in the business volume of other nodes, and the pressure on the system of a single node will increase, which may affect the normal processing of the business. The usual processing solution is to directly allocate the business to the nearest node for processing based on the distance from the request location to the system node or the area of ​​the request. However, the source of user requests is uncertain. For example, when promoting business in a certain place, there may be a sudden increase in users and requests, or other situations that cause a surge in system visits and the number of users. Distributing traffic in this way may lead to excessive requests to a certain node, longer processing delays, business backlogs, or even node downtime. Summary of the Invention

[0004] The main purpose of the present invention is to provide a system flow distribution method, device, equipment and computer-readable storage medium, aiming to improve the accuracy of system flow distribution.

[0005] To achieve the above object, the present invention provides a system flow distribution method, which includes the following steps:

[0006] Determine the likelihood that the concurrent number threshold of each system exceeds the preset concurrent number threshold;

[0007] Determine the system stability coefficient of each system and set the corresponding risk level according to the system stability coefficient;

[0008] A diversion index corresponding to each of the systems is determined according to the risk level, the possibility, and the credibility of the risk level, and the received system traffic is allocated to the corresponding system according to the diversion index.

[0009] Optionally, the step of determining the possibility that the concurrency threshold of each system exceeds a preset concurrency threshold includes:

[0010] Obtaining the maximum concurrent number of each of the systems and a set of concurrent numbers obtained by the system at a preset collection interval in a preset period;

[0011] The possibility that the concurrency threshold of each system exceeds the preset concurrency threshold is determined according to the maximum concurrency, the preset period, and the set.

[0012] Optionally, the step of determining, based on the maximum concurrent number, the preset period, and the probability that the concurrent number threshold of each system in the set exceeds the preset concurrent number threshold, includes:

[0013] According to the maximum concurrency number, the tolerable concurrency number of each system in the preset collection interval is obtained;

[0014] Obtaining the remaining concurrency of each system within the preset period according to the tolerable concurrency of the system and the set of the concurrency numbers;

[0015] Determine the ratio of each remaining concurrency to the tolerable concurrency of each system, the preset period, and the maximum concurrency as the probability that the concurrency threshold of each system exceeds the preset concurrency threshold.

[0016] Optionally, the step of determining the system stability coefficient of each system includes:

[0017] Obtaining a collection of processing times for each request processed by each system within a preset period;

[0018] Obtaining the average response time and response time variance of each system;

[0019] The system stability coefficient is determined according to the average response time, the response time variance, and the set.

[0020] Optionally, the step of setting a corresponding risk level according to the system stability coefficient includes:

[0021] When the difference in stability coefficients of the systems is greater than a preset value, a corresponding risk level is set according to resource information of each system.

[0022] Optionally, while performing the step of setting the corresponding risk level according to the resource information of each system, the following steps are further performed:

[0023] Determine the credibility of the risk level based on the time interval between the target task of each system and the last update;

[0024] When the credibility of the risk level is lower than a preset value, the target task is restarted.

[0025] Optionally, the step of determining a diversion index corresponding to each of the systems according to the risk level, the possibility, and the credibility of the risk level, and determining to allocate the received system traffic to the corresponding system according to the diversion index includes:

[0026] Determine the current cycle of the target task according to the credibility;

[0027] Determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the period;

[0028] The received system traffic is distributed to the corresponding system according to the diversion index.

[0029] To achieve the above object, the present invention further provides a system flow distribution device, the system flow distribution device comprising:

[0030] A receiving module, configured to determine the possibility that the concurrent number threshold of each system exceeds a preset concurrent number threshold;

[0031] A first determination module is used to determine the system stability coefficient of each system and set a corresponding risk level according to the system stability coefficient;

[0032] The second determining module is configured to determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the credibility of the risk level, and to allocate the received system traffic to the corresponding system according to the diversion index.

[0033] To achieve the above-mentioned purpose, the present invention also provides a system flow distribution device, which includes a memory, a processor, and a system flow distribution program stored in the memory and executable on the processor. When the system flow distribution program is executed by the processor, the various steps of the system flow distribution method described above are implemented.

[0034] To achieve the above objectives, the present invention further provides a computer-readable storage medium, which stores a system flow distribution program. When the system flow distribution program is executed by a processor, it implements the various steps of the system flow distribution method described above.

[0035] The present invention provides a system traffic distribution method, apparatus, device, and computer-readable storage medium. These methods determine the likelihood that each system's concurrency threshold exceeds a preset concurrency threshold, determine the system stability coefficient for each system, set a corresponding risk level based on the system stability coefficient, determine a corresponding diversion index for each system based on the risk level, the likelihood, and the credibility of the risk level, and allocate received system traffic to the corresponding system based on the diversion index. By analyzing the diversion index of each system, the accuracy of allocating system traffic is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of the hardware structure of a system flow distribution device involved in an embodiment of the present invention;

[0037] Figure 2 A flow chart of an embodiment of a system flow distribution method of the present invention;

[0038] Figure 3 Detailed flowchart of step S20 of another embodiment of the system flow distribution method of the present invention;

[0039] Figure 4 Schematic diagram of the flow chart of the system flow distribution method of the present invention;

[0040] Figure 5 This is a module diagram of the system flow distribution method of the present invention.

[0041] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0043] The main solution of the embodiment of the present invention is: determining the possibility that the concurrency threshold of each system exceeds the preset concurrency threshold; determining the system stability coefficient of each system, and setting the corresponding risk level according to the system stability coefficient; determining the diversion index corresponding to each system according to the risk level, the possibility and the credibility of the risk level, and determining to distribute the received system traffic to the corresponding system according to the diversion index.

[0044] As an implementation solution, the system flow distribution device can be Figure 1 shown.

[0045] The embodiment of the present invention relates to a system flow distribution device, which includes a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to achieve connection and communication between these components.

[0046] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a system flow distribution program; and the processor 101 may be used to call the system flow distribution program stored in the memory 102 and perform the following operations:

[0047] Determine the likelihood that the concurrent number threshold of each system exceeds the preset concurrent number threshold;

[0048] Determine the system stability coefficient of each system and set the corresponding risk level according to the system stability coefficient;

[0049] A diversion index corresponding to each of the systems is determined according to the risk level, the possibility, and the credibility of the risk level, and the received system traffic is allocated to the corresponding system according to the diversion index.

[0050] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0051] Obtaining the maximum concurrent number of each of the systems and a set of concurrent numbers obtained by the system at a preset collection interval in a preset period;

[0052] The possibility that the concurrency threshold of each system exceeds the preset concurrency threshold is determined according to the maximum concurrency, the preset period, and the set.

[0053] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0054] According to the maximum concurrency number, the tolerable concurrency number of each system in the preset collection interval is obtained;

[0055] Obtaining the remaining concurrency of each system within the preset period according to the tolerable concurrency of the system and the set of the concurrency numbers;

[0056] Determine the ratio of each remaining concurrency to the tolerable concurrency of each system, the preset period, and the maximum concurrency as the probability that the concurrency threshold of each system exceeds the preset concurrency threshold.

[0057] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0058] Obtaining a collection of processing times for each request processed by each system within a preset period;

[0059] Obtaining the average response time and response time variance of each system;

[0060] The system stability coefficient is determined according to the average response time, the response time variance, and the set.

[0061] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0062] When the difference in stability coefficients of the systems is greater than a preset value, a corresponding risk level is set according to resource information of each system.

[0063] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0064] Determine the credibility of the risk level based on the time interval between the target task of each system and the last update;

[0065] When the credibility of the risk level is lower than a preset value, the target task is restarted.

[0066] In one embodiment, the processor 101 may be configured to call the system traffic allocation program stored in the memory 102 and perform the following operations:

[0067] Determine the current cycle of the target task according to the credibility;

[0068] Determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the period;

[0069] The received system traffic is distributed to the corresponding system according to the diversion index.

[0070] Generally, large-scale systems will be configured with multi-site active-active configurations. Multiple systems will be built in different locations. Multiple systems can carry business traffic simultaneously. When a site fails (hardware problems, power outages in the computer room, or other natural disasters such as earthquakes), it can quickly (in minutes) switch to other remote sites to ensure the normal operation of the system.

[0071] When implementing multi-site active-active, it is necessary to consider the issue of traffic distribution under normal business conditions. This is equivalent to dividing the system into multiple nodes, and the processing performance of each node is only a portion of the total performance. If the traffic is unevenly distributed, it will lead to an increase in the business volume of other nodes, and the pressure on the system of a single node will increase, which may affect the normal processing of the business. The usual processing solution is to directly allocate the business to the nearest node for processing based on the distance from the request location to the system node or the area of ​​the request. However, the source of user requests is uncertain. For example, when promoting business in a certain place, there may be a sudden increase in users and requests, or other situations that cause a surge in system visits and the number of users. Distributing traffic in this way may lead to excessive requests to a certain node, longer processing delays, business backlogs, or even node downtime.

[0072] An embodiment of the system flow distribution method of the present invention is proposed.

[0073] Reference Figure 2 , Figure 2 This is an embodiment of the system flow distribution method of the present invention, and the system flow distribution method includes the following steps:

[0074] Step S10, determining the possibility that the concurrent number threshold of each system exceeds the preset concurrent number threshold;

[0075] The execution subject of this embodiment is the system flow distribution device. In this application, the system flow distribution device can control multiple systems. Optionally, in this application, two systems are used as an example for description.

[0076] Optionally, in this embodiment, the maximum concurrency number of each system and the set of concurrency numbers obtained by the system at a preset collection interval in a preset period are obtained, and the possibility that the concurrency number threshold of each system exceeds the preset concurrency number threshold is determined based on the maximum concurrency number, the preset period, and the set.

[0077] The maximum number of concurrent connections of each system is C. m .

[0078] The preset period is T, and the preset collection interval is the time interval for obtaining the concurrent number of each system in period T, thereby obtaining the set C of concurrent numbers collected by the system within the period T at the preset collection interval. t (1≤t≤T).

[0079] For example, in this embodiment, a scheduled task (GET_CONCURRENCY_TASK) is deployed and started in the background of the two systems to obtain the number of concurrent users of the system per minute, and is run once per minute.

[0080] Optionally, in this embodiment, when the memory usage of the system is lower than 50%, the system starts to detect the current actual number of concurrent requests per minute and obtains a collection.

[0081] Optionally, you can set the threshold of concurrent requests per minute that the system can tolerate, for example, in Set to 80% C m , that is, the threshold of concurrent number per minute that the system can tolerate is C m It is understood that this percentage can be set according to the actual operation of the system.

[0082] The probability that the system's concurrent number threshold exceeds the system's preset concurrent number threshold is calculated once every time period, according to the formula:

[0083]

[0084] First, multiply the maximum number of concurrent connections in the system by the threshold of the number of concurrent connections per minute that the system can tolerate (generally set to a constant of 80%), and the result is the number of concurrent connections per minute that the system can tolerate. Then subtract the number of concurrent connections in the tth minute to get the remaining number of concurrent connections. Then add up all the remaining concurrency that can be generated in this cycle. For example, the maximum is 1000, 900 have been generated, and the remaining 100 is the remaining tolerable number of concurrent connections. Finally, divide it by the product of "the product of the maximum number of concurrent connections in the system and the threshold of the number of concurrent connections per minute that the system can tolerate (generally set to a constant of 80%)" and the product of "the number of cycles". The final result is considered to be the possibility that the system concurrency threshold exceeds the system preset concurrency threshold.

[0085] When the two remote systems are initially deployed, a timed task (GET_OVER_THRESHOLD_TASK) is deployed and started in the background to calculate the probability of the system exceeding the maximum concurrency number. This task is executed every 5 minutes at a preset period. Then, by substituting T=5 into the above formula, the probability P of the system concurrency threshold exceeding the system preset concurrency threshold is calculated. c , and the P obtained by the two systems CA 、P CB The remaining concurrency is determined, and the ratio of the remaining concurrency to the tolerable concurrency of each system, the preset period, and the maximum concurrency is used to determine the probability that the concurrency threshold of each system exceeds the preset concurrency threshold, providing a basis for determining to allocate the currently received system traffic to the corresponding system.

[0086] Step S20, determining the system stability coefficient of each system, and setting a corresponding risk level according to the system stability coefficient;

[0087] Optionally, a set of processing time for each system to process each request within a preset period is obtained, an average response time and response time variance of each system are obtained, and a system stability coefficient is determined based on the average response time, response time variance and the set.

[0088] After detecting that the user terminal initiates a request, determine the probability P of each system's concurrent number threshold exceeding the system's preset concurrent number threshold CA 、P CB , send the current request to the system corresponding to the value with the smaller probability. For example, after system A processes the request, it records the response time and summarizes it to get the set RT A .

[0089] Optionally, in this embodiment, the acquisition rate may be set to avoid concurrent processing of received requests when the system is busy.

[0090] Assuming the acquisition rate is 80%, it means that the system receives 10 requests, 8 of which will start synchronization tasks. The synchronization task is that the system forwards the request to P c The system with the smaller value will send the same request to another system at the same time and also record the response time. That is, when querying the user system from system A and returning the response to the user, it will also send the same request to system B and record the response time RT when getting the request response. B , the summary set is RT B For example, if the collection rate is set to 80%, the system receives 10 requests, 8 of which will start synchronization tasks, and the response time of these 8 requests will be collected. This will give the processing time set of the two systems within the preset period. and

[0091] During system initialization and deployment, the background deploys and starts a scheduled task (GET_RESPONSE_TIME_TASK) for traffic distribution correction to obtain the system response time set to calculate the final system stability coefficient.

[0092] For example, you can collect response time data every M hours, assuming M = 1. Optionally, in the early stage, when the system business volume and data volume are small, you can set the task cycle M to be larger to ensure that the data volume within one cycle is large enough. In the later stage, when the business volume is large, you can adjust the cycle M to be shorter, so that the system can adjust flexibly. That is, the response time data within one hour is an RT set. The final task is the set G RT ={RT1,RT2,...,RT M}, then the RT set of system A within 1 hour is:

[0093]

[0094] The stability coefficient of system A is calculated according to the following formula:

[0095]

[0096] in, Indicates the average square of the system response time difference obtained within a GET_RESPONSE_TIME_TASK task cycle. A smaller value indicates a smaller system response time difference within the cycle and a more stable system within the cycle. The average value of the square of the system response time difference over M cycles is expressed as RT A The average of the differences in the squares of the system response time differences. The average value of the square of the difference between the calculated response time and the average response time. The smaller the value obtained by the final formula, the more stable the system operation is, which is used as the stability coefficient of the system. The final result represents the system stability coefficient reflected by the response time dimension of system A, and then G RTB Substituting this into the formula, we can obtain the system stability coefficient reflected by the response time dimension of system B.

[0097] Compare the system stability coefficients of systems A and B. If the difference between the two values ​​is small, both systems are relatively stable and the traffic distribution method can continue to operate. If there is a significant difference between the stability coefficients of A and B, the corresponding risk level (RL) can be set based on the specific system resource conditions. The default value is 0. After the identification result of the target task (GET_RESPONSE_TIME_TASK) is released, the risk indicator (RL) is updated on a scale of 0 to 1. RL = 0.1 indicates a risk warning, and RL = 1 indicates a severe alarm.

[0098] Step S30 , determining a diversion index corresponding to each of the systems according to the risk level, the possibility, and the credibility of the risk level, and allocating the received system traffic to the corresponding system according to the diversion index.

[0099] The system diversion index calculation formula is:

[0100] P c ×0.084i+RL×(1-0.084i) (Formula 3);

[0101] The risk level, the likelihood, and the credibility of the risk level are used to determine the corresponding diversion index for each of the systems. Optionally, in this embodiment, it can be determined that the currently received system traffic will be distributed to the system with the smallest diversion index, or the system whose diversion index meets a preset threshold, where the preset threshold can be set based on actual conditions. For example, when there are two systems, the currently received system traffic will be distributed to the system with the smallest diversion index; when there are three or more systems, the currently acquired system traffic will be randomly distributed to the system whose diversion index meets the preset threshold. When it is further determined that there are two or more systems whose diversion index meets the preset threshold, any one of the systems can be randomly selected and the currently received system traffic will be distributed to that system.

[0102] In this embodiment, the likelihood of each system's concurrent count threshold exceeding a preset concurrent count threshold is determined, the system stability coefficient of each system is determined, and a corresponding risk level is set based on the system stability coefficient. A corresponding diversion index is determined for each system based on the risk level, the likelihood, and the credibility of the risk level. The received system traffic is then allocated to the corresponding system based on the diversion index. By analyzing the diversion index of each system, the accuracy of allocating system traffic is improved.

[0103] Reference Figure 3 , Figure 3 This is another embodiment of the system flow distribution method of the present invention, based on the first embodiment, and step S20 includes:

[0104] Step S21 : When the difference in the stability coefficients of the systems is greater than a preset value, a corresponding risk level is set according to the resource information of each system.

[0105] It is understood that in this embodiment, when GET_RESPONSE_TIME_TASK and GET_OVER_THRESHOLD_TASK are just completed, the result represents the current state of the system, and the RL credibility is 100%. Since GET_OVER_THRESHOLD_TASK is executed once, the result of GET_RESPONSE_TIME_TASK (target task) is from 5 minutes ago, and GET_OVER_THRESHOLD_TASK is executed a second time, the result of GET_RESPONSE_TIME_TASK is from 10 minutes ago. In other words, as time increases, the cycle of GET_RESPONSE_TIME_TASK is one hour. Therefore, the longer the interval, the more likely the system will change, and thus the credibility will continue to decrease. The cycle of GET_OVER_THRESHOLD_TASK is 5 minutes, and the cycle of GET_RESPONSE_TIME_TASK is 1 hour, i.e., 60 minutes. Here, we assume that by the 12th cycle of GET_OVER_THRESHOLD_TASK, the credibility is 0. Each time GET_OVER_THRESHOLD_TASK executes, the credibility decreases by 100 / 12, which is approximately 8.4. Therefore, each subsequent execution of GET_OVER_THRESHOLD_TASK reduces the credibility of the RL by 8.4%. The results of rerunning GET_RESPONSE_TIME_TASK reflect the latest system state, so it is considered to have the highest credibility here. Therefore, each time GET_RESPONSE_TIME_TASK executes, the credibility of the RL is reset to 100%.

[0106] Optionally, in this embodiment, when the credibility of GET_RESPONSE_TIME_TAS is less than a preset value, it indicates that the credibility of the currently calculated risk level is low, and the target task receiving is restarted to improve the accuracy of determining the risk level.

[0107] Reference Figure 4 , Figure 4This is a flowchart of the application. This application proposes three tasks, namely GET_CONCURRENCY_TASK: Get the number of concurrent users per minute, GET_OVER_THRESHOLD_TASK: Calculate the possibility of the system exceeding the maximum number of concurrent users, and GET_RESPONSE_TIME_TASK: Get the final system stability coefficient. These three tasks can be started from the start of the system. The statistical period of each task may be different: GET_CONCURRENCY_TASK is counted once a minute to get the number of concurrent users per minute as the input condition for GET_OVER_THRESHOLD_TASK calculation; the period of GET_OVER_THRESHOLD_TASK is greater than or equal to one minute. Each time it is executed, the possibility of exceeding the maximum number of concurrent users is calculated based on the concurrency data obtained by the GET_CONCURRENCY_TASK task; GET_RESPONSE_TIME_TASK is to obtain the response time set of the system to calculate the final system stability coefficient.

[0108] When the system boots up, the three tasks are initiated simultaneously and executed according to their respective cycles. Each user's request to the system follows the steps outlined in the process. If there is no system risk, the request completes at the "Forward system traffic to a system with a lower traffic volume" step. The subsequent process collects data and calculates the system risk level. If the system risk level is greater than 0, the request is forwarded to a system with a lower traffic diversion index based on the results of the three tasks. All requests are forwarded according to this process.

[0109] The present invention also provides a system flow distribution device, the system flow distribution device comprising:

[0110] The receiving module 10 is configured to determine the possibility that the concurrent number threshold of each system exceeds the preset concurrent number threshold;

[0111] A first determination module 20 is configured to determine a system stability coefficient of each system and set a corresponding risk level according to the system stability coefficient;

[0112] The second determining module 30 is configured to determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the credibility of the risk level, and to allocate the received system traffic to the corresponding system according to the diversion index.

[0113] In one embodiment, in determining the possibility that the concurrency threshold of each system exceeds the preset concurrency threshold, the receiving module 10 is specifically configured to:

[0114] Obtaining the maximum concurrent number of each of the systems and a set of concurrent numbers obtained by the system at a preset collection interval in a preset period;

[0115] The possibility that the concurrency threshold of each system exceeds the preset concurrency threshold is determined according to the maximum concurrency, the preset period, and the set.

[0116] In one embodiment, based on the maximum number of concurrent connections, the preset period, and the likelihood that the concurrent connection threshold of each system in the set exceeds the preset concurrent connection threshold, the receiving module 10 is specifically configured to:

[0117] According to the maximum concurrency number, the tolerable concurrency number of each system in the preset collection interval is obtained;

[0118] Obtaining the remaining concurrency of each system within the preset period according to the tolerable concurrency of the system and the set of the concurrency numbers;

[0119] Determine the ratio of each remaining concurrency to the tolerable concurrency of each system, the preset period, and the maximum concurrency as the probability that the concurrency threshold of each system exceeds the preset concurrency threshold.

[0120] In one embodiment, based on the maximum number of concurrent connections, the preset period, and the likelihood that the concurrent connection threshold of each system in the set exceeds the preset concurrent connection threshold, the first determining module 20 is specifically configured to:

[0121] Obtaining a collection of processing times for each request processed by each system within a preset period;

[0122] Obtaining the average response time and response time variance of each system;

[0123] The system stability coefficient is determined according to the average response time, the response time variance, and the set.

[0124] In one embodiment, in determining the corresponding risk level according to the system stability coefficient, the first determination module 20 is specifically configured to:

[0125] When the difference in stability coefficients of the systems is greater than a preset value, a corresponding risk level is set according to resource information of each system.

[0126] In one embodiment, in terms of setting a corresponding risk level according to resource information of each system, the second determination module 30 is specifically configured to:

[0127] Determine the credibility of the risk level based on the time interval between the target task of each system and the last update;

[0128] When the credibility of the risk level is lower than a preset value, restart the target task. Determine the current cycle of the target task based on the credibility;

[0129] Determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the period;

[0130] The received system traffic is distributed to the corresponding system according to the diversion index.

[0131] The present invention also provides a system flow distribution device, which includes a memory, a processor, and a system flow distribution program stored in the memory and executable on the processor. When the system flow distribution program is executed by the processor, it implements the various steps of the system flow distribution method described in the above embodiment.

[0132] The present invention also provides a computer-readable storage medium, which stores a system flow distribution program. When the system flow distribution program is executed by a processor, it implements the various steps of the system flow distribution method described in the above embodiment.

[0133] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0134] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, system, article, or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, system, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, system, article, or device comprising the element.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment system can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, parking management equipment, air conditioner, or network equipment, etc.) to execute the system described in each embodiment of the present invention.

[0136] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A system flow distribution method, characterized in that: The system flow distribution method includes: Obtaining the maximum concurrent number of each system and the set of concurrent numbers obtained by the system in a preset period at a preset collection interval; According to the maximum concurrency number, the tolerable concurrency number of each system in the preset collection interval is obtained; Obtaining the remaining concurrency of each system within the preset period according to the tolerable concurrency of the system and the set of the concurrency numbers; Determine the product of the tolerable concurrency number of each system, the preset period, and the maximum concurrency number, determine the ratio of each remaining concurrency number to the product, and determine the ratio as the probability that the concurrency number threshold of each system exceeds the preset concurrency number threshold; Obtaining a set of processing times for each request processed by each system within a preset period; Obtaining the average response time and response time variance of each system; Determining a system stability coefficient based on the average response time, the response time variance, and the processing time, and setting a corresponding risk level based on the system stability coefficient; The diversion index corresponding to each system is determined based on the risk level, the possibility and the credibility of the risk level. The received system traffic is distributed to the corresponding system based on the diversion index. The credibility of the risk level is determined based on the time interval between the target task of each system and the last update.

2. The system flow distribution method according to claim 1, characterized in that: The step of setting a corresponding risk level according to the system stability coefficient includes: When the difference in stability coefficients of the systems is greater than a preset value, a corresponding risk level is set according to resource information of each system.

3. The system flow distribution method according to claim 2, characterized in that: While executing the setting of the corresponding risk level according to the resource information of each system, the following is also executed: Determine the credibility of the risk level based on the time interval between the target task of each system and the last update; When the credibility of the risk level is lower than a preset value, the target task is restarted.

4. The system flow distribution method according to claim 1, characterized in that: The step of determining a diversion index corresponding to each of the systems according to the risk level, the possibility, and the credibility of the risk level, and determining to distribute the received system traffic to the corresponding system according to the diversion index, includes: Determine the current cycle of the target task according to the credibility; Determine a diversion index corresponding to each of the systems according to the risk level, the possibility, and the period; The received system traffic is distributed to the corresponding system according to the diversion index.

5. A system flow distribution device, characterized in that: The system flow distribution device includes: A receiving module is configured to obtain a maximum concurrency number of each system and a set of concurrency numbers obtained by the system at a preset collection interval in a preset period; obtain a tolerable concurrency number of each system in the preset collection interval based on the maximum concurrency number; obtain a remaining concurrency number of each system in the preset period based on the tolerable concurrency number and the set of concurrency numbers; determine a product of the tolerable concurrency number of each system, the preset period, and the maximum concurrency number, determine a ratio of each remaining concurrency number to the product, and determine that the ratio is a probability that the concurrency number threshold of each system exceeds the preset concurrency threshold; a first determination module configured to obtain a set of processing times for each request processed by each system within a preset period; obtain an average response time and a response time variance of each system; determine a system stability coefficient based on the average response time, the response time variance, and the processing time, and set a corresponding risk level based on the system stability coefficient; The second determination module is used to determine the diversion index corresponding to each of the systems based on the risk level, the possibility and the credibility of the risk level, and to determine the distribution of the received system traffic to the corresponding system based on the diversion index. The credibility of the risk level is determined based on the time interval between the target task of each system and the last update.

6. A system flow distribution device, characterized in that: The system flow distribution device includes a memory, a processor, and a system flow distribution program stored in the memory and executable on the processor. When the system flow distribution program is executed by the processor, the system flow distribution program implements the various steps of the system flow distribution method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a system flow distribution program, and when the system flow distribution program is executed by a processor, each step of the system flow distribution method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Shunting method, data service system, front end of data service system and storage medium

    CN110083485A

  • Business risk control adjustment method, apparatus and device, and storage medium

    CN110737889A