Task allocation method and device, computer equipment, storage medium and program product

By stopping the detection task after the test is completed in the cloud host hot migration test, removing and reassigning the cloud host to form a new test group, the problem of achieving accurate testing with a smaller number of cloud hosts is solved, and resource utilization and test accuracy are improved.

CN119520342AActive Publication Date: 2025-02-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411720484.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-25
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Cloud host hot migration performance testing requires more provisioned cloud hosts, and excess provisioned resources will affect the test results, making it difficult to achieve accurate testing with a small number of cloud hosts.

Method used

When multiple cloud hosts under test perform concurrent hot migration tests in the tested group, after the hot migration test of the first cloud host is detected, the network connectivity detection task of the second cloud host for the first cloud host is stopped, the first cloud host is removed from the tested group, and the test cloud host corresponding to the root node in the smallest heap is transferred from the test group to the tested group to form a new test group, thereby determining the third cloud host corresponding to the new cloud host and assigning the detection task.

Benefits of technology

While reducing the number of cloud hosts, it realizes accurate testing of the hot migration performance of cloud hosts, improves resource utilization, and realizes the recycling of resources through the flow of cloud hosts between the test group and the tested group.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520342A_ABST
    Figure CN119520342A_ABST
Patent Text Reader

Abstract

The invention relates to a task allocation method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: in a process of concurrently carrying out a live migration test on a plurality of tested cloud hosts in a tested group, if the end of the live migration test of a first cloud host in the plurality of tested cloud hosts is detected, controlling a second cloud host to stop a network connectivity detection task for the first cloud host; removing the first cloud host from the tested group, taking the test cloud host corresponding to the root node in the minimum heap as a new tested cloud host, and transferring the new tested cloud host from the test group to the tested group to obtain a new test group; and determining a third cloud host corresponding to the new tested cloud host from the new test group, and allocating a network connectivity detection task for the new tested cloud host to the third cloud host. By adopting the method, accurate testing of the thermal migration performance of the cloud hosts can be realized under the condition that the number of the cloud hosts is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a task allocation method, apparatus, computer equipment, storage medium and program product. Background Art

[0002] Cloud host hot migration is an important means to protect customer services and improve resource utilization efficiency through secondary scheduling at the IaaS (Infrastructure as a Service) level.

[0003] The cloud host hot migration performance test is mainly divided into two parts: the control plane and the data plane. However, completing the performance tests of the control plane and the data plane at the same time requires a large number of pre-configured cloud hosts, and more pre-configured resources will also affect the test results of the hot migration. Summary of the invention

[0004] Based on this, it is necessary to provide a task allocation method, device, computer equipment, storage medium and program product to address the above technical problems, which can accurately test the hot migration performance of cloud hosts with a smaller number of cloud hosts.

[0005] In a first aspect, the present application provides a task allocation method, the method comprising:

[0006] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0007] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0008] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0009] In one embodiment, after controlling the second cloud host to stop the network connectivity detection task for the first cloud host, the method further includes:

[0010] The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated; accordingly, the test cloud host corresponding to the root node in the minimum heap is used as the new cloud host under test, including: the test cloud host corresponding to the root node in the updated minimum heap is used as the new cloud host under test.

[0011] In one embodiment, determining a third cloud host corresponding to a new cloud host under test from a new test group includes:

[0012] Based on the hash function, the node position is determined according to the upper limit of the number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host under test; the test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new cloud host under test.

[0013] In one embodiment, after allocating a network connectivity detection task for a new cloud host to be tested to the third cloud host, the method further includes:

[0014] The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

[0015] In one embodiment, taking the test cloud host corresponding to the root node in the updated minimum heap as a new cloud host under test includes:

[0016] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0017] In one embodiment, transferring a new cloud host under test from a test group to a tested group includes:

[0018] The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the test group.

[0019] In a second aspect, the present application further provides a task allocation device, the device comprising:

[0020] The task stop module is used to control the second cloud host to stop the network connectivity detection task for the first cloud host if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished during the hot migration test of multiple cloud hosts under test in the test group; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0021] A host transfer module is used to remove the first cloud host from the tested group, use the test cloud host corresponding to the root node in the minimum heap as a new tested cloud host, and transfer the new tested cloud host from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0022] The task allocation module is used to determine the third cloud host corresponding to the new tested cloud host from the new test group, and allocate the network connectivity detection task for the new tested cloud host to the third cloud host.

[0023] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0024] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0025] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0026] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0028] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0029] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0030] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0032] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0033] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0034] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0035] The above-mentioned task allocation method, device, computer equipment, storage medium and program product detect the hot migration status of multiple cloud hosts under test in the process of concurrently performing hot migration tests on multiple cloud hosts under test in the group under test. If it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is completed, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; further, the first cloud host is removed from the group under test, and the test cloud host corresponding to the root node in the minimum heap is used as the new cloud host under test, and the new cloud host under test is transferred from the test group to the group under test to obtain a new test group, thereby realizing the flow of cloud hosts between the test group and the group under test; further, from the new test group, the third cloud host corresponding to the new cloud host under test is determined, and the network connectivity detection task for the new cloud host under test is assigned to the third cloud host, thereby completing the task allocation accurately. This scheme provides a way to rationalize task allocation by introducing the minimum heap; furthermore, by removing the cloud host under test (i.e., the first cloud host) that has completed the hot migration test from the tested group, and selecting a suitable test cloud host from the test group and transferring it to the tested group, the cloud host can be recycled between the test group and the tested group, and finally, the hot migration performance of the cloud host can be accurately tested while improving the utilization rate of the cloud host in the hot migration test. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] FIG1 is an application environment diagram of a task allocation method provided in an embodiment of the present application;

[0038] FIG2 is a schematic diagram of a task allocation process provided in an embodiment of the present application;

[0039] FIG3 is a schematic diagram of a thermal migration test process provided in an embodiment of the present application;

[0040] FIG4 is a schematic diagram of a thermal migration test process provided in an embodiment of the present application;

[0041] FIG5 is a schematic diagram of a process flow of another thermal migration test provided in an embodiment of the present application;

[0042] FIG6 is a schematic diagram of another thermal migration test process provided in an embodiment of the present application;

[0043] FIG7 is a schematic diagram of a process for determining a third cloud host provided in an embodiment of the present application;

[0044] FIG8 is a schematic diagram of a process flow of another thermal migration test provided in an embodiment of the present application;

[0045] FIG9 is a structural block diagram of a task allocation device provided in an embodiment of the present application;

[0046] FIG. 10 is an internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] The task allocation method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. During the concurrent hot migration test of multiple cloud hosts under test in the tested group, the server 104 detects the status of each cloud host under test, and issues instructions to each cloud host to adjust the hot migration test in real time, and can also display the progress and situation of the hot migration test through the terminal 102. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0049] In an exemplary embodiment, as shown in FIG. 2 , a task allocation method is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and may include the following steps:

[0050] S201, during a concurrent hot migration test on multiple cloud hosts in a tested group, if it is detected that the hot migration test of a first cloud host among the multiple cloud hosts is finished, a second cloud host is controlled to stop a network connectivity detection task for the first cloud host.

[0051] Among them, the tested group includes multiple tested cloud hosts (cloud hosts that need to perform hot migration tests); the first cloud host can represent any cloud host in the tested group that has completed the hot migration test; the second cloud host can represent the cloud host in the test group (which can be used to perform network connectivity detection tasks on each cloud host in the tested group) that performs a network connectivity detection task on the first cloud host; the hot migration test can be used to verify whether a cloud host (i.e., a virtual machine or application) can be successfully migrated from one physical host (source host) to another physical host (target host) without shutting down; the network connectivity detection task can be used to ensure that network devices can communicate normally, such as adding a network detection task of pinging the first cloud host in the second cloud host.

[0052] It should be noted that each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test. The second cloud host is the test cloud host corresponding to the first cloud host; there is at least one test cloud host in the test group whose network connectivity detection task quantity is 0; wherein, the cloud host under test can represent the cloud host in the tested group that executes the network connectivity detection task; the test cloud host can represent the cloud host in the test group that can establish a network connectivity detection task with the cloud host in the tested group.

[0053] Among them, all cloud hosts (including the cloud hosts under test and the test cloud hosts) are identified by host numbers.

[0054] Exemplarily, as shown in FIG3 , server 104 detects the hot migration test status of each cloud host in the tested group (such as analyzing the status of resources such as CPU (Central Processing Unit), memory, disk and network through monitoring or log analysis). If it is detected that the hot migration test of the first cloud host (i.e., the cloud host with host number 0) in the tested group is completed, the second cloud host (i.e., the cloud host with host number 12) in the test group that performs the network connectivity detection task with the first cloud host (i.e., the cloud host with host number 0) can be further determined; further, a stop instruction can be sent to the second cloud host (i.e., the cloud host with host number 12) to control the second cloud host (i.e., the cloud host with host number 12) to stop the network connectivity detection task for the first cloud host (i.e., the cloud host with host number 0).

[0055] S202, remove the first cloud host from the tested group, use the test cloud host corresponding to the root node in the minimum heap as a new tested cloud host, and transfer the new tested cloud host from the test group to the tested group to obtain a new test group.

[0056] Among them, the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host, that is, each node in the minimum heap corresponds to the only test cloud host in the test group, or the test cloud hosts are sorted according to the number of network connectivity detection tasks of each test cloud host in the test group; the minimum heap is a sorted complete binary tree, in which the value of each node is less than or equal to the value of its child node, that is, the root node of the minimum heap is the minimum value in the heap, and the key value of the parent node is always less than or equal to the key value of its child node.

[0057] Exemplarily, as shown in Figure 4, after the second cloud host (i.e., the cloud host with host number 12) stops the network connectivity detection task for the first cloud host, the number of network connectivity detection tasks for which the second cloud host (i.e., the cloud host with host number 12) is responsible (the number of network connectivity detection tasks in Figure 3 is 2) is updated (i.e., 2 minus 1), and the first cloud host (i.e., the cloud host with host number 0) is removed from the tested group; further, a test cloud host (i.e., the test cloud host corresponding to the root node in the minimum heap - host number 10) can be selected from the test group as a new tested cloud host, that is, the new tested cloud host (i.e., host number 10) is removed from the test group and transferred to the tested group.

[0058] S203: Determine a third cloud host corresponding to the new cloud host under test from the new test group, and assign a network connectivity detection task for the new cloud host under test to the third cloud host.

[0059] The third cloud host may represent a cloud host that performs a network connectivity detection task with the new cloud host under test.

[0060] Exemplarily, as shown in FIG5 , the host number (such as host number 15) for performing the network connectivity detection task with the new cloud host under test can be determined based on the host number of the new cloud host under test and the number of nodes in the minimum heap. The minimum heap and the host number of the new cloud host under test can also be directly input into the cloud host allocation model, which will calculate and analyze them and ultimately determine the host number for performing the network connectivity detection task with the new cloud host under test.

[0061] The above-mentioned task allocation method detects the hot migration status of multiple cloud hosts under test during the concurrent hot migration test of multiple cloud hosts under test in the group under test. If it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is completed, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; further, the first cloud host is removed from the group under test, and the test cloud host corresponding to the root node in the minimum heap is used as the new cloud host under test, and the new cloud host under test is transferred from the test group to the group under test to obtain a new test group, thereby realizing the flow of cloud hosts between the test group and the group under test; further, from the new test group, the third cloud host corresponding to the new cloud host under test is determined, and the network connectivity detection task for the new cloud host under test is assigned to the third cloud host, thereby completing the task allocation accurately. This scheme provides a way to rationalize task allocation by introducing the minimum heap; furthermore, by removing the cloud host under test (i.e., the first cloud host) that has completed the hot migration test from the tested group, and selecting a suitable test cloud host from the test group and transferring it to the tested group, the cloud host can be recycled between the test group and the tested group, and finally, the hot migration performance of the cloud host can be accurately tested while improving the utilization rate of the cloud host in the hot migration test.

[0062] Based on the above embodiment, the embodiment of the present application explains the above embodiment S201 in detail. Specifically, the embodiment of the present application involves the process after controlling the second cloud host to stop the network connectivity detection task for the first cloud host, which specifically includes:

[0063] The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated.

[0064] Exemplarily, as shown in FIG3 , when the second cloud host (i.e., the cloud host with host number 12) has not yet stopped the network connectivity detection task for the first cloud host (i.e., the cloud host with host number 0), the number of tasks of the network connectivity detection task corresponding to the second cloud host (i.e., the cloud host with host number 12) is 2 (respectively, the network connectivity detection task between the first cloud host-host number 0, and the network connectivity detection task between the second cloud host and host number 5); further, after the second cloud host stops the network connectivity detection task for the first cloud host, the number of tasks of the network connectivity detection task corresponding to the second cloud host (i.e., the cloud host with host number 12) is updated to 1 (i.e., the network connectivity detection task between the second cloud host and host number 5); further, based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap can be updated to obtain FIG6 .

[0065] Correspondingly, taking the test cloud host corresponding to the root node in the minimum heap as the new cloud host under test includes: taking the test cloud host corresponding to the root node in the updated minimum heap as the new cloud host under test.

[0066] Exemplarily, as shown in FIG6 , the test cloud host corresponding to the root node in the updated minimum heap (the cloud host with host number 10) can be used as the new cloud host under test, that is, after removing the first cloud host from the tested group, the new cloud host under test is added to the tested group, as shown in FIG4 .

[0067] In one achievable manner, when the test cloud host corresponding to the root node in the updated minimum heap has not undergone a hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0068] Exemplarily, the test cloud host corresponding to the root node in the updated minimum heap is detected to ensure that the test cloud host has not undergone hot migration testing to avoid repeating the hot migration test on the cloud host. That is, the test cloud host needs to meet two conditions as the new cloud host under test, namely, the test cloud host is located at the root node position in the updated minimum heap, and the test cloud host has not undergone hot migration testing.

[0069] Another implementable manner is to not perform a prerequisite check on the test cloud host corresponding to the root node in the updated minimum heap, that is, to directly use the test cloud host corresponding to the root node in the updated minimum heap as the new cloud host under test.

[0070] In the embodiment of the present application, by introducing the idea of ​​maintaining a minimum heap based on the number of network connectivity detection tasks, a foundation is laid for automatically implementing task allocation of cloud hosts.

[0071] Based on the above embodiment, the present application embodiment explains the above embodiment S203 in detail. Specifically, the process of determining the third cloud host in the present application embodiment, as shown in FIG7, specifically includes the following steps:

[0072] S701, based on a hash function, determine the node location according to the upper limit of the number of hosts, the current number of hosts of the test cloud host in the new test group, and the host number of the new tested cloud host.

[0073] Among them, the hash function is a data processing technology that can map information of any length to information of a fixed length; the upper limit number of hosts can represent the maximum number of cloud hosts in the test group that perform hot migration tests on the tested cloud hosts in the tested group; the node position can represent the position of the node in the minimum heap, such as the position of each node in the minimum heap can be identified by the slot. Combined with Figure 4, slot 0 can represent the root node in the minimum heap - corresponding to the test cloud host with host number 11, slot 1 can represent the node of the test cloud host with host number 15 in the minimum heap, and slot 2 can represent the node of the test cloud host with host number 13 in the minimum heap.

[0074] For example, in conjunction with FIG4 , if the upper limit of the number of hosts is 5 (i.e., there are at most 5 test cloud hosts in the (new) test group that perform network connectivity detection with the tested cloud hosts in the (new) tested group), the current number of test cloud hosts in the new test group is 6, the host number of the new tested cloud host is 10, and the hash function can be expressed as:

[0075]

[0076] Among them, h(k) can represent the position of the test cloud host in the new test group that performs network connectivity detection with the new tested cloud host in the minimum heap, such as a slot; heapsize can represent the current number of test cloud hosts in the new test group; P can represent the upper limit number of hosts; k can represent the host number of the new tested cloud host.

[0077] Furthermore, for a new cloud host numbered 10, the calculation process of determining the position of the test cloud host in the minimum heap for network connectivity detection with the new cloud host in the test group through a hash function can be expressed as: h(10)=6-5+(10 2 mod 5)=1, that is, the test cloud host corresponding to the node at slot 1 in the minimum heap, that is, the test cloud host with host number 15.

[0078] S702: Use the test cloud host corresponding to the node at the node position in the updated minimum heap as the third cloud host corresponding to the new tested cloud host.

[0079] As shown in the above example, the test cloud host with host number 15 in the new test group is used as the third cloud host corresponding to the new tested cloud host (i.e., the tested cloud host with host number 10), and a network connectivity detection task is established between the third cloud host and the new tested cloud host, that is, the task quantity of the network connectivity detection task corresponding to the third cloud host is increased by 1, and the minimum heap is updated to obtain Figure 5.

[0080] In the embodiment of the present application, by introducing a hash function, a method is provided for determining a corresponding test cloud host for a new cloud host under test, thereby facilitating task allocation.

[0081] Based on the above embodiment, the present application embodiment explains the above embodiment S203 in detail. Specifically, the present application embodiment involves the process after allocating a network connectivity detection task for a new cloud host to be tested to the third cloud host, specifically including:

[0082] The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

[0083] Exemplarily, as shown in FIG5 , the first cloud host can be added to the end of the new test group, that is, behind the test cloud host with host number 16, and the number of network connectivity detection tasks corresponding to the first cloud host (that is, 0) is added to the end of the updated minimum heap, that is, the child node of the slot 2 node (corresponding to host number 13), and to the right of the slot 5 node (corresponding to host number 16); further, based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host can be updated, and FIG8 can be obtained.

[0084] In an embodiment of the present application, by adding the first cloud host removed from the tested group to a new test group and updating the minimum heap, the cloud host is recycled and the number of cloud hosts required for hot migration testing is reduced.

[0085] Based on the above embodiment, the embodiment of the present application explains the above embodiment S202 in detail. Specifically, the embodiment of the present application involves a process of transferring a new cloud host under test from a test group to a tested group, specifically including: removing the new cloud host under test from the test group, and adding the new cloud host under test to the position of the first cloud host in the tested group.

[0086] Exemplarily, as shown in Figures 3 and 4, after the first cloud host (the cloud host with host number 0) is removed from the tested group, the cloud host with host number 10 in the test group is directly added to the position of the original first cloud host (the cloud host with host number 0) in the tested group.

[0087] In the embodiment of the present application, by detailing the location at which the new cloud host to be tested is added in the tested group, details are provided for the specific implementation process of the task allocation method.

[0088] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0089] Based on the same inventive concept, the embodiment of the present application also provides a task allocation device for implementing the task allocation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more task allocation device embodiments provided below can refer to the limitations on the task allocation method above, and will not be repeated here.

[0090] In an exemplary embodiment, as shown in FIG9 , a task allocation device 1 is provided, comprising: a task stopping module 10, a host transfer module 20 and a task allocation module 30, wherein:

[0091] The task stop module 10 is used to control the second cloud host to stop the network connectivity detection task for the first cloud host if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is completed during the concurrent hot migration test of multiple cloud hosts under test in the test group; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each test cloud host is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks for at least one test cloud host in the test group is 0.

[0092] The host transfer module 20 is used to remove the first cloud host from the tested group, use the test cloud host corresponding to the root node in the minimum heap as the new tested cloud host, and transfer the new tested cloud host from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host.

[0093] The task allocation module 30 is used to determine the third cloud host corresponding to the new cloud host under test from the new test group, and allocate the network connectivity detection task for the new cloud host under test to the third cloud host.

[0094] In one embodiment, the task allocation device 1 specifically further includes:

[0095] The first update module is used to update the number of network connectivity detection tasks of the second cloud host, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, update the minimum heap; and use the test cloud host corresponding to the root node in the updated minimum heap as the new cloud host under test.

[0096] In one embodiment, the task allocation module 30 is further configured to:

[0097] Based on the hash function, the node position is determined according to the upper limit of the number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host under test; the test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new cloud host under test.

[0098] In one embodiment, the task allocation device 1 specifically further includes:

[0099] The second update module is used to add the first cloud host to the new test group, and add the number of network connectivity detection tasks corresponding to the first cloud host to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, update the minimum heap after adding the first cloud host.

[0100] In one embodiment, the first update module is further configured to:

[0101] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0102] In one embodiment, the host transfer module 20 is further configured to:

[0103] The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the test group.

[0104] Each module in the above task allocation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0105] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store test data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a task allocation method is implemented.

[0106] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0107] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0108] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0109] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0110] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated; the test cloud host corresponding to the root node in the updated minimum heap is used as the new cloud host under test.

[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0114] Based on the hash function, the node position is determined according to the upper limit of the number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host under test; the test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new cloud host under test.

[0115] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0116] The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0118] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0120] The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the test group.

[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0122] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0123] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0124] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0125] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0126] The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated; the test cloud host corresponding to the root node in the updated minimum heap is used as the new cloud host under test.

[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0128] Based on the hash function, the node position is determined according to the upper limit of the number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host under test; the test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new cloud host under test.

[0129] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0130] The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0132] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0134] The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the test group.

[0135] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0136] During the hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; the number of network connectivity detection tasks for at least one test cloud host in the test group is 0;

