CN115794458A - Strategy allocation method and device, electronic equipment and storage medium - Google Patents

Strategy allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115794458A
CN115794458A CN202211339682.XA CN202211339682A CN115794458A CN 115794458 A CN115794458 A CN 115794458A CN 202211339682 A CN202211339682 A CN 202211339682A CN 115794458 A CN115794458 A CN 115794458A
Authority
CN
China
Prior art keywords
host
handling
strategy
policy
hosts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211339682.XA
Other languages
Chinese (zh)
Inventor
许云中
宁阳
郑景中
王雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202211339682.XA priority Critical patent/CN115794458A/en
Publication of CN115794458A publication Critical patent/CN115794458A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention is suitable for the technical field of computers and provides a strategy allocation method, a device, electronic equipment and a storage medium, wherein the strategy allocation method comprises the following steps: allocating one of at least two handling policies to each of at least two hosts; at least two hosts are hosts corresponding to the same fault type under a set system; at least two handling policies correspond to the fault type; acquiring the influence degree of the disposal strategy distributed to each host on the corresponding host; and determining a target handling strategy of the fault type based on the influence degree of the handling strategy corresponding to each host.

Description

Strategy allocation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a policy distribution method and apparatus, an electronic device, and a storage medium.
Background
The cloud system management has a large number of hosts, and the hosts under the cloud system can have various faults under different conditions. When a host in the cloud system fails, the related technology processes the failure of the host through a preset disposal strategy so as to enable the host to recover to be normal. Since there are many types of faults, the related art needs to classify all fault types in advance and set a corresponding handling policy for each fault type. However, the handling policy set for the fault type in the related art is not necessarily the optimal one, and the influence on the customer service due to the fault cannot be alleviated to the maximum extent.
Disclosure of Invention
In order to solve the above problem, embodiments of the present invention provide a policy allocation method, an apparatus, an electronic device, and a storage medium, so as to at least solve a problem that a handling policy set for a fault type in the related art is not an optimal handling policy.
The technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a policy allocation method, where the method includes:
allocating one of at least two handling policies to each of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type;
acquiring the influence degree of the disposal strategy distributed by each host on the corresponding host;
and determining a target handling policy of the fault type based on the influence degree of the handling policy corresponding to each host.
In the foregoing solution, the determining a target handling policy of the fault type based on the degree of influence of the handling policy corresponding to each host includes:
performing hypothesis testing on the difference of the influence degrees of different handling strategies based on the influence degree of the handling strategy corresponding to each host to obtain a hypothesis testing result;
and if the hypothesis test result represents that the difference meets the statistical significance, determining the handling strategy with the minimum influence degree as the target handling strategy of the fault type.
In the above solution, the performing hypothesis test on the difference of the degrees of influence of the different handling policies includes:
calculating a P value based on the influence degrees of different treatment strategies; the P value characterizes the likelihood size that the influence degree of all handling strategies is the same;
determining whether the P value is less than a set significance level;
and if the P value is less than the set significance level, obtaining a hypothesis test result representing that the difference meets the statistical significance.
In the foregoing solution, the obtaining the influence degree of the handling policy allocated to each host on the corresponding host includes:
after each host executes the corresponding disposal strategy, acquiring fault information of each host in a set time window;
determining the influence degree of the handling strategy on the corresponding host based on the fault information;
the fault information includes at least one of:
the number of interrupts of the virtual machine in the host;
an interrupt duration for a virtual machine in a host;
the number of reboots of the virtual machine in the host;
number of migrations of virtual machines in the host.
In the above scheme, each of the at least two hosts, the probability assigned to any one of the at least two handling policies is the same.
In the above solution, after determining the target handling policy of the fault type, the method further includes:
assigning a target handling policy for the type of failure to the at least two hosts;
acquiring the influence degree of the target handling strategy of the fault type on each host;
determining whether the difference in the degree of influence within the current time window and the historical time window satisfies a statistical significance;
and if the difference meets the statistical significance, re-determining the target handling strategy of the fault type.
In the foregoing solution, the allocating one of at least two handling policies to each of at least two hosts includes:
if the first host fails in a historical time window and is allocated with a first handling strategy, and when the first host fails in the same failure type again, the first handling strategy is allocated to the first host; the first host is any one of the at least two hosts; the first handling policy is any one of the at least two handling policies.
In a second aspect, an embodiment of the present invention provides a policy distribution apparatus, where the apparatus includes:
an allocation module to allocate one of at least two handling policies for each of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type;
the acquisition module is used for acquiring the influence degree of the handling strategy distributed by each host on the corresponding host;
and the determining module is used for determining the target handling strategy of the fault type based on the influence degree of the handling strategy corresponding to each host.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the steps of the policy assignment method provided in the first aspect of the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program. The computer program, when executed by a processor, implements the steps of the policy assignment method as provided by the first aspect of the embodiment of the present invention.
The method and the device for processing the fault type of the wireless communication system acquire the influence degree of the processing strategy distributed to each host on the corresponding host by distributing one of at least two processing strategies to each host of at least two hosts, and determine the target processing strategy of the fault type based on the influence degree of the processing strategy corresponding to each host. The at least two hosts are hosts corresponding to the same fault type under the set system, and the at least two handling strategies correspond to the fault type. The embodiment can automatically determine the optimal treatment strategy for the fault type without manual participation, and can reduce the labor cost. In addition, the target handling policy of the fault type is determined based on the influence degree of the handling policy in the embodiment, so that the target handling policy allocated to the fault type can be guaranteed to achieve the optimal fault handling effect.
Drawings
Fig. 1 is a schematic flow chart of an implementation of a policy distribution method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of another policy distribution method according to an embodiment of the present invention;
fig. 3 is a schematic implementation flow diagram of another policy distribution method provided in the embodiment of the present invention;
fig. 4 is a schematic flow chart of an implementation of another policy distribution method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a policy distribution process provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of a policy allocation scenario of a cloud host according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a policy distribution apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Taking a cloud system as an example, with the development of network technology, cloud services are more and more popular, and many enterprises are provided with the cloud system to provide the cloud services. The cloud system is a cloud platform integrated management system which is constructed on basic hardware resources such as servers, storage, networks and the like and basic software such as a stand-alone operating system, middleware, a database and the like and manages massive basic hardware and software resources. The cloud system includes: a public cloud, a private cloud, a managed cloud, and the like.
The cloud system is a cloud computing center operating system composed of a plurality of cloud hosts, each cloud host can be provided with a plurality of virtual machines to provide cloud services, but the cloud hosts can break down due to various reasons. For example, when the load of the virtual machine is too high or the usage time is too long, some failures (such as disk failures and memory failures) may occur.
For different fault types, the related art sets one handling policy for each fault type to solve the fault, for example, for a memory fault of a virtual machine, the set handling policy is "to expand the memory capacity of the virtual machine". Due to the fact that the types of the faults in the cloud system are various, particularly in a large-scale cloud system, it is difficult to comprehensively classify all the fault types and set a good disposal strategy. Setting the handling strategies for all fault types requires a large amount of labor cost and time cost, the fault handling efficiency is low, and the related art cannot determine that the allocated handling strategies can achieve the optimal fault handling effect.
Secondly, as the cloud system software and hardware are updated frequently and the workload of the client changes, the processing effect of the processing strategy which works well before is deteriorated.
In view of the above drawbacks of the related art, embodiments of the present invention provide a policy allocation method, which can automatically determine an optimal handling policy for a fault type. In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow chart illustrating an implementation process of a policy distribution method according to an embodiment of the present invention, where an execution subject of the policy distribution method is an electronic device, and the electronic device includes a desktop computer, a notebook computer, a server, and the like. The server may be an entity device, or may be a virtualization device deployed in the cloud. Referring to fig. 1, the policy assignment method includes:
s101, allocating one handling strategy of at least two handling strategies for each host of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type.
Here, the provisioning system may be a distributed computing cluster such as a cloud system, and the provisioning system includes a plurality of hosts, for example, the cloud system includes a plurality of cloud hosts.
In this embodiment, the setting system includes a plurality of hosts, at least two hosts are hosts corresponding to the same failure type under the setting system, and the time of failure of at least two hosts may be different.
In practical applications, at least two hosts may belong to the same setting system or different setting systems.
When a host fails, the failure type of the host is obtained, and in this embodiment, each failure type corresponds to at least two handling policies. At least two handling strategies corresponding to the fault type of the host are obtained, and one handling strategy is selected from the at least two handling strategies and distributed to the fault host. For example, one handling policy may be randomly selected from at least two handling policies to assign to the failed host.
It should be understood that each host may assign a handling policy from at least two handling policies, and the handling policies assigned by different hosts may be the same, for example, host a and host B correspond to the same fault type, host a is assigned handling policy a, and host B may also be assigned handling policy a.
In an embodiment, each of the at least two hosts, the probability assigned to any one of the at least two handling policies is the same. For example, the probability that host a is assigned to the handling policy a and the probability that host a is assigned to the handling policy B are the same, as are the probabilities that host a is assigned to the handling policy a and host B is assigned to the handling policy B.
The at least two handling strategies are distributed to the at least two hosts with the same probability, so that the distribution fairness is guaranteed, the subsequently obtained target handling strategies are more accurate, and the fault handling effect of the target handling strategies is better.
In this embodiment, the failure of the host includes: a fault that has occurred with the host and a predicted impending fault. The handling strategy is used for taking necessary measures to handle the faults about to occur or already occur to the host, so that the influence caused by the faults is relieved.
S102, obtaining the influence degree of the handling strategy distributed by each host on the corresponding host.
After the host allocates the disposal policy, the host executes the allocated disposal policy, and then monitors the influence degree of the disposal policy on the host, wherein the influence degree can be represented by some operation parameters of the host. For example, the operational parameters include the length of time the host failed, the number of failures, etc. Specifically, the failure duration may be an interruption duration of the virtual machine installed in the host, and the number of failures may be an interruption number of the virtual machine installed in the host.
By monitoring the host, the operating parameters can be obtained, and the operating parameters represent the influence degree of the disposal strategy on the host.
It should be understood that the setting system is to monitor the host computer for a set period of time to obtain the degree of influence. For example, after the handling policy is executed on the host, the operating parameters of the host within one hour are monitored, so as to determine the degree of influence of the handling policy on the host, such as obtaining the number of interrupts of the virtual machine in the host within one hour.
S103, determining the target disposal strategy of the fault type based on the influence degree of the disposal strategy corresponding to each host.
Here, the target handling policy refers to an optimal handling policy of the fault type, and the target handling policy is executed, which may have a good fault handling effect.
For example, the handling policy that is most beneficial to the failed host in terms of its impact may be set as the target handling policy for the failure type.
The influence degree of the handling policy on the host is good or bad, and the handling policy with the highest influence degree can be determined as the target handling policy of the fault type.
In practical application, if the influence degrees of the handling policies corresponding to the fault types on the host are all bad, and the fault degrees of the host are all deepened, the target handling policies of the fault types are not determined from the bad, and the handling policies are distributed to the host again.
Since different hosts may correspond to the same handling policy, when determining the degree of influence of the handling policy on the hosts, the average value of the degrees of influence of the hosts may be calculated. For example, there are 3 hosts corresponding to the same handling policy a, and within one hour after the 3 hosts execute the handling policy a, the number of interrupts of the virtual machine in the host a is 3, the number of interrupts of the virtual machine in the host B is 2, and the number of interrupts of the virtual machine in the host C is 1, then the average value of the number of interrupts of the virtual machines in the 3 hosts may be taken, and the average value is 2, which is used as the influence degree of the handling policy a on the hosts. If 3 handling policies are included in total, the degree of influence of the handling policy b on the host is 1, and the degree of influence of the handling policy c on the host is 3, the handling policy b may be determined as a target handling policy of the failure type.
The method and the device for processing the fault type of the wireless communication system acquire the influence degree of the processing strategy distributed to each host on the corresponding host by distributing one of at least two processing strategies to each host of at least two hosts, and determine the target processing strategy of the fault type based on the influence degree of the processing strategy corresponding to each host. The at least two hosts are hosts corresponding to the same fault type under the set system, and the at least two handling strategies correspond to the fault type. The embodiment can automatically determine the optimal handling strategy for the fault type without human participation, and can reduce the labor cost. In addition, the target handling policy of the fault type is determined based on the influence degree of the handling policy in the embodiment, and it can be ensured that the target handling policy determined for the fault type can achieve the optimal fault handling effect.
Referring to fig. 2, in an embodiment, the determining a target handling policy of the fault type based on the degree of influence of the handling policy corresponding to each host includes:
s201, performing hypothesis testing on differences of the influence degrees of different handling strategies based on the influence degree of the handling strategy corresponding to each host to obtain a hypothesis testing result;
s202, if the hypothesis test result indicates that the difference meets the statistical significance, determining the handling strategy with the minimum influence degree as the target handling strategy of the fault type.
In the embodiment, hypothesis testing is used to test whether the influence degree of a certain handling policy on the host is significantly smaller than that of other handling policies, and if the difference reaches statistical significance, the handling policy with the smallest influence degree can be determined as the target handling policy.
The hypothesis test is also called statistical hypothesis test, which is a statistical inference method for determining whether the difference between samples and populations is caused by sampling errors or essential differences. Significance testing is a method in hypothesis testing, whose rationale is to first make some hypothesis on the characteristics of the population and then, through statistical reasoning in sampling studies, make an inference as to whether the hypothesis should be rejected or accepted. Commonly used hypothesis testing methods include Z test, t test, chi-square test, F test, and the like. The basic idea of hypothesis testing is the principle of "small probability events", whose statistical inference method is a counter-syndrome method with some probabilistic nature. The small probability idea means that small probability events do not substantially occur in one trial. The idea of the counter-syndrome method is to put forward a test hypothesis first, and then determine whether the hypothesis is true by using a proper statistical method and a small probability principle.
In this embodiment, it is assumed that the influence degrees of all the handling policies are the same, then a hypothesis testing method is used to perform significance testing, if the hypothesis testing result characterization differences satisfy the statistical significance, the original hypothesis is rejected, which indicates that the influence degrees of all the handling policies are not the same, and the handling policy with the smallest influence degree may be selected as the target handling policy of the fault type.
In an embodiment, the performing hypothesis testing on the difference of the degrees of influence of the different treatment strategies includes:
calculating a P value based on the influence degrees of different treatment strategies; the P value characterizes the likelihood size that all treatment strategies are equally affected;
determining whether the P value is less than a set significance level;
and if the P value is less than the set significance level, obtaining a hypothesis test result representing that the difference meets the statistical significance.
The P value, i.e., the probability, reflects the magnitude of the likelihood of an event occurring. The P value refers to the probability of a sample observation or more extreme result occurring when the original hypothesis is true. If the value of P is small, it indicates that this situation has a low probability of occurring, and if this occurs, there is a reason to reject the original hypothesis, based on the principle of small probability. The smaller the value of P, the more sufficient the reason for rejecting the original hypothesis. The advantage of the P value is that it reflects the probability of observed disagreement between actual data and the original hypothesis, which is a specific value compared to the conventional rejection field range, thus providing more information.
It should be understood that the meaning of the P value does not indicate the magnitude of the difference between the influence levels of the different groups, and the P value reflects the statistical significance of the difference between the influence levels of the different groups, and does not indicate the magnitude of the difference between the influence levels.
In practical applications, the P value may be calculated by anova1 function, anova2 function, anova function, and manova1 function in the MATLAB function.
In hypothesis testing, the level of significance represents the probability of rejecting the original hypothesis when it was true. For example, in the present embodiment, the significance level may be set to 0.005 or 0.001, and when the P value is less than 0.005 or 0.001, the original assumption is rejected, that is, the influence degrees of all the treatment strategies are not the same.
In practical applications, we can use Welch's t-test to analyze differences for 2 treatment strategies; for more than 2 treatment strategies, the differences can be analyzed using Welch ANOVA test, and Post-hoc analysis can be used to derive the optimal treatment strategy.
The method comprises the steps of analyzing the influence degrees of different handling strategies by using hypothesis testing, so as to intelligently learn the optimal handling strategies corresponding to different fault types, determining the optimal handling strategies corresponding to the fault types by using the hypothesis testing in a fair and reasonable manner, enabling the handling strategies distributed for the fault types to achieve the optimal fault handling effect, and reducing the influence of the fault on customer service to the maximum extent.
Referring to fig. 3, in an embodiment, the obtaining the influence degree of the handling policy allocated to each host on the corresponding host includes:
s301, after each host executes the corresponding handling strategy, the fault information of each host is obtained in a set time window.
S302, based on the fault information, determining the influence degree of the handling strategy on the corresponding host.
The fault information includes at least one of:
the number of interrupts of the virtual machine in the host;
interrupt duration of a virtual machine in a host;
a number of reboots of a virtual machine in a host;
number of migrations of virtual machines in the host.
The time window is set to a period of time after the host executes the corresponding handling policy, for example, within 1 hour after executing the handling policy.
Any one of the interruption times, interruption duration, restart times and migration times of the virtual machine in the host can be directly used as the influence degree of the handling strategy on the host. Or, performing weighted calculation on the interruption times, the interruption duration, the restart times and the migration times, and taking the calculated value as the influence degree of the disposal strategy on the host.
Referring to fig. 4, in an embodiment, after determining the target handling policy for the fault type, the method further comprises:
s401, distributing the target handling strategy of the fault type to the at least two hosts;
s402, obtaining the influence degree of the target handling strategy of the fault type on each host;
s403, determining whether the difference of the influence degrees in the current time window and the historical time window meets statistical significance;
s404, if the difference meets the statistical significance, the target handling strategy of the fault type is determined again.
Since the software and hardware of the setting system are updated and the workload of the client is changed, the failure handling effect of the previously determined target handling strategy may not be necessarily optimal at a later time. Therefore, the present embodiment stops allocating the handling policy after the difference reaches the statistical significance, and at this time, directly allocates the target handling policy to each host of the failure type. The extent of impact of each host after executing the target handling policy is subsequently continuously monitored.
And starting from executing the target handling strategy, if the influence degree of the target handling strategy in the current time window is changed significantly compared with the historical time window, allocating the handling strategy for the host again, and re-determining the target handling strategy of the fault type.
For example, the current time window may be within one hour before the current time point, the historical time window may be within one hour after the disposal policy is executed, and if the difference between the influence degrees in the 2 time windows satisfies the statistical significance, it may be because the software and hardware of the setting system are updated, or the workload of the client is changed, and the target disposal policy of the fault type needs to be determined again.
In practical applications, the statistical difference in the degree of influence between the current time window and the historical time window can be analyzed using the Welch's t-test hypothesis testing analysis method. For example, a P value is calculated, and if the P value is less than 0.005, it indicates that the current degree of influence is significantly increased compared to the historical data, which means that the failure handling effect of the previously determined target handling policy may no longer be the best at the current time. At this point, the steps of the embodiment shown in fig. 1 are re-executed to re-determine the target handling policy for the fault type.
The embodiment adapts to the software and hardware updating of the setting system and the change of the working load of the client, can adaptively adjust the target disposal strategy, timely adjusts the disposal strategy of the host, and furthest lightens the influence of the client service caused by the fault.
In an embodiment, said allocating one of at least two handling policies to each of the at least two hosts comprises:
if the first host fails in the historical time window and is allocated with a first handling strategy, and when the first host fails in the same fault type again, the first handling strategy is allocated to the first host; the first host is any one of the at least two hosts; the first handling policy is any one of the at least two handling policies.
Given that the same host may happen or predict the same fault multiple times, if different handling policies are assigned, the assumption of independent and identical distribution of a/B test requirements is violated, since the host states at different times may be highly correlated. Therefore, the present embodiment introduces a sticky assignment method, and the assigned handling policy is determined by the hosts and the failure type, i.e. the first host is assigned the first handling policy when failure type a occurs before, and the first handling policy is always assigned when failure type a occurs later.
The A/B test is a random test that compares two different things (i.e., A and B) together under a hypothesis. Can be used to test the difference between two different versions of a variable. The embodiment may search an optimal treatment strategy based on an a/B test principle, perform a test experiment using an equal probability viscosity assignment method, and analyze differences in the degree of influence of the strategy using hypothesis testing, thereby determining the optimal treatment strategy.
Referring to fig. 5, fig. 5 is a schematic diagram of a policy distribution flow provided in an embodiment of the present invention, where the policy distribution flow includes:
first, equiprobable sticky assignment.
Assigning each of the at least two hosts any one of the at least two handling policies, the probability assigned to any one of the at least two handling policies being the same for each of the at least two hosts. And, the first host is assigned the first handling policy when the failure type a occurs before, and always assigned the first handling policy when the failure type a occurs later.
And secondly, collecting cost.
The cost here is the degree of influence in the above-described embodiment. After the host executes the disposal strategy, monitoring the influence degree in a set time window, wherein the influence degree comprises the interruption times, the interruption time, the migration times and the like of the virtual machine in the host.
And thirdly, the cost reaches a remarkable difference.
Hypothesis testing is used to verify that a certain handling strategy is significantly less influential than other handling strategies. And if the cost difference reaches the statistical significance, judging the disposal strategy with the minimum cost as the optimal disposal strategy. Otherwise, the random allocation handling policy is continued. Since each handling policy changes the number of virtual machine interrupts per host significantly, hypothesis testing is used to check for differences in different handling policies. For example, welch's t-test may be used to analyze differences for 2 treatment strategies, welch anova may be used to analyze differences for 3 and more treatment strategies, and Post-hoc analysis may be used to derive the best treatment strategy.
And fourthly, distributing the optimal treatment strategy.
And when the cost difference reaches the statistical significance, stopping randomly distributing the disposal strategies, directly distributing the optimal disposal strategy to each host with the fault type, and continuously monitoring the cost of each host after executing the optimal disposal strategy.
Fifth, a significant cost increase is achieved.
And if the cost corresponding to the optimal treatment strategy is remarkably increased, restarting the random distribution strategy and exploring the optimal treatment strategy. Statistical differences in the cost data for the current time window and the historical time window may be analyzed using Welch's t-test. Calculating a P value, if the P value is less than 0.005, indicates that the current cost and historical data have significantly increased, meaning that the previously determined optimal strategy may no longer be optimal.
The embodiment performs a test experiment by using an equiprobable sticky assignment method, and analyzes the difference of the execution cost of the treatment strategy by using hypothesis testing, thereby determining the optimal treatment strategy. The embodiment can automatically determine the optimal handling strategy for the fault type, and the handling strategy allocated for the fault type can achieve the optimal fault handling effect. The manual participation is not needed, and the labor cost can be reduced. And the software and hardware updating of the adaptive setting system and the change of the working load of the client can adaptively adjust the optimal disposal strategy, adjust the disposal strategy of the host in time and reduce the influence of the client service caused by the fault to the maximum extent.
As shown in fig. 6, fig. 6 is a schematic diagram of a cloud host policy allocation scenario according to an application embodiment of the present invention. The cloud hosts in fig. 6 include cloud hosts 1 to 5, but the cloud hosts 1 to 5 are merely an example and are not limited to the number of cloud hosts of the cloud system.
The cloud host 1, the cloud host 2 and the cloud host 3 correspond to the same fault type, and the cloud host 4 and the cloud host 5 correspond to the same fault type. Each fault type corresponds to at least two handling policies, one of the at least two handling policies a is allocated to the cloud host 1, the cloud host 2, and the cloud host 3, and one of the at least two handling policies B is allocated to the cloud host 4 and the cloud host 5.
And then acquiring the influence degree of the handling strategy distributed by each cloud host on the cloud host, and determining the target handling strategy of the fault type based on the influence degree of the handling strategy corresponding to each cloud host.
And finally, distributing the target handling strategy of the fault type to the corresponding cloud host, so as to automatically determine the optimal handling strategy for the fault type.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The technical means described in the embodiments of the present invention may be arbitrarily combined without conflict.
In addition, in the embodiments of the present invention, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order.
Referring to fig. 7, fig. 7 is a schematic diagram of a policy distribution apparatus according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes:
an allocation module to allocate one of at least two handling policies for each of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type;
the acquisition module is used for acquiring the influence degree of the handling strategy distributed by each host on the corresponding host;
a determining module, configured to determine a target handling policy of the fault type based on an influence degree of a handling policy corresponding to each host.
In the above embodiment, the determining, by the determining module, the target handling policy of the fault type based on the degree of influence of the handling policy corresponding to each host includes:
performing hypothesis testing on the difference of the influence degrees of different handling strategies based on the influence degree of the handling strategy corresponding to each host to obtain a hypothesis testing result;
and if the hypothesis test result represents that the difference meets the statistical significance, determining the handling strategy with the minimum influence degree as the target handling strategy of the fault type.
In the above embodiment, the determining module performs hypothesis testing on the difference of the degrees of influence of the different treatment strategies, including:
calculating a P value based on the influence degrees of different treatment strategies; the P value characterizes the likelihood size that the influence degree of all handling strategies is the same;
determining whether the P value is less than a set significance level;
and if the P value is less than the set significance level, obtaining a hypothesis test result representing that the difference meets the statistical significance.
In the above embodiment, the obtaining module obtains the influence degree of the handling policy allocated to each host on the corresponding host, including:
after each host executes the corresponding disposal strategy, acquiring the fault information of each host in a set time window;
determining the influence degree of the handling strategy on the corresponding host based on the fault information;
the fault information includes at least one of:
the number of interrupts of the virtual machine in the host;
interrupt duration of a virtual machine in a host;
a number of reboots of a virtual machine in a host;
number of migrations of a virtual machine in a host.
In the above embodiment, each of the at least two hosts, the probability assigned to any one of the at least two handling policies is the same.
In the above embodiment, the apparatus further includes: a reset module;
the implementation reset module is to: assigning a target handling policy for the fault type to the at least two hosts; obtaining the influence degree of the target handling strategy of the fault type on each host to determine whether the difference of the influence degrees in the current time window and the historical time window meets the statistical significance; and if the difference meets the statistical significance, re-determining the target handling strategy of the fault type.
In the above embodiment, the allocating module allocates one of at least two handling policies to each of the at least two hosts, including:
if the first host fails in the historical time window and is allocated with a first handling strategy, and when the first host fails in the same fault type again, the first handling strategy is allocated to the first host; the first host is any one of the at least two hosts; the first handling policy is any one of the at least two handling policies.
In practical applications, the distribution module, the obtaining module and the determining module may be implemented by a Processor in an electronic device, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA).
It should be noted that: in the policy distributing apparatus provided in the foregoing embodiment, when performing policy distribution, only the division of each module is illustrated, and in practical applications, the processing distribution may be completed by different modules as needed, that is, the internal structure of the apparatus is divided into different modules, so as to complete all or part of the processing described above. In addition, the policy allocation apparatus and the policy allocation method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments, and are not described herein again.
The policy distribution device may be in the form of an image file, and after the image file is executed, the image file may be run in the form of a container or a virtual machine, so as to implement the policy distribution method described in this application. Of course, the method is not limited to the image file form, and any software form capable of implementing the policy distribution method described in the present application is within the scope of the present application.
Based on the hardware implementation of the program module, and in order to implement the method of the embodiment of the present application, an embodiment of the present application further provides an electronic device. Fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application, and as shown in fig. 8, the electronic device includes:
the communication interface can carry out information interaction with other equipment such as network equipment and the like;
and the processor is connected with the communication interface to realize information interaction with other equipment, and is used for executing the method provided by one or more technical schemes on the electronic equipment side when running a computer program. And the computer program is stored on the memory.
In practical applications, the electronic device may be a host in the setting system.
Of course, in practice, the various components in an electronic device are coupled together by a bus system. It will be appreciated that a bus system is used to enable communications among the components. The bus system includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as a bus system in fig. 8.
The electronic device may be in a cluster form, for example, a cloud computing platform, where the cloud computing platform is a service form that organizes a plurality of independent server physical hardware resources into pooled resources by using computing virtualization, network virtualization, and storage virtualization technologies, and is a software-defined resource structure based on virtualization technology development, and may provide resource capabilities in the form of virtual machines, containers, and the like. The fixed relation between hardware and an operating system is eliminated, the resource scheduling is unified by the communication of a network, and then required virtual resources and services are provided.
The current cloud computing platform supports several service modes:
SaaS (Software as a Service): the cloud computing platform user does not need to purchase software, but rents the software deployed on the cloud computing platform, the user does not need to maintain the software, and a software service provider can manage and maintain the software in full rights;
PaaS (Platform as a Service): a cloud computing platform user (usually a software developer at this time) can build a new application on a framework provided by the cloud computing platform, or expand an existing application, and does not need to purchase a development server, a quality control server or a production server;
IaaS (Infrastructure as a Service): the cloud computing platform provides data center, infrastructure hardware and software resources through the internet, and the cloud computing platform in the IaaS mode can provide servers, operating systems, disk storage, databases and/or information resources.
The memory in the embodiments of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a magnetic random access Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), synchronous Static Random Access Memory (SSRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous Dynamic Random Access Memory (DDRSDRAM, double data rate Synchronous Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous joint Dynamic Random Access Memory (DRAM, SLC Synchronous Random Access Memory), direct bus Random Access Memory (DRM, random Access Memory). The memories described in the embodiments of the present application are intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to a processor, or may be implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in a memory where a processor reads the programs in the memory and in combination with its hardware performs the steps of the method as previously described.
Optionally, when the processor executes the program, the corresponding process implemented by the electronic device in each method of the embodiment of the present application is implemented, and for brevity, no further description is given here.
In an exemplary embodiment, the present application further provides a storage medium, i.e., a computer storage medium, specifically a computer readable storage medium, for example, including a first memory storing a computer program, where the computer program is executable by a processor of an electronic device to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, electronic device and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media capable of storing program code.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application or portions thereof that contribute to the related art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
In addition, in the examples of the present application, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for policy distribution, comprising:
allocating one of at least two handling policies to each of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type;
acquiring the influence degree of the disposal strategy distributed to each host on the corresponding host;
and determining a target handling policy of the fault type based on the influence degree of the handling policy corresponding to each host.
2. The method as claimed in claim 1, wherein the determining the target handling policy for the failure type based on the degree of influence of the handling policy corresponding to each host includes:
performing hypothesis testing on the difference of the influence degrees of different handling strategies based on the influence degree of the handling strategy corresponding to each host to obtain a hypothesis testing result;
and if the hypothesis test result represents that the difference meets the statistical significance, determining the handling strategy with the minimum influence degree as the target handling strategy of the fault type.
3. The method of claim 2, wherein the performing a hypothesis test on the difference in the degree of influence of the different treatment strategies comprises:
calculating a P value based on the influence degrees of different treatment strategies; the P value characterizes the likelihood size that all treatment strategies are equally affected;
determining whether the P value is less than a set significance level;
and if the P value is less than the set significance level, obtaining a hypothesis test result representing that the difference meets the statistical significance.
4. The method of claim 1, wherein the obtaining the degree of influence of the handling policy assigned to each host on the corresponding host comprises:
after each host executes the corresponding disposal strategy, acquiring fault information of each host in a set time window;
determining the influence degree of the handling strategy on the corresponding host based on the fault information;
the fault information includes at least one of:
the number of interrupts of the virtual machine in the host;
interrupt duration of a virtual machine in a host;
a number of reboots of a virtual machine in a host;
number of migrations of virtual machines in the host.
5. The method of claim 1, wherein each of the at least two hosts, the probability assigned to any one of the at least two handling policies is the same.
6. The method of claim 1, wherein after determining the target handling policy for the type of failure, the method further comprises:
assigning a target handling policy for the fault type to the at least two hosts;
acquiring the influence degree of the target handling strategy of the fault type on each host;
determining whether the difference in the degree of influence within the current time window and the historical time window satisfies a statistical significance;
and if the difference meets the statistical significance, re-determining the target handling strategy of the fault type.
7. The method of claim 1, wherein said assigning one of at least two handling policies to each of at least two hosts comprises:
if the first host fails in the historical time window and is allocated with a first handling strategy, and when the first host fails in the same fault type again, the first handling strategy is allocated to the first host; the first host is any one of the at least two hosts; the first handling policy is any one of the at least two handling policies.
8. A policy assignment device, comprising:
an allocation module for allocating one of at least two handling policies to each of at least two hosts; the at least two hosts are hosts corresponding to the same fault type under a set system; the at least two handling policies correspond to the fault type;
the acquisition module is used for acquiring the influence degree of the handling strategy distributed by each host on the corresponding host;
and the determining module is used for determining the target handling strategy of the fault type based on the influence degree of the handling strategy corresponding to each host.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the policy assignment method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the policy assignment method according to any one of claims 1 to 7.
CN202211339682.XA 2022-10-27 2022-10-27 Strategy allocation method and device, electronic equipment and storage medium Pending CN115794458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211339682.XA CN115794458A (en) 2022-10-27 2022-10-27 Strategy allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211339682.XA CN115794458A (en) 2022-10-27 2022-10-27 Strategy allocation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115794458A true CN115794458A (en) 2023-03-14

Family

ID=85434348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211339682.XA Pending CN115794458A (en) 2022-10-27 2022-10-27 Strategy allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794458A (en)

Similar Documents

Publication Publication Date Title
US9798635B2 (en) Service level agreement-based resource allocation for failure recovery
US9697068B2 (en) Building an intelligent, scalable system dump facility
US11558311B2 (en) Automated local scaling of compute instances
US10944581B2 (en) Increasing processing capacity of processor cores during initial program load processing
US10565021B2 (en) Automated capacity management in distributed computing systems
US9270539B2 (en) Predicting resource provisioning times in a computing environment
US11573848B2 (en) Identification and/or prediction of failures in a microservice architecture for enabling automatically-repairing solutions
US11209988B2 (en) Dynamic storage volume distribution according to wearing level
CN111209110A (en) Task scheduling management method, system and storage medium for realizing load balance
US20200272526A1 (en) Methods and systems for automated scaling of computing clusters
CN111538585B (en) Js-based server process scheduling method, system and device
US10884818B2 (en) Increasing processing capacity of virtual machines
US10884845B2 (en) Increasing processing capacity of processor cores during initial program load processing
CN109992408B (en) Resource allocation method, device, electronic equipment and storage medium
US20200019469A1 (en) System and method for orchestrated backup in a virtualized environment
CN115794458A (en) Strategy allocation method and device, electronic equipment and storage medium
CN112817687A (en) Data synchronization method and device
CN110247802B (en) Resource configuration method and device for cloud service single-machine environment
AU2020219324B2 (en) Increasing processing capacity of partitions for an abnormal event
US20210349705A1 (en) Performance sensitive storage system upgrade
CN113127191B (en) Resource updating method, storage medium and related device
US11645164B2 (en) Adjusting data backups based on system details
EP4261682A1 (en) Just-in-time packager build system
CN112087336B (en) Deployment and management method and device of virtual IP service system and electronic equipment
KR102672580B1 (en) Increased virtual machine processing capacity for abnormal events

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination