Traffic distribution method and device, electronic equipment and storage medium
By obtaining the service operation data of the pending cluster, determining the evaluation attributes and reasonably allocating traffic, the problem of discontinuity of business processing in the existing technology is solved, and the stability and continuity of business processing are achieved.
Patent Information
- Application Number
- CN202411658256.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, when applying cluster processing services, the continuity of business processing cannot be guaranteed, and business processing interruptions are prone to problems.
From the perspective of business processing, the service operation data of the pending cluster is obtained, including the service processing volume, business response time and business completion rate, and determine the evaluation attributes of the pending cluster in the response dimension and completion rate dimension, so as to reasonably allocate traffic and ensure the continuity of business processing.
By reasonably allocating traffic, we ensure that the pending clusters with better operating conditions can allocate more traffic, ensuring the continuity of service processing of each pending cluster and avoiding interruptions in business processing.
Smart Images

Figure CN119576559A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a flow distribution method, device, electronic equipment and storage medium. Background Art
[0002] When the application cluster is processing key services, if the cluster is unstable or keeps reporting errors, it will affect the user experience of handling key services and even cause business losses. For example, key services can be user login, identity authentication, or resource transfer. Therefore, it is particularly important to ensure the stability of cluster operation and the continuity of business processing.
[0003] At present, the flow is mainly distributed by the memory usage of the application cluster when processing business. However, the above method cannot guarantee the continuity of business processing and is prone to business processing interruption. Summary of the invention
[0004] The present invention provides a flow distribution method, device, electronic device and storage medium, which distribute flow to a processing cluster from the perspective of business processing, realize reasonable distribution of flow and ensure the continuity of business processing of each processing cluster.
[0005] According to one aspect of the present invention, a traffic distribution method is provided, which is applied to at least one to-be-processed cluster, and the method includes:
[0006] For at least one to-be-processed cluster, obtain business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate;
[0007] For different business types, the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types;
[0008] According to the first evaluation attribute and the second evaluation attribute of the at least one to-be-processed cluster, a target flow rate allocated to the at least one to-be-processed cluster is determined.
[0009] According to another aspect of the present invention, a traffic distribution device is provided, which is applied to at least one to-be-processed cluster, and includes:
[0010] A data acquisition module, used for acquiring, for at least one to-be-processed cluster, business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate;
[0011] An evaluation attribute determination module is used to determine, for different business types, a first evaluation attribute of the to-be-processed cluster in the response dimension and a second evaluation attribute in the completion rate dimension according to the business processing volume, business response time and business completion rate of the different business types;
[0012] The target flow determination module is used to determine the target flow allocated to at least one to-be-processed cluster according to the first evaluation attribute and the second evaluation attribute of at least one to-be-processed cluster.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the flow distribution method of any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flow distribution method of any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, the computer program implements the traffic distribution method as described in any embodiment of the present invention.
[0019] The technical solution of the embodiment of the present invention provides data support for the subsequent determination of the evaluation attributes of traffic allocation by obtaining the business operation data generated by each to-be-processed cluster under different business types. For different business types, the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types. According to the first evaluation attribute and the second evaluation attribute of at least one to-be-processed cluster, the target traffic allocated to at least one to-be-processed cluster is determined, and the traffic allocation from the business response time dimension and the business completion rate dimension is achieved, which solves the problem that the traffic allocation in the prior art cannot guarantee the continuity of business processing and is prone to business processing interruptions. Through the technical solution of the present invention, a reasonable distribution of traffic is achieved, so that the to-be-processed clusters with better operating status can be allocated more traffic, ensuring the continuity of business processing of each to-be-processed cluster.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a flow distribution method provided by an embodiment of the present invention;
[0023] Figure 2 is a scenario example diagram of the application traffic distribution method provided by an embodiment of the present invention;
[0024] Figure 3 is a flow chart of a flow distribution method provided by an embodiment of the present invention;
[0025] Figure 4 is a structural schematic diagram of a flow distribution device provided by an embodiment of the present invention;
[0026] Figure 5 It is a structural schematic diagram of an electronic device for implementing the flow distribution method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Embodiment 1
[0030] Figure 1 This is a flow chart of a traffic distribution method provided in the first embodiment of the present invention. This embodiment is applicable to the case where traffic is distributed to at least one to-be-processed cluster from the perspective of business processing. The method can be executed by a traffic distribution device, which can be implemented in the form of hardware and / or software. The traffic distribution device can be configured in electronic devices such as mobile phones, computers or servers. Figure 1 As shown, the method includes:
[0031] S110. For at least one to-be-processed cluster, obtain business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate.
[0032] Among them, the cluster to be processed can be an application cluster for processing business. The cluster to be processed can include multiple servers for processing business of different business types. The business type can be a predetermined business type of critical business or important business. For example, user login business, identity authentication business, and resource transfer business. At least one cluster to be processed can be deployed in different areas. For example, if there are 4 clusters to be processed, cluster A to be processed can be deployed in area a. Cluster B to be processed can be deployed in area b, cluster C to be processed can be deployed in area c, and cluster D to be processed can be deployed in area d.
[0033] The business operation data can be understood as the real-time operation data corresponding to the business of each business type processed by the processing cluster. The business operation data may include business processing volume, business response time and business completion rate. The business processing volume can be understood as the total number of businesses of the current business type processed. The business response time can be the average value corresponding to each response time when processing the business of the current business type. For example, if the business processing volume of the current business type is 2, the average value of the response time is determined based on the response time when processing the business twice, that is, the business response time is obtained. The business completion rate can be the average value of the business success rate corresponding to the business of the current business type. For example, if the business processing volume of the current business type is 2, the business success rate is 100% once, and the business success rate is 0% another time, then the business completion rate is 50%. This is just an example, and there is no restriction on the business processing volume and business completion rate.
[0034] Specifically, for at least one processing cluster deployed in different regions, business operation data generated by each processing cluster under different business types is obtained, wherein the business operation data mainly includes the business processing volume, business response time and business completion rate corresponding to each business type.
[0035] For example, see Figure 2 , Figure 2 There are 4 pending clusters in the system, which are deployed in multiple locations with multiple copies. That is, pending cluster A, pending cluster B, pending cluster C, and pending cluster D are deployed in four different geographical regions. When a pending cluster in a certain region experiences network fluctuations or other system errors, it does not affect the normal external services of other pending clusters, that is, it does not affect the business processing of other pending clusters. To prevent extreme situations, a single pending cluster can carry business processing of all business types.
[0036] The data collection platform obtains the business operation data of each processing cluster in real time for different business types. The business operation data includes the business processing volume, business response time and business completion rate of each business type. The business operation data is sent to the data analysis platform.
[0037] S120. For different business types, determine a first evaluation attribute of the to-be-processed cluster in the response dimension and a second evaluation attribute in the completion rate dimension according to the business processing volume, business response time, and business completion rate of the different business types.
[0038] The response dimension is the service response time dimension. The first evaluation attribute may be a risk value of allocating traffic to the cluster to be processed, determined based on the response dimension. The completion rate dimension is the service completion rate dimension. The second evaluation attribute may be a risk value of allocating traffic to the cluster to be processed, determined based on the completion rate dimension.
[0039] Specifically, for different business types, the first evaluation attribute of the current cluster to be processed in the response dimension can be determined based on the business processing volume and business response time of the current cluster to be processed for each business type. The second evaluation attribute of the current cluster to be processed in the completion rate dimension can be determined based on the business processing volume and business completion rate of the current cluster to be processed for each business type.
[0040] In an embodiment of the present invention, the method for determining the evaluation attributes can be: for different business types, according to the business processing volume and business response time corresponding to each business type, determine the evaluation attributes to be integrated corresponding to each business type, and determine the first evaluation attribute of the cluster to be processed in the response dimension according to the evaluation attributes to be integrated corresponding to the different business types; according to the business processing volume and business completion rate corresponding to each business type, determine the evaluation attributes to be used corresponding to each business type, and determine the second evaluation attribute of the cluster to be processed in the completion rate dimension according to the evaluation attributes to be used corresponding to the different business types.
[0041] Among them, the evaluation attribute to be integrated can be determined according to the business processing volume and business response time of the current business type. Optionally, the evaluation attribute to be integrated = business processing volume of the current business type × business response time. The first evaluation attribute can be determined according to the evaluation attributes to be integrated corresponding to different business types. Optionally, the first evaluation attribute = business processing volume of business type 1 × business response time of business type 1 + business processing volume of business type 2 × business response time of business type 2 + ... + business processing volume of business type n × business response time of business type n, where n represents the type of business type.
[0042] The evaluation attribute to be used may be determined based on the business processing volume of the current business type. Optionally, the evaluation attribute to be used = the business processing volume of the current business type × (1-business completion rate). The second evaluation attribute may be determined based on the evaluation attributes to be used corresponding to different business types. Optionally, the second evaluation attribute = the business processing volume of business type 1 × (1-business completion rate of business type 1) + the business processing volume of business type 2 × (1-business completion rate of business type 2) + ... + the business processing volume of business type n × (1-business completion rate of business type n), where n represents the type of business type.
[0043] Specifically, for different business types corresponding to the current cluster to be processed, the evaluation attributes to be integrated corresponding to each business type are determined according to the business processing volume and business response time corresponding to the current cluster to be processed on each business cluster. The evaluation attributes to be integrated of different business types are summed up to obtain the first evaluation attribute of the cluster to be processed in the response dimension. The evaluation attributes to be used corresponding to each business type are determined according to the business processing volume and business completion rate corresponding to the current cluster to be processed on each business cluster. The second evaluation attribute of the cluster to be processed in the completion rate dimension is determined according to the evaluation attributes to be used corresponding to different business types.
[0044] Exemplarily, in combination with the above example, a business type list can be defined in the data analysis platform. For example, the business type list can include business operation data corresponding to the system login business, identity authentication business, and resource transfer business processed by each cluster to be processed. For each cluster to be processed, the corresponding evaluation attributes are determined from the response time dimension and the completion rate dimension.
[0045] That is, the first evaluation attribute of the current cluster to be processed = the business processing volume of business type 1 × the business response time of business type 1 + the business processing volume of business type 2 × the business response time of business type 2 + ... + the business processing volume of business type n × the business response time of business type n, where n represents the type of business type.
[0046] The second evaluation attribute of the current cluster to be processed = business processing volume of business type 1 × (1-business completion rate of business type 1) + business processing volume of business type 2 × (1-business completion rate of business type 2) + ... + business processing volume of business type n × (1-business completion rate of business type n), where n represents the type of business type.
[0047] S130: Determine a target flow allocated to at least one to-be-processed cluster according to a first evaluation attribute and a second evaluation attribute of at least one to-be-processed cluster.
[0048] The target traffic may be traffic allocated to each cluster to be processed.
[0049] Specifically, the corresponding first preset attribute range and second preset attribute range can be set according to the business processing situation and external service situation of at least one cluster to be processed. When the first evaluation attribute of each cluster to be processed belongs to the first preset attribute range, and the second evaluation attribute belongs to the second preset attribute range, the target flow that can be allocated to each cluster to be processed is determined according to the first evaluation attribute and the second evaluation attribute of each cluster to be processed, and the total allocated flow.
[0050] In an embodiment of the present invention, a method for determining the target flow allocated to the cluster to be processed may be: when the first evaluation attribute belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, determining the first flow allocation ratio corresponding to the cluster to be processed according to the first evaluation attribute of at least one cluster to be processed, and determining the second flow allocation ratio corresponding to the cluster to be processed according to the second evaluation attribute of at least one cluster to be processed; determining the target flow allocated to each cluster to be processed according to the first flow allocation ratio, the second flow allocation ratio and the total allocated flow.
[0051] The first preset attribute range may be a standard range to which the first evaluation attribute belongs, which is preset according to the business processing and external service conditions of the cluster to be processed. The second preset attribute range may be a standard range to which the second evaluation attribute belongs, which is preset according to the business processing and external service conditions of the cluster to be processed.
[0052] The first traffic allocation ratio may be a traffic allocation ratio determined according to a first evaluation attribute corresponding to at least one cluster to be processed. The second traffic allocation ratio may be a traffic allocation ratio determined according to a second evaluation attribute corresponding to at least one cluster to be processed. For example, if there are 4 clusters to be processed, the ratio of the first evaluation attributes of cluster A to be processed, cluster B to be processed, cluster C to be processed, and cluster D to be processed may be 2:2:3:3, then the first traffic allocation ratio is 3:3:2:2. Accordingly, the second traffic allocation ratio is determined in a similar manner to the first traffic allocation ratio, and examples are not given here for further explanation. The total allocated traffic can be understood as the total traffic that can be allocated to at least one cluster to be processed.
[0053] Specifically, when the first evaluation attribute belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, the proportion corresponding to the first evaluation attribute is determined according to the first evaluation attribute of each cluster to be processed. And according to the proportion corresponding to the first evaluation attribute, the first flow allocation ratio is obtained. Correspondingly, according to the second evaluation attribute of each cluster to be processed, the proportion corresponding to the second evaluation attribute is determined, and according to the proportion corresponding to the second evaluation attribute, the second flow allocation ratio is obtained. According to the first flow allocation ratio and the total allocated flow corresponding to each cluster to be processed, the first allocable flow corresponding to each cluster to be processed is determined. Correspondingly, according to the second flow allocation ratio and the total allocated flow, the second allocable flow corresponding to each cluster to be processed is determined. The first allocable flow and the second allocable flow are averaged to obtain the target flow corresponding to each cluster to be processed.
[0054] Optionally, the target flow allocated to each cluster to be processed is determined based on the first flow allocation ratio, the second flow allocation ratio and the total allocated flow, including: determining the first allocatable flow and the second allocatable flow corresponding to each cluster to be processed based on the total allocated flow, the first flow allocation ratio and the second flow allocation ratio; performing mean processing on the first allocatable flow and the second allocatable flow of each cluster to be processed to determine the target flow corresponding to each cluster to be processed.
[0055] The first allocatable flow can be understood as the flow determined from the response dimension and allocated to each to-be-processed cluster. The second allocatable flow can be determined from the completion rate dimension and allocated to each to-be-processed cluster.
[0056] Specifically, the first allocable flow corresponding to each to-be-processed cluster is determined according to the total allocated flow and the first flow allocation ratio. The second allocable flow corresponding to each to-be-processed cluster is determined according to the total allocated flow and the second flow allocation ratio. The first allocable flow and the second allocable flow of each to-be-processed cluster are averaged to obtain the target flow that can be allocated to each to-be-processed cluster, so as to send the target flow to the corresponding to-be-processed cluster.
[0057] Exemplarily, in combination with the above example, if the first evaluation attribute of the four to-be-processed clusters belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, it means that the four to-be-processed clusters can process the business normally. The traffic distribution platform can allocate the total allocated traffic according to the first evaluation attribute and the second evaluation attribute of each to-be-processed cluster. The target traffic of each to-be-processed cluster = (the first traffic allocation ratio corresponding to each to-be-processed cluster × the total allocatable traffic + the second traffic allocation ratio corresponding to each to-be-processed cluster × the total allocatable traffic) / 2. Based on the above, the to-be-processed clusters with faster business processing or better operating status can be allocated more traffic, and the to-be-processed clusters with slower business processing or poor operating status can be allocated less traffic.
[0058] The technical solution of this embodiment provides data support for the subsequent determination of the evaluation attributes of traffic allocation by obtaining the business operation data generated by each to-be-processed cluster under different business types. For different business types, the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types. According to the first evaluation attribute and the second evaluation attribute of at least one to-be-processed cluster, the target traffic allocated to at least one to-be-processed cluster is determined, and the allocation of traffic from the business response time dimension and the business completion rate dimension is achieved, which solves the problem that traffic allocation in the prior art cannot guarantee the continuity of business processing and is prone to business processing interruptions. Through the technical solution of the present invention, a reasonable allocation of traffic is achieved, so that the to-be-processed clusters with better operating status can be allocated more traffic, ensuring the continuity of business processing of each to-be-processed cluster.
[0059] Embodiment 2
[0060] Figure 3 This is a flow chart of a traffic distribution method provided by the second embodiment of the present invention. This embodiment is based on the above embodiment. When the first evaluation attribute of the cluster to be processed does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, the cluster to be processed is processed out of service. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 3 As shown, the method includes:
[0061] S210. For at least one to-be-processed cluster, obtain business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate.
[0062] S220. For different business types, determine a first evaluation attribute of the to-be-processed cluster in the response dimension and a second evaluation attribute in the completion rate dimension according to the business processing volume, business response time, and business completion rate of the different business types.
[0063] S230: If the first evaluation attribute of the cluster to be processed does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, determine that the cluster to be processed is a faulty cluster, and remove the faulty cluster.
[0064] If the first evaluation attribute of the to-be-processed cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, the to-be-processed cluster is a faulty cluster.
[0065] Specifically, when a network fluctuation or other system error occurs in the cluster to be processed, it is easy for the first evaluation attribute to not belong to the first preset attribute range or the second evaluation attribute to not belong to the second preset attribute range. In this case, the cluster to be processed is determined as a faulty cluster. In addition, in order to ensure the continuity of business processing and normal traffic distribution of other clusters to be processed, the faulty cluster is processed out of service.
[0066] For example, in combination with the above example, if the cluster A to be processed has network fluctuations or other system errors, the first evaluation attribute of the cluster A to be processed does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range. At this time, the cluster A to be processed is a faulty cluster. In order to ensure the smooth operation of other clusters to be processed, the traffic distribution platform automatically exits the cluster A to be processed immediately without manual operation. In addition, the target traffic can be allocated to clusters B to be processed, clusters C to be processed, and clusters D to be processed.
[0067] S240: Determine a target flow rate to be allocated to each cluster to be processed based on the first evaluation attribute and the second evaluation attribute corresponding to the clusters to be processed except the faulty cluster.
[0068] Specifically, according to the first evaluation attribute and the second evaluation attribute corresponding to the to-be-processed clusters except the faulty cluster, the corresponding first flow allocation ratio and the second flow allocation ratio are re-determined. According to the re-determined first flow allocation ratio and the second flow allocation ratio, and the total allocated flow, the target flow allocated to each to-be-processed cluster except the faulty cluster is determined.
[0069] Exemplarily, in combination with the above example, if the faulty cluster is the to-be-processed cluster A, the corresponding first flow allocation ratio and second flow allocation ratio are re-determined according to the first evaluation attribute and the second evaluation attribute of the to-be-processed cluster B, the to-be-processed cluster C, and the to-be-processed cluster D. The target flows corresponding to the to-be-processed cluster B, the to-be-processed cluster C, and the to-be-processed cluster D are determined by the re-allocated first flow allocation ratio and the second flow allocation ratio, as well as the total allocated flow.
[0070] Optionally, if the outage duration of the faulty cluster reaches a preset duration, a preset flow is allocated to the faulty cluster, and when it is detected that the first evaluation attribute of the faulty cluster belongs to a first preset attribute range and the second evaluation attribute belongs to a second preset attribute range, the faulty cluster is determined as a target cluster to determine the target flow allocated to the target cluster.
[0071] The preset duration may be a preset standard duration for the fault cluster to be down. For example, the preset duration may be 10 minutes. The preset flow rate may be a preset flow rate allocated to the fault cluster. For example, the preset flow rate may be 1% of the total allocated flow rate. The target cluster may be a fault cluster whose first evaluation attribute belongs to the first preset attribute range and whose second evaluation attribute belongs to the second preset attribute range.
[0072] Specifically, when the outage duration of the fault cluster reaches a preset duration, a preset flow can be allocated to the fault cluster, and the first evaluation attribute and the second evaluation attribute of the fault cluster after the preset flow is allocated are detected. When the first evaluation attribute of the fault cluster belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, it means that the fault cluster can process the business normally, and the fault cluster is determined as the target cluster. Based on this, the corresponding target flow can be allocated to the to-be-processed cluster and the target cluster other than the fault cluster.
[0073] Exemplarily, in combination with the above example, after the pending cluster A is out of service for 10 minutes, 1% of the total allocatable traffic is allocated to the pending cluster A. If it is detected that the first evaluation attribute of the pending cluster A belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, it means that the pending cluster A has returned to normal, and the target traffic is gradually allocated to the pending cluster A, and the state of the four pending clusters processing services simultaneously is restored.
[0074] Optionally, after allocating preset traffic to the fault cluster, the method also includes: if it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, then based on the first evaluation attribute, the second evaluation attribute and the business operation data of the fault cluster, generating early warning prompt information, so as to troubleshoot the fault cluster based on the early warning prompt information.
[0075] The early warning prompt information may be determined based on the business operation data of the fault cluster, the first evaluation attribute, and the second evaluation attribute, and is used to prompt the corresponding staff to repair the fault cluster. Optionally, the early warning prompt information may be sent to the staff's target terminal in the form of text messages, emails, or voice broadcasts to remind the corresponding staff to handle the fault cluster. The target terminal may be the staff's mobile phone, computer, or other electronic device. The reminder method of the early warning prompt information and the type of the target terminal are not limited here.
[0076] Specifically, after allocating preset traffic to the fault cluster, if it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, it means that the fault cluster cannot be automatically recovered and manual intervention is required. According to the first evaluation attribute, the second evaluation attribute and the business operation data of the fault cluster, an early warning prompt information is generated so that the corresponding staff can troubleshoot the fault cluster according to the received early warning prompt information. It should be noted that after the fault of the fault cluster is resolved, the fault cluster can be used to process business at any time.
[0077] Exemplarily, after allocating 1% of the total allocable traffic to the pending cluster A, if it is detected that the first evaluation attribute of the pending cluster A does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, an early warning message can be generated based on the first evaluation attribute of the pending cluster A, the second evaluation attribute and the business operation data, so that the staff who receives the early warning message intervenes in the troubleshooting of the pending cluster A. When the staff determines that the fault of the pending cluster A has been resolved, the state of the four pending clusters processing business simultaneously can be restored at any time.
[0078] Optionally, after allocating the preset traffic to the fault cluster, the method further includes: if it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, then the fault cluster is disconnected again, and when the second disconnection duration of the fault cluster reaches the preset duration, the preset traffic is allocated to the fault cluster again, and the first evaluation attribute and the second evaluation attribute of the fault cluster at this time are determined. If it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, then based on the first evaluation attribute, the second evaluation attribute and the business operation data of the fault cluster, an early warning prompt information is generated to perform troubleshooting on the fault cluster based on the early warning prompt information.
[0079] The technical solution of this embodiment provides data support for the subsequent determination of the evaluation attributes of traffic distribution by obtaining the business operation data generated by each to-be-processed cluster under different business types. For different business types, the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types. If the first evaluation attribute of the to-be-processed cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, the to-be-processed cluster is determined to be a fault cluster, and the fault cluster is shut down. Based on this, the automatic shut-down of the fault cluster is realized without manual intervention, thereby solving the problem of increased business costs caused by cluster errors. Based on the first evaluation attribute and the second evaluation attribute corresponding to the to-be-processed clusters other than the fault cluster, the target traffic allocated to each to-be-processed cluster is determined, and the traffic of other to-be-processed clusters is reasonably distributed, ensuring the continuity of business processing of each to-be-processed cluster.
[0080] Embodiment 3
[0081] Figure 4 Schematic diagram of the structure of a flow distribution device provided by the third embodiment of the present invention. Figure 4 As shown, the device includes: a data acquisition module 310, an evaluation attribute determination module 320 and a target flow determination module 330.
[0082] A data acquisition module is used to obtain business operation data generated by at least one cluster to be processed under different business types, wherein the business operation data includes business processing volume, business response time and business completion rate; an evaluation attribute determination module is used to determine the first evaluation attribute of the cluster to be processed in the response dimension and the second evaluation attribute in the completion rate dimension according to the business processing volume, business response time and business completion rate of different business types; a target traffic determination module is used to determine the target traffic allocated to at least one cluster to be processed according to the first evaluation attribute and the second evaluation attribute of at least one cluster to be processed.
[0083] The technical solution of this embodiment provides data support for the subsequent determination of the evaluation attributes of traffic allocation by obtaining the business operation data generated by each to-be-processed cluster under different business types. For different business types, the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types. According to the first evaluation attribute and the second evaluation attribute of at least one to-be-processed cluster, the target traffic allocated to at least one to-be-processed cluster is determined, and the allocation of traffic from the business response time dimension and the business completion rate dimension is achieved, which solves the problem that traffic allocation in the prior art cannot guarantee the continuity of business processing and is prone to business processing interruptions. Through the technical solution of the present invention, a reasonable allocation of traffic is achieved, so that the to-be-processed clusters with better operating status can be allocated more traffic, ensuring the continuity of business processing of each to-be-processed cluster.
[0084] On the basis of the above embodiment, optionally, an evaluation attribute determination module is used to determine the evaluation attributes to be integrated corresponding to each business type for different business types according to the business processing volume and business response time corresponding to each business type, and determine the first evaluation attribute of the cluster to be processed in the response dimension according to the evaluation attributes to be integrated corresponding to the different business types; determine the evaluation attributes to be used corresponding to each business type according to the business processing volume and business completion rate corresponding to each business type, and determine the second evaluation attribute of the cluster to be processed in the completion rate dimension according to the evaluation attributes to be used corresponding to the different business types.
[0085] Optionally, the target traffic determination module includes: a traffic allocation ratio determination unit, which is used to determine the first traffic allocation ratio corresponding to the cluster to be processed according to the first evaluation attribute of at least one cluster to be processed, and to determine the second traffic allocation ratio corresponding to the cluster to be processed according to the second evaluation attribute of at least one cluster to be processed when the first evaluation attribute belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range; and the target traffic determination unit, which is used to determine the target traffic allocated to each cluster to be processed according to the first traffic allocation ratio, the second traffic allocation ratio and the total allocated traffic.
[0086] Optionally, a target flow determination unit is used to determine the first allocable flow and the second allocable flow corresponding to each cluster to be processed based on the total allocated flow, the first flow allocation ratio and the second flow allocation ratio; and perform mean processing on the first allocable flow and the second allocable flow of each cluster to be processed to determine the target flow corresponding to each cluster to be processed.
[0087] Optionally, the device also includes: a cluster dropout module, which is used to determine that the cluster to be processed is a fault cluster and drop out the faulty cluster if the first evaluation attribute of the cluster to be processed does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range; based on the first evaluation attribute and the second evaluation attribute corresponding to the clusters to be processed except the faulty cluster, determine the target flow allocated to each cluster to be processed.
[0088] Optionally, the device also includes: a fault cluster update module, which is used to allocate preset traffic to the fault cluster if the outage duration of the fault cluster reaches a preset duration, and when it is detected that the first evaluation attribute of the fault cluster belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, determine the fault cluster as a target cluster to determine the target traffic allocated to the target cluster.
[0089] Optionally, the device also includes: an early warning processing module, which is used to generate early warning prompt information based on the first evaluation attribute, the second evaluation attribute and the business operation data of the fault cluster if it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, so as to troubleshoot the fault cluster based on the early warning prompt information.
[0090] The flow distribution device provided in the embodiment of the present invention can execute the flow distribution method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0091] Embodiment 4
[0092] Figure 5 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0093] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0094] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0095] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the traffic distribution method.
[0096] In some embodiments, the traffic distribution method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the traffic distribution method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the traffic distribution method in any other appropriate manner (e.g., by means of firmware).
[0097] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0098] The computer program for implementing the flow distribution method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0099] Embodiment 5
[0100] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a flow distribution method, the method comprising:
[0101] For at least one cluster to be processed, business operation data generated by the cluster to be processed under different business types are obtained, wherein the business operation data include business processing volume, business response time and business completion rate; for different business types, a first evaluation attribute of the cluster to be processed in the response dimension and a second evaluation attribute in the completion rate dimension are determined according to the business processing volume, business response time and business completion rate of different business types; based on the first evaluation attribute and the second evaluation attribute of at least one cluster to be processed, a target flow allocated to at least one cluster to be processed is determined.
[0102] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0105] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A flow distribution method, characterized in that: Applied to at least one cluster to be processed, the method comprises: For the at least one to-be-processed cluster, obtaining business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate; For different business types, according to the business processing volume, business response time and business completion rate of different business types, determine the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension; According to the first evaluation attribute and the second evaluation attribute of the at least one to-be-processed cluster, a target flow rate allocated to the at least one to-be-processed cluster is determined.
2. The method according to claim 1, characterized in that Determining the first evaluation attribute of the to-be-processed cluster in the response dimension and the second evaluation attribute in the completion rate dimension according to the business processing volume, business response time and business completion rate of different business types includes: For different business types, according to the business processing volume and business response time corresponding to each business type, determine the evaluation attribute to be integrated corresponding to each business type, and determine the first evaluation attribute of the cluster to be processed in the response dimension according to the evaluation attributes to be integrated corresponding to different business types; According to the business processing volume and business completion rate corresponding to each business type, the to-be-used evaluation attribute corresponding to each business type is determined, and according to the to-be-used evaluation attributes corresponding to the different business types, the second evaluation attribute of the to-be-processed cluster in the completion rate dimension is determined.
3. The method according to claim 1, characterized in that The determining, according to the first evaluation attribute and the second evaluation attribute of the at least one to-be-processed cluster, the target flow allocated to the at least one to-be-processed cluster comprises: When the first evaluation attribute belongs to a first preset attribute range and the second evaluation attribute belongs to a second preset attribute range, determining a first traffic allocation ratio corresponding to the to-be-processed cluster according to the first evaluation attribute of the at least one to-be-processed cluster, and determining a second traffic allocation ratio corresponding to the to-be-processed cluster according to the second evaluation attribute of the at least one to-be-processed cluster; According to the first traffic allocation ratio, the second traffic allocation ratio and the total allocated traffic, a target traffic allocated to each of the to-be-processed clusters is determined.
4. The method according to claim 3, characterized in that The determining, according to the first traffic allocation ratio, the second traffic allocation ratio and the total allocated traffic, a target traffic allocated to each of the to-be-processed clusters includes: Determine, according to the total allocated flow, the first flow allocation ratio, and the second flow allocation ratio, a first allocatable flow and a second allocatable flow corresponding to each of the to-be-processed clusters; Average processing is performed on the first allocatable flow and the second allocatable flow of each of the to-be-processed clusters to determine a target flow corresponding to each of the to-be-processed clusters.
5. The method according to claim 1, characterized in that The method further comprises: If the first evaluation attribute of the to-be-processed cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, determining that the to-be-processed cluster is a faulty cluster, and exiting the faulty cluster; Based on the first evaluation attribute and the second evaluation attribute corresponding to the to-be-processed clusters except the faulty cluster, a target flow rate allocated to each of the to-be-processed clusters is determined.
6. The method according to claim 5, characterized in that The method further comprises: If the outage duration of the fault cluster reaches a preset duration, a preset flow is allocated to the fault cluster, and when it is detected that the first evaluation attribute of the fault cluster belongs to the first preset attribute range and the second evaluation attribute belongs to the second preset attribute range, the fault cluster is determined as a target cluster to determine the target flow allocated to the target cluster.
7. The method according to claim 6, characterized in that After allocating the preset traffic to the fault cluster, the method further includes: If it is detected that the first evaluation attribute of the fault cluster does not belong to the first preset attribute range or the second evaluation attribute does not belong to the second preset attribute range, an early warning prompt information is generated based on the first evaluation attribute of the fault cluster, the second evaluation attribute and the business operation data, so as to perform troubleshooting on the fault cluster based on the early warning prompt information.
8. A flow distribution device, characterized in that: Applied to at least one cluster to be processed, the device comprises: A data acquisition module, configured to acquire, for the at least one to-be-processed cluster, business operation data generated by the to-be-processed cluster under different business types, wherein the business operation data includes business processing volume, business response time, and business completion rate; An evaluation attribute determination module is used to determine, for different business types, a first evaluation attribute of the to-be-processed cluster in a response dimension and a second evaluation attribute in a completion rate dimension according to business processing volumes, business response times, and business completion rates of different business types; The target flow determination module is used to determine the target flow allocated to the at least one to-be-processed cluster according to the first evaluation attribute and the second evaluation attribute of the at least one to-be-processed cluster.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the flow distribution method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flow distribution method according to any one of claims 1 to 7 when executed.