[0137] The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host;

[0138] A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is assigned to the third cloud host.

[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0140] The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated; the test cloud host corresponding to the root node in the updated minimum heap is used as the new cloud host under test.

[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0142] Based on the hash function, the node position is determined according to the upper limit of the number of hosts, the current number of test cloud hosts in the new test group, and the host number of the new cloud host under test; the test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new cloud host under test.

[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0144] The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0146] In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0148] The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the test group.

[0149] It should be noted that the information (including but not limited to device information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0151] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0152] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A task allocation method, characterized in that: The method comprises: During the concurrent hot migration test of multiple cloud hosts under test in the tested group, if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished, the second cloud host is controlled to stop the network connectivity detection task for the first cloud host; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks for at least one test cloud host in the test group is 0; The first cloud host is removed from the tested group, the test cloud host corresponding to the root node in the minimum heap is used as a new tested cloud host, and the new tested cloud host is transferred from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host; A third cloud host corresponding to the new cloud host under test is determined from the new test group, and a network connectivity detection task for the new cloud host under test is allocated to the third cloud host.

2. The method according to claim 1, characterized in that: After controlling the second cloud host to stop the network connectivity detection task for the first cloud host, the method further includes: The number of network connectivity detection tasks of the second cloud host is updated, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap is updated; Accordingly, the step of taking the test cloud host corresponding to the root node in the minimum heap as a new cloud host under test includes: The test cloud host corresponding to the root node in the updated minimum heap is used as the new cloud host under test.

3. The method according to claim 2, characterized in that The step of determining, from the new test group, a third cloud host corresponding to the new cloud host under test includes: Based on a hash function, determining the node location according to the upper limit of the number of hosts, the current number of hosts of the test cloud host in the new test group, and the host number of the new tested cloud host; The test cloud host corresponding to the node at the node position in the updated minimum heap is used as the third cloud host corresponding to the new tested cloud host.

4. The method according to claim 2, characterized in that: After allocating a network connectivity detection task for the new cloud host to be tested to the third cloud host, the method further includes: The first cloud host is added to the new test group, and the number of network connectivity detection tasks corresponding to the first cloud host is added to the end of the updated minimum heap, and based on the principle that the number of network connectivity detection tasks corresponding to the parent node is less than the number of network connectivity detection tasks corresponding to the child node, the minimum heap after adding the first cloud host is updated.

5. The method according to claim 4, characterized in that The step of taking the test cloud host corresponding to the root node in the updated minimum heap as a new cloud host under test includes: In the case that the test cloud host corresponding to the root node in the updated minimum heap has not undergone the hot migration test, the test cloud host corresponding to the root node in the updated minimum heap is used as a new cloud host under test.

6. The method according to claim 1, characterized in that The transferring the new cloud host under test from the test group to the tested group includes: The new cloud host under test is removed from the test group, and the new cloud host under test is added to the position of the first cloud host in the tested group.

7. A task allocation device, characterized in that: The device comprises: A task stop module is used to control a second cloud host to stop the network connectivity detection task for the first cloud host if it is detected that the hot migration test of the first cloud host among the multiple cloud hosts under test is finished during the hot migration test of multiple cloud hosts under test in the test group; wherein each cloud host under test corresponds to a test cloud host in the test group, and the test cloud host corresponding to each cloud host under test is used to perform network connectivity detection on the cloud host under test, and the second cloud host is the test cloud host corresponding to the first cloud host; and the number of network connectivity detection tasks for at least one test cloud host in the test group is 0; A host transfer module, used to remove the first cloud host from the tested group, use the test cloud host corresponding to the root node in the minimum heap as a new tested cloud host, and transfer the new tested cloud host from the test group to the tested group to obtain a new test group; wherein the minimum heap is constructed according to the number of network connectivity detection tasks of each test cloud host; The task allocation module is used to determine the third cloud host corresponding to the new tested cloud host from the new test group, and allocate the network connectivity detection task for the new tested cloud host to the third cloud host.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Network connectivity detection method, monitoring server and monitoring agent device

    CN112751689A

  • Connectivity detection method and device, electronic equipment and storage medium

    CN114520778A

  • Cloud platform database connectivity detection method and device, equipment and medium

    CN117640451A

  • Apparatus, system, and method for discovering path maximum transmission units

    US10992591B